Taml

Engine/source/persistence/taml/taml.h

More...

Public Types

enum
TamlFormatMode {
  InvalidFormat = 0
  XmlFormat 
  BinaryFormat 
  JSONFormat 
}

Private Types

Parent 
typeCompiledHash 
typeNodeVector 

Private Functions

compileObject(SimObject * pSimObject, const bool forceId)
read(FileStream & stream, const TamlFormatMode formatMode)
T *
read(FileStream & stream, const TamlFormatMode formatMode)
bool
write(FileStream & stream, SimObject * pSimObject, const TamlFormatMode formatMode)

Public Functions

Taml()

Declare Console Object.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

bool
parse(const char * pFilename, TamlVisitor & visitor)

Parse.

T *
read(const char * pFilename)

Read.

read(const char * pFilename)
setAutoFormat(const bool autoFormat)

Auto-Format mode.

setAutoFormatXmlExtension(const char * pExtension)

Auto-format extensions.

setBinaryCompression(const bool compressed)

Compression.

Format mode.

setJSONStrict(const bool jsonStrict)

JSON Strict RFC4627 mode.

setProgenitorUpdate(const bool progenitorUpdate)

Progenitor.

setWriteDefaults(const bool writeDefaults)

Write defaults.

tamlAddParent(TamlCallbacks * pCallbacks, SimObject * pParentObject)
tamlCustomRead(TamlCallbacks * pCallbacks, const TamlCustomNodes & customNodes)
tamlCustomWrite(TamlCallbacks * pCallbacks, TamlCustomNodes & customNodes)
tamlPostRead(TamlCallbacks * pCallbacks, const TamlCustomNodes & customNodes)

Taml callbacks.

bool
write(SimObject * pSimObject, const char * pFilename)

Write.

Public Static Functions

createType(StringTableEntry typeName, const Taml * pTaml, const char * pProgenitorSuffix)

Create type.

bool

Schema generation.

getFormatModeEnum(const char * label)

Get format mode info.

WriteUnrestrictedCustomTamlSchema(const char * pCustomNodeName, const AbstractClassRep * pClassRep, TiXmlElement * pParentElement)

Write a unrestricted custom Taml schema.

Detailed Description

see:

tamlGroup

Public Types

TamlFormatMode

Enumerator

InvalidFormat = 0
XmlFormat
BinaryFormat
JSONFormat

Private Types

typedef SimObject Parent 
typedef HashTable< SimObjectId, TamlWriteNode * > typeCompiledHash 
typedef Vector< TamlWriteNode * > typeNodeVector 

Private Attributes

bool mAutoFormat 
StringTableEntry mAutoFormatBinaryExtension 
StringTableEntry mAutoFormatJSONExtension 
StringTableEntry mAutoFormatXmlExtension 
bool mBinaryCompression 
typeNodeVector mCompiledNodes 
typeCompiledHash mCompiledObjects 
char mFilePathBuffer [1024]
TamlFormatMode mFormatMode 
bool mJSONStrict 
U32 mMasterNodeId 
bool mProgenitorUpdate 
bool mWriteDefaults 

Private Functions

compileChildren(TamlWriteNode * pTamlWriteNode)

compileCustomNodeState(TamlCustomNode * pCustomNode)

compileCustomState(TamlWriteNode * pTamlWriteNode)

compileDynamicFields(TamlWriteNode * pTamlWriteNode)

compileObject(SimObject * pSimObject, const bool forceId)

compileStaticFields(TamlWriteNode * pTamlWriteNode)

read(FileStream & stream, const TamlFormatMode formatMode)

read(FileStream & stream, const TamlFormatMode formatMode)

resetCompilation(void )

write(FileStream & stream, SimObject * pSimObject, const TamlFormatMode formatMode)

Public Functions

Taml()

~Taml()

DECLARE_CONOBJECT(Taml )

Declare Console Object.

getAutoFormat(void )

getAutoFormatBinaryExtension(void )

getAutoFormatXmlExtension(void )

getBinaryCompression(void )

getFileAutoFormatMode(const char * pFilename)

getFilePathBuffer(void )

getFormatMode(void )

getJSONStrict(void )

getProgenitorUpdate(void )

getWriteDefaults(void )

onAdd()

Reimplemented from: SimObject

onRemove()

Reimplemented from: SimObject

parse(const char * pFilename, TamlVisitor & visitor)

Parse.

read(const char * pFilename)

Read.

read(const char * pFilename)

setAutoFormat(const bool autoFormat)

Auto-Format mode.

setAutoFormatBinaryExtension(const char * pExtension)

setAutoFormatXmlExtension(const char * pExtension)

Auto-format extensions.

setBinaryCompression(const bool compressed)

Compression.

setFormatMode(const TamlFormatMode formatMode)

Format mode.

setJSONStrict(const bool jsonStrict)

JSON Strict RFC4627 mode.

setProgenitorUpdate(const bool progenitorUpdate)

Progenitor.

setWriteDefaults(const bool writeDefaults)

Write defaults.

tamlAddParent(TamlCallbacks * pCallbacks, SimObject * pParentObject)

tamlCustomRead(TamlCallbacks * pCallbacks, const TamlCustomNodes & customNodes)

tamlCustomWrite(TamlCallbacks * pCallbacks, TamlCustomNodes & customNodes)

tamlPostRead(TamlCallbacks * pCallbacks, const TamlCustomNodes & customNodes)

tamlPostWrite(TamlCallbacks * pCallbacks)

tamlPreRead(TamlCallbacks * pCallbacks)

tamlPreWrite(TamlCallbacks * pCallbacks)

Taml callbacks.

write(SimObject * pSimObject, const char * pFilename)

Write.

Public Static Functions

createType(StringTableEntry typeName, const Taml * pTaml, const char * pProgenitorSuffix)

Create type.

generateTamlSchema()

Schema generation.

getFormatModeDescription(const TamlFormatMode formatMode)

getFormatModeEnum(const char * label)

Get format mode info.

initPersistFields()

WriteUnrestrictedCustomTamlSchema(const char * pCustomNodeName, const AbstractClassRep * pClassRep, TiXmlElement * pParentElement)

Write a unrestricted custom Taml schema.