VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtLuaMessageInterface Class Reference

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.

Public Types

typedef DtAdminContent *(* luaTableToAdminContentFcn )(const luabind::object &messageContents)
 
typedef bool(* adminContentToLuaTableFcn )(const DtAdminContent *, luabind::object &luaTable)
 
typedef std::function< void(const
DtVrfObjectMessage *msg)> 
MessageReceiveFcn
 

Public Member Functions

 DtLuaMessageInterface (DtVrfObjectCommunicationInterface *commIf, MessageReceiveFcn fcn)
 
virtual ~DtLuaMessageInterface ()
 
virtual void sendMessage (const DtScriptVrfObject &receiver, const std::string &messageType, const luabind::object &messageContents)
 
virtual void sendRadioMessage (const DtScriptVrfObject &receiver, const std::string &messageType, const luabind::object &messageContents)
 
virtual void registerForMessage (const std::string &messageType)
 
virtual void unregisterForMessage (const std::string &messageType)
 

Protected Member Functions

virtual void processObjectMessage (const DtVrfObjectMessage *msg)
 

Static Protected Member Functions

static void objectMessageCallback (const DtVrfObjectMessage *msg, void *usr)
 

Protected Attributes

DtVrfObjectCommunicationInterfacemyCommunicationIf
 
std::list
< DtAdminContentMessageType
myRegisteredAdminTypes
 
MessageReceiveFcn myMessageReceiveFcn
 

Private Member Functions

 DtLuaMessageInterface (const DtLuaMessageInterface &other)
 
DtLuaMessageInterfaceoperator= (const DtLuaMessageInterface &other)
 

Member Typedef Documentation

typedef DtAdminContent*(* DtLuaMessageInterface::luaTableToAdminContentFcn)(const luabind::object &messageContents)
typedef bool(* DtLuaMessageInterface::adminContentToLuaTableFcn)(const DtAdminContent *, luabind::object &luaTable)
typedef std::function<void(const DtVrfObjectMessage* msg)> DtLuaMessageInterface::MessageReceiveFcn

Function signature for the function called when.

Constructor & Destructor Documentation

DtLuaMessageInterface::DtLuaMessageInterface ( const DtLuaMessageInterface other)
private

Not implemented.

DtLuaMessageInterface::DtLuaMessageInterface ( DtVrfObjectCommunicationInterface commIf,
MessageReceiveFcn  fcn 
)
virtual DtLuaMessageInterface::~DtLuaMessageInterface ( )
virtual

Member Function Documentation

DtLuaMessageInterface& DtLuaMessageInterface::operator= ( const DtLuaMessageInterface other)
private

Not implemented.

virtual void DtLuaMessageInterface::sendMessage ( const DtScriptVrfObject receiver,
const std::string &  messageType,
const luabind::object &  messageContents 
)
virtual
virtual void DtLuaMessageInterface::sendRadioMessage ( const DtScriptVrfObject receiver,
const std::string &  messageType,
const luabind::object &  messageContents 
)
virtual
virtual void DtLuaMessageInterface::registerForMessage ( const std::string &  messageType)
virtual
virtual void DtLuaMessageInterface::unregisterForMessage ( const std::string &  messageType)
virtual
static void DtLuaMessageInterface::objectMessageCallback ( const DtVrfObjectMessage msg,
void *  usr 
)
staticprotected
virtual void DtLuaMessageInterface::processObjectMessage ( const DtVrfObjectMessage msg)
protectedvirtual

Member Data Documentation

DtVrfObjectCommunicationInterface* DtLuaMessageInterface::myCommunicationIf
protected
std::list<DtAdminContentMessageType> DtLuaMessageInterface::myRegisteredAdminTypes
protected
MessageReceiveFcn DtLuaMessageInterface::myMessageReceiveFcn
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)