|
W32DLib
|
#include <w32dlib/datax.h>
Public Types | |
| enum | EType { eInt, eString, eBool } |
| Describes the types allowed using DataX. More... | |
Public Member Functions | |
| DataX (int value) | |
| Constructs an eInt object. | |
| DataX (const TCHAR *value) | |
| Constructs an eString object. | |
| DataX (bool value) | |
| Constructs an eBool object. | |
| virtual | ~DataX () |
| Destructor. | |
| EType | Type () |
| Get the type. | |
| void | Set (int value) |
| Sets the value of an eInt instance. | |
| void | Set (const W32String &value) |
| Sets the value of an eString instance. | |
| void | Set (const TCHAR *value) |
| Sets the value of an eString instance. | |
| void | Set (bool value) |
| Sets the value of an eBool instance. | |
| int | Int () |
| Gets the value of an eInt instance. | |
| W32String | Str () |
| Gets the value of an eString instance. | |
| bool | Bool () |
| Gets the value of an eBool instance. | |
The DataX class.
This class is used to manage data exchanges between variables and controls.
Illegal operations, such as trying to set or get a string from an int DataX instance will silently fail or return default empty/false values.
Describes the types allowed using DataX.
| Enumerator | |
|---|---|
| eInt |
int |
| eString |
W32String. |
| eBool |
bool |
| W32DLib::DataX::DataX | ( | int | value | ) |
Constructs an eInt object.
| value | The initial value. |
| W32DLib::DataX::DataX | ( | const TCHAR * | value | ) |
Constructs an eString object.
| value | The initial value. |
| W32DLib::DataX::DataX | ( | bool | value | ) |
Constructs an eBool object.
| value | The initial value. |
|
virtual |
Destructor.
| bool W32DLib::DataX::Bool | ( | ) |
Gets the value of an eBool instance.
| int W32DLib::DataX::Int | ( | ) |
Gets the value of an eInt instance.
| void W32DLib::DataX::Set | ( | int | value | ) |
Sets the value of an eInt instance.
| value | The value to set. |
| void W32DLib::DataX::Set | ( | const W32String & | value | ) |
Sets the value of an eString instance.
| value | The value to set. |
| void W32DLib::DataX::Set | ( | const TCHAR * | value | ) |
Sets the value of an eString instance.
| value | The value to set. |
| void W32DLib::DataX::Set | ( | bool | value | ) |
Sets the value of an eBool instance.
| value | The value to set. |