VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
vrfLua Namespace Reference

Functions

template<typename T >
bool DtAsciiSerializeLua (const luabind::object &lobj, DtString &serializedString)
 
template<typename T , typename Parent >
bool DtAsciiSerializeLua (const luabind::object &lobj, DtString &serializedString)
 
template<typename T >
luabind::object DtAsciiDeserializeLua (lua_State *state, const DtString &typeName, const DtString &serializedString, DtLocalObject *owner)
 
template<typename T >
luabind::object DtAsciiDeserializeLuaSharedPtr (lua_State *state, const DtString &typeName, const DtString &serializedString, DtLocalObject *owner)
 
template<class T >
T * luaTypeCast (luabind::object const &luaObject)
 
template<class T >
T * luaTypeCastNoThrow (luabind::object const &luaObject)
 
DT_DLL_vrfLua bool DtLuaFunctionExists (lua_State *luaState, const char *functionName)
 
DT_DLL_vrfLua int DtLuaErrorHandler (lua_State *L)
 
DT_DLL_vrfLua int DtLuaErrorHandlerToString (lua_State *L)
 
DT_DLL_vrfLua int DtLuaAppendPath (lua_State *L, const char *path)
 
DT_DLL_vrfLua int DtLuaAppendPath (lua_State *L, const std::vector< std::string > &paths)
 
DT_DLL_vrfLua void DtLuaGetPath (lua_State *L, std::vector< std::string > &paths)
 

Variables

static const charentrySeparator = ":"
 
static const charobjectSeparator = "|"
 

Function Documentation

template<typename T >
bool vrfLua::DtAsciiSerializeLua ( const luabind::object &  lobj,
DtString serializedString 
)

This is a templated function that is used and registered to the serializer for each object we have defined in lua. This means that if someone wants to define a new object, they simply add this function to the serializer with the correct object template (their new object) and it will work as long as that object is derived for DtAsciiSerializable (and has a static creator function registered to the (de)serializer)

template<typename T , typename Parent >
bool vrfLua::DtAsciiSerializeLua ( const luabind::object &  lobj,
DtString serializedString 
)
template<typename T >
luabind::object vrfLua::DtAsciiDeserializeLua ( lua_State *  state,
const DtString typeName,
const DtString serializedString,
DtLocalObject owner 
)

This is a templated function that is used and registered to the (de)serializer for each object we have defined in lua. This means that if someone wants to define a new object, they simply add this function to the (de)serializer with the correct object template (their new object) and it will work as long as that object is derived for DtAsciiSerializable (and has a static creator function registered to the (de)serializer)

References DtLuaObjectSerializer::createInstance(), DtAsciiSerializable::deserialize(), DtLuaObjectSerializer::instance(), and DtAsciiSerializable::objectType().

template<typename T >
luabind::object vrfLua::DtAsciiDeserializeLuaSharedPtr ( lua_State *  state,
const DtString typeName,
const DtString serializedString,
DtLocalObject owner 
)
template<class T >
T* vrfLua::luaTypeCast ( luabind::object const &  luaObject)

separator for "objects" which are comprised of entries

template<class T >
T* vrfLua::luaTypeCastNoThrow ( luabind::object const &  luaObject)
DT_DLL_vrfLua bool vrfLua::DtLuaFunctionExists ( lua_State *  luaState,
const char functionName 
)

Determine whether or not a function exists.

DT_DLL_vrfLua int vrfLua::DtLuaErrorHandler ( lua_State *  L)

Lua Debugging functions.

DT_DLL_vrfLua int vrfLua::DtLuaErrorHandlerToString ( lua_State *  L)
DT_DLL_vrfLua int vrfLua::DtLuaAppendPath ( lua_State *  L,
const char path 
)

Add a path into Lua for include files.

DT_DLL_vrfLua int vrfLua::DtLuaAppendPath ( lua_State *  L,
const std::vector< std::string > &  paths 
)
DT_DLL_vrfLua void vrfLua::DtLuaGetPath ( lua_State *  L,
std::vector< std::string > &  paths 
)

Get the path from the Lua state.

Variable Documentation

const char* vrfLua::entrySeparator = ":"
static
const char* vrfLua::objectSeparator = "|"
static

separator for entries in an "object"


Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)