CCustomData is a handly class for storing any kind of data.
- Each data is defined by its identifier. This identifier can be constructed using the MAKE_CUSTOM_ID macro.
Using your own identifiers, you can associate your own data to any classes that give access to a CCustomData object (which is the case of many classes in the SDK)
These data follow the classes and you can retrieve them after different operations that might occur on the classes data.
- A data store in CCustomData has a type. If you use CCustomData::SetString with an id and use that's id to retrieve an int using CCustomData::GetInt, you'll get nothing.
This is why, when some data are store in CCustomData, you'll find the type of the data.
For example, FBX_IO_OPTION_PASSWORD defines in io3dmgr.h specifies that the data is a CXString. You must use CCustomData::SetString to define the fbx password through the CSceneImportOptions / CSceneExportOptions.
- The CCustomData data can be read/save through the CCustomData::Serialize process
CCustomData::LoadFromPrefs / CCustomData::SaveToPrefs allow to load/store the data on disk
|
unsigned int | CopyID (const CCustomData *, unsigned int firstid,...) |
|
void | Copy (const CCustomData *, unsigned int copyFlags) |
|
CCustomData * | Copy () const |
|
CCustomData & | operator= (const CCustomData &refdata) |
|
bool | IsEqual (const CCustomData &data) const |
|
void | SetBinary (unsigned int id, const void *ptr, unsigned int size) |
|
void | SetCustomData (unsigned int id, const CCustomData &data) |
|
void | SetCustomClass (unsigned int id, const CCustomDataClass &value) |
|
void | SetFloat (unsigned int id, float value) |
|
void | SetDouble (unsigned int id, double value) |
|
void | SetChar (unsigned int id, char value) |
|
void | SetUChar (unsigned int id, unsigned char value) |
|
void | SetBool (unsigned int id, BOOL value) |
|
void | SetPtr (unsigned int id, const void *ptr) |
|
void | SetInt (unsigned int id, int value) |
|
void | SetUInt (unsigned int id, unsigned int value) |
|
void | SetLong (unsigned int id, long value) |
|
void | SetULong (unsigned int id, unsigned long value) |
|
void | SetSizet (unsigned int id, SIZET value) |
|
void | SetLongInt (unsigned int id, longint value) |
|
void | SetULongInt (unsigned int id, longuint value) |
|
bool | SetArray (unsigned int id, const void *ptr, unsigned int elementCount, unsigned int sizeOfElement) |
|
void | SetString (unsigned int id, const CXString &string) |
|
void | SetStringA (unsigned int id, const CXStringA &string) |
|
void | SetStringW (unsigned int id, const CXStringW &string) |
|
void | SetStringList (unsigned int id, const CStringList &strings) |
|
void | SetStringArray (unsigned int id, const CXStringArray &strings) |
|
void | SetUTCTime (unsigned int id, const CXTime &time) |
|
void | SetXTime (unsigned int id, const CXTime &time) |
|
void | AddToCustomData (unsigned int id, const CCustomData &newdata, BOOL copyNewIDOnly) |
|
bool | HasData () const |
|
bool | HasData (unsigned int id) const |
|
unsigned int | GetDataKindOf (unsigned int id) const |
|
bool | ChangeID (unsigned int srcid, unsigned int newid) |
|
void | FreeExtra () |
|
void * | Detach (unsigned int &size) |
|
void | Attach (void *data, unsigned int size) |
|
const void * | GetData (unsigned int &totalsize) const |
|
void | SetData (const void *data, unsigned int totalsize) |
|
unsigned int | GetDataSize (unsigned int id) const |
|
const void * | GetCustomPtr (unsigned int id, unsigned int &size) const |
|
unsigned int | GetChecksum (unsigned int id) const |
|
bool | GetBinary (unsigned int id, void *ptr, unsigned int size) const |
|
bool | GetCustomData (unsigned int id, CCustomData &data) const |
|
bool | GetCustomClass (unsigned int id, CCustomDataClass &data) const |
|
bool | GetFloat (unsigned int id, float &value, float defaultvalue) const |
|
bool | GetDouble (unsigned int id, double &value, double defaultvalue) const |
|
bool | GetBool (unsigned int id, bool &value, bool defaultvalue) const |
|
bool | GetBool (unsigned int id, BOOL &value, BOOL defaultvalue) const |
|
bool | GetChar (unsigned int id, char &value, char defaultvalue) const |
|
bool | GetUChar (unsigned int id, unsigned char &value, unsigned char defaultvalue) const |
|
bool | GetPtr (unsigned int id, void *&value) const |
|
void * | GetPtr (unsigned int id) const |
|
bool | GetInt (unsigned int id, int &value, int defaultvalue) const |
|
bool | GetUInt (unsigned int id, unsigned int &value, unsigned int defaultvalue) const |
|
bool | GetLong (unsigned int id, long &value, long defaultvalue) const |
|
bool | GetLongInt (unsigned int id, longint &value, longint defaultvalue) const |
|
bool | GetSizet (unsigned int id, SIZET &value, SIZET defaultvalue) const |
|
bool | GetULong (unsigned int id, unsigned long &value, unsigned long defaultvalue) const |
|
bool | GetULongInt (unsigned int id, longuint &value, longuint defaultvalue) const |
|
const void * | GetArray (unsigned int id, unsigned int &elementCount, unsigned int sizeOfElement, CXSingleLock *safeThreadGuard) const |
|
bool | GetString (unsigned int id, CXString &string, const CXString &=CXString()) const |
|
bool | GetStringA (unsigned int id, CXStringA &string, const CXStringA &=CXStringA()) const |
|
bool | GetStringW (unsigned int id, CXStringW &string, const CXStringW &=CXStringW()) const |
|
int | GetStringList (unsigned int id, CStringList &strings) const |
|
int | GetStringArray (unsigned int id, CXStringArray &strings) const |
|
bool | GetUTCTime (unsigned int id, CXTime &time, const CXTime &=CXTime::GetCurrentTime().GetTime()) const |
|
bool | GetXTime (unsigned int id, CXTime &time, const CXTime &=CXTime::GetCurrentTime().GetTime()) const |
|
void | RemoveAll () |
|
bool | RemoveCustom (unsigned int id) |
|
unsigned int | GetIDCount () const |
|
unsigned int | GetIDByIndex (unsigned int index, unsigned int &kindof) const |
|
CXString | DumpCustomData (bool tabify, int level=0) const |
|
virtual void | Serialize (CXArchive &archive) |
|
virtual bool | SerializeFromData (const void *rawdata, fileuint size) |
|
virtual void * | SerializeToData (fileuint &size) const |
|
bool | SaveToPrefs (const CXString &filename, unsigned int paramName1, unsigned int paramName2) const |
|
bool | LoadFromPrefs (const CXString filename, unsigned int paramName1, unsigned int paramName2, bool copyPreviousVersion=false) |
|
| CCustomData (const CCustomData &data) |
|