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 virtual const bool& statePropertiesUpdated()
const override;
129 virtual const DtRwProperties& parameterProperties()
const override;
131 virtual void setParameterProperties(
const DtRwProperties&)
override;
132 virtual bool isModified()
const override;
135 virtual void makeWritable()
override;
138 virtual void makeReadOnly()
override;
142 return myStatePropertiesModified;
147 myStatePropertiesModified =
false;
151 void setPublishingOnLegionNetwork(
bool);
153 void updateLegionNetwork(
double newTime);
157 return myLastTimeStatePropertiesUpdated;
168 double myLastTimeStatePropertiesUpdated = 0.;
182 virtual const bool& statePropertiesUpdated()
const override;
183 virtual const DtRwProperties& parameterProperties()
const override;
185 virtual bool findReadComponent();
186 virtual bool readComponentValid()
const;
188 void setPublishingOnLegionNetwork(
bool);
192 return myStatePropertiesModifiedByLegion;
197 myStatePropertiesModifiedByLegion =
false;
202 void handleStatePropertiesUpdated();
234 virtual void updateDataStorage()
override;
238 myCurrentFrameState.updateStateData(sd);
239 myNextFrameState.updateStateData(sd);
243 virtual bool forceAdvance()
override;
250 myCurrentFrameState.aboutToBeDeleted();
251 myNextFrameState.aboutToBeDeleted();
255 virtual 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:64
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:216
std::map< DtString, DtString > ExtendedData
Definition: statePropertiesStateComponent.h:96
DtStatePropertiesStateComponentNextFrame myNextFrameState
Definition: statePropertiesStateComponent.h:259
Definition: stateDataTypes.h:23
bool statePropertiesModified() const
Definition: statePropertiesStateComponent.h:140
Definition: statePropertiesStateComponent.h:26
#define UNDEFINED_METHOD(Type, Method,...)
Definition: doubleBufferedDataStorage.h:68
bool myStatePropertiesModified
Definition: statePropertiesStateComponent.h:164
2) Define the next frame class. This will be used for write access.
Definition: statePropertiesStateComponent.h:113
VRF::WriteStatePropertiesRepository myWriteStatePropertiesRepository
Definition: statePropertiesStateComponent.h:163
double lastTimeStatePropertiesUpdated() const
Definition: statePropertiesStateComponent.h:155
VRF::ReadStatePropertiesRepository myReadStatePropertiesRepository
Definition: statePropertiesStateComponent.h:213
Definition: stateComponent.h:269
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
void clearStatePropertiesModifiedByLegion()
Definition: statePropertiesStateComponent.h:195
const std::vector< DtReaderWriterRegistryData * > & registryData() const
Definition: readerWriterRegistry.h:161
unsigned int myCallbackHandle
Definition: statePropertiesStateComponent.h:214
Definition: readerWriter.h:85
DtStatePropertiesStateComponentCurrentFrame myCurrentFrameState
Definition: statePropertiesStateComponent.h:258
#define UNDEFINED_RETURNREF_ACCESSORS(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:40
Contains the DtUUID class declaration.
#define UNDEFINED_RETURNREF_ACCESSOR(ReturnType, Member)
Definition: doubleBufferedDataStorage.h:34
virtual void updateStateData(DtStateData *sd) override
Implement to update data storage to the new state data.
Definition: statePropertiesStateComponent.h:236
void clearStatePropertiesUpdated()
Definition: statePropertiesStateComponent.h:51
Interface class used to define minimal interface for a property. The DtPropertyInterface class provid...
Definition: propertyInterface.h:53
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 ...
static DtReaderWriterFactory * factory()
virtual const DtFrameStateInterface * nextFrameState() const override
Definition: statePropertiesStateComponent.h:232
DtStatePropertiesStateComponentData & frameState()
Definition: statePropertiesStateComponent.h:121
3) Define the current frame class. This will be used for read access.
Definition: statePropertiesStateComponent.h:172
virtual DtFrameStateInterface * nextFrameState() override
Definition: statePropertiesStateComponent.h:231
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
void clearStatePropertiesModified()
Definition: statePropertiesStateComponent.h:145
const DtReaderWriterRegistry & registry() const
Collection of child DtReaderWriter nodes owned by this object.
Definition: readerWriter.h:492
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
virtual const DtFrameStateInterface * currentFrameState() const override
Definition: statePropertiesStateComponent.h:230
DtStatePropertiesStateComponentData myData
Definition: statePropertiesStateComponent.h:167
Subclass from this to indicate that this will be a double buffered state component.
Definition: stateComponent.h:384
const DtStatePropertiesStateComponentData & frameState() const
Current frame state only can access current frame buffers. This ensures thread safety.
Definition: statePropertiesStateComponent.h:179
std::map< std::string, Legion::InstanceHandle > myLegionStateProperties
Definition: statePropertiesStateComponent.h:166
virtual void aboutToBeDeleted()
virtual void aboutToBeDeleted() override
Definition: statePropertiesStateComponent.h:247
const char * source
Definition: lz4.h:442
void advanceFrame(const DtStatePropertiesStateComponentData &data)
Definition: statePropertiesStateComponent.h:207
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:217
const DtRwProperties & parameterProperties() const
Definition: statePropertiesStateComponent.h:79
bool statePropertiesModifiedByLegion() const
Definition: statePropertiesStateComponent.h:190
DtStatePropertiesStateComponentData & operator=(const DtStatePropertiesStateComponentData &rhs)
Definition: statePropertiesStateComponent.h:42
bool myFoundComponent
Definition: statePropertiesStateComponent.h:260
DtStatePropertiesStateComponentData myData
Definition: statePropertiesStateComponent.h:218
bool isDoubleBuffered()
Definition: statePropertiesStateComponent.h:229
#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:215
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
void statePropertiesWereUpdated()
Definition: statePropertiesStateComponent.h:56
DtRwProperties & parameterProperties()
Definition: statePropertiesStateComponent.h:80
Contains the DtStateComponent class declaration.
bool myPublishOnLegionNetwork
Definition: statePropertiesStateComponent.h:165
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:223
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:265
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
DtStatePropertiesStateComponentData(const DtStatePropertiesStateComponentData &orig)
Definition: statePropertiesStateComponent.h:35
Definition: stateComponent.h:77
std::shared_ptr< DtRwProperties > myParameterProperties
Definition: statePropertiesStateComponent.h:88