VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extEntityStateRepository.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 
12 #include <vl/entityStateRepository.h>
15 
16 #include <list>
17 
18 // class DtExtEntityStateRepository:
19 //
20 // Instances of DtExtEntityStateRepository are
23 
26  public DtVrfExtensions
27 {
28 public:
29 
30  // default constructor
32 
33  // destructor
34  virtual ~DtExtEntityStateRepository();
35 
36  // copy constructor
38 
39  // assignment operator
41 
42  // Return a copy/empty object of the same type as this.
43  virtual DtStateRepository* clone(bool copy = false) const;
44 
45  // Compares us against the supplied state repository and returns what's
46  // changed
47  virtual int compare(const DtExtEntityStateRepository* rhs);
48 
49  // Returns what has changed since the last time we called compare
50  virtual int compareToMostRecent();
51 
52  // Compares articulated parts in the local copy to current values
53  // and returns a non-zero value if modified. If modified, copies current
54  // into last value
55  virtual int compareArtParts(const std::list<int>&);
56 
57  // Compares each value that is valid, and, if any have changed, returns
58  // DtChanged_Other
59  virtual int compareArtParts(const DtArticulatedPart* source, const DtArticulatedPart* target);
60 
61  // Returns true if our stashed location is different than our
62  // current location
63  virtual bool locationsDifferent(bool updateIfDifferent);
64 
65  // If the DI guy repository being set is *not* of the extended type, then create one of the extended type (passing in the di guy state rep into the copy
66  // constructor) before setting in the base class
67  virtual void setDiGuyStateRepository( DtDIGuyObjectStateRepository* diGuyStateRep );
68 
69  // DI-Guy extension. Get/set body weight
70  virtual void setBodyWeight(double);
71  virtual double bodyWeight() const;
72 
77  virtual DtString uuidString() const;
78 
79 public:
81  bool needsVrfDataUpdate() const;
82  void clearVrfDataNeedsUpdate();
83 
85  bool hasVrfObjectDataMessage() const;
86 
90  void setHasVrfObjectDataMessage(bool);
91 
95  virtual void setSendVrfObjectDataRecord(bool shouldSend);
96  virtual bool shouldSendVrfObjectDataRecord() const;
98 
99  virtual DtExtDiGuyStateRepository* extDiGuyStateRepository();
100  virtual const DtExtDiGuyStateRepository* extDiGuyStateRepository() const;
101 
108  virtual void createDiGuyStateRep();
109 
110 public:
111 
112  static DtExtEntityStateRepository* create();
113 
114 protected:
115  virtual void extensionModified();
116 
117 public:
118  // Override to set myHasVrfObjectDataMessage to true
119  virtual bool setupFromVrfObjectData(const DtIfVrfObjectData& data);
120 
121 protected:
124 
125  // If true, a vrf object data message has been seen for this object. By default, this is false
127 
129 };
130 
132 {
134 }
135 
137 {
139 }
140 
142 {
143  return myVrfObjectDataUpdated;
144 }
145 
147 {
148  myVrfObjectDataUpdated = false;
149 }
150 
152 {
153  myVrfObjectDataUpdated = true;
154 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)