VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UUIDNetworkManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
12 
13 #pragma once
14 
16 #include <vlutil/vlString.h>
17 #include <boost/unordered_map.hpp>
18 #include <vl/globalObjectDesignator.h>
19 #include <vrfutil/rwUUID.h>
20 #include <string>
21 #include <cstdio>
22 
24 #if WIN32 && _MSC_VER == 1400 || _MSC_VER == 1500
25 
26 #ifndef _INTPTR_T_DEFINED
27  #define _INTPTR_T_DEFINED
28  #ifdef _WIN64
29 typedef __int64 intptr_t;
30  #else /* _WIN64 */
31 typedef _W64 int intptr_t;
32  #endif /* _WIN64 */
33 #endif /* _INTPTR_T_DEFINED */
34 
35 #ifndef _UINTPTR_T_DEFINED
36  #define _UINTPTR_T_DEFINED
37  #ifdef _WIN64
38 typedef unsigned __int64 uintptr_t;
39  #else /* _WIN64 */
40 typedef _W64 unsigned int uintptr_t;
41  #endif /* _WIN64 */
42 #endif /* _UINTPTR_T_DEFINED */
43 
44 #else
45 #include <stdint.h>
46 #endif
47 
48 class DtExerciseConn;
52 
55 
58 
60 {
61 public:
62 
65 
67  virtual ~DtUUIDNetworkManager();
68 
78  virtual void init(DtExerciseConn* exConn,
79  DtReflectedExtEntityList* reel = NULL,
80  DtReflectedExtAggregateList* ral = NULL,
81  DtReflectedControlObjectList* rel = NULL,
82  const DtString& uuidMarkingForNonVrForces = "entity-identifier");
83 
87  virtual void reinitialize(
88  DtReflectedExtEntityList* reel = NULL,
89  DtReflectedExtAggregateList* ral = NULL,
90  DtReflectedControlObjectList* rel = NULL);
91 
94  virtual void setNonVrfUUIDResolver(DtNonVrfUUIDResolver*);
95  virtual DtNonVrfUUIDResolver* nonVrfUUIDResolver() const;
96 
99  virtual DtUUID uuidFor(DtReflectedExtEntity*) const;
100  virtual DtUUID uuidFor(DtReflectedExtAggregate*) const;
101  virtual DtUUID uuidFor(DtReflectedControlObject*) const;
102 
103  DtReflectedControlObjectList* controlObjectList() { return myControlObjectList; };
104  DtReflectedExtEntityList* entityList() { return myEntityList; };
105  DtReflectedExtAggregateList* aggregateList() { return myAggregateList; };
106 
107 protected:
109  virtual void initializeEntityList();
110  static void entityAddedCallback(DtReflectedExtEntity*, void* usr);
111  virtual void processEntityAdded(DtReflectedExtEntity*);
112  static void entityRemovedCallback(DtReflectedExtEntity*, void* usr);
113  virtual void processEntityRemoved(DtReflectedExtEntity*);
114  static void postEntityUpdateCallback(DtReflectedExtEntity*, void* usr);
115  virtual void processPostEntityUpdate(DtReflectedExtEntity*);
116 
117  virtual void initializeAggregateList();
118  static void aggregateAddedCallback(DtReflectedExtAggregate*, void* usr);
119  virtual void processAggregateAdded(DtReflectedExtAggregate*);
120  static void aggregateRemovedCallback(DtReflectedExtAggregate*, void* usr);
121  virtual void processAggregateRemoved(DtReflectedExtAggregate*);
122  static void postAggregateUpdateCallback(DtReflectedExtAggregate*, void* usr);
123  virtual void processPostAggregateUpdate(DtReflectedExtAggregate*);
124 
125  virtual void initializeControlObjectList();
126  static void controlObjectAddedCallback(DtReflectedControlObject*, void* usr);
127  virtual void processControlObjectAdded(DtReflectedControlObject*);
128  static void controlObjectRemovedCallback(DtReflectedControlObject*, void* usr);
129  virtual void processControlObjectRemoved(DtReflectedControlObject*);
130  static void postControlObjectUpdateCallback(DtReflectedControlObject*, void* usr);
131  virtual void processPostControlObjectUpdate(DtReflectedControlObject*);
132 
134  virtual void removeObject(const uintptr_t&);
135 
136 protected:
137  DtExerciseConn* myExerciseConnection;
140 
143 
146 
148 
149  typedef boost::unordered_map<uintptr_t, DtUUID> CurrentDataMap;
151 
152  typedef boost::unordered_map<uintptr_t, int> DataUpdateTrackerCount;
154 
157 };

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)