VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfControlObjectPublisher.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
16 #include <vl/environmentProcessPublisher.h>
17 #include <vlutil/vlSmartPointers.h>
19 
20 
22 class DtEntityType;
24 
25 namespace makVrfVrlinkExtToolkit
26 {
27  class DtExtendedAttributesObjectPublisher;
28 }
29 
35 {
36 public:
37 
38  typedef DtControlObjectRepository* (*MyStateRepCreator)();
39 
50  const DtEntityType& type, DtExerciseConn* conn,
51 #if DtHLA
53 #endif
54  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
55  DtRwProperties* stateProps = 0, DtRwProperties* paramProps = 0);
56 
66  const DtEntityType& type, DtExerciseConn* conn,
67 #if DtHLA
69 #endif
70  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
71  const DtRwProperties& stateProps = DtRwProperties::emptyProperties(),
72  const DtRwProperties& paramProps = DtRwProperties::emptyProperties());
73 
75  virtual ~DtVrfControlObjectPublisher();
76 
81  virtual void setExtendedData(const DtString& key, const DtString& value);
82  virtual void clearExtendedData();
83  virtual void removeExtendedData(const DtString& key);
84  virtual DtString extendedData(const DtString& key) const;
86 
92  virtual bool tick(
93 #if DtHLA
94  bool& extAttrTicked
95 #endif
96  );
97 
101  virtual DtControlObjectRepository* controlObjectProcessStateRep();
102  virtual DtControlObjectRepository* controlObjectStateRep();
103  virtual DtControlObjectRepository* cosr();
105 
106 #ifdef DtHLA
107  virtual DtCtrlPublisherDecoder* decoder();
110 
113  virtual DtCtrlPublisherEncoder* encoder();
114 #endif
115 
118  {
119  return myPublisher->sr();
120  }
121 
122 #ifdef DtHLA
123  const DtString& name() const
125  {
126  return myPublisher->name();
127  }
128 #endif
129 
131  virtual const DtObjectId& id() const;
132 
134  virtual const DtObjectId& localId() const;
135 
137  virtual const DtGlobalObjectDesignator& globalId() const;
138 
141  virtual void forceUpdate();
142 
144  virtual DtControlObjectPublisher* controlObjectPublisher();
145 
148  virtual void setSendVrfObjectDataRecord(bool shouldSend);
149 
151  static void setInitializer(DtExtendedAttributesInitializerPtr init);
152 
154  static DtExtendedAttributesInitializerPtr initializer();
155 
156 #if DtHLA
157  static void setObjectClassChooser(DtObjectClassChooserPtr chooser);
159 
161  static DtObjectClassChooserPtr objectClassChooser();
162 #endif
163 
164 protected:
165 
171 
173  void initialize(const DtEntityType& type, DtExerciseConn* conn,
174 #if DtHLA
175  const DtGlobalObjectDesignator& glId,
176 #endif
177  const DtEntityIdentifier& entId);
178 
179  virtual DtControlObjectPublisher* createPublisher(const DtEntityType& type, DtExerciseConn* conn,
180 #if DtHLA
181  const DtGlobalObjectDesignator& glId,
182 #endif
183  const DtEntityIdentifier& entId) const;
184 
185 private:
186 
189 
192 
193 protected:
194 
196 
197 #if DtHLA
199 
201 #endif
202 
204 };
Contains the DtControlObjectPublisher class declaration.
static DtGlobalObjectDesignator nullId()
Definition: vrfObjectIdGenerator.h:54
This class will wrap a DtControlObjectPublisher to allow for easier creation of a publisher that is c...
Definition: vrfControlObjectPublisher.h:34
static const DtRwProperties & emptyProperties()
Contains the DtVrfObjectIdGenerator class declaration.
DtStateRepository * sr()
Returns the state repository.
Definition: vrfControlObjectPublisher.h:117
DtControlObjectRepository class extends the DtControlObjectBaseRepository to be able to handle extend...
Definition: controlObjectRepository.h:27
DtEnvironmentProcessDecoder DtCtrlPublisherDecoder
Definition: controlObjectPublisher.h:18
DtControlObjectPublisher * myPublisher
Definition: vrfControlObjectPublisher.h:195
static DtObjectClassChooserPtr theObjectClassChooser
Definition: vrfControlObjectPublisher.h:200
static DtExtendedAttributesInitializerPtr theInitializer
Definition: vrfControlObjectPublisher.h:203
This class will wrap a VR-Link DtEnvironmentalProcessPublisher to allow for easier creation of a publ...
Definition: controlObjectPublisher.h:31
makVrfVrlinkExtToolkit::DtExtendedAttributesObjectPublisher * myExtAttrPublisher
Definition: vrfControlObjectPublisher.h:198
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtBoost::shared_ptr< DtExtendedAttributesInitializer > DtExtendedAttributesInitializerPtr
Definition: extendedAttributesInitializer.h:158
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
This class is used to choose the object class to publish. By default it uses the classes configured i...
Definition: objectClassChooser.h:20
DtBoost::shared_ptr< DtObjectClassChooser > DtObjectClassChooserPtr
Definition: vrfObjectClassChooser.h:46
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)