![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cStructElem.h>
Public Member Functions | |
void * | GetValPtr (const void *pBaseInst) const noexcept |
size_t | get_TypeLength () const |
size_t | GetDataLength (const void *pBaseInst) const |
COMPARE_t | CompareVal (const void *pBase1, const void *pBase2) const |
COMPARE_t | CompareVar (void *pBaseInst, const cVariant &vVal) const |
int | GetValInt (const void *pBaseInst) const |
cString | GetValStr (const void *pBaseInst) const |
bool | GetValVar (const void *pBaseInst, cVariant &vVal) const |
bool | SetValInt (void *pBaseInst, int iVal) const |
bool | SetValStr (void *pBaseInst, cString sVal) const |
bool | SetValVar (void *pBaseInst, const cVariant &vVal) const |
HRESULT | SetValCheck (void *pBaseInst, const cVariant &vVal) const |
HRESULT | SerializeInput (cStreamInput &file, void *pBaseInst) const |
HRESULT | SerializeOutput (cStreamOutput &file, const void *pBaseInst) const |
HRESULT | Serialize (cStream &file, bool bModeWrite, void *pBaseInst) const |
HRESULT | Serialize (cArchive &a, void *pBaseInst) const |
HRESULT | ScriptWrite (IScriptableSetter *pScript, const void *pBaseInst, const ATOMCHAR_t *pszPropName) const |
HRESULT | ScriptRead (IScriptableGetter *pScript, void *pBaseInst, const ATOMCHAR_t *pszPropName) const |
UNITTEST_FRIEND (cStructElem) | |
Public Attributes | |
VARTYPE_TYPE | m_eVarType |
effective type of the data in the mapped structure. More... | |
size_t | m_offset |
The offset into the struct/class instance for this item. More... | |
UINT | m_extra |
m_extra for VARTYPE_StringConst = max size. More... | |
Describe an element of a structure/class. a field. define/map a single element/field of a structure. For convert to/from cVariant
COMPARE_t GrayLib::cStructElem::CompareVal | ( | const void * | pBase1, |
const void * | pBase2 | ||
) | const |
Compare an element from 2 examples of this structure.
size_t GrayLib::cStructElem::get_TypeLength | ( | ) | const |
Get the base size of the type irrelevant of the instance data. I.E. Variable size stuff is not going to show up.
size_t GrayLib::cStructElem::GetDataLength | ( | const void * | pBaseInst | ) | const |
I.E. Variable size stuff IS going to show up.
int GrayLib::cStructElem::GetValInt | ( | const void * | pBaseInst | ) | const |
|
inlinenoexcept |
get a raw cVariantData pointer to the element.
cString GrayLib::cStructElem::GetValStr | ( | const void * | pBaseInst | ) | const |
bool GrayLib::cStructElem::GetValVar | ( | const void * | pBaseInst, |
cVariant & | vVal | ||
) | const |
Get the element value as a cVariant.
HRESULT GrayLib::cStructElem::ScriptRead | ( | IScriptableGetter * | pScript, |
void * | pBaseInst, | ||
const ATOMCHAR_t * | pszPropName | ||
) | const |
Find this key in IScriptableGetter and set it to the cStructElem
HRESULT GrayLib::cStructElem::ScriptWrite | ( | IScriptableSetter * | pScript, |
const void * | pBaseInst, | ||
const ATOMCHAR_t * | pszPropName | ||
) | const |
get the value from cStructElem and write out to IScriptableSetter
|
inline |
Move the element. Read or Write.
HRESULT GrayLib::cStructElem::SerializeInput | ( | cStreamInput & | file, |
void * | pBaseInst | ||
) | const |
HRESULT GrayLib::cStructElem::SerializeOutput | ( | cStreamOutput & | file, |
const void * | pBaseInst | ||
) | const |
Set the value if not already set. check for value not changing.
bool GrayLib::cStructElem::SetValInt | ( | void * | pBaseInst, |
int | iVal | ||
) | const |
bool GrayLib::cStructElem::SetValStr | ( | void * | pBaseInst, |
cString | sVal | ||
) | const |
bool GrayLib::cStructElem::SetValVar | ( | void * | pBaseInst, |
const cVariant & | vVal | ||
) | const |
Set this element value (at pBaseInst) from a cVariant.
GrayLib::cStructElem::UNITTEST_FRIEND | ( | cStructElem | ) |
VARTYPE_TYPE GrayLib::cStructElem::m_eVarType |
effective type of the data in the mapped structure.
UINT GrayLib::cStructElem::m_extra |
m_extra for VARTYPE_StringConst = max size.
size_t GrayLib::cStructElem::m_offset |
The offset into the struct/class instance for this item.