fysxasteroids/engine/Variables.h

38 lines
793 B
C
Raw Normal View History

2010-04-05 23:38:59 +02:00
#ifndef _VARIABLES_H
#define _VARIABLES_H
#include "Engine.h"
#include <assert.h>
#include <string>
#include <map>
namespace Engine {
class Module;
class Variable;
/** \brief Manages all variables that can be changed by the Model itself
*
* \todo make the variable names case insensitive
* \todo only allow certain characters in variable names
*/
class Variables : public Module{
public:
void RegisterVariable (const std::string &name, Variable *var);
Variable *GetVariable (const std::string &name);
protected:
/** \brief Initializes the system */
int OnInit (int argc, char* argv[]);
/** \brief Destroys the system (must be called!) */
void OnDestroy ();
void OnRegisterCommands ();
std::map<std::string, Variable*> mVariablesData;
};
}
#endif // _VARIABLES_H