VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedExtAggregate.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #if DtHLA
9  #include <vl/reflectedObjectHLA.h>
10  #define DtAggReflectedObjectType DtReflectedObject
11 #elif DtDIS
12  #include <vl/reflectedAggregateDIS.h>
13  #define DtAggReflectedObjectType DtReflectedAggregate
14 #elif DtTENA
15  #define DtAggReflectedObjectType DtReflectedAggregate
16 #else
17 # pragma message ( "No protocol defined." )
18 #endif
19 
21 
22 // Callback function that takes a DtReflectedExtAggregate
23 // and usr data.
24 
26 
27 typedef void (*DtExtAggregateCallbackFunction)
28 (
29  DtReflectedExtAggregate* obj, void* userData
30 );
31 
32 class DtExerciseConn;
33 
36 {
37 
38 public:
39 
40 #if DtHLA
42  (
43  DtHlaObject* obj,
44  DtExerciseConn* conn
45  );
46  DtReflectedExtAggregate(DtExerciseConn* conn, DtAggregateStateRepository* esrToUse);
47 #elif (DtDIS || DtTENA)
48  // constructor
50  (
51  DtExerciseConn* conn,
52  const DtEntityIdentifier& id,
53  const DtEntityType& type
54  );
55 #else
56 # pragma message ( "No protocol defined." )
57 #endif
58 
59  // destructor
60  virtual ~DtReflectedExtAggregate();
61 
62  // Returns a pointer to an aggregate state repository through which you can
63  // inspect current state info.
64  virtual DtExtAggregateStateRepository* extAggregateStateRep() const;
65 
66  // Synonym for extAggregateStateRep.
67  virtual DtExtAggregateStateRepository* easr() const;
68 
69  // Implementation for abstract base class. Calls cosr().
70  virtual DtStateRepository* stateRep() const;
71 
72 #if DtDIS
73  // Process an aggregate state PDU.
74  // Calls DtReflectedAggregate::processStateMessage().
75  virtual void processStateMessage(const DtStateMsg& msg);
76 #endif
77 
78  // Get the next and previous elements in the reflected aggregate list.
79  virtual DtReflectedExtAggregate* nextEA() const;
80  virtual DtReflectedExtAggregate* prevEA() const;
81 
82  // Get the next and previous elements, wrap at the ends of the list.
83  virtual DtReflectedExtAggregate* wrapNextEA() const;
84  virtual DtReflectedExtAggregate* wrapPrevEA() const;
85 
86  // Aggregate callback registration/deregistration.
87  virtual void addPostUpdateCallback
88  (
89  DtExtAggregateCallbackFunction cb, void* userData
90  );
91  virtual void removePostUpdateCallback
92  (
93  DtExtAggregateCallbackFunction cb, void* userData
94  );
95 
96  static void postUpdateCallback
97  (
98  DtReflectedExtAggregate* agg, void* userData
99  );
100 
101  virtual void processPostUpdateCallback(DtReflectedExtAggregate* agg);
102 
103  virtual void updateExtensions();
104 
105  // Overridden from bast class to make public.
106  virtual void processPostUpdateCallbacks();
107 
108 private:
109 
110  // copy constructor
112 
113  // assignment operator
114  DtReflectedExtAggregate& operator=(const DtReflectedExtAggregate& orig);
115 
116 };

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)