PersistenceManager
Engine/source/console/persistenceManager.h
Classes:
Public Types
DirtyList
Protected Types
Parent
Protected Attributes
const char *
Protected Static Functions
compareFiles(const void * a, const void * b)
Protected Functions
const char *
createNewProperty(const char * name, const char * value, bool isArray, U32 arrayPos)
deleteObject(ParsedObject * object)
findDirtyObject(SimObject * object)
findParentObject(SimObject * object, ParsedObject * parentObject)
findParsedObject(SimObject * object, ParsedObject * parentObject)
bool
findRemoveField(SimObject * object, const char * fieldName, U32 arrayPos)
const char *
getFieldValue(SimObject * object, const char * fieldName, U32 arrayPos)
char *
getObjectIndent(ParsedObject * object)
getPropertyIndex(ParsedObject * parsedObject, const char * fieldName, U32 arrayPos)
bool
isEmptyLine(const char * line)
removeField(const ParsedProperty & prop)
removeLine(U32 lineNumber)
removeParsedObject(ParsedObject * parsedObject)
bool
updateLineOffsets(U32 startLine, S32 diff, ParsedObject * skipObject)
updateObject(SimObject * object, ParsedObject * parentObject)
updatePositions(U32 lineNumber, U32 startPos, S32 diff)
writeNewObject(SimObject * object, const Vector< const char * > & properties, const U32 insertLine, ParsedObject * parentObject)
Public Functions
addRemoveField(SimObject * object, const char * fieldName)
deleteObjectsFromFile(const char * fileName)
bool
hasDirty()
bool
onAdd()
Called when the object is added to the sim.
removeDirty(SimObject * object)
removeObjectFromFile(SimObject * object, const char * fileName)
bool
bool
saveDirtyObject(SimObject * object)
Detailed Description
Public Types
typedef Vector< DirtyObject > DirtyList
Protected Types
typedef SimObject Parent
Protected Attributes
const char * mCurrentFile
ParsedObject * mCurrentObject
DirtyList mDirtyObjects
Vector< const char * > mLineBuffer
Vector< ParsedObject * > mObjectBuffer
Vector< ParsedObject * > mObjectStack
Tokenizer mParser
Vector< RemoveField > mRemoveFields
Protected Static Functions
compareFiles(const void * a, const void * b)
Protected Functions
clearFileData()
clearLineBuffer()
clearObjects()
createNewProperty(const char * name, const char * value, bool isArray, U32 arrayPos)
deleteObject(ParsedObject * object)
findDirtyObject(SimObject * object)
findParentObject(SimObject * object, ParsedObject * parentObject)
findParsedObject(SimObject * object, ParsedObject * parentObject)
findRemoveField(SimObject * object, const char * fieldName, U32 arrayPos)
getFieldValue(SimObject * object, const char * fieldName, U32 arrayPos)
getObjectIndent(ParsedObject * object)
getPropertyIndex(ParsedObject * parsedObject, const char * fieldName, U32 arrayPos)
isEmptyLine(const char * line)
killObject()
parseFile(const char * fileName)
parseObject()
readFile(const char * fileName)
removeField(const ParsedProperty & prop)
removeLine(U32 lineNumber)
removeParsedObject(ParsedObject * parsedObject)
removeTextBlock(U32 startLine, U32 endLine, U32 startPos, U32 endPos, bool removeEmptyLines)
saveDirtyFile()
saveObject()
updateLineOffsets(U32 startLine, S32 diff, ParsedObject * skipObject)
updateObject(SimObject * object, ParsedObject * parentObject)
updatePositions(U32 lineNumber, U32 startPos, S32 diff)
updateToken(const U32 lineNumber, const U32 linePosition, const U32 oldValueLen, const char * newValue, bool addQuotes)
writeNewObject(SimObject * object, const Vector< const char * > & properties, const U32 insertLine, ParsedObject * parentObject)
writeProperties(const Vector< const char * > & properties, const U32 insertLine, const char * objectIndent)
Public Functions
PersistenceManager()
~PersistenceManager()
addRemoveField(SimObject * object, const char * fieldName)
clearAll()
DECLARE_CONOBJECT(PersistenceManager )
deleteObjectsFromFile(const char * fileName)
getDirtyList()
hasDirty()
isDirty(SimObject * object)
onAdd()
Reimplemented from: SimObject
onRemove()
Reimplemented from: SimObject
removeDirty(SimObject * object)
removeObjectFromFile(SimObject * object, const char * fileName)
saveDirty()
saveDirtyObject(SimObject * object)
setDirty(SimObject * object, const char * fileName)