MAK Legion 1.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Legion::WriteStateInstance Class Reference

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...
 
WriteStateInstanceoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

Legion::WriteStateInstance::WriteStateInstance ( )

constructors

Legion::WriteStateInstance::WriteStateInstance ( InstanceHandle  instanceId)
explicit
virtual Legion::WriteStateInstance::~WriteStateInstance ( )
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

Member Function Documentation

template<typename DATA_TYPE >
void Legion::WriteStateInstance::addDataArray ( AttributeIndex  attributeIndex,
const Span< DATA_TYPE > &  val 
)

Appends values to end of a variable length attribute array.

virtual void Legion::WriteStateInstance::addExtension ( WriteStateInstance val)
virtual

Referenced by main().

template<typename DATA_TYPE >
DATA_TYPE Legion::WriteStateInstance::data ( AttributeIndex  attributeId) const

Read the data of a given attribute that is available in the current frame.

template<typename DATA_TYPE >
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 int Legion::WriteStateInstance::extensionCount ( ) const
virtual

Array of extension repositories, e.g. EmbeddedSystem and other features.

Referenced by findTypeExtension(), getTypeExtensions(), and typeExtensionCount().

virtual Legion::Span<Legion::InstanceHandle> Legion::WriteStateInstance::extensions ( ) const
virtual
template<typename COMP_TYPE >
COMP_TYPE Legion::WriteStateInstance::findParent ( ) const

References getParent().

template<typename COMP_TYPE >
COMP_TYPE Legion::WriteStateInstance::findTypeExtension ( int  index) const

References extensionCount(), and getExtension().

virtual Legion::InstanceHandle Legion::WriteStateInstance::getExtension ( int  index) const
virtual
virtual Legion::InstanceHandle Legion::WriteStateInstance::getParent ( ) const
virtual

Referenced by findParent().

template<typename COMP_TYPE >
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 bool Legion::WriteStateInstance::hasParent ( ) const
virtual

get the parent of this instance, if it exists

InstanceHandle Legion::WriteStateInstance::instanceHandle ( ) const
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

template<typename DATA_TYPE >
void Legion::WriteStateInstance::removeDataArray ( AttributeIndex  attributeIndex,
const Span< DATA_TYPE > &  val 
)

Removes values from a variable length attribute array.

virtual void Legion::WriteStateInstance::removeExtension ( WriteStateInstance val)
virtual
template<typename DATA_TYPE >
void Legion::WriteStateInstance::setData ( AttributeIndex  attributeIndex,
const DATA_TYPE &  val 
)

Sets the data for use in the next frame.

template<typename DATA_TYPE >
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 void Legion::WriteStateInstance::setExtensions ( Legion::Span< Legion::InstanceHandle val)
virtual
virtual void Legion::WriteStateInstance::setParent ( const WriteStateInstance val)
virtual
static AttributeSetId Legion::WriteStateInstance::setType ( InstanceHandle  id)
static
AttributeSetId Legion::WriteStateInstance::setType ( ) const

get the type of simulation object of this instance.

template<typename COMP_TYPE >
int Legion::WriteStateInstance::typeExtensionCount ( ) const

References extensionCount(), and getExtension().

Member Data Documentation

InstanceHandle Legion::WriteStateInstance::myInstanceHandle
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed May 26 15:17:05 EDT 2021 from SVN revision 229676
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)