sttcl  v0.9c
STTCL C++ template state machine framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs > Class Template Reference

#include <Region.h>

Inheritance diagram for sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >:
Collaboration diagram for sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >:

List of all members.

Public Types

typedef
sttcl::internal::RegionEventDispatchInterfaceSelector
< RegionContainerImpl,
IInnerState, EventArgs >
::RESULT_TYPE 
RegionEventDispatchInterface
typedef
RegionEventDispatchInterface::RefCountPtr 
RefCountPtr
typedef
RegionEventDispatchInterface::InnerEventHandler 
InnerEventHandler
- Public Types inherited from sttcl::internal::IRegionEventDispatchWithArgs< RegionContainerImpl, IInnerState, EventArgs >
typedef
EventArgsInterfaceSelector
< RegionContainerImpl,
IInnerState, EventArgs > 
EventArgsSelectorType

Public Member Functions

 RegionBase (RegionContainerImpl *argRegionContainer)
virtual ~RegionBase ()
virtual void enterRegion (RegionContainerImpl *context)=0
virtual void exitRegion (RegionContainerImpl *context)=0
virtual void finalizeRegion (bool recursive)=0
virtual bool initializeRegion (bool recursive)=0
virtual void startDoRegion (RegionContainerImpl *context)=0
virtual void endDoRegion (RegionContainerImpl *context)=0
virtual bool isRegionInitialized ()=0
virtual bool isRegionFinalized ()=0
virtual bool isRegionThreadRunning () const =0
virtual void joinRegionThread ()=0
template<class RegionImpl >
RegionImpl * getRegionContext ()
virtual void internalInitialize (bool recursive)=0
virtual void internalFinalize (bool recursive)=0
virtual void queueDispatchedEvent (const sttcl::internal::DispatchedEvent< RegionContainerImpl, IInnerState, EventArgs > &dispatchedEvent)=0
- Public Member Functions inherited from sttcl::internal::IRegionEventDispatchWithArgs< RegionContainerImpl, IInnerState, EventArgs >
virtual void handleBroadcastedEvent (RegionContainerImpl *context, InnerEventHandler eventHandler, RefCountPtr eventArgs)=0
virtual ~IRegionEventDispatchWithArgs ()

Protected Attributes

RegionContainerImpl * regionContainer

Detailed Description

template<class RegionContainerImpl, class IInnerState, class EventArgs>
class sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >

Represents the abstract Region base class.

Template Parameters:
RegionContainerImpl
StateInterface
EventArgs

Member Typedef Documentation

template<class RegionContainerImpl , class IInnerState , class EventArgs >
typedef RegionEventDispatchInterface::InnerEventHandler sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::InnerEventHandler

The inner states event handler signature. All methods of the IInnerState interface must have this signature. The first parameter is a pointer to the containing state machine. The second parameter is a pointer to additional event arguments as specified with the EventArgs template parameter.

Reimplemented from sttcl::internal::IRegionEventDispatchWithArgs< RegionContainerImpl, IInnerState, EventArgs >.

Reimplemented in sttcl::Region< RegionImpl, RegionContainerImpl, IInnerState, EventArgs, HistoryType, StateThreadType, TimeDurationType, SemaphoreType, MutexType, EventQueueType >, sttcl::internal::RegionBaseImplWithoutEventArgs< RegionImpl, RegionContainerImpl, IInnerState, EventArgs >, and sttcl::internal::RegionBaseImplWithEventArgs< RegionImpl, RegionContainerImpl, IInnerState, EventArgs >.

template<class RegionContainerImpl , class IInnerState , class EventArgs >
typedef sttcl::internal::RegionEventDispatchInterfaceSelector<RegionContainerImpl,IInnerState,EventArgs>::RESULT_TYPE sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::RegionEventDispatchInterface

Constructor & Destructor Documentation

template<class RegionContainerImpl , class IInnerState , class EventArgs >
sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::RegionBase ( RegionContainerImpl *  argRegionContainer)
inline

Constructor for class RegionBase.

template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::~RegionBase ( )
inlinevirtual

Destructor for class RegionBase.


Member Function Documentation

template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::endDoRegion ( RegionContainerImpl *  context)
pure virtual

Called to stop the region thread.

Parameters:
contextA pointer to the containing state machine.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::enterRegion ( RegionContainerImpl *  context)
pure virtual

Called when the region is entered.

Parameters:
contextA pointer to the containing state machine.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::exitRegion ( RegionContainerImpl *  context)
pure virtual

Called when the region is left.

Parameters:
contextA pointer to the containing state machine.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::finalizeRegion ( bool  recursive)
pure virtual

Called to finalize the region.

Parameters:
recursiveIndicates to finalize nested sub state machines recursively.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
template<class RegionImpl >
RegionImpl* sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::getRegionContext ( )
inline

Gets the actual Region implementation context.

Returns:
A pointer to the actual Region implementation.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual bool sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::initializeRegion ( bool  recursive)
pure virtual

Called to initialize the region.

Parameters:
recursiveIndicates to initialize nested sub state machines recursively.
Returns:
true when the region was successfully initialized, false otherwise.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::internalFinalize ( bool  recursive)
pure virtual
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::internalInitialize ( bool  recursive)
pure virtual

Used to call the Region::initialize() method, when initialize() should run inside the region thread.

Parameters:
recursive
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual bool sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::isRegionFinalized ( )
pure virtual

Indicates that the region is finalized.

Returns:
true if the region is finalized, false otherwise.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual bool sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::isRegionInitialized ( )
pure virtual

Indicates that the region is initialized.

Returns:
true if the region is initialized, false otherwise.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual bool sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::isRegionThreadRunning ( ) const
pure virtual

Indicates that the region thread is currently running.

Returns:
true if the region thread is running, false otherwise.
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::joinRegionThread ( )
pure virtual

Called to join the region thread after stopping it.

template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::queueDispatchedEvent ( const sttcl::internal::DispatchedEvent< RegionContainerImpl, IInnerState, EventArgs > &  dispatchedEvent)
pure virtual
template<class RegionContainerImpl , class IInnerState , class EventArgs >
virtual void sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::startDoRegion ( RegionContainerImpl *  context)
pure virtual

Called to start the region thread.

Parameters:
contextA pointer to the containing state machine.

Member Data Documentation

template<class RegionContainerImpl , class IInnerState , class EventArgs >
RegionContainerImpl* sttcl::RegionBase< RegionContainerImpl, IInnerState, EventArgs >::regionContainer
protected

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