VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
reflectedControlObjectList.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/reflectedEnvironmentProcessList.h>
15 #include <vl/dataInteraction.h>
16 
17 // class DtReflectedControlObjectList:
18 // Instances of DtReflectedControlObjectList manage the list of
19 // remote environmental processes in the exercise.
21 {
22 
23 public:
24 
25  // Constructor - obtains the set of object classes to subscribe
26  // to from the exConn's fomMapper.
27  DtReflectedControlObjectList(DtExerciseConn* exConn);
28 
29 #if DtHLA
30  // Constructor - obtains the set of object classes to subscribe
31  // to from the exConn's fomMapper.
32  DtReflectedControlObjectList(DtExerciseConn* exConn,
33  const DtDDMRegionSet* regionSetToUse);
34 
35  // Constructor - only subscribe to the RTI::ObjectClassHandles
36  // in handleList.
37  DtReflectedControlObjectList ( DtExerciseConn* exConn, const DtList *handleList,
38  const DtDDMRegionSet* regionSetToUse = 0);
39 #endif
40 
41  // destructor
43 
44 #if DtHLA
45 #if DtHLA_1516
46  virtual DtReflectedControlObject* lookupCO(RTI::ObjectInstanceHandle id);
47 #else
48  virtual DtReflectedControlObject* lookupCO(RTI::ObjectHandle id);
49 #endif
50 #elif (DtDIS || DtTENA)
51  // Look up environmental process by identifier.
52  virtual DtReflectedControlObject* lookup(const DtObjectId& id);
53 #else
54 # pragma message ( "No protocol defined." )
55 #endif
56 
57  // Get the first/last environmental process in the list.
58  virtual DtReflectedControlObject* firstCO() const;
59  virtual DtReflectedControlObject* lastCO() const;
60 
61  // Look up an environmental process object by DtGlobalObjectDesignator.
62  virtual DtReflectedControlObject* lookupCO(
63  const DtGlobalObjectDesignator& designator);
64 
65  // Environmental process added callback registration/deregistration.
66  virtual void addControlObjectAdditionCallback
67  (
68  DtControlObjectCallbackFunction cb, void* userData
69  );
70  virtual void removeControlObjectAdditionCallback
71  (
72  DtControlObjectCallbackFunction cb, void* userData
73  );
74 
75  // Environmental process removed callback registration/deregistration.
76  virtual void addControlObjectRemovalCallback
77  (
78  DtControlObjectCallbackFunction cb, void* userData
79  );
80  virtual void removeControlObjectRemovalCallback
81  (
82  DtControlObjectCallbackFunction cb, void* userData
83  );
84 
85 protected:
86 
87  // copy constructor
89  (
91  );
92 
93  // assignment operator
95  (
97  );
98 
99  static void dataInteractionCallback(DtDataInteraction* i, void* usr);
100 
101  virtual void processDataInteraction(DtDataInteraction* i);
102 
103 #if DtHLA
104  virtual DtReflectedObject* newReflectedObject(DtHlaObject* obj) const;
105 #elif (DtDIS || DtTENA)
106  // Create a new reflected control object.
107  virtual DtReflectedEnvironmentProcess* newReflectedEnvironmentProcess
108  (
109  const DtEntityIdentifier& id,
110  const DtEntityType& type
111  ) const;
112 #else
113 # pragma message ( "No protocol defined." )
114 #endif
115 };

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)