![]() |
C++ API
|
This class encapsulates a value of one of following data types: bool, int, float and String. More...
#include <plux.h>
Public Types | |
| enum | Type { TypeNone , TypeBool , TypeInt , TypeFloat , TypeString } |
| Data type enumeration. More... | |
Public Member Functions | |
| Variant (void) | |
| Constructs an empty Variant. | |
| Variant (bool _b) | |
| Constructs a Variant with a bool value. | |
| Variant (int _i) | |
| Constructs a Variant with an int value. | |
| Variant (float _f) | |
| Constructs a Variant with a float value. | |
| Variant (const char *_s) | |
| Constructs a Variant with a String value from a const char*. | |
| Variant (const String &_s) | |
| Constructs a Variant with a String value. | |
| Variant (const Variant &v) | |
| Constructs a Variant as a copy of another Variant. | |
Public Attributes | ||
| const Type | type | |
| Data type. | ||
| union { | ||
| bool b | ||
| int i | ||
| float f | ||
| String * s | ||
| }; | ||
| Data value. | ||
This class encapsulates a value of one of following data types: bool, int, float and String.
| enum Plux::Variant::Type |
Data type enumeration.
| Enumerator | |
|---|---|
| TypeNone | No data. |
| TypeBool | bool data type |
| TypeInt | int data type |
| TypeFloat | float data type |
| TypeString | String data type |