Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

CompletionTrans Class Reference

causes a transition when at least n sources have signalled completion; n = 0 means "all" (default) More...

#include <CompletionTrans.h>

Inheritance diagram for CompletionTrans:

Detailed Description

causes a transition when at least n sources have signalled completion; n = 0 means "all" (default)

Definition at line 10 of file CompletionTrans.h.

List of all members.

Public Member Functions

 CompletionTrans (StateNode *destination, int n=0)
 constructor, pass destination and the minimum number of sources which must signal completion before this transition will fire
 CompletionTrans (const std::string &name, StateNode *destination, int n=0)
 constructor, pass name, destination and the minimum number of times the source must signal completion beyond the first (n)
virtual void postStart ()
 starts listening
virtual void stop ()
 stops listening
virtual void doEvent ()
 record completions, and fire the transition if enough sources have completed

Protected Member Functions

Dummy functions to satisfy the compiler

 CompletionTrans (const CompletionTrans &)
 don't call this
CompletionTransoperator= (const CompletionTrans &)
 don't call this

Protected Attributes

int minsrcs
 the minimum number of sources which must signal completion before this transition will fire
bool * completions
 pointer to array for recording completion events for all sources
EventBase savedEvent
 Copy of current event to be used after timer expires.

Constructor & Destructor Documentation

CompletionTrans::CompletionTrans ( StateNode destination,
int  n = 0 
)

constructor, pass destination and the minimum number of sources which must signal completion before this transition will fire

Definition at line 18 of file CompletionTrans.h.

CompletionTrans::CompletionTrans ( const std::string &  name,
StateNode destination,
int  n = 0 
)

constructor, pass name, destination and the minimum number of times the source must signal completion beyond the first (n)

Definition at line 22 of file CompletionTrans.h.

CompletionTrans::CompletionTrans ( const CompletionTrans  )  [protected]

don't call this


Member Function Documentation

void CompletionTrans::doEvent (  )  [virtual]

record completions, and fire the transition if enough sources have completed

Reimplemented from BehaviorBase.

Definition at line 21 of file CompletionTrans.cc.

CompletionTrans& CompletionTrans::operator= ( const CompletionTrans  )  [protected]

don't call this

void CompletionTrans::postStart (  )  [virtual]

starts listening

Reimplemented from BehaviorBase.

Definition at line 3 of file CompletionTrans.cc.

void CompletionTrans::stop (  )  [virtual]

stops listening

Reimplemented from Transition.

Definition at line 14 of file CompletionTrans.cc.


Member Data Documentation

bool* CompletionTrans::completions [protected]

pointer to array for recording completion events for all sources

Definition at line 13 of file CompletionTrans.h.

Referenced by doEvent(), postStart(), and stop().

int CompletionTrans::minsrcs [protected]

the minimum number of sources which must signal completion before this transition will fire

Definition at line 12 of file CompletionTrans.h.

Referenced by doEvent().

Copy of current event to be used after timer expires.

Definition at line 14 of file CompletionTrans.h.

Referenced by doEvent().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:06 2016 by Doxygen 1.6.3