VR-Vantage 2.4 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) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
14 #include <vl/aggregatePublisher.h>
15 
16 #ifdef DtDIS
17 typedef DtAggregateStateEncoder DtAggPublisherEncoder;
18 typedef DtAggregateStateDecoder DtAggPublisherDecoder;
19 #elif DtHLA
22 #endif
23 
25 class DtEntityType;
26 class DtBaseEntityStateRepository;
27 
33 {
34 public:
35 
36  typedef DtAggregateStateRepository* (*MyStateRepCreator)();
37 
38 public:
39 
47  const DtEntityType& type,
48  DtExerciseConn* conn,
49 #if DtHLA
50  const DtGlobalObjectDesignator& glId = DtVrfObjectIdGenerator::nullId(),
51 #endif
52  const DtEntityIdentifier& entId = DtEntityIdentifier::nullId());
53 
55  virtual ~DtVrfAggregatePublisher();
56 
57 public:
60  virtual void addEntity(const DtBaseEntityStateRepository*);
61  virtual void removeEntity(const DtBaseEntityStateRepository*);
62 
63  virtual void addAggregate(const DtBaseEntityStateRepository*);
64  virtual void removeAggregate(const DtBaseEntityStateRepository*);
65 
69  virtual void setExtendedData(const DtString& key, const DtString& value);
70  virtual void clearExtendedData();
71  virtual void removeExtendedData(const DtString& key);
72  virtual DtString extendedData(const DtString& key) const;
74 
75 public:
82  virtual void tick();
83 
86  virtual DtExtAggregateStateRepository* aggregateProcessStateRep();
87  virtual DtExtAggregateStateRepository* aggregateStateRep();
88 
90  virtual DtExtAggregateStateRepository* agsr();
91 
92 #ifdef DtHLA
93 
94 
95 
96  virtual DtAggPublisherDecoder* decoder();
97 
100  virtual DtAggPublisherEncoder* encoder();
101 #endif
102 
105  {
106  return myPublisher->sr();
107  }
108 
109 #ifdef DtHLA
110  const DtString& name() const
111  {
112  return myPublisher->name();
113  }
114 #endif
115 
117  virtual const DtObjectId& id() const;
118 
120  virtual const DtObjectId& localId() const;
121 
123  virtual const DtGlobalObjectDesignator& globalId() const;
124 
127  virtual void forceUpdate();
128 
130  virtual DtAggregatePublisher* aggregatePublisher();
131 
134  virtual void setSendVrfObjectDataRecord(bool shouldSend);
135 
136 protected:
137 
143 
145  void initialize(const DtEntityType& type, DtExerciseConn* conn,
146 #if DtHLA
147  const DtGlobalObjectDesignator& glId,
148 #endif
149  const DtEntityIdentifier& entId);
150 
151 #ifdef DtDIS
152 
153 
154  virtual void sendFinalPdu();
155 #endif
156 
157 private:
161 
162 protected:
163  DtAggregatePublisher* myPublisher;
164 };


Copyright © 2005-2018 VT MAK. All Rights Reserved (www.mak.com)