#include <Object.h>
Public Member Functions | |
uint32 * | GetData () |
size_t | EncodeSQL (void *oData) |
char * | EncodeSQL () |
bool | DecodeSQL (const char *iSqlStr) |
void | SetLength (uint n) |
Set vector length. | |
uint | Length () |
Get vector length in elements. | |
uint32 | GetU32 (uint iIndex) const |
Get a uint32 value from the vector. | |
uint64 | GetU64 (uint iIndex) const |
Get a uint64 value from the vector. | |
float | GetF32 (uint iIndex) const |
Get a float32 value from the vector. | |
void | SetU32 (uint iIndex, uint32 iValue) |
Set a uint32 value in the vector and update the changemask. | |
void | SetU64 (uint iIndex, uint64 iValue) |
Set a uint64 value in the vector and update the changemask. | |
void | SetF32 (uint iIndex, float iValue) |
Set a float value in the vector and update the changemask. | |
void | SetBits (uint iIndex, uint32 iMask, uint32 iValue) |
void | Clear (uint iIndex, uint iCount) |
Clear a range of fields with zeros. |
bool ObjectFields::DecodeSQL | ( | const char * | iSqlStr | ) | [inline] |
Decode the whole fields array from a text string that has been read from the SQL database.
char* ObjectFields::EncodeSQL | ( | ) | [inline] |
A simpler (but not always effective) version of EncodeSQL() that allocates and returns the encoded string directly
size_t ObjectFields::EncodeSQL | ( | void * | oData | ) | [inline] |
Encode the whole fields array into a minimal-overhead text string that can be stored into the SQL database.
uint32* ObjectFields::GetData | ( | ) | [inline] |
Get the Data variable,
void ObjectFields::SetBits | ( | uint | iIndex, | |
uint32 | iMask, | |||
uint32 | iValue | |||
) | [inline] |
Set/reset bitflags. This method can be used to set or clear an arbitrary number of bitflags at once. The mask defines which bits are touched, and the value defines to which state these bits will be set. For example, SetBits (0xffffffff, 0) will reset all bits to 0, while SetBits (0xff, 0x0f) will set the lower 4 bits of the flags to 1, next 4 bits to 0 and the rest will remain untouched.