VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtMessageDispatcher.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <map>
12 #include <list>
13 #include <string>
14 #include <vector>
15 #include <vrvUtil/DtMessage.h>
16 
17 #include <vrvCore/vrvCore.h>
18 
19 namespace makVrv
20 {
21 
22  class DtDe;
23  class DtProctor;
24  class DtProxy;
25  class DtMessage;
26  class DtMessageClient;
27  class DtUdpMessageClient;
28 
32  {
33  public:
34 
35  enum
36  {
37  theInternalControlId = 1
38  };
39 
40  enum
41  {
42  id_AddInterfaceMap = 1
43  };
44 
46  DtMessageDispatcher(bool isMaster);
47 
50  typedef unsigned short IGIInterfaceID;
51 
53  virtual ~DtMessageDispatcher();
54 
59  void registerProctor(int classId, DtProctor* handler);
60 
62  DtProctor* findProctor(int classId);
63 
65  void deliverFromClients();
66 
68  void deliverToClients();
69 
72  void queueForDelivery(DtMessage* msg, bool toClients = true,bool toLocalInterface = false);
73 
75  void addClient(DtMessageClient* client);
76 
78  void removeClient(DtMessageClient* client);
79 
80  void setUdpClient(DtUdpMessageClient* udpClient);
81 
82  void removeUdpClient();
83 
84 
86  bool hasClients() const;
87 
89  bool isMaster() const;
90 
92  void setIsMaster(bool isMaster);
93 
94  protected:
95 
97  void sendInterfaceMapToClients(IGIInterfaceID id, const std::string& name);
98 
102 
105 
106  typedef std::list<DtMessageClient*> ClientList;
109 
111 
112  typedef std::map<std::string,IGIInterfaceID> NameIdMap;
114 
115  typedef std::map<IGIInterfaceID,DtProxy*> IdInterfaceMap;
117 
118  typedef std::list<DtProxy*> InterfaceList;
120 
121  typedef std::map<int, DtProctor*> ProctorTable;
123 
124  typedef std::vector<DtMessage*> MessageList;
126  };
127 
128 }
129 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)