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

An EventInstance is a single instance of a simulation event such as Fire or Detonate. More...

+ Inheritance diagram for Legion::EventInstance:
+ Collaboration diagram for Legion::EventInstance:

Public Member Functions

 EventInstance (const EventInstance &orig)
 copy constructor More...
 
EventInstanceoperator= (const EventInstance &orig)
 assignment operator More...
 
EventHandle handle () const
 Returns the event handle to the internal representation. More...
 
EventType typeId () const
 Returns the type ID of the event. More...
 
template<typename DATA_TYPE >
DATA_TYPE data (ParameterId parameterId) const
 Returns the data of a given parameter. More...
 
template<typename DATA_TYPE >
const Span< DATA_TYPE > dataArray (ParameterId parameterId) const
 Returns an array of data for a given parameters, if the particular parameter's cardinality is greater than one. More...
 
template<typename DATA_TYPE >
void setData (ParameterId parameterId, const DATA_TYPE &val)
 Sets a given parameters value. More...
 
template<typename DATA_TYPE >
void setDataArray (ParameterId parameterId, const Span< DATA_TYPE > &val)
 Sets a given parameter to an array of values, if the particular parameter's cardinality is greater than one. More...
 
void setDataArrayLength (ParameterId paramId, UInt32 length)
 Set the length of a variable length array parameter. This only works for variable length array parameters. More...
 
UInt32 dataArrayLength (ParameterId paramId) const
 Get the length of the parameter if it is an array. More...
 

Protected Member Functions

 EventInstance (EventHandle handle)
 constructor More...
 
virtual ~EventInstance ()
 

Protected Attributes

EventHandle myHandle
 

Friends

class EventManager
 

Detailed Description

An EventInstance is a single instance of a simulation event such as Fire or Detonate.

EventInstances are created by the EventManager. The may not be created on the stack or heap by the user. In order to create an EventInstance, a type of EventInstance must be registered with the EventManager, then the user my request an EventInstance from the EventManager. EventInstances are only valid in the frame that are created (when sending) or when delivered. The underlying memory is invalidated at the end of the frame.

Constructor & Destructor Documentation

Legion::EventInstance::EventInstance ( const EventInstance orig)

copy constructor

Legion::EventInstance::EventInstance ( EventHandle  handle)
protected

constructor

virtual Legion::EventInstance::~EventInstance ( )
protectedvirtual

Member Function Documentation

template<typename DATA_TYPE >
DATA_TYPE Legion::EventInstance::data ( ParameterId  parameterId) const

Returns the data of a given parameter.

template<typename DATA_TYPE >
const Span<DATA_TYPE> Legion::EventInstance::dataArray ( ParameterId  parameterId) const

Returns an array of data for a given parameters, if the particular parameter's cardinality is greater than one.

UInt32 Legion::EventInstance::dataArrayLength ( ParameterId  paramId) const

Get the length of the parameter if it is an array.

EventHandle Legion::EventInstance::handle ( ) const

Returns the event handle to the internal representation.

EventInstance& Legion::EventInstance::operator= ( const EventInstance orig)

assignment operator

template<typename DATA_TYPE >
void Legion::EventInstance::setData ( ParameterId  parameterId,
const DATA_TYPE &  val 
)

Sets a given parameters value.

template<typename DATA_TYPE >
void Legion::EventInstance::setDataArray ( ParameterId  parameterId,
const Span< DATA_TYPE > &  val 
)

Sets a given parameter to an array of values, if the particular parameter's cardinality is greater than one.

void Legion::EventInstance::setDataArrayLength ( ParameterId  paramId,
UInt32  length 
)

Set the length of a variable length array parameter. This only works for variable length array parameters.

EventType Legion::EventInstance::typeId ( ) const

Returns the type ID of the event.

Friends And Related Function Documentation

friend class EventManager
friend

Member Data Documentation

EventHandle Legion::EventInstance::myHandle
protected

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

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)