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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)