VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfAggregatePublisher.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
16 #include <vl/aggregatePublisher.h>
17 #include <vlutil/vlSmartPointers.h>
19 
20 #ifdef DtDIS
21 typedef DtAggregateStateEncoder DtAggPublisherEncoder;
22 typedef DtAggregateStateDecoder DtAggPublisherDecoder;
23 #else // DtHLA
26 #endif
27 
29 class DtBaseEntityStateRepository;
30 class DtEntityType;
32 
33 namespace makVrfVrlinkExtToolkit
34 {
35  class DtExtendedAttributesObjectPublisher;
36 }
37 
43 {
44 public:
45 
46  typedef DtAggregateStateRepository* (*MyStateRepCreator)();
47 
58  const DtEntityType& type, DtExerciseConn* conn,
59 #if DtHLA
61  const DtGlobalObjectDesignator& extAttrGlId = DtGlobalObjectDesignator::nullId(),
62 #endif
63  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
64  DtRwProperties* stateProps = 0, DtRwProperties* paramProps = 0);
65 
75  const DtEntityType& type, DtExerciseConn* conn,
76 #if DtHLA
78  const DtGlobalObjectDesignator& extAttrGlId = DtGlobalObjectDesignator::nullId(),
79 #endif
80  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
81  const DtRwProperties& stateProps = DtRwProperties::emptyProperties(),
82  const DtRwProperties& paramProps = DtRwProperties::emptyProperties());
83 
85  virtual ~DtVrfAggregatePublisher();
86 
89  virtual void addEntity(const DtBaseEntityStateRepository*);
90  virtual void removeEntity(const DtBaseEntityStateRepository*);
91 
92  virtual void addAggregate(const DtBaseEntityStateRepository*);
93  virtual void removeAggregate(const DtBaseEntityStateRepository*);
94 
99  virtual void setExtendedData(const DtString& key, const DtString& value);
100  virtual void clearExtendedData();
101  virtual void removeExtendedData(const DtString& key);
102  virtual DtString extendedData(const DtString& key) const;
104 
113  virtual bool tick(
114 #ifdef DtHLA
115  bool& extAttrPublisherTick
116 #endif
117  );
118 
122  virtual DtExtAggregateStateRepository* aggregateProcessStateRep();
123  virtual DtExtAggregateStateRepository* aggregateStateRep();
124  virtual DtExtAggregateStateRepository* agsr();
126 
127 #ifdef DtHLA
128  virtual DtAggPublisherDecoder* decoder();
131 
134  virtual DtAggPublisherEncoder* encoder();
135 #endif
136 
139  {
140  return myPublisher->sr();
141  }
142 
143 #ifdef DtHLA
144  const DtString& name() const
146  {
147  return myPublisher->name();
148  }
149 #endif
150 
152  virtual const DtObjectId& id() const;
153 
155  virtual const DtObjectId& localId() const;
156 
158  virtual const DtGlobalObjectDesignator& globalId() const;
159 
162  virtual void forceUpdate();
163 
165  virtual DtAggregatePublisher* aggregatePublisher();
166 
169  virtual void setSendVrfObjectDataRecord(bool shouldSend);
170 
172  static void setInitializer(DtExtendedAttributesInitializerPtr init);
173 
175  static DtExtendedAttributesInitializerPtr initializer();
176 
177 #if DtHLA
178  static void setObjectClassChooser(DtObjectClassChooserPtr chooser);
180 
182  static DtObjectClassChooserPtr objectClassChooser();
183 #endif
184 
185 protected:
186 
192 
194  void initialize(const DtEntityType& type, DtExerciseConn* conn,
195 #if DtHLA
196  const DtGlobalObjectDesignator& glId,
197 #endif
198  const DtEntityIdentifier& entId);
199 
200 #ifdef DtDIS
201  virtual void sendFinalPdu();
204 #endif
205 
206 private:
207 
210 
213 
214 protected:
215 
216  DtAggregatePublisher* myPublisher;
217 
218 #if DtHLA
220 
222 #endif
223 
225 };
static DtGlobalObjectDesignator nullId()
Definition: vrfObjectIdGenerator.h:54
static const DtRwProperties & emptyProperties()
DtAggregatePublisher * myPublisher
Definition: vrfAggregatePublisher.h:216
Contains the DtVrfObjectIdGenerator class declaration.
std::shared_ptr< DtObjectClassChooser > DtObjectClassChooserPtr
Definition: objectClassChooser.h:49
DtAggregateStateEncoder DtAggPublisherEncoder
Definition: vrfAggregatePublisher.h:21
Contains the DtVrfAggregatePublisher class declaration.
static DtExtendedAttributesInitializerPtr theInitializer
Definition: vrfAggregatePublisher.h:224
static DtObjectClassChooserPtr theObjectClassChooser
Definition: vrfAggregatePublisher.h:221
DtAggregateStateDecoder DtAggPublisherDecoder
Definition: vrfAggregatePublisher.h:22
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
makVrfVrlinkExtToolkit::DtExtendedAttributesObjectPublisher * myExtAttrPublisher
Definition: vrfAggregatePublisher.h:219
std::shared_ptr< DtExtendedAttributesInitializer > DtExtendedAttributesInitializerPtr
Definition: extendedAttributesInitializer.h:162
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
This class is used to choose the object class to publish. By default it uses the classes configured i...
Definition: objectClassChooser.h:20
This class will wrap a VR-Link DtAggregatePublisher to allow for easier creation of a publisher that ...
Definition: vrfAggregatePublisher.h:42
DtStateRepository * sr()
Returns the state repository.
Definition: vrfAggregatePublisher.h:138
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23
DtExtAggregateStateRepository class extends the DtExtAggregateBaseStateRepository to be able to handl...
Definition: extAggregateStateRepository.h:26

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)