W32DLib
W32DLib::DataX Class Reference

The DataX class. More...

#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.
 

Detailed Description

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.

Member Enumeration Documentation

Describes the types allowed using DataX.

Enumerator
eInt 

int

eString 

W32String.

eBool 

bool

Constructor & Destructor Documentation

W32DLib::DataX::DataX ( int  value)

Constructs an eInt object.

Parameters
valueThe initial value.
W32DLib::DataX::DataX ( const TCHAR *  value)

Constructs an eString object.

Parameters
valueThe initial value.
W32DLib::DataX::DataX ( bool  value)

Constructs an eBool object.

Parameters
valueThe initial value.
virtual W32DLib::DataX::~DataX ( )
virtual

Destructor.

Member Function Documentation

bool W32DLib::DataX::Bool ( )

Gets the value of an eBool instance.

Returns
The value.
int W32DLib::DataX::Int ( )

Gets the value of an eInt instance.

Returns
The value.
void W32DLib::DataX::Set ( int  value)

Sets the value of an eInt instance.

Parameters
valueThe value to set.
void W32DLib::DataX::Set ( const W32String value)

Sets the value of an eString instance.

Parameters
valueThe value to set.
void W32DLib::DataX::Set ( const TCHAR *  value)

Sets the value of an eString instance.

Parameters
valueThe value to set.
void W32DLib::DataX::Set ( bool  value)

Sets the value of an eBool instance.

Parameters
valueThe value to set.
W32String W32DLib::DataX::Str ( )

Gets the value of an eString instance.

Returns
The value.
EType W32DLib::DataX::Type ( )

Get the type.

Returns
The data type.
See Also
EType

The documentation for this class was generated from the following file: