Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

W32DLib::DataX Class Reference

The DataX class. More...

#include <w32dlib/datax.h>

List of all members.

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 char *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 std::string &value)
 Sets the value of an eString instance.
void Set (const char *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.
std::string 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

enum W32DLib::DataX::EType
 

Describes the types allowed using DataX.

Enumeration values:
eInt  int
eString  std::string
eBool  bool


Constructor & Destructor Documentation

W32DLib::DataX::DataX int  value  ) 
 

Constructs an eInt object.

Parameters:
value The initial value.

W32DLib::DataX::DataX const char *  value  ) 
 

Constructs an eString object.

Parameters:
value The initial value.

W32DLib::DataX::DataX bool  value  ) 
 

Constructs an eBool object.

Parameters:
value The 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 bool  value  ) 
 

Sets the value of an eBool instance.

Parameters:
value The value to set.

void W32DLib::DataX::Set const char *  value  ) 
 

Sets the value of an eString instance.

Parameters:
value The value to set.

void W32DLib::DataX::Set const std::string &  value  ) 
 

Sets the value of an eString instance.

Parameters:
value The value to set.

void W32DLib::DataX::Set int  value  ) 
 

Sets the value of an eInt instance.

Parameters:
value The value to set.

std::string 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:
Generated on Fri May 6 01:22:33 2005 for W32DLib by  doxygen 1.4.1