faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > Class Template Reference
[Generator Classes]

#include <cgenerator.h>

Inheritance diagram for faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >:

faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > faudes::vGenerator List of all members.

Detailed Description

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
class faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >

Generator with controllability attributes.

The cGenerator is a variant of the Generator to add an interface for events with controllabilty attributes, ie an event may be controllable, observable or forcible.

Technically, the construct is based on the specialized attribute class faudes::AttributeCFlags that provides attributes with semantics for controllability properties. The TcGenerator expects an event attribute template parameter with the minimum interface defined in AttribueCFlags. Thus, you can add further semantics by deriving a class AttributeCFlagsAndMore from AttribueeCFlags and use this as event attribute parameter for TcGenerator. To model a plain finite state machine plus controllability properties, use TcGenerator with AttributeCFlags for the event attribute parameter and AttributeVoid for the other parameters. For convenience, this has been typedefed as cGenerator.

Definition at line 197 of file cgenerator.h.

Public Member Functions

 TcGenerator (void)
 Creates an emtpy cGenerator object.
 TcGenerator (const vGenerator &rOtherGen)
 cGenerator from a std Generator.
 TcGenerator (const TcGenerator &rOtherGen)
 cGenerator from a cGenerator.
 TcGenerator (const char *pFileName)
 construct a cGenerator from file
TcGeneratorNewP (void) const
 construct on heap
TcGenerator NewCGen (void) const
 construct on stack
void InsControllableEvent (Idx index)
 Add an existing controllable event to generator.
Idx InsControllableEvent (const std::string &rName)
 Add new named controllable event to generator.
void InsUncontrollableEvent (Idx index)
 Add an existing uncontrollable event to generator.
Idx InsUncontrollableEvent (const std::string &rName)
 Add new named uncontrollable event to generator.
void SetControllable (Idx index)
 Mark event controllable (by index).
void SetControllable (const std::string &rName)
 Mark event controllable (by name).
void SetControllable (const EventSet &rEvents)
 Mark set of events controllable (by index).
void ClrControllable (Idx index)
 Mark event uncontrollable (by index).
void ClrControllable (const std::string &rName)
 Mark event uncontrollable (by name).
void ClrControllable (const EventSet &rEvents)
 Mark set of events uncontrollable (by index).
bool Controllable (Idx index) const
 Is event controllable (by index).
bool Controllable (const std::string &rName) const
 Is event controllable (by name).
EventSet ControllableEvents (void) const
 Get EventSet with controllable events.
EventSet UncontrollableEvents (void) const
 Get EventSet with uncontrollable events.
void InsObservableEvent (Idx index)
 Add an existing observable event to generator.
Idx InsObservableEvent (const std::string &rName)
 Add new named observable event to generator.
void InsUnobservableEvent (Idx index)
 Add an existing unobservable event to generator.
Idx InsUnobservableEvent (const std::string &rName)
 Add new named unobservable event to generator.
void SetObservable (Idx index)
 Mark event observable (by index).
void SetObservable (const std::string &rName)
 Mark event observable (by name).
void SetObservable (const EventSet &rEvents)
 Mark set of events observable.
void ClrObservable (Idx index)
 Mark event unobservable (by index).
void ClrObservable (const std::string &rName)
 Mark event unobservable (by name).
void ClrObservable (const EventSet &rEvents)
 Mark set of events unobservable.
bool Observable (Idx index) const
 Is event observable (by index).
bool Observable (const std::string &rName) const
 Is event observable (by name).
EventSet ObservableEvents (void) const
 Get EventSet with observable events.
EventSet UnobservableEvents (void) const
 Get EventSet with unobservable events.
void InsForcibleEvent (Idx index)
 Add an existing forcible event to generator.
Idx InsForcibleEvent (const std::string &rName)
 Add new named forcible event to generator.
void InsUnforcibleEvent (Idx index)
 Add an existing unforcible event to generator.
Idx InsUnforcibleEvent (const std::string &rName)
 Add new named unforcible event to generator.
void SetForcible (Idx index)
 Mark event forcible (by index).
void SetForcible (const std::string &rName)
 Mark event forcible (by name).
void SetForcible (const EventSet &rEvents)
 Mark set of events forcible.
void ClrForcible (Idx index)
 Mark event unforcible (by index).
void ClrForcible (const std::string &rName)
 Mark event unforcible (by name).
void ClrForcible (const EventSet &rEvents)
 Mark set of events unforcible.
bool Forcible (Idx index) const
 Is event forcible (by index).
bool Forcible (const std::string &rName) const
 Is event forcible (by name).
EventSet ForcibleEvents (void) const
 Get EventSet with forcible events.
EventSet UnforcibleEvents (void) const
 Get EventSet with unforcible events.


Constructor & Destructor Documentation

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TcGenerator void   ) 
 

Creates an emtpy cGenerator object.

Definition at line 648 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TcGenerator const vGenerator rOtherGen  ) 
 

cGenerator from a std Generator.

Copy constructor

Parameters:
rOtherGen 

Definition at line 658 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TcGenerator const TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > &  rOtherGen  ) 
 

cGenerator from a cGenerator.

Copy constructor

Parameters:
rOtherGen 

Definition at line 653 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::TcGenerator const char *  pFileName  ) 
 

construct a cGenerator from file

Parameters:
pFileName Filename
Exceptions:
Exception If opening/reading fails an Exception object is thrown (id 1, 50, 51)

Definition at line 663 of file cgenerator.h.


Member Function Documentation

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrControllable const EventSet rEvents  ) 
 

Mark set of events uncontrollable (by index).

Parameters:
rEvents EventSet

Definition at line 794 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrControllable const std::string &  rName  ) 
 

Mark event uncontrollable (by name).

Parameters:
rName Event name

Definition at line 779 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrControllable Idx  index  ) 
 

Mark event uncontrollable (by index).

Parameters:
index Event index

Definition at line 771 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrForcible const EventSet rEvents  ) 
 

Mark set of events unforcible.

Parameters:
rEvents EventSet

Definition at line 1057 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrForcible const std::string &  rName  ) 
 

Mark event unforcible (by name).

Parameters:
rName Event name

Definition at line 1042 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrForcible Idx  index  ) 
 

Mark event unforcible (by index).

Parameters:
index Event index

Definition at line 1034 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrObservable const EventSet rEvents  ) 
 

Mark set of events unobservable.

Parameters:
rEvents EventSet

Definition at line 925 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrObservable const std::string &  rName  ) 
 

Mark event unobservable (by name).

Parameters:
rName Event name

Definition at line 910 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ClrObservable Idx  index  ) 
 

Mark event unobservable (by index).

Parameters:
index Event index

Definition at line 902 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Controllable const std::string &  rName  )  const
 

Is event controllable (by name).

Parameters:
rName Event name
Returns:
True / false

Definition at line 701 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Controllable Idx  index  )  const
 

Is event controllable (by index).

Parameters:
index Event index
Returns:
True / false

Definition at line 695 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ControllableEvents void   )  const
 

Get EventSet with controllable events.

Returns:
EventSet of controllable events

Definition at line 803 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Forcible const std::string &  rName  )  const
 

Is event forcible (by name).

Parameters:
rName Event name
Returns:
True / false

Definition at line 964 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Forcible Idx  index  )  const
 

Is event forcible (by index).

Parameters:
index Event index
Returns:
True / false

Definition at line 958 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ForcibleEvents void   )  const
 

Get EventSet with forcible events.

Returns:
EventSet of controllable events

Definition at line 1066 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsControllableEvent const std::string &  rName  ) 
 

Add new named controllable event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 715 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsControllableEvent Idx  index  ) 
 

Add an existing controllable event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 707 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsForcibleEvent const std::string &  rName  ) 
 

Add new named forcible event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 978 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsForcibleEvent Idx  index  ) 
 

Add an existing forcible event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 970 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsObservableEvent const std::string &  rName  ) 
 

Add new named observable event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 846 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsObservableEvent Idx  index  ) 
 

Add an existing observable event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 838 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUncontrollableEvent const std::string &  rName  ) 
 

Add new named uncontrollable event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 731 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUncontrollableEvent Idx  index  ) 
 

Add an existing uncontrollable event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 723 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUnforcibleEvent const std::string &  rName  ) 
 

Add new named unforcible event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 994 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUnforcibleEvent Idx  index  ) 
 

Add an existing unforcible event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 986 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
Idx faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUnobservableEvent const std::string &  rName  ) 
 

Add new named unobservable event to generator.

An entry in the global eventtable will be made if event is new.

Parameters:
rName Name of the event to add
Returns:
New global unique index

Definition at line 862 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::InsUnobservableEvent Idx  index  ) 
 

Add an existing unobservable event to generator.

An entry in the global eventtable will be made.

Parameters:
index Event index

Definition at line 854 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewCGen void   )  const
 

construct on stack

Returns:
new Generator

Definition at line 687 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > * faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::NewP void   )  const [virtual]
 

construct on heap

Returns:
new Generator

Reimplemented from faudes::TaGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >.

Definition at line 677 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Observable const std::string &  rName  )  const
 

Is event observable (by name).

Parameters:
rName Event name
Returns:
True / false

Definition at line 832 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
bool faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::Observable Idx  index  )  const
 

Is event observable (by index).

Parameters:
index Event index
Returns:
True / false

Definition at line 826 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::ObservableEvents void   )  const
 

Get EventSet with observable events.

Returns:
EventSet of controllable events

Definition at line 934 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetControllable const EventSet rEvents  ) 
 

Mark set of events controllable (by index).

Parameters:
rEvents EventSet

Definition at line 762 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetControllable const std::string &  rName  ) 
 

Mark event controllable (by name).

Parameters:
rName Event name

Definition at line 747 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetControllable Idx  index  ) 
 

Mark event controllable (by index).

Parameters:
index Event index

Definition at line 739 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetForcible const EventSet rEvents  ) 
 

Mark set of events forcible.

Parameters:
rEvents EventSet

Definition at line 1025 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetForcible const std::string &  rName  ) 
 

Mark event forcible (by name).

Parameters:
rName Event name

Definition at line 1010 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetForcible Idx  index  ) 
 

Mark event forcible (by index).

Parameters:
index Event index

Definition at line 1002 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetObservable const EventSet rEvents  ) 
 

Mark set of events observable.

Parameters:
rEvents EventSet

Definition at line 893 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetObservable const std::string &  rName  ) 
 

Mark event observable (by name).

Parameters:
rName Event name

Definition at line 878 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
void faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::SetObservable Idx  index  ) 
 

Mark event observable (by index).

Parameters:
index Event index

Definition at line 870 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UncontrollableEvents void   )  const
 

Get EventSet with uncontrollable events.

Returns:
EventSet of uncontrollable events

Definition at line 815 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UnforcibleEvents void   )  const
 

Get EventSet with unforcible events.

Returns:
EventSet of uncontrollable events

Definition at line 1078 of file cgenerator.h.

template<class GlobalAttr, class StateAttr, class EventAttr, class TransAttr>
EventSet faudes::TcGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >::UnobservableEvents void   )  const
 

Get EventSet with unobservable events.

Returns:
EventSet of uncontrollable events

Definition at line 946 of file cgenerator.h.


The documentation for this class was generated from the following file:
Generated on Fri May 9 11:26:48 2008 for libFAUDES 2.09b by  doxygen 1.4.4