VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extAggregateBaseStateRepository.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2018 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
11 
12 #pragma once
13 
17 #include <vl/aggregateStateRepository.h>
18 #include <vector>
19 
21 {
22 public:
23 
26 
29 
31  virtual void updateDataRecords(DtAggregateStateRepository*);
32 
34  virtual void decodeDataRecords(DtAggregateStateRepository*);
35 
37  virtual bool readFromRecord(DtVariableDatumRecord&);
38 };
39 
41 {
42 
43 public:
44 
47 
50 
53 
57 
59  virtual DtStateRepository* clone(bool copy = false) const;
60 
63  virtual int compare(const DtExtAggregateBaseStateRepository* rhs);
64 
66  virtual int compareToMostRecent();
67 
70  virtual bool locationsDifferent(bool updateIfDifferent);
71 
74  virtual DtString extendedData(const DtString& key) const;
75 
77  {
78  return myExtendedRecordData;
79  }
80 
82  {
83  return myExtendedRecordData;
84  }
85 
87  virtual void generateUniqueId();
89  virtual void setUniqueId(const DtVrlUuid& uniqueId);
91  virtual const DtVrlUuid& uniqueId() const;
92 
95  virtual void addEntity(const DtBaseEntityStateRepository*);
96  virtual void removeEntity(const DtBaseEntityStateRepository*);
97 
98  virtual void addAggregate(const DtBaseEntityStateRepository*);
99  virtual void removeAggregate(const DtBaseEntityStateRepository*);
100 
102  virtual void addSubordinate(const DtEntityIdentifier&);
103  virtual void removeSubordinate(const DtEntityIdentifier&);
104 
106  virtual void setExtendedData(const std::map<DtString, DtString>& ed);
107  virtual void setExtendedData(const DtString& key, const DtString& value);
108 
112  virtual int numVrfVariableDatumRecords() const;
113 
115  virtual bool getUserVariableDatum(int userRecordNumber,
116  DtVariableDatumRecord& rec);
117 
119  virtual bool setUserVariableDatum(int userRecordNumber,
120  const DtVariableDatumRecord& record);
121 
127  virtual void updateDataRecords();
128 
132  virtual void setSendVrfObjectDataRecord(bool shouldSend);
133  virtual bool shouldSendVrfObjectDataRecord() const;
135 
137  int appearance() const;
138  void setAppearance(int);
139 
141  const std::vector<DtEntityIdentifier>& orderedSubordinates() const;
142  virtual void setOrderedSubordinates(const std::vector<DtEntityIdentifier>&);
143 
145 
146  virtual DtString formationName() const;
147  virtual void setFormationName(const DtString& formationName);
149 
151  virtual void updateExtensions();
152 
153  static DtExtAggregateBaseStateRepository* create();
154 
155 protected:
156 
157 #ifdef DtDIS
158  virtual void addUuidRecord();
160 #endif
161 
162  virtual void extensionModified();
163 
164 protected:
167 
169  std::vector<DtEntityIdentifier> myOrderedSubordinates;
170 
175 
177 
179  DtVrlUuid myUuid;
180 };
181 
183 {
184  return myAppearance;
185 }
186 
188 {
189  if (i != myAppearance)
190  {
191  myRecordModified = true;
192  myAppearance = i;
193  }
194 }
195 
196 inline const std::vector<DtEntityIdentifier>& DtExtAggregateBaseStateRepository::orderedSubordinates() const
197 {
198  return myOrderedSubordinates;
199 }
DtString myFormationName
Definition: extAggregateBaseStateRepository.h:174
int myBitLength
Definition: extAggregateBaseStateRepository.h:172
Definition: vrfExtensions.h:22
std::vector< DtEntityIdentifier > myOrderedSubordinates
Definition: extAggregateBaseStateRepository.h:169
DtVrfExtensions & operator=(const DtVrfExtensions &orig)
DtVrfExtendedRecordData & extendedRecordData()
Definition: extAggregateBaseStateRepository.h:81
Definition: vrfExtendedRecordData.h:18
const DtVrfExtendedRecordData & extendedRecordData() const
Definition: extAggregateBaseStateRepository.h:76
bool myRecordModified
Definition: extAggregateBaseStateRepository.h:173
const std::vector< DtEntityIdentifier > & orderedSubordinates() const
Gets/sets the list of subordinates in subordinate order.
Definition: extAggregateBaseStateRepository.h:196
DtAggregateExtendedRecordData myExtendedRecordData
Definition: extAggregateBaseStateRepository.h:166
Definition: extAggregateBaseStateRepository.h:20
virtual const std::map< DtString, DtString > & extendedData() const
Gets/sets extended data.
Contains the DtVrfExtensions class declaration.
char * mySubordinateBuffer
Definition: extAggregateBaseStateRepository.h:171
int appearance() const
Appearance as read from network or set by user.
Definition: extAggregateBaseStateRepository.h:182
int myAppearance
Definition: extAggregateBaseStateRepository.h:168
DtExtAggregateBaseStateRepository * myLastCopy
Definition: extAggregateBaseStateRepository.h:165
virtual void extensionModified()
bool mySendVrfObjectDataRec
Definition: extAggregateBaseStateRepository.h:176
DtVrlUuid myUuid
Definition: extAggregateBaseStateRepository.h:179
void setAppearance(int)
Definition: extAggregateBaseStateRepository.h:187
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23
Definition: extAggregateBaseStateRepository.h:40
virtual void setExtendedData(const std::map< DtString, DtString > &)
Gets/sets extended data.
bool myGeneratedUuid
Definition: extAggregateBaseStateRepository.h:178

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)