![]() |
VR-Forces 4.10 Class Documentation
|
Handles translation of messages from C++ structures into Lua tables and the reverse translation as well. More...
Public Types | |
| typedef DtAdminContent *(* | luaTableToAdminContentFcn )(const luabind::object &messageContents) |
| typedef bool(* | adminContentToLuaTableFcn )(const DtAdminContent *, luabind::object &luaTable) |
Public Member Functions | |
| DtLuaMessageBuilder () | |
| virtual | ~DtLuaMessageBuilder () |
| virtual void | registerAdminContentType (DtAdminContentMessageType type, luaTableToAdminContentFcn toAcFcn, adminContentToLuaTableFcn toTableFcn) |
| Adds a new admin content type to the system with the functions needed to convert it to/from a lua table. More... | |
| virtual DtVrfObjectMessage * | createMessageFromContents (const std::string &messageType, const luabind::object &messageContents) const |
| virtual bool | convertMessageToLua (const DtVrfObjectMessage *message, std::string &messageType, luabind::object &messageContents) const |
| Fills in messageType and messageContents based on message for any message type that is registered with the builder. More... | |
| virtual void | registerDefaultMessages () |
| Registers the the default VRF message builder functions. More... | |
| virtual DtAdminContentMessageType | adminTypeForString (const std::string &typeString) const |
| If provided string is registered as an adminContent type, this returns the equivalent admin content type. More... | |
Static Public Member Functions | |
| static void | setInstance (DtLuaMessageBuilder *mb) |
| Sets the global instance of the message builder to the provided pointer. More... | |
| static const DtLuaMessageBuilder * | instance () |
| Returns the global instance. More... | |
| static DtLuaMessageBuilder * | create () |
| Creates instance and registers default messages. More... | |
Protected Attributes | |
| std::unordered_map < std::string, adminContentToLuaTableFcn > | myAdminContentToLuaTableFunctions |
| Map keyed by admin content type that contains functions for creating the admin content from a lua table of contents. More... | |
| std::unordered_map < std::string, luaTableToAdminContentFcn > | myLuaTableToAdminContentFunctions |
Static Protected Attributes | |
| static DtLuaMessageBuilder * | theLuaMessageBuilder |
Private Member Functions | |
| DtLuaMessageBuilder (const DtLuaMessageBuilder &other) | |
| Not implemented. More... | |
| DtLuaMessageBuilder & | operator= (const DtLuaMessageBuilder &other) |
| Not implemented. More... | |
Handles translation of messages from C++ structures into Lua tables and the reverse translation as well.
Provides interface for Lua scripts to register interest in various messages and send messages.
| typedef DtAdminContent*(* DtLuaMessageBuilder::luaTableToAdminContentFcn)(const luabind::object &messageContents) |
| typedef bool(* DtLuaMessageBuilder::adminContentToLuaTableFcn)(const DtAdminContent *, luabind::object &luaTable) |
|
private |
Not implemented.
| DtLuaMessageBuilder::DtLuaMessageBuilder | ( | ) |
|
virtual |
|
private |
Not implemented.
|
virtual |
Adds a new admin content type to the system with the functions needed to convert it to/from a lua table.
|
virtual |
|
virtual |
Fills in messageType and messageContents based on message for any message type that is registered with the builder.
|
virtual |
Registers the the default VRF message builder functions.
|
virtual |
If provided string is registered as an adminContent type, this returns the equivalent admin content type.
If it is not registered, the DtAdminContentMessageType is returned.
|
static |
Sets the global instance of the message builder to the provided pointer.
|
static |
Returns the global instance.
|
static |
Creates instance and registers default messages.
|
protected |
Map keyed by admin content type that contains functions for creating the admin content from a lua table of contents.
|
protected |
|
staticprotected |