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) 2025 MAK Technologies, Inc.
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 
28  virtual ~DtAggregateExtendedRecordData() override;
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 
49  virtual ~DtExtAggregateBaseStateRepository() override;
50 
53 
57 
59  virtual DtStateRepository *clone(bool copy = false) const override;
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 override;
75 
76  const DtEntityType& objectType() const { return entityType(); };
77 
79  {
80  return myExtendedRecordData;
81  }
82 
84  {
85  return myExtendedRecordData;
86  }
87 
89  virtual void generateUniqueId();
91  virtual void setUniqueId(const DtVrlUuid& uniqueId);
93  virtual const DtVrlUuid& uniqueId() const;
94 
97  virtual void addEntity(const DtBaseEntityStateRepository*);
98  virtual void removeEntity(const DtBaseEntityStateRepository*);
99 
100  virtual void addAggregate(const DtBaseEntityStateRepository*);
101  virtual void removeAggregate(const DtBaseEntityStateRepository*);
102 
104  virtual void addSubordinate(const DtEntityIdentifier&);
105  virtual void removeSubordinate(const DtEntityIdentifier&);
106 
108  virtual void setExtendedData(const std::map<DtString, DtString> &ed) override;
109  virtual void setExtendedData(const DtString &key,
110  const DtString &value) override;
111 
115  virtual int numVrfVariableDatumRecords() const;
116 
118  virtual bool getUserVariableDatum(int userRecordNumber,
119  DtVariableDatumRecord& rec);
120 
122  virtual bool setUserVariableDatum(int userRecordNumber,
123  const DtVariableDatumRecord& record);
124 
129  virtual void updateDataRecords();
130 
134  virtual void setSendVrfObjectDataRecord(bool shouldSend);
135  virtual bool shouldSendVrfObjectDataRecord() const;
137 
139  int appearance() const;
140  void setAppearance(int);
141 
143  const std::vector<DtEntityIdentifier>& orderedSubordinates() const;
144  virtual void setOrderedSubordinates(const std::vector<DtEntityIdentifier>&);
145 
147 
148  virtual DtString formationName() const;
149  virtual void setFormationName(const DtString& formationName);
151 
153  virtual void updateExtensions();
154 
155  static DtExtAggregateBaseStateRepository* create();
156 
157 protected:
158 
159 #ifdef DtDIS
160  virtual void addUuidRecord();
162 #endif
163 
164  virtual void extensionModified() override;
165 
166 protected:
169 
171  std::vector<DtEntityIdentifier> myOrderedSubordinates;
172 
177 
179 
181  DtVrlUuid myUuid;
182 };
183 
185 {
186  return myAppearance;
187 }
188 
190 {
191  if (i != myAppearance)
192  {
193  myRecordModified = true;
194  myAppearance = i;
195  }
196 }
197 
198 inline const std::vector<DtEntityIdentifier>& DtExtAggregateBaseStateRepository::orderedSubordinates() const
199 {
200  return myOrderedSubordinates;
201 }
DtString myFormationName
Definition: extAggregateBaseStateRepository.h:176
int myBitLength
Definition: extAggregateBaseStateRepository.h:174
Definition: vrfExtensions.h:22
std::vector< DtEntityIdentifier > myOrderedSubordinates
Definition: extAggregateBaseStateRepository.h:171
DtVrfExtensions & operator=(const DtVrfExtensions &orig)
DtVrfExtendedRecordData & extendedRecordData()
Definition: extAggregateBaseStateRepository.h:83
const DtEntityType & objectType() const
Definition: extAggregateBaseStateRepository.h:76
Definition: vrfExtendedRecordData.h:18
const DtVrfExtendedRecordData & extendedRecordData() const
Definition: extAggregateBaseStateRepository.h:78
bool myRecordModified
Definition: extAggregateBaseStateRepository.h:175
const std::vector< DtEntityIdentifier > & orderedSubordinates() const
Gets/sets the list of subordinates in subordinate order.
Definition: extAggregateBaseStateRepository.h:198
DtAggregateExtendedRecordData myExtendedRecordData
Definition: extAggregateBaseStateRepository.h:168
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:173
int appearance() const
Appearance as read from network or set by user.
Definition: extAggregateBaseStateRepository.h:184
int myAppearance
Definition: extAggregateBaseStateRepository.h:170
DtExtAggregateBaseStateRepository * myLastCopy
Definition: extAggregateBaseStateRepository.h:167
virtual void extensionModified()
bool mySendVrfObjectDataRec
Definition: extAggregateBaseStateRepository.h:178
DtVrlUuid myUuid
Definition: extAggregateBaseStateRepository.h:181
void setAppearance(int)
Definition: extAggregateBaseStateRepository.h:189
#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:180

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)