Variable Class Reference
#include <Variable.h>
Description
Abstraction for a variable in Dynacoe.
The variable that it represents MUST have at least as long of a lifetime as this variable's, as Variable has no inkling as to whether the variable it represents has been free'd/ deleted.
Public Types | |
enum | Type { Boolean, Int, Float, Vector, String, Address, Unknown } |
Functions | |
std::string | GetName () |
Type | GetType () |
std::string | ToString () |
void | Set (const std::string &) |
Construction | |
Variable () | |
Variable (const std::string &name, bool &v) | |
Variable (const std::string &name, int &v) | |
Variable (const std::string &name, float &v) | |
Variable (const std::string &name, std::string &v) | |
Variable (const std::string &name, void *v) | |
Variable (const std::string &name, Vector &v) | |
Member Enumeration Documentation
|
strong |
Member Function Documentation
std::string GetName | ( | ) |
reutrns the name of the variable.
Type GetType | ( | ) |
Returns the type of the variable.
std::string ToString | ( | ) |
Returns a text reduction of the variable.
void Set | ( | const std::string & | ) |
Attempts to set the value of the Variable to the value denoted by the string. The function will guess the type and value represented. If a value and type cannot be gleaned from the string or if the type cannot be converted to this variables type, no action is taken.
The documentation for this class was generated from the following file:
- /home/jc/git/Dynacoe/DynacoeSrc/includes/Dynacoe/Variable.h