VR-Forces 4.0.4 Class Documentation
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...

List of all members.

Public Types

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

Public Member Functions

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

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.

Protected Attributes

bool myIsMasterFlag
 Holds whether the IGI Manager is the master manager.
IGIInterfaceID myFreeInterfaceId
 Internal id used to generate IDs.
ClientList myClients
 My list of clients.
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::map<int, DtProctor*> makVrv::DtMessageDispatcher::ProctorTable [protected]
typedef std::vector<DtMessage*> makVrv::DtMessageDispatcher::MessageList [protected]

Member Enumeration Documentation

anonymous enum
Enumerator:
theInternalControlId 
anonymous enum
Enumerator:
id_AddInterfaceMap 

Constructor & Destructor Documentation

Protected CTOR, construct using the Instance class.

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.

Find a handler.

Deliver any messages from clients.

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.

Add a client to the manager.

Remove a client from the manager.

Check to see if the IGI Manager has clients.

Check to see if the Manager is the master manager.

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

Holds whether the IGI Manager is the master manager.

The server should always be the master manager.

Internal id used to generate IDs.

My list of clients.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)