VR-Vantage 2.7 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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
60  const DtGlobalObjectDesignator& glId = DtVrfObjectIdGenerator::nullId(),
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
76  const DtGlobalObjectDesignator& glId = DtVrfObjectIdGenerator::nullId(),
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 
108  virtual void tick();
109 
113  virtual DtExtAggregateStateRepository* aggregateProcessStateRep();
114  virtual DtExtAggregateStateRepository* aggregateStateRep();
115  virtual DtExtAggregateStateRepository* agsr();
117 
118 #ifdef DtHLA
119 
120 
121  virtual DtAggPublisherDecoder* decoder();
122 
125  virtual DtAggPublisherEncoder* encoder();
126 #endif
127 
130  {
131  return myPublisher->sr();
132  }
133 
134 #ifdef DtHLA
135 
136  const DtString& name() const
137  {
138  return myPublisher->name();
139  }
140 #endif
141 
143  virtual const DtObjectId& id() const;
144 
146  virtual const DtObjectId& localId() const;
147 
149  virtual const DtGlobalObjectDesignator& globalId() const;
150 
153  virtual void forceUpdate();
154 
156  virtual DtAggregatePublisher* aggregatePublisher();
157 
160  virtual void setSendVrfObjectDataRecord(bool shouldSend);
161 
163  static void setInitializer(DtExtendedAttributesInitializerPtr init);
164 
166  static DtExtendedAttributesInitializerPtr initializer();
167 
168 #if DtHLA
169 
170  static void setObjectClassChooser(DtObjectClassChooserPtr chooser);
171 
173  static DtObjectClassChooserPtr objectClassChooser();
174 #endif
175 
176 protected:
177 
183 
185  void initialize(const DtEntityType& type, DtExerciseConn* conn,
186 #if DtHLA
187  const DtGlobalObjectDesignator& glId,
188 #endif
189  const DtEntityIdentifier& entId);
190 
191 #ifdef DtDIS
192 
193 
194  virtual void sendFinalPdu();
195 #endif
196 
197 private:
198 
201 
204 
205 protected:
206 
207  DtAggregatePublisher* myPublisher;
208 
209 #if DtHLA
211 
213 #endif
214 
216 };


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