VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
DtSimTrigger Class Reference

class DtSimTrigger: More...

List of all members.

Public Member Functions

 DtSimTrigger ()
 default constructor
 DtSimTrigger (const DtStmtIndex &whenStmt, DtPlan *plan)
 initializing constructor
 DtSimTrigger (const DtSimTrigger &orig, DtPlan *plan=NULL)
 copy constructor
virtual ~DtSimTrigger ()
 destructor
DtSimTriggeroperator= (const DtSimTrigger &orig)
 Assignment operator (Note: this will NOT copy the plan pointer, and they had better not match!)
virtual void tick ()
 Test the condition, and activate the trigger if true.
virtual bool testCondition ()
 Check the current state of the When statement's test.
virtual void activate ()
 Unconditionally fire the trigger, and set the isDone flag.
virtual const DtSimCondExprcondition () const
 Used by testCondition() to look up the DtWhenStmt's conditional expression and return a pointer to it.
virtual DtWhenBlockwhenBlock () const
 Looks up the DtWhenStmt's whenBlock() and returns a pointer to it.
virtual DtString whenOption () const
 Looks up the DtWhenStmt's option() string and returns it.
virtual const DtWhenStmtwhenStmt () const
 Gets or sets a pointer to the DtWhenStmt that created this trigger.
virtual void setWhenStmt (const DtWhenStmt *arg)
virtual void translateInto (const DtSimBlock &newBlock)
 Translate the When statement index to point into the new block.
virtual DtPlanplan () const
virtual void setPlan (DtPlan *arg)
 When the Plan is set, this Trigger will be registered with the new Plan.
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.
virtual void setIsDone (bool arg)
virtual char * netRep ()
virtual int netRepSize () const
 returns the size of the full network representation padded to an 8-byte boundary.
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 Fills in the request from the network buffer.
virtual bool setToNet ()
 Fills in the network buffer (created by base class sim statement) with the set data request contents.

Protected Member Functions

virtual char * createNetworkBuffer ()

Protected Attributes

DtStmtIndex myWhenStmt
DtPlanmyPlan
bool myEnabled
bool myIsDone
char * myNetRep

Detailed Description

class DtSimTrigger:

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


Constructor & Destructor Documentation

default constructor

DtSimTrigger::DtSimTrigger ( const DtStmtIndex whenStmt,
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 DtWhenStmt's conditional expression and return a pointer to it.

virtual DtWhenBlock* DtSimTrigger::whenBlock ( ) const [virtual]

Looks up the DtWhenStmt's whenBlock() and returns a pointer to it.

virtual DtString DtSimTrigger::whenOption ( ) const [virtual]

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

virtual const DtWhenStmt* DtSimTrigger::whenStmt ( ) const [virtual]

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

virtual void DtSimTrigger::setWhenStmt ( const DtWhenStmt 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 ( ) [protected, virtual]

Member Data Documentation

char* DtSimTrigger::myNetRep [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)