csVariant Struct Reference
[Utilities]
Variant, ie a value whose type is set at runtime.
More...
#include <csutil/variant.h>
List of all members.
Detailed Description
Variant, ie a value whose type is set at runtime.
- Warning:
- Requesting another type than the contained one will trigger an assertion
Definition at line 80 of file variant.h.
Constructor & Destructor Documentation
| csVariant::csVariant |
( |
|
) |
[inline] |
Blank constructor; Set the variant to CSVAR_LONG and 0; Usually not used.
Where it is needed, the type and value should generally be overwritten anyway.
Definition at line 113 of file variant.h.
| csVariant::csVariant |
( |
int |
i |
) |
[inline] |
Constructor initialized with a value of type CSVAR_LONG.
Definition at line 115 of file variant.h.
| csVariant::csVariant |
( |
long |
l |
) |
[inline] |
Constructor initialized with a value of type CSVAR_LONG.
Definition at line 117 of file variant.h.
| csVariant::csVariant |
( |
bool |
b |
) |
[inline] |
Constructor initialized with a value of type CSVAR_BOOL.
Definition at line 119 of file variant.h.
| csVariant::csVariant |
( |
float |
f |
) |
[inline] |
Constructor initialized with a value of type CSVAR_FLOAT.
Definition at line 121 of file variant.h.
| csVariant::csVariant |
( |
const char * |
s |
) |
[inline] |
Constructor initialized with a value of type CSVAR_STRING (from a char*).
Definition at line 123 of file variant.h.
| csVariant::csVariant |
( |
scfString & |
s |
) |
[inline] |
Constructor initialized with a value of type CSVAR_STRING (from an scfString).
Definition at line 125 of file variant.h.
| csVariant::csVariant |
( |
const csColor & |
c |
) |
[inline] |
Constructor initialized with a value of type CSVAR_COLOR.
Definition at line 127 of file variant.h.
| csVariant::csVariant |
( |
const csColor4 & |
c |
) |
[inline] |
Constructor initialized with a value of type CSVAR_COLOR4.
Definition at line 129 of file variant.h.
| csVariant::csVariant |
( |
const csVector2 & |
v |
) |
[inline] |
Constructor initialized with a value of type CSVAR_VECTOR2.
Definition at line 131 of file variant.h.
| csVariant::csVariant |
( |
const csVector3 & |
v |
) |
[inline] |
Constructor initialized with a value of type CSVAR_VECTOR3.
Definition at line 133 of file variant.h.
| csVariant::csVariant |
( |
const csVector4 & |
v |
) |
[inline] |
Constructor initialized with a value of type CSVAR_VECTOR4.
Definition at line 135 of file variant.h.
| csVariant::csVariant |
( |
const csMatrix3 & |
m |
) |
[inline] |
Constructor initialized with a value of type CSVAR_MATRIX3.
Definition at line 137 of file variant.h.
| csVariant::csVariant |
( |
const csTransform & |
t |
) |
[inline] |
Constructor initialized with a value of type CSVAR_TRANSFORM.
Definition at line 139 of file variant.h.
| csVariant::csVariant |
( |
iBase * |
ib |
) |
[inline] |
| csVariant::csVariant |
( |
const csVariant & |
var |
) |
[inline] |
Member Function Documentation
| csString csVariant::Description |
( |
|
) |
const [inline] |
Return a textual description of this variant.
Definition at line 357 of file variant.h.
| bool csVariant::GetBool |
( |
|
) |
const [inline] |
| csColor csVariant::GetColor |
( |
|
) |
const [inline] |
| csColor4 csVariant::GetColor4 |
( |
|
) |
const [inline] |
| float csVariant::GetFloat |
( |
|
) |
const [inline] |
| iBase* csVariant::GetIBase |
( |
|
) |
const [inline] |
| long csVariant::GetLong |
( |
|
) |
const [inline] |
| csMatrix3 csVariant::GetMatrix3 |
( |
|
) |
const [inline] |
| const char* csVariant::GetString |
( |
|
) |
const [inline] |
Retrieve a string.
Definition at line 299 of file variant.h.
Get the type of the contained value. The default value is CSVAR_CMD.
Definition at line 354 of file variant.h.
| csVector2 csVariant::GetVector2 |
( |
|
) |
const [inline] |
| csVector3 csVariant::GetVector3 |
( |
|
) |
const [inline] |
| csVector4 csVariant::GetVector4 |
( |
|
) |
const [inline] |
Assignment operator.
Definition at line 160 of file variant.h.
| void csVariant::SetBool |
( |
bool |
b |
) |
[inline] |
| void csVariant::SetColor |
( |
const csColor & |
c |
) |
[inline] |
| void csVariant::SetColor4 |
( |
const csColor4 & |
c |
) |
[inline] |
| void csVariant::SetCommand |
( |
|
) |
[inline] |
Assign a command. A command has no value, it is just a flag which can be set or not.
Definition at line 189 of file variant.h.
| void csVariant::SetFloat |
( |
float |
f |
) |
[inline] |
| void csVariant::SetIBase |
( |
const csRef< iBase > & |
ib |
) |
[inline] |
| void csVariant::SetLong |
( |
long |
l |
) |
[inline] |
| void csVariant::SetMatrix3 |
( |
const csMatrix3 & |
m |
) |
[inline] |
| void csVariant::SetString |
( |
const char * |
s |
) |
[inline] |
| void csVariant::SetTransform |
( |
const csTransform & |
t |
) |
[inline] |
| void csVariant::SetVector2 |
( |
const csVector2 & |
v |
) |
[inline] |
| void csVariant::SetVector3 |
( |
const csVector3 & |
v |
) |
[inline] |
| void csVariant::SetVector4 |
( |
const csVector4 & |
v |
) |
[inline] |
The documentation for this struct was generated from the following file: