mirror of
https://github.com/fedddddd/iw5-gsc-utils.git
synced 2025-04-21 21:25:43 +00:00
28 lines
553 B
C++
28 lines
553 B
C++
#pragma once
|
|
|
|
namespace command
|
|
{
|
|
class params
|
|
{
|
|
public:
|
|
params();
|
|
|
|
int size() const;
|
|
const char* get(int index) const;
|
|
std::string join(int index) const;
|
|
|
|
const char* operator[](const int index) const
|
|
{
|
|
return this->get(index);
|
|
}
|
|
|
|
private:
|
|
int nesting_;
|
|
};
|
|
|
|
void add_raw(const char* name, void (*callback)());
|
|
void add(const char* name, const std::function<void(const params&)>& callback);
|
|
|
|
void add_script_command(const std::string& name, const std::function<void(const params&)>& callback);
|
|
void clear_script_commands();
|
|
} |