VR-Forces 4.1.1 Class Documentation
extAggSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2000 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: extAggSR.h,v $ $Revision: 1.14 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef EXTAGGSR_H
10 #define EXTAGGSR_H
11 
12 #include <vl/aggregateSR.h>
14 
15 #include <vector>
16 
17 // class DtExtAggregateStateRepository:
18 //
19 // Instances of DtExtAggregateStateRepository are
20 
23 {
24 
25 public:
26 
27  // default constructor
29 
30  // destructor
32 
33  // copy constructor
35 
36  // assignment operator
38  const DtExtAggregateStateRepository& orig);
39 
40  // Return a copy/empty object of the same type as this.
41  virtual DtStateRepository* clone(bool copy = false) const;
42 
43  // Compares us against the supplied state repository and returns what's
44  // changed
45  virtual int compare(const DtExtAggregateStateRepository* rhs);
46 
47  // Returns what has changed since the last time we called compare
48  virtual int compareToMostRecent();
49 
50  // Returns true if our stashed location is different than our
51  // current location
52  virtual bool locationsDifferent(bool updateIfDifferent);
53 
54 public:
57  virtual void addEntity(const DtBaseEntityStateRepository*);
58  virtual void removeEntity(const DtBaseEntityStateRepository*);
59 
60  virtual void addAggregate(const DtBaseEntityStateRepository*);
61  virtual void removeAggregate(const DtBaseEntityStateRepository*);
62 
64  virtual void addSubordinate(const DtEntityIdentifier&);
65  virtual void removeSubordinate(const DtEntityIdentifier&);
66 
67 public:
71  virtual int numVrfVariableDatumRecords() const;
72 
74  virtual bool getUserVariableDatum(int userRecordNumber,
75  DtVariableDatumRecord& rec);
76 
78  virtual bool setUserVariableDatum(int userRecordNumber,
79  const DtVariableDatumRecord& record);
80 
86  virtual void updateDataRecords();
87 
88 public:
89  // Appearance as read from network or set by user
90  int appearance() const;
91  void setAppearance(int);
92 
93  // Gets/sets the list of subordinates in subordinate order
94  const std::vector<DtEntityIdentifier>& orderedSubordinates() const;
95  virtual void setOrderedSubordinates(const std::vector<DtEntityIdentifier>&);
96 
97  // The name of the current formation of the aggregate.
99  virtual DtString formationName() const;
100  virtual void setFormationName(const DtString& formationName);
102 
103 public:
105  virtual void updateExtensions();
106 
107 public:
108 
109  static DtExtAggregateStateRepository* create();
110 
111 protected:
112  virtual void extensionModified();
113 
114 protected:
116 
118  std::vector<DtEntityIdentifier> myOrderedSubordinates;
119 
124 };
125 
127 {
128  return myAppearance;
129 }
130 
132 {
133  if (i != myAppearance)
134  {
135  myRecordModified = true;
136  myAppearance = i;
137  }
138 }
139 
140 inline const std::vector<DtEntityIdentifier>& DtExtAggregateStateRepository::orderedSubordinates() const
141 {
142  return myOrderedSubordinates;
143 }
144 
145 #endif

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)