VR-Vantage 2.3 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedControlObject.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 #include <vl/reflectedEnvironmentProcess.h>
15 
16 // Callback function that takes a DtReflectedControlObject and usr data.
18 
20 (
21  DtReflectedControlObject* obj, void* userData
22 );
23 
24 class DtExerciseConn;
25 
27 {
28 public:
29 #if DtHLA
30  // constructor
31  DtReflectedControlObject(DtHlaObject* obj, DtExerciseConn* conn);
32 #elif (DtDIS || DtTENA)
33  // constructor
35  (
36  DtExerciseConn* conn,
37  const DtEntityIdentifier& id,
38  const DtEntityType& type
39  );
40 #else
41 # pragma message ( "No protocol defined." )
42 #endif
43 
44  // destructor
45  virtual ~DtReflectedControlObject();
46 
47  // Returns ptr to environmentProcessStateRepository --
48  // through which you can inspect current state info.
49  virtual DtControlObjectRepository* controlObjectStateRep() const;
50 
51  // Synonym for environmentStateRep.
52  virtual DtControlObjectRepository* cosr() const;
53 
54  // Implementation for abstract base class. Calls cosr().
55  virtual DtStateRepository* stateRep() const;
56 
57 #if DtDIS
58  // Process an environment process state PDU.
59  // Calls processEnvironmentProcess().
60  virtual void processStateMessage(const DtStateMsg& msg);
61 #endif
62 
63  // Get the next and previous elements in the reflected
64  // cwenvironment process list.
65  virtual DtReflectedControlObject* nextCO() const;
66  virtual DtReflectedControlObject* prevCO() const;
67 
68  // Get the next and previous elements, wrap at the ends of the list.
69  virtual DtReflectedControlObject* wrapNextCO() const;
70  virtual DtReflectedControlObject* wrapPrevCO() const;
71 
72  // Environment Process callback registration/deregistration.
73  virtual void addPostUpdateCallback
74  (
75  DtControlObjectCallbackFunction cb, void* userData
76  );
77  virtual void removePostUpdateCallback
78  (
79  DtControlObjectCallbackFunction cb, void* userData
80  );
81 
82  static void postUpdateCallback
83  (
84  DtReflectedControlObject* obj, void* userData
85  );
86 
87  virtual void processPostUpdateCallback(DtReflectedControlObject* obj);
88 
89  // updateExtensions()
90  // extracts the extended environmental process state information,
91  // if present, from the state repository
92  virtual void updateExtensions();
93 
94 private:
95  // not implemented.
97  DtReflectedControlObject& operator=(const DtReflectedControlObject& orig);
98 
99 };
100 


Copyright © 2005-2018 VT MAK. All Rights Reserved (www.mak.com)