15 #include <vlutil/vlTime.h>
16 #include "legionDataStore/writeStateInstance.h"
17 #include "legionDataStore/readStateInstance.h"
18 #include "legionDataStore/view.h"
19 #include "vrfOM/sets/readStatePropertiesRepository.hpp"
20 #include "vrfOM/sets/writeStatePropertiesRepository.hpp"
24 class DtStatePropertiesStateComponentDataStore;
29 : myStateProperties(
"state-properties")
30 , myStatePropertiesUpdated(false)
31 , myParameterProperties(new
DtRwProperties(
"parameter-properties"))
36 : myStateProperties(orig.myStateProperties)
37 , myStatePropertiesUpdated(orig.myStatePropertiesUpdated)
38 , myParameterProperties(orig.myParameterProperties)
46 myStatePropertiesUpdated =
true;
53 myStatePropertiesUpdated =
false;
58 myStatePropertiesUpdated =
true;
63 myStateProperties.clearVariables();
64 std::vector<DtReaderWriterRegistryData*>::const_iterator itr = other.
registry().
registryData().begin();
65 std::vector<DtReaderWriterRegistryData*>::const_iterator end = other.
registry().
registryData().end();
66 for(; itr != end; ++itr)
74 otherRw, &myStateProperties.
registry());
87 bool myStatePropertiesUpdated;
100 : DtFrameStateInterface(storage)
109 virtual
void setStateProperties(const DtRwProperties&) {
throw DtUnimplementedMethod(
"setStateProperties(const DtRwProperties& key) is not implemented for this class"); };
127 const bool& statePropertiesUpdated()
const;
134 virtual void makeWritable();
137 virtual void makeReadOnly();
141 return myStatePropertiesModified;
146 myStatePropertiesModified =
false;
150 void setPublishingOnLegionNetwork(
bool);
152 void updateLegionNetwork(
double newTime);
174 const bool& statePropertiesUpdated()
const;
177 virtual bool findReadComponent();
178 virtual bool readComponentValid()
const;
180 void setPublishingOnLegionNetwork(
bool);
184 return myStatePropertiesModifiedByLegion;
189 myStatePropertiesModifiedByLegion =
false;
194 void handleStatePropertiesUpdated();
227 void updateDataStorage();
231 myCurrentFrameState.updateStateData(sd);
232 myNextFrameState.updateStateData(sd);
236 virtual bool forceAdvance();
243 myCurrentFrameState.aboutToBeDeleted();
244 myNextFrameState.aboutToBeDeleted();
248 void setPublishingOnLegionNetwork(
bool)
override;
void copyOnlPublishedStateProperties(const DtRwProperties &other)
Definition: statePropertiesStateComponent.h:61
Instances of DtVrfObjectParameters are the readable/writeable objects that contain the information ne...
Definition: vrfObjectParameters.h:63
DtStatePropertiesStateComponentData()
Definition: statePropertiesStateComponent.h:28
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: statePropertiesStateComponent.h:93
std::map< std::string, double > myLastTimeUpdated
Definition: statePropertiesStateComponent.h:208
std::map< DtString, DtString > ExtendedData
Definition: statePropertiesStateComponent.h:96
DtStatePropertiesStateComponentNextFrame myNextFrameState
Definition: statePropertiesStateComponent.h:252
double myLastTimeStatePropertiesUpdated
Definition: statePropertiesStateComponent.h:254
Definition: stateDataTypes.h:23
bool statePropertiesModified() const
Definition: statePropertiesStateComponent.h:139
Definition: statePropertiesStateComponent.h:26
#define UNDEFINED_METHOD(Type, Method,...)
Definition: doubleBufferedDataStorage.h:68
bool myStatePropertiesModified
Definition: statePropertiesStateComponent.h:156
2) Define the next frame class. This will be used for write access.
Definition: statePropertiesStateComponent.h:113
VRF::WriteStatePropertiesRepository myWriteStatePropertiesRepository
Definition: statePropertiesStateComponent.h:155
VRF::ReadStatePropertiesRepository myReadStatePropertiesRepository
Definition: statePropertiesStateComponent.h:205
Definition: stateComponent.h:257
const DtStatePropertiesStateComponentData & frameState() const
Next frame access write access. Ensure this is only used in a single thread (i.e.a controller thread)...
Definition: statePropertiesStateComponent.h:120
virtual DtFrameStateInterface * nextFrameState()
Definition: statePropertiesStateComponent.h:224
void clearStatePropertiesModifiedByLegion()
Definition: statePropertiesStateComponent.h:187
const std::vector< DtReaderWriterRegistryData * > & registryData() const
Definition: readerWriterRegistry.h:161
unsigned int myCallbackHandle
Definition: statePropertiesStateComponent.h:206
Definition: readerWriter.h:85
DtStatePropertiesStateComponentCurrentFrame myCurrentFrameState
Definition: statePropertiesStateComponent.h:251
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
DtStateData * myStateData
Definition: statePropertiesStateComponent.h:159
Contains the DtUUID class declaration.
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:34
void clearStatePropertiesUpdated()
Definition: statePropertiesStateComponent.h:51
Interface class used to define minimal interface for a property. The DtPropertyInterface class provid...
Definition: propertyInterface.h:48
virtual DtReaderWriter * cloneReaderWriter(const DtString &name, const DtReaderWriter *sourceRw, DtReaderWriterRegistry *parentRegistry) const
Creates a clone of the RW object to create a clone of the specified object. The object will first be ...
DtStateData * myStateData
Definition: statePropertiesStateComponent.h:210
static DtReaderWriterFactory * factory()
DtStatePropertiesStateComponentData & frameState()
Definition: statePropertiesStateComponent.h:121
3) Define the current frame class. This will be used for read access.
Definition: statePropertiesStateComponent.h:164
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
void clearStatePropertiesModified()
Definition: statePropertiesStateComponent.h:144
const DtReaderWriterRegistry & registry() const
Collection of child DtReaderWriter nodes owned by this object.
Definition: readerWriter.h:496
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:219
void updateStateData(DtStateData *sd)
Implement to update data storage to the new state data.
Definition: statePropertiesStateComponent.h:229
DtStatePropertiesStateComponentData myData
Definition: statePropertiesStateComponent.h:160
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:370
const DtStatePropertiesStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: statePropertiesStateComponent.h:171
std::map< std::string, Legion::InstanceHandle > myLegionStateProperties
Definition: statePropertiesStateComponent.h:158
virtual void aboutToBeDeleted()
virtual void aboutToBeDeleted() override
Definition: statePropertiesStateComponent.h:240
const char * source
Definition: lz4.h:442
void advanceFrame(const DtStatePropertiesStateComponentData &data)
Definition: statePropertiesStateComponent.h:199
virtual bool isPublished() const =0
Whether this property should be published.
#define DEFINE_REF_ACCESSORS(ReturnType, Method, Member)
Definition: doubleBufferedDataStorage.h:13
#define DEFINE_ACCESSOR_MUTATOR(ReturnType, Accessor, Mutator)
Definition: doubleBufferedDataStorage.h:23
bool myStatePropertiesModifiedByLegion
Definition: statePropertiesStateComponent.h:209
const DtRwProperties & parameterProperties() const
Definition: statePropertiesStateComponent.h:79
bool statePropertiesModifiedByLegion() const
Definition: statePropertiesStateComponent.h:182
DtStatePropertiesStateComponentData & operator=(const DtStatePropertiesStateComponentData &rhs)
Definition: statePropertiesStateComponent.h:42
bool myFoundComponent
Definition: statePropertiesStateComponent.h:253
DtStatePropertiesStateComponentData myData
Definition: statePropertiesStateComponent.h:211
bool isDoubleBuffered()
Definition: statePropertiesStateComponent.h:222
const DtFrameStateInterface * currentFrameState() const
Definition: statePropertiesStateComponent.h:223
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
bool myPublishOnLegionNetwork
Definition: statePropertiesStateComponent.h:207
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
void statePropertiesWereUpdated()
Definition: statePropertiesStateComponent.h:56
DtRwProperties & parameterProperties()
Definition: statePropertiesStateComponent.h:80
Contains the DtStateComponent class declaration.
bool myPublishOnLegionNetwork
Definition: statePropertiesStateComponent.h:157
DtRwProperties myStateProperties
Definition: statePropertiesStateComponent.h:80
4) Define the state component that will contain the wrappers to the next and current frame states tha...
Definition: statePropertiesStateComponent.h:216
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
DtStateComponentCreator< DtStatePropertiesStateComponentImplementation > DtStatePropertiesStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: statePropertiesStateComponent.h:259
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:282
DtStatePropertiesStateComponentData(const DtStatePropertiesStateComponentData &orig)
Definition: statePropertiesStateComponent.h:35
Definition: stateComponent.h:72
std::shared_ptr< DtRwProperties > myParameterProperties
Definition: statePropertiesStateComponent.h:88
virtual const DtFrameStateInterface * nextFrameState() const
Definition: statePropertiesStateComponent.h:225