CrystalSpace

Public API Reference

csVariant Struct Reference
[Utilities]

Variant, means that type of contained data is set at runtime. More...

#include <iutil/pluginconfig.h>

List of all members.

Public Member Functions

 csVariant (const csVariant &var)
 Copy constructor - only IncRef's the String, should our type be a string.
 csVariant ()
bool GetBool () const
 Retrieve a bool.
float GetFloat () const
 Retrieve a float.
long GetLong () const
 Retrieve a long.
const char * GetString () const
 Retrieve a string.
csVariantType GetType () const
const csVariantoperator= (const csVariant &var)
 Assignment operator. As with the copy-ctor, only IncRef's the string.
void SetBool (bool b)
 Assign a bool.
void SetCommand ()
 Assign a command.
void SetFloat (float f)
 Assign a float.
void SetLong (long l)
 Assign a long.
void SetString (const char *s)
 Assign a string.
 ~csVariant ()


Detailed Description

Variant, means that type of contained data is set at runtime.

Be aware that requesting another type than the containing one will trigger an assertion!

Definition at line 50 of file pluginconfig.h.


Constructor & Destructor Documentation

csVariant::csVariant ( const csVariant var  )  [inline]

Copy constructor - only IncRef's the String, should our type be a string.

Definition at line 70 of file pluginconfig.h.

References CSVAR_STRING, type, and v.


Member Function Documentation

bool csVariant::GetBool (  )  const [inline]

Retrieve a bool.

Definition at line 134 of file pluginconfig.h.

References CS_ASSERT, and CSVAR_BOOL.

float csVariant::GetFloat (  )  const [inline]

Retrieve a float.

Definition at line 140 of file pluginconfig.h.

References CS_ASSERT, and CSVAR_FLOAT.

long csVariant::GetLong (  )  const [inline]

Retrieve a long.

Definition at line 128 of file pluginconfig.h.

References CS_ASSERT, and CSVAR_LONG.

const char* csVariant::GetString (  )  const [inline]

Retrieve a string.

Definition at line 146 of file pluginconfig.h.

References CS_ASSERT, and CSVAR_STRING.

const csVariant& csVariant::operator= ( const csVariant var  )  [inline]

Assignment operator. As with the copy-ctor, only IncRef's the string.

Definition at line 80 of file pluginconfig.h.

References CSVAR_STRING, type, and v.

void csVariant::SetBool ( bool  b  )  [inline]

Assign a bool.

Definition at line 97 of file pluginconfig.h.

References CSVAR_BOOL.

void csVariant::SetCommand (  )  [inline]

Assign a command.

Definition at line 121 of file pluginconfig.h.

References CSVAR_CMD.

void csVariant::SetFloat ( float  f  )  [inline]

Assign a float.

Definition at line 104 of file pluginconfig.h.

References CSVAR_FLOAT.

void csVariant::SetLong ( long  l  )  [inline]

Assign a long.

Definition at line 90 of file pluginconfig.h.

References CSVAR_LONG.

void csVariant::SetString ( const char *  s  )  [inline]

Assign a string.

Definition at line 111 of file pluginconfig.h.

References CSVAR_STRING.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7