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 #endif
62  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
63  DtRwProperties* stateProps = 0, DtRwProperties* paramProps = 0);
64 
74  const DtEntityType& type, DtExerciseConn* conn,
75 #if DtHLA
77 #endif
78  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId(),
79  const DtRwProperties& stateProps = DtRwProperties::emptyProperties(),
80  const DtRwProperties& paramProps = DtRwProperties::emptyProperties());
81 
83  virtual ~DtVrfAggregatePublisher();
84 
87  virtual void addEntity(const DtBaseEntityStateRepository*);
88  virtual void removeEntity(const DtBaseEntityStateRepository*);
89 
90  virtual void addAggregate(const DtBaseEntityStateRepository*);
91  virtual void removeAggregate(const DtBaseEntityStateRepository*);
92 
97  virtual void setExtendedData(const DtString& key, const DtString& value);
98  virtual void clearExtendedData();
99  virtual void removeExtendedData(const DtString& key);
100  virtual DtString extendedData(const DtString& key) const;
102 
111  virtual bool tick(
112 #ifdef DtHLA
113  bool& extAttrPublisherTick
114 #endif
115  );
116 
120  virtual DtExtAggregateStateRepository* aggregateProcessStateRep();
121  virtual DtExtAggregateStateRepository* aggregateStateRep();
122  virtual DtExtAggregateStateRepository* agsr();
124 
125 #ifdef DtHLA
126  virtual DtAggPublisherDecoder* decoder();
129 
132  virtual DtAggPublisherEncoder* encoder();
133 #endif
134 
137  {
138  return myPublisher->sr();
139  }
140 
141 #ifdef DtHLA
142  const DtString& name() const
144  {
145  return myPublisher->name();
146  }
147 #endif
148 
150  virtual const DtObjectId& id() const;
151 
153  virtual const DtObjectId& localId() const;
154 
156  virtual const DtGlobalObjectDesignator& globalId() const;
157 
160  virtual void forceUpdate();
161 
163  virtual DtAggregatePublisher* aggregatePublisher();
164 
167  virtual void setSendVrfObjectDataRecord(bool shouldSend);
168 
170  static void setInitializer(DtExtendedAttributesInitializerPtr init);
171 
173  static DtExtendedAttributesInitializerPtr initializer();
174 
175 #if DtHLA
176  static void setObjectClassChooser(DtObjectClassChooserPtr chooser);
178 
180  static DtObjectClassChooserPtr objectClassChooser();
181 #endif
182 
183 protected:
184 
190 
192  void initialize(const DtEntityType& type, DtExerciseConn* conn,
193 #if DtHLA
194  const DtGlobalObjectDesignator& glId,
195 #endif
196  const DtEntityIdentifier& entId);
197 
198 #ifdef DtDIS
199  virtual void sendFinalPdu();
202 #endif
203 
204 private:
205 
208 
211 
212 protected:
213 
214  DtAggregatePublisher* myPublisher;
215 
216 #if DtHLA
218 
220 #endif
221 
223 };
static DtGlobalObjectDesignator nullId()
Definition: vrfObjectIdGenerator.h:54
static const DtRwProperties & emptyProperties()
DtAggregatePublisher * myPublisher
Definition: vrfAggregatePublisher.h:214
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:222
static DtObjectClassChooserPtr theObjectClassChooser
Definition: vrfAggregatePublisher.h:219
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:217
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:136
#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 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)