![]() |
MAK Legion 1.1 API Documentation
|
The WriteStateInstance is the base class of all write simulation object repository classes. More...
Inheritance diagram for Legion::WriteStateInstance:
Collaboration diagram for Legion::WriteStateInstance:Public Member Functions | |
| WriteStateInstance () | |
| constructors More... | |
| WriteStateInstance (InstanceHandle instanceId) | |
| virtual | ~WriteStateInstance () |
| destructor This will not destroy the underlying object, just this interface class to the object More... | |
| WriteStateInstance (const WriteStateInstance &orig) | |
| copy constructor. This does not copy the underlying object, just the interface class to the object More... | |
| WriteStateInstance & | operator= (const WriteStateInstance &orig) |
| assignment operator. This does not copy the underlying object, just the interface class to the object More... | |
| void | destroy () |
| Destroy this instance. After the call the WriteStateInstance will no longer be valid. More... | |
| bool | isValid () const |
| Does this class reference a valid simulation object instance in the database. More... | |
| InstanceHandle | instanceHandle () const |
| Get the instance ID of the simulation object that this state repository references. More... | |
| GlobalIdentifier | globalId () const |
| Get the global ID of the simulation object that this state repository references. More... | |
| AttributeSetId | setType () const |
| get the type of simulation object of this instance. More... | |
| DatabaseHandle | database () const |
| get the database that owns this object More... | |
| template<typename DATA_TYPE > | |
| DATA_TYPE | data (AttributeIndex attributeId) const |
| Read the data of a given attribute that is available in the current frame. More... | |
| template<typename DATA_TYPE > | |
| const Span< DATA_TYPE > | dataArray (AttributeIndex attributeIndex) const |
| Read the array data of a given attribute that is available in the current frame. More... | |
| template<typename DATA_TYPE > | |
| void | setData (AttributeIndex attributeIndex, const DATA_TYPE &val) |
| Sets the data for use in the next frame. More... | |
| template<typename DATA_TYPE > | |
| void | setDataArray (AttributeIndex attributeIndex, const Span< DATA_TYPE > &val) |
| Sets data in a fixed or variable length array. More... | |
| template<typename DATA_TYPE > | |
| void | addDataArray (AttributeIndex attributeIndex, const Span< DATA_TYPE > &val) |
| Appends values to end of a variable length attribute array. More... | |
| template<typename DATA_TYPE > | |
| void | removeDataArray (AttributeIndex attributeIndex, const Span< DATA_TYPE > &val) |
| Removes values from a variable length attribute array. More... | |
| UInt32 | dataArrayCount (AttributeIndex attributeIndex) const |
| Get the length of the array data of a given attribute. More... | |
| void | setDataArrayCount (AttributeIndex attributeIndex, UInt32 count) |
| virtual bool | hasParent () const |
| get the parent of this instance, if it exists More... | |
| virtual Legion::InstanceHandle | getParent () const |
| virtual void | setParent (const WriteStateInstance &val) |
| template<typename COMP_TYPE > | |
| COMP_TYPE | findParent () const |
| virtual int | extensionCount () const |
| Array of extension repositories, e.g. EmbeddedSystem and other features. More... | |
| virtual void | addExtension (WriteStateInstance &val) |
| virtual void | removeExtension (WriteStateInstance &val) |
| virtual Legion::InstanceHandle | getExtension (int index) const |
| virtual Legion::Span < Legion::InstanceHandle > | extensions () const |
| virtual void | setExtensions (Legion::Span< Legion::InstanceHandle > val) |
| template<typename COMP_TYPE > | |
| COMP_TYPE | findTypeExtension (int index) const |
| template<typename COMP_TYPE > | |
| int | typeExtensionCount () const |
| template<typename COMP_TYPE > | |
| std::vector< COMP_TYPE > | getTypeExtensions () const |
Static Public Member Functions | |
| static AttributeSetId | setType (InstanceHandle id) |
Protected Attributes | |
| InstanceHandle | myInstanceHandle |
The WriteStateInstance is the base class of all write simulation object repository classes.
It provides generic access to attributes. Values read from a WriteStateInstance will be consistent with the context of a frame of simulation. Values written to a WriteStateInstance instance will be visible in the next frame of simulation. WriteStateInstance is an interface class that provides generic access to the internal database representation of the simulation object. It does not store any simulation data itself. All derived WriteStateInstance classes must implement a static AttributeSetId type() function that returns the attribute set ID of the derived class.
| Legion::WriteStateInstance::WriteStateInstance | ( | ) |
constructors
|
explicit |
|
virtual |
destructor This will not destroy the underlying object, just this interface class to the object
| Legion::WriteStateInstance::WriteStateInstance | ( | const WriteStateInstance & | orig | ) |
copy constructor. This does not copy the underlying object, just the interface class to the object
| void Legion::WriteStateInstance::addDataArray | ( | AttributeIndex | attributeIndex, |
| const Span< DATA_TYPE > & | val | ||
| ) |
Appends values to end of a variable length attribute array.
|
virtual |
Referenced by main().
| DATA_TYPE Legion::WriteStateInstance::data | ( | AttributeIndex | attributeId | ) | const |
Read the data of a given attribute that is available in the current frame.
| const Span<DATA_TYPE> Legion::WriteStateInstance::dataArray | ( | AttributeIndex | attributeIndex | ) | const |
Read the array data of a given attribute that is available in the current frame.
| UInt32 Legion::WriteStateInstance::dataArrayCount | ( | AttributeIndex | attributeIndex | ) | const |
Get the length of the array data of a given attribute.
| DatabaseHandle Legion::WriteStateInstance::database | ( | ) | const |
get the database that owns this object
| void Legion::WriteStateInstance::destroy | ( | ) |
Destroy this instance. After the call the WriteStateInstance will no longer be valid.
|
virtual |
Array of extension repositories, e.g. EmbeddedSystem and other features.
Referenced by findTypeExtension(), getTypeExtensions(), and typeExtensionCount().
|
virtual |
| COMP_TYPE Legion::WriteStateInstance::findParent | ( | ) | const |
References getParent().
| COMP_TYPE Legion::WriteStateInstance::findTypeExtension | ( | int | index | ) | const |
References extensionCount(), and getExtension().
|
virtual |
Referenced by findTypeExtension(), getTypeExtensions(), and typeExtensionCount().
|
virtual |
Referenced by findParent().
| std::vector< COMP_TYPE > Legion::WriteStateInstance::getTypeExtensions | ( | ) | const |
References extensionCount(), and getExtension().
| GlobalIdentifier Legion::WriteStateInstance::globalId | ( | ) | const |
Get the global ID of the simulation object that this state repository references.
|
virtual |
get the parent of this instance, if it exists
|
inline |
Get the instance ID of the simulation object that this state repository references.
| bool Legion::WriteStateInstance::isValid | ( | ) | const |
Does this class reference a valid simulation object instance in the database.
| WriteStateInstance& Legion::WriteStateInstance::operator= | ( | const WriteStateInstance & | orig | ) |
assignment operator. This does not copy the underlying object, just the interface class to the object
| void Legion::WriteStateInstance::removeDataArray | ( | AttributeIndex | attributeIndex, |
| const Span< DATA_TYPE > & | val | ||
| ) |
Removes values from a variable length attribute array.
|
virtual |
| void Legion::WriteStateInstance::setData | ( | AttributeIndex | attributeIndex, |
| const DATA_TYPE & | val | ||
| ) |
Sets the data for use in the next frame.
| void Legion::WriteStateInstance::setDataArray | ( | AttributeIndex | attributeIndex, |
| const Span< DATA_TYPE > & | val | ||
| ) |
Sets data in a fixed or variable length array.
It is an error to try and write past the end of a fixed array
| void Legion::WriteStateInstance::setDataArrayCount | ( | AttributeIndex | attributeIndex, |
| UInt32 | count | ||
| ) |
|
virtual |
|
virtual |
|
static |
| AttributeSetId Legion::WriteStateInstance::setType | ( | ) | const |
get the type of simulation object of this instance.
| int Legion::WriteStateInstance::typeExtensionCount | ( | ) | const |
References extensionCount(), and getExtension().
|
protected |
Referenced by WriteEngineRepository::operator=(), and WriteEngineRepository::WriteEngineRepository().