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 faudes::Type faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr > faudes::Executor 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 194 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 std::string &rFileName)
 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 645 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 655 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 650 of file cgenerator.h.

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

construct a cGenerator from file

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

Definition at line 660 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 775 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 768 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 760 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 1006 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 999 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 991 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 890 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 883 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 875 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 698 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 692 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 784 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 929 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 923 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 1015 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 712 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 704 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 943 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 935 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 827 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 819 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 728 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 720 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 959 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 951 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 843 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 835 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 684 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 >.

Reimplemented in faudes::TtGenerator< GlobalAttr, StateAttr, EventAttr, TransAttr >, and faudes::TtGenerator< AttributeTimedGlobal, AttributeTimedState, AttributeCFlags, AttributeTimedTrans >.

Definition at line 674 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 813 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 807 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 899 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 751 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 744 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 736 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 982 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 975 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 967 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 866 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 859 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 851 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 796 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 1027 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 911 of file cgenerator.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 10 08:13:17 2008 for libFAUDES 2.11v by  doxygen 1.4.4