VR-Vantage 3.1 API Documentation
 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) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
16 #include <vl/aggregatePublisher.h>
17 #include <vlutil/vlSmartPointers.h>
18 #include <readerWriter/rwProperties.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 
127 
128  virtual DtAggPublisherDecoder* decoder();
129 
132  virtual DtAggPublisherEncoder* encoder();
133 #endif
134 
137  {
138  return myPublisher->sr();
139  }
140 
141 #ifdef DtHLA
142 
143  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 
177  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 
200 
201  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 };


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)