VR-Vantage API Documentation
reflCtrlObj.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: reflCtrlObj.h,v $ $Revision: 1.10 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef REFLCTRLOBJ_H
10 #define REFLCTRLOBJ_H
11 
12 #if DtHLA
13  #include <vl/hReflectedObj.h>
14  #define DtCOReflectedObjectType DtReflectedObject
15 #elif DtDIS
16  #include <vl/dReflEnvProc.h>
17  #define DtCOReflectedObjectType DtReflectedEnvironmentProcess
18 #elif DtTENA
19  #include <vl/tReflEnvProc.h>
20  #define DtCOReflectedObjectType DtReflectedEnvironmentProcess
21 #else
22 # pragma message ( "No protocol defined." )
23 #endif
24 
26 
27 // Callback function that takes a DtReflectedControlObject
28 // and usr data.
29 
31 
33 (
34  DtReflectedControlObject* obj, void* userData
35 );
36 
37 class DtExerciseConn;
38 
41 {
42 public:
43 #if DtHLA
44  // constructor
45  DtReflectedControlObject(DtHlaObject* obj, DtExerciseConn* conn);
46 #elif (DtDIS || DtTENA)
47  // constructor
49  (
50  DtExerciseConn* conn,
51  const DtEntityIdentifier& id,
52  const DtEntityType& type
53  );
54 #else
55 # pragma message ( "No protocol defined." )
56 #endif
57 
58  // destructor
59  virtual ~DtReflectedControlObject();
60 
61  // Returns ptr to environmentProcessStateRepository --
62  // through which you can inspect current state info.
63  virtual DtControlObjectRepository* controlObjectStateRep() const;
64 
65  // Synonym for environmentStateRep.
66  virtual DtControlObjectRepository* cosr() const;
67 
68  // Implementation for abstract base class. Calls cosr().
69  virtual DtStateRepository* stateRep() const;
70 
71 #if DtDIS
72  // Process an environment process state PDU.
73  // Calls processEnvironmentProcess().
74  virtual void processStateMessage(const DtStateMsg& msg);
75 #endif
76 
77  // Get the next and previous elements in the reflected
78  // cwenvironment process list.
79  virtual DtReflectedControlObject* nextCO() const;
80  virtual DtReflectedControlObject* prevCO() const;
81 
82  // Get the next and previous elements, wrap at the ends of the list.
83  virtual DtReflectedControlObject* wrapNextCO() const;
84  virtual DtReflectedControlObject* wrapPrevCO() const;
85 
86  // Environment Process callback registration/deregistration.
87  virtual void addPostUpdateCallback
88  (
89  DtControlObjectCallbackFunction cb, void* userData
90  );
91  virtual void removePostUpdateCallback
92  (
93  DtControlObjectCallbackFunction cb, void* userData
94  );
95 
96  static void postUpdateCallback
97  (
98  DtReflectedControlObject* obj, void* userData
99  );
100 
101  virtual void processPostUpdateCallback(DtReflectedControlObject* obj);
102 
103  // updateExtensions()
104  // extracts the extended environmental process state information,
105  // if present, from the state repository
106  virtual void updateExtensions();
107 
108 private:
109  // not implemented.
111  DtReflectedControlObject& operator=(const DtReflectedControlObject& orig);
112 
113 };
114 
115 #endif


Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)