MPMA Framework 0.4
|
A variable that can have eithar an integral, real, or string type. It can convert itself between the different types. More...
#include <Vary.h>
Public Types | |
enum | Type { INTEGER, REAL, STRING } |
Type of variable. More... | |
Public Member Functions | |
Vary () | |
ctor | |
Vary (const Vary &o) | |
ctor | |
Vary (const sint64 &ival) | |
ctor | |
Vary (const uint64 &ival) | |
ctor | |
Vary (const sint32 &ival) | |
ctor | |
Vary (const uint32 &ival) | |
ctor | |
Vary (const sint16 &ival) | |
ctor | |
Vary (const uint16 &ival) | |
ctor | |
Vary (const sint8 &ival) | |
ctor | |
Vary (const uint8 &ival) | |
ctor | |
Vary (const float &rval) | |
ctor | |
Vary (const std::string &sval) | |
ctor | |
Vary (const char *sval) | |
ctor | |
Vary (const std::vector< char > &sval) | |
ctor | |
Vary (const size_t &ival) | |
ctor | |
const Type | GetType () const |
Retrieves the current type. | |
void | Clear () |
Resets the value of the variable, but not the type. | |
const Vary & | operator= (const Vary &vval) |
op= | |
const Vary & | operator= (const sint64 &ival) |
op= | |
const Vary & | operator= (const uint64 &ival) |
op= | |
const Vary & | operator= (const float &rval) |
op= | |
const Vary & | operator= (const std::string &sval) |
op= | |
const Vary & | operator= (const char *sval) |
op= | |
const Vary & | operator= (const std::vector< char > &sval) |
op= | |
operator const sint64 () const | |
conversion | |
operator const std::string & () const | |
conversion | |
operator const float () const | |
conversion | |
const sint64 | AsInt () const |
conversion | |
const std::string & | AsString () const |
conversion | |
std::string | AsHexString () const |
conversion | |
const float | AsFloat () const |
conversion | |
const char * | c_str () const |
Gets a c string that represents this variable. | |
void | MakeInt () |
Changes the current type. | |
void | MakeReal () |
Changes the current type. | |
void | MakeString () |
Changes the current type. | |
const Vary & | operator+= (const Vary &var) |
Addition (for numeric) and concatenation (for string) | |
const Vary | operator+ (const Vary &var) const |
Addition (for numeric) and concatenation (for string) | |
Vary & | operator++ () |
Increment (valid only on INTEGER and REAL types) | |
Vary & | operator-- () |
Decrement (valid on all types, on strings it removes the last character (if any)) | |
Vary (Vary &&o) | |
const Vary & | operator= (Vary &&o) |
Static Public Member Functions | |
static Vary | FromHexString (const std::string &s) |
Creates a Vary as an integer from a hex string. |
A variable that can have eithar an integral, real, or string type. It can convert itself between the different types.
enum MPMA::Vary::Type |
MPMA::Vary::Vary | ( | Vary && | o | ) | [inline] |
o | move constructor |