fysxasteroids/engine/CommandsGlobal.h

25 lines
782 B
C
Raw Permalink Normal View History

2010-04-05 23:38:59 +02:00
#ifndef _COMMANDSGLOBAL_H
#define _COMMANDSGLOBAL_H
namespace Engine {
typedef bool (*command_cb) (std::vector<std::string>);
/** \brief Adds the function callback as command for the given name*/
void AddCommand (const std::string &name, command_cb callback);
/** \brief Executes the given command immediately */
bool RunCommand (const std::string &command);
/** \brief Adds the given command to the command queue */
void QueueCommand (const std::string &command);
/** \brief Executes the command queue */
bool CommandQueueExecute ();
/** \brief When a command fails it sets the error with this function */
void CommandSetErrorString (const std::string &error_str);
/** \brief Returns the error string */
std::string CommandGetErrorString ();
}
#endif /* _COMMANDSGLOBAL_H */