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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)