VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfAggregateStateRepository.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
14 #include "vrfutil/formationState.h"
15 #include <vlpi/disEnums.h>
16 
18 class DtFormationState;
19 class DtFormation;
20 
22 {
23 private:
26 
28 
30  const DtVrfAggregateStateRepository & orig);
31 
32 public:
33 
34  DtVrfAggregateStateRepository (DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
35  DtReaderWriterRegistry* parentRegistry = 0);
36 
37  virtual ~DtVrfAggregateStateRepository() override;
38 
45  virtual void initStatePropertiesNotToBeRestored() override;
46 
48  virtual DtString type() const override;
49 
51  virtual std::list<DtString> allowableFormationNames() const;
52 
55  virtual void setBlockSetFormationChange(bool);
56  virtual bool blockSetFormationChange() const;
57 
59  virtual const int vrfMovingObjectStateRepositorySubType() const override;
60 
62  virtual const int aggregateStateRepositorySubType() const;
63 
65  virtual void getSelf(DtlObjPtr args,
66  const DtReaderWriter::SearchPaths& searchPaths,
67  const DtVariableBindingsList& variableBindings) override;
68 
70  static DtVrfObjectStateRepository* creator (const DtString& name,
71  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
72 
74  {
75  return myFormationState;
76  }
77 
79  {
80  return myFormationState;
81  }
82 
83  virtual void pruneEngagementHistory(int clampSize);
84 
85 protected:
86 
91  virtual void preGetSelf() override;
92  virtual void postGetSelf() override;
93 
94  virtual void setToLegacyRWData() override;
95  virtual void restoreFromLegacyRWData() override;
96  virtual void createLegacyRWData() override;
97 
98  virtual void updateSupportPoints(const DtVector& newPosition, const DtReal newHeading) override;
99 
100  virtual void tick() override;
101  virtual void updateCachedStateProperties() override;
102 
103 public:
106 
107 protected:
110 
112  DtRwPropertiesMap* myEngagementHistory = nullptr;
113  DtRwPropertiesMap* myArchivedEngagementHistory = nullptr;
114 
115 public:
117 
119 
120  VRF4API_METHOD virtual void setFormationName(const DtString& name);
126  VRF4API_METHOD virtual DtString formationName() const;
128 
134 
135  VRF4API_METHOD virtual void setAggregateState(enum DtAggregateState state);
136  VRF4API_METHOD virtual enum DtAggregateState aggregateState() const;
138 
139  VRF4API_METHOD virtual void setFormation(DtAggregateFormation formation);
140  VRF4API_METHOD virtual DtAggregateFormation formation() const;
141 
143  VRF4API_METHOD virtual double formationHalfLength();
144 
145  VRF4API_METHOD virtual bool aggregatedExtent(DtExtent& extent);
146 
148  VRF4API_METHOD virtual double totalMass() const override;
150 };
151 
DtAggregateLocalObjectFacade myAggregateLocalObject
Definition: vrfAggregateStateRepository.h:111
virtual void postGetSelf() override
Hook function called immediately following getSelf().
Contains the DtVrfMovingObjectStateRepository class declaration.
virtual void initStatePropertiesNotToBeRestored()
Initializes the list of state properties which should not be restored.
DtFormationState myFormationState
Definition: vrfAggregateStateRepository.h:109
Definition: formationState.h:40
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
virtual void preGetSelf() override
Hook function called immediately prior to getSelf().
DtFormationState & formationState()
Definition: vrfAggregateStateRepository.h:78
static int TheDefaultEnagementHistoryClampSize
Default is 60.
Definition: vrfAggregateStateRepository.h:105
virtual double totalMass() const
Returns the current total mass of the entity.
bool myBlockSetFormationChange
Definition: vrfAggregateStateRepository.h:108
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
const DtFormationState & formationState() const
Definition: vrfAggregateStateRepository.h:73
DtVrfMovingObjectStateRepository & operator=(const DtVrfMovingObjectStateRepository &orig)
Assignment Operator.
Definition: readerWriterRegistry.h:39
Instances of DtFormation are a list of DtFormationEntry objects which make up an aggregate formation...
Definition: formation.h:22
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
virtual const int vrfMovingObjectStateRepositorySubType() const
Returns DtVrfMovingObjectStateRepositorySubTypeBase.
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:92
virtual void setToLegacyRWData() override
virtual void restoreFromLegacyRWData() override
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual void tick() override
Tick function.
virtual void createLegacyRWData() override
Creates the legacy data used for any pre/put operation. Override this to create your legacy data atta...
Acts as a map for properties. A map is a definition that has a key and a prototype, with values being the key and prototype pair. The key can only be a string (DtRwStringType), int (DtRwIntType, DtRwInt8Type, DtRwInt16Type, DtRwInt32Type), or real (DtRwRealType, DtRwReal32Type, DtRwReal64Type).
Definition: rwPropertiesMap.h:41
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
Override getSelf to handle mapping of old pre-2.0 oob files. Maps the old variables for local and wor...
virtual DtString type() const override
returns DtSimObjectStateRepositoryType
Definition: vrfAggregateStateRepository.h:21
virtual void updateCachedStateProperties()
Call to update any cached values that are representative of state properties. This is done for effici...
Contains the set of readable/writeable parameters associated with a pseudo-aggregate entities...
Definition: aggregateObjectParameters.h:29
virtual void updateSupportPoints(const DtVector &newPosition, const DtReal newHeading) override
When reading in a scenario, want to make sure the support points get set up properly. Note that this will make a blocking call to DtVrfObjectStateRepository::placePoints to allow all the necessary parts of the terrain to page in before the scenario load is complete.
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:23
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)