![]() |
VR-Forces 4.6.1 Class Documentation
|
Public Types | |
| typedef DtTemplatedException< 300 > | DtStateParseException |
Public Member Functions | |
| virtual | ~DtLuaObjectSerializer () |
| virtual DtAsciiSerializable * | createInstance (const DtString &typeName, const DtString &serializedString) |
| Registers a DtAsciiSerializable creator function. | |
| virtual void | registerCreatorFunc (const DtString &typeName, DtSerializableCreatorFunc func) |
| virtual void | registerDeserializerFunc (const DtString &typeName, DtDeserializerFunc func) |
| Registers a deserializer function to convert a string to a lua object. | |
| virtual void | registerSerializerFunc (const DtString &typeName, DtSerializerFunc func) |
| Registers the function to serialize the lua object to a string. | |
| virtual bool | serializeObject (const luabind::object &lobj, std::string &buffer, std::vector< luabind::object > stackParameters) |
| Serialize the specific lua object to the string buffer. | |
| virtual const char * | deserializeObject (lua_State *state, const char *buffer, luabind::object &lobj) |
| Deserialize the serialized string to the lua object. | |
| virtual bool | doesSerializerExist (const DtString &type) |
| virtual DtSimManager & | simManager () |
| virtual bool | saveLuaScriptGlobals (lua_State *state, std::string &buffer) |
| Serializes the scripts globals in a character buffer. | |
| virtual bool | saveLuaScriptTable (lua_State *state, const std::string &key, const luabind::object &lobj, std::string &buffer) |
| Serializes the table with the given key name. | |
| virtual bool | loadLuaScriptGlobals (lua_State *state, const DtString &buffer) |
| Loads the scripts globals from a character buffer. | |
| virtual void | addKeyToIgnore (const std::string &) |
| When serializing ignore any key found in this list. | |
| virtual void | removeKeyToIgnore (const std::string &) |
| Removes a key to ignore during serialization. | |
Static Public Member Functions | |
| static DtLuaObjectSerializer * | instance () |
| Returns the static instance of this class. | |
| static DtLuaObjectSerializer * | create (DtSimManager *simManager) |
| static void | setFactory (DtLuaObjectSerializer *factory) |
Protected Member Functions | |
| DtLuaObjectSerializer (DtSimManager *simManager) | |
| DtLuaObjectSerializer (const DtLuaObjectSerializer &other) | |
| DtLuaObjectSerializer & | operator= (const DtLuaObjectSerializer &other) |
| virtual const char * | parseBufferToTableKeyVals (lua_State *state, luabind::object &table, const char *buffer) |
| internal function for loading lua globals | |
| virtual void | parseTableKeyValsToBuffer (const luabind::object &, std::string &buffer, std::vector< luabind::object > stackParameters) |
| internal function for saving lua globals. | |
| virtual bool | needsEscaping (const DtString &buffer) const |
| virtual void | applyStandardEscapes (DtString &buffer) |
| virtual bool | needsUnescaping (DtString &buffer) const |
| virtual void | unapplyStandardEscapes (DtString &buffer) |
| virtual bool | isKeyToIgnore (const DtString &keyName) |
| virtual bool | IsALoadedPackage (lua_State *L, const char *tableName) |
| virtual const char * | nextToken (char separator, const char *buf, DtString &tok) |
| Retrieves the next token from buf, separated by the next unescaped separator character. | |
Protected Attributes | |
| std::map< DtString, DtSerializableCreatorFunc > | myCreators |
| std::map< DtString, DtSerializerFunc > | mySerializers |
| std::map< DtString, DtDeserializerFunc > | myDeserializers |
| DtSimManager * | mySimManager |
| std::set< std::string > | myKeysToIgnore |
| When serializing, ignore these keys. | |
Static Protected Attributes | |
| static DtLuaObjectSerializer * | theInstance |
| typedef DtTemplatedException<300> DtLuaObjectSerializer::DtStateParseException |
|
protected |
|
protected |
|
virtual |
|
protected |
|
static |
Returns the static instance of this class.
Referenced by vrfLua::DtAsciiDeserializeLua(), and vrfLua::DtAsciiDeserializeLuaSharedPtr().
|
virtual |
Registers a DtAsciiSerializable creator function.
It should create a default object with default values.
Referenced by vrfLua::DtAsciiDeserializeLua(), and vrfLua::DtAsciiDeserializeLuaSharedPtr().
|
virtual |
|
virtual |
Registers a deserializer function to convert a string to a lua object.
|
virtual |
Registers the function to serialize the lua object to a string.
|
virtual |
Serialize the specific lua object to the string buffer.
This function will append to the string buffer
|
virtual |
Deserialize the serialized string to the lua object.
The lua state is required in the creation of the lua object This is a template since luabind requires the specific object type to be bound rather than the base class these objects inherit from.
|
virtual |
|
static |
|
static |
|
virtual |
Serializes the scripts globals in a character buffer.
|
virtual |
Serializes the table with the given key name.
|
virtual |
Loads the scripts globals from a character buffer.
|
virtual |
When serializing ignore any key found in this list.
|
virtual |
Removes a key to ignore during serialization.
|
protectedvirtual |
internal function for loading lua globals
|
protectedvirtual |
internal function for saving lua globals.
Stack parameters is used to make sure the serializer is not recursively serializing objects
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Retrieves the next token from buf, separated by the next unescaped separator character.
Returns the pointer into buf beyond the returned token.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
When serializing, ignore these keys.