VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DtSimTrigger Class Reference

class DtSimTrigger: More...

Public Member Functions

 DtSimTrigger ()
 default constructor More...
 
 DtSimTrigger (const DtStmtIndex &triggerStmt, DtPlan *plan)
 initializing constructor More...
 
 DtSimTrigger (const DtSimTrigger &orig, DtPlan *plan=NULL)
 copy constructor More...
 
virtual ~DtSimTrigger ()
 destructor More...
 
DtSimTriggeroperator= (const DtSimTrigger &orig)
 Assignment operator (Note: this will NOT copy the plan pointer, and they had better not match!) More...
 
virtual void tick ()
 Test the condition, and activate the trigger if true. More...
 
virtual bool testCondition ()
 Check the current state of the When statement's test. More...
 
virtual void activate ()
 Unconditionally fire the trigger, and set the isDone flag. More...
 
virtual const DtSimCondExprcondition () const
 Used by testCondition() to look up the DtRegisterTriggerStatement's conditional expression and return a pointer to it. More...
 
virtual DtTriggerBlocktriggerBlock () const
 Looks up the DtRegisterTriggerStatement's triggerBlock() and returns a pointer to it. More...
 
virtual DtString triggerOption () const
 Looks up the DtRegisterTriggerStatement's option() string and returns it. More...
 
virtual const
DtRegisterTriggerStatement
triggerStmt () const
 Gets or sets a pointer to the DtRegisterTriggerStatement that created this trigger. More...
 
virtual void setTriggerStmt (const DtRegisterTriggerStatement *arg)
 
virtual void translateInto (const DtSimBlock &newBlock)
 Translate the When statement index to point into the new block. More...
 
virtual DtPlanplan () const
 
virtual void setPlan (DtPlan *arg)
 When the Plan is set, this Trigger will be registered with the new Plan. More...
 
virtual bool enabled () const
 
virtual void setEnabled (bool arg)
 
virtual bool isDone () const
 This function indicates that the trigger will not fire again and should be deleted by the Plan at the earliest opportunity. More...
 
virtual void setIsDone (bool arg)
 
virtual charnetRep ()
 
virtual int netRepSize () const
 returns the size of the full network representation padded to an 8-byte boundary. More...
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 Fills in the request from the network buffer. More...
 
virtual bool setToNet ()
 Fills in the network buffer (created by base class sim statement) with the set data request contents. More...
 

Protected Member Functions

virtual charcreateNetworkBuffer ()
 
virtual void reregisterIfNeeded ()
 

Protected Attributes

DtStmtIndex myTriggerStmt
 
DtPlanmyPlan
 
bool myEnabled
 
bool myIsDone
 
charmyNetRep
 

Detailed Description

class DtSimTrigger:

Instances of DtSimTrigger represent pending triggers (triggers that have been registered by execution of a "When" statement).

Constructor & Destructor Documentation

DtSimTrigger::DtSimTrigger ( )

default constructor

DtSimTrigger::DtSimTrigger ( const DtStmtIndex triggerStmt,
DtPlan plan 
)

initializing constructor

DtSimTrigger::DtSimTrigger ( const DtSimTrigger orig,
DtPlan plan = NULL 
)

copy constructor

virtual DtSimTrigger::~DtSimTrigger ( )
virtual

destructor

Member Function Documentation

DtSimTrigger& DtSimTrigger::operator= ( const DtSimTrigger orig)

Assignment operator (Note: this will NOT copy the plan pointer, and they had better not match!)

virtual void DtSimTrigger::tick ( )
virtual

Test the condition, and activate the trigger if true.

virtual bool DtSimTrigger::testCondition ( )
virtual

Check the current state of the When statement's test.

virtual void DtSimTrigger::activate ( )
virtual

Unconditionally fire the trigger, and set the isDone flag.

virtual const DtSimCondExpr* DtSimTrigger::condition ( ) const
virtual

Used by testCondition() to look up the DtRegisterTriggerStatement's conditional expression and return a pointer to it.

virtual DtTriggerBlock* DtSimTrigger::triggerBlock ( ) const
virtual

Looks up the DtRegisterTriggerStatement's triggerBlock() and returns a pointer to it.

virtual DtString DtSimTrigger::triggerOption ( ) const
virtual

Looks up the DtRegisterTriggerStatement's option() string and returns it.

virtual const DtRegisterTriggerStatement* DtSimTrigger::triggerStmt ( ) const
virtual

Gets or sets a pointer to the DtRegisterTriggerStatement that created this trigger.

virtual void DtSimTrigger::setTriggerStmt ( const DtRegisterTriggerStatement arg)
virtual
virtual void DtSimTrigger::translateInto ( const DtSimBlock newBlock)
virtual

Translate the When statement index to point into the new block.

virtual DtPlan* DtSimTrigger::plan ( ) const
virtual
virtual void DtSimTrigger::setPlan ( DtPlan arg)
virtual

When the Plan is set, this Trigger will be registered with the new Plan.

virtual bool DtSimTrigger::enabled ( ) const
virtual
virtual void DtSimTrigger::setEnabled ( bool  arg)
virtual
virtual bool DtSimTrigger::isDone ( ) const
virtual

This function indicates that the trigger will not fire again and should be deleted by the Plan at the earliest opportunity.

virtual void DtSimTrigger::setIsDone ( bool  arg)
virtual
virtual char* DtSimTrigger::netRep ( )
virtual
virtual int DtSimTrigger::netRepSize ( ) const
virtual

returns the size of the full network representation padded to an 8-byte boundary.

virtual bool DtSimTrigger::setFromNet ( const char contentBuffer,
unsigned  contentSize 
)
virtual

Fills in the request from the network buffer.

virtual bool DtSimTrigger::setToNet ( )
virtual

Fills in the network buffer (created by base class sim statement) with the set data request contents.

virtual char* DtSimTrigger::createNetworkBuffer ( )
protectedvirtual
virtual void DtSimTrigger::reregisterIfNeeded ( )
protectedvirtual

Member Data Documentation

DtStmtIndex DtSimTrigger::myTriggerStmt
protected
DtPlan* DtSimTrigger::myPlan
protected
bool DtSimTrigger::myEnabled
protected
bool DtSimTrigger::myIsDone
protected
char* DtSimTrigger::myNetRep
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)