VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtMessageDispatcher Class Reference

IGI Manager managers both IGI clients and IGI interfaces. More...

Public Types

enum  { theInternalControlId = 1 }
 
enum  { id_AddInterfaceMap = 1 }
 
typedef unsigned short IGIInterfaceID
 The IGIInterfaceID type. More...
 

Public Member Functions

 DtMessageDispatcher (bool isMaster)
 Protected CTOR, construct using the Instance class. More...
 
virtual ~DtMessageDispatcher ()
 DTOR. More...
 
void registerProctor (int classId, DtProctor *handler)
 Register an proctor class. More...
 
DtProctorfindProctor (int classId)
 Find a handler. More...
 
void deliverFromClients ()
 Deliver any messages from clients. More...
 
void deliverToClients ()
 Deliver all queued messages to clients. More...
 
void queueForDelivery (DtMessage *msg, bool toClients=true, bool toLocalInterface=false)
 Deliver the message, note the msg will be 'owned' and deleted upon send. More...
 
void addClient (DtMessageClient *client)
 Add a client to the manager. More...
 
void removeClient (DtMessageClient *client)
 Remove a client from the manager. More...
 
void setUdpClient (DtUdpMessageClient *udpClient)
 
void removeUdpClient ()
 
bool hasClients () const
 Check to see if the IGI Manager has clients. More...
 
bool isMaster () const
 Check to see if the Manager is the master manager. More...
 
void setIsMaster (bool isMaster)
 Set if the manager is the master manager. More...
 

Protected Types

typedef std::list
< DtMessageClient * > 
ClientList
 
typedef std::map< std::string,
IGIInterfaceID
NameIdMap
 
typedef std::map
< IGIInterfaceID, DtProxy * > 
IdInterfaceMap
 
typedef std::list< DtProxy * > InterfaceList
 
typedef std::map< int,
DtProctor * > 
ProctorTable
 
typedef std::vector< DtMessage * > MessageList
 

Protected Member Functions

void sendInterfaceMapToClients (IGIInterfaceID id, const std::string &name)
 Send an interface map to clients. More...
 

Protected Attributes

bool myIsMasterFlag
 Holds whether the IGI Manager is the master manager. More...
 
IGIInterfaceID myFreeInterfaceId
 Internal id used to generate IDs. More...
 
ClientList myClients
 My list of clients. More...
 
DtUdpMessageClientmyUdpClient
 
NameIdMap myIdLookUp
 
IdInterfaceMap myInstanceLookUp
 
InterfaceList myUnknownInterfaceList
 
ProctorTable myProctors
 
MessageList myMessageQueue
 

Detailed Description

IGI Manager managers both IGI clients and IGI interfaces.

Member Typedef Documentation

The IGIInterfaceID type.

An IGIInterfaceID uniquely defines an instance.

typedef std::map<std::string,IGIInterfaceID> makVrv::DtMessageDispatcher::NameIdMap
protected
typedef std::list<DtProxy*> makVrv::DtMessageDispatcher::InterfaceList
protected
typedef std::vector<DtMessage*> makVrv::DtMessageDispatcher::MessageList
protected

Member Enumeration Documentation

anonymous enum
Enumerator
theInternalControlId 
anonymous enum
Enumerator
id_AddInterfaceMap 

Constructor & Destructor Documentation

makVrv::DtMessageDispatcher::DtMessageDispatcher ( bool  isMaster)

Protected CTOR, construct using the Instance class.

virtual makVrv::DtMessageDispatcher::~DtMessageDispatcher ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtMessageDispatcher::registerProctor ( int  classId,
DtProctor handler 
)

Register an proctor class.

To remove an proctor class, register a NULL pointer.

Exceptions
DtInvalidInputif an proctor is already registered with that classId.
DtProctor* makVrv::DtMessageDispatcher::findProctor ( int  classId)

Find a handler.

void makVrv::DtMessageDispatcher::deliverFromClients ( )

Deliver any messages from clients.

void makVrv::DtMessageDispatcher::deliverToClients ( )

Deliver all queued messages to clients.

void makVrv::DtMessageDispatcher::queueForDelivery ( DtMessage msg,
bool  toClients = true,
bool  toLocalInterface = false 
)

Deliver the message, note the msg will be 'owned' and deleted upon send.

void makVrv::DtMessageDispatcher::addClient ( DtMessageClient client)

Add a client to the manager.

void makVrv::DtMessageDispatcher::removeClient ( DtMessageClient client)

Remove a client from the manager.

void makVrv::DtMessageDispatcher::setUdpClient ( DtUdpMessageClient udpClient)
void makVrv::DtMessageDispatcher::removeUdpClient ( )
bool makVrv::DtMessageDispatcher::hasClients ( ) const

Check to see if the IGI Manager has clients.

bool makVrv::DtMessageDispatcher::isMaster ( ) const

Check to see if the Manager is the master manager.

void makVrv::DtMessageDispatcher::setIsMaster ( bool  isMaster)

Set if the manager is the master manager.

void makVrv::DtMessageDispatcher::sendInterfaceMapToClients ( IGIInterfaceID  id,
const std::string &  name 
)
protected

Send an interface map to clients.

Member Data Documentation

bool makVrv::DtMessageDispatcher::myIsMasterFlag
protected

Holds whether the IGI Manager is the master manager.

The server should always be the master manager.

IGIInterfaceID makVrv::DtMessageDispatcher::myFreeInterfaceId
protected

Internal id used to generate IDs.

ClientList makVrv::DtMessageDispatcher::myClients
protected

My list of clients.

DtUdpMessageClient* makVrv::DtMessageDispatcher::myUdpClient
protected
NameIdMap makVrv::DtMessageDispatcher::myIdLookUp
protected
IdInterfaceMap makVrv::DtMessageDispatcher::myInstanceLookUp
protected
InterfaceList makVrv::DtMessageDispatcher::myUnknownInterfaceList
protected
ProctorTable makVrv::DtMessageDispatcher::myProctors
protected
MessageList makVrv::DtMessageDispatcher::myMessageQueue
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)