faudes::TaTransSet< Attr > Class Template Reference
[State, Event and Transition Set]

Set of Transitions with attributes. More...

#include <cfl_transset.h>

List of all members.

Public Member Functions

Constructors & Destructor

 TaTransSet (void)
 Construct an empty TaTransSet object.
 TaTransSet (const TaTransSet &rOtherSet)
 Copy-constructor (incl attributes).
 TaTransSet (const TTransSet< TransSort::X1EvX2 > &rOtherSet)
 Copy-Constructor (set attributes to default).
virtual ~TaTransSet ()
 Virtual destructor.
virtual TaTransSetAssign (const TransSet &rSrc)
 Relaxed assignment method.
virtual TaTransSetoperator= (const TransSet &rSrc)
 Relaxed assignment operator.

Protected Member Functions

virtual void DoAssign (const TaTransSet &rSource)
 Assign my members.

Accessing individual transitions



typedef TTransSet
< TransSort::X1EvX2 >
::Iterator 
Iterator
 Iterator on transition.
void Clear (void)
 Clear all transitions incl attributes.
bool Insert (Idx x1, Idx ev, Idx x2)
 Add a Transition by indices.
bool Insert (const Transition &rTransition)
 Add a Transition directly.
bool Insert (const Transition &rTransition, const Attr &rAttr)
 Add a Transition with attribute.
virtual void InsertSet (const TransSet &rOtherSet)
 Inserts transitions of rOtherSet.
virtual void InsertSet (const TaTransSet &rOtherSet)
 Inserts transitions of rOtherSet.
bool Erase (const Transition &t)
 Remove a Transition.
bool Erase (Idx x1, Idx ev, Idx x2)
 Remove a Transition.
Iterator Erase (const Iterator &it)
 Remove a Transition by iterator.
void EraseByX1 (Idx x1)
 Remove all transitions containing predecessor state x1.
void EraseByX2 (Idx x2)
 Remove all transitions containing successor state x2.
void EraseByEv (Idx ev)
 Remove all transitions containing event ev.
void EraseByX1OrX2 (Idx x)
 Remove all transitions containing state x.
void EraseByX1OrX2 (const StateSet &rStateSet)
 Remove all transitions containing a specified state.
void EraseSet (const TransSet &rOtherSet)
 Erase elements given by other set.
void RestrictSet (const TransSet &rOtherSet)
 Restrict to specified subset.
void RestrictStates (const StateSet &rStateSet)
 Restrict to transitions with states as specified.
void RestrictEvents (const EventSet &rEventSet)
 Restrict to transitions with events as specified.
virtual void Attributes (const TransSet &rOtherSet)
 Set attributes.
virtual void Attributes (const TaTransSet &rOtherSet)
 Set attributes.

Detailed Description

template<class Attr>
class faudes::TaTransSet< Attr >

Set of Transitions with attributes.

This container class is derived from TTransSet to provide attributes as an additional feature. As with TaBaseSet, the template parameter specifies the attribute class, which in turn must provide some basic funtionality. In contrast to the TTransSet, the TaTransSet is restricted to standard ordering.

Note that it is the context of a Generator that actually allows to interpret a TaTransSet as a set of transitions as opposed to a set of triples of indices with attributes. In particular, file IO of transitions is provided by the generator class (although TaTransSet provides output functions for debugging)

Definition at line 947 of file cfl_transset.h.


Member Typedef Documentation

template<class Attr>
typedef TTransSet<TransSort::X1EvX2>::Iterator faudes::TaTransSet< Attr >::Iterator

Iterator on transition.

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1002 of file cfl_transset.h.


Constructor & Destructor Documentation

template<class Attr >
faudes::TaTransSet< Attr >::TaTransSet ( void   )  [inline]

Construct an empty TaTransSet object.

doxygen group

Definition at line 1825 of file cfl_transset.h.

template<class Attr >
faudes::TaTransSet< Attr >::TaTransSet ( const TaTransSet< Attr > &  rOtherSet  )  [inline]

Copy-constructor (incl attributes).

Definition at line 1834 of file cfl_transset.h.

template<class Attr >
faudes::TaTransSet< Attr >::TaTransSet ( const TTransSet< TransSort::X1EvX2 > &  rOtherSet  )  [inline]

Copy-Constructor (set attributes to default).

Definition at line 1845 of file cfl_transset.h.

template<class Attr>
virtual faudes::TaTransSet< Attr >::~TaTransSet (  )  [inline, virtual]

Virtual destructor.

Definition at line 971 of file cfl_transset.h.


Member Function Documentation

template<class Attr >
TaTransSet< Attr > & faudes::TaTransSet< Attr >::Assign ( const TransSet rSrc  )  [inline, virtual]

Relaxed assignment method.

Maintains attributes provided they can be casted.

Parameters:
rSrc Source from which to assign
Returns:
Ref to this set

Definition at line 1862 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::Attributes ( const TaTransSet< Attr > &  rOtherSet  )  [inline, virtual]

Set attributes.

Attributes are copied per element from rOtherSet. Elements of this set which are not in rOtherSet maintain their attribute.

Parameters:
rOtherSet Other IndexSet

Definition at line 2051 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::Attributes ( const TransSet rOtherSet  )  [inline, virtual]

Set attributes.

Provided that rOtherSet has attributes that can be casted to the appropriate type, attributes are copied per element from rOtherSet. Elements of this set which are not in rOtherSet maintain their attribute.

Parameters:
rOtherSet Other IndexSet
Exceptions:
Exception 
  • Element does not exist (63)
  • Cannot cast attribute type (63)

Definition at line 2057 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::Clear ( void   )  [inline, virtual]

Clear all transitions incl attributes.

doxygen group

Reimplemented from faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >.

Definition at line 1878 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::DoAssign ( const TaTransSet< Attr > &  rSource  )  [inline, protected, virtual]

Assign my members.

Maintain attributes.

Parameters:
rSource Source to copy from
Returns:
Ref to this set

Definition at line 1856 of file cfl_transset.h.

template<class Attr >
TaTransSet< Attr >::Iterator faudes::TaTransSet< Attr >::Erase ( const Iterator it  )  [inline]

Remove a Transition by iterator.

Returns:
Iterator to next transition

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1927 of file cfl_transset.h.

template<class Attr >
bool faudes::TaTransSet< Attr >::Erase ( Idx  x1,
Idx  ev,
Idx  x2 
) [inline]

Remove a Transition.

Returns:
True if transition did exist

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1920 of file cfl_transset.h.

template<class Attr >
bool faudes::TaTransSet< Attr >::Erase ( const Transition t  )  [inline, virtual]

Remove a Transition.

Returns:
True if transition did exist

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1915 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::EraseByEv ( Idx  ev  )  [inline]

Remove all transitions containing event ev.

Parameters:
ev Event index

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1971 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::EraseByX1 ( Idx  x1  )  [inline]

Remove all transitions containing predecessor state x1.

Parameters:
x1 State index

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1939 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::EraseByX1OrX2 ( const StateSet rStateSet  )  [inline]

Remove all transitions containing a specified state.

This function iterates over all transitions to work with any sorting.

Parameters:
rStateSet Set of states to remore

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 2007 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::EraseByX1OrX2 ( Idx  x  )  [inline]

Remove all transitions containing state x.

Parameters:
x State index

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1989 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::EraseByX2 ( Idx  x2  )  [inline]

Remove all transitions containing successor state x2.

Parameters:
x2 State index

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1954 of file cfl_transset.h.

template<class Attr>
void faudes::TaTransSet< Attr >::EraseSet ( const TransSet rOtherSet  ) 

Erase elements given by other set.

This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.

Parameters:
rOtherSet Elements to erase
template<class Attr >
bool faudes::TaTransSet< Attr >::Insert ( const Transition rTransition,
const Attr &  rAttr 
) [inline]

Add a Transition with attribute.

Parameters:
rTransition Reference to transition object
rAttr Reference to attribute
Returns:
True if the transition was new to the set

Reimplemented from faudes::TaBaseSet< Transition, Attr, TransSort::X1EvX2 >.

Definition at line 1897 of file cfl_transset.h.

template<class Attr >
bool faudes::TaTransSet< Attr >::Insert ( const Transition rTransition  )  [inline, virtual]

Add a Transition directly.

If the transition already exists, the attribute is maintained. Otherwise, the transition is inserted with default attribute.

Parameters:
rTransition Reference to transition object
Returns:
True if the transition was new to the set

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1884 of file cfl_transset.h.

template<class Attr >
bool faudes::TaTransSet< Attr >::Insert ( Idx  x1,
Idx  ev,
Idx  x2 
) [inline]

Add a Transition by indices.

Parameters:
x1 Predecessor state
ev Event
x2 Successor state
Returns:
True if the transition was new to the set

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 1890 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::InsertSet ( const TaTransSet< Attr > &  rOtherSet  )  [inline, virtual]

Inserts transitions of rOtherSet.

Attributes of this set are maintained, new transitions are inserted with attribute.

Parameters:
rOtherSet Other IndexSet

Definition at line 1902 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::InsertSet ( const TransSet rOtherSet  )  [inline, virtual]

Inserts transitions of rOtherSet.

Attributes of this set are maintained, newly inserted transitions have default attribute.

Parameters:
rOtherSet Other IndexSet

Definition at line 1908 of file cfl_transset.h.

template<class Attr >
TaTransSet< Attr > & faudes::TaTransSet< Attr >::operator= ( const TransSet rSrc  )  [inline, virtual]

Relaxed assignment operator.

Maintains attributes provided they can be casted.

Parameters:
rSrc Source from which to assign
Returns:
Ref to this set

Definition at line 1873 of file cfl_transset.h.

template<class Attr >
void faudes::TaTransSet< Attr >::RestrictEvents ( const EventSet rEventSet  )  [inline]

Restrict to transitions with events as specified.

Erases any transition with event not in the specified state set.

Parameters:
rEventSet Set of events to keep.

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 2033 of file cfl_transset.h.

template<class Attr>
void faudes::TaTransSet< Attr >::RestrictSet ( const TransSet rOtherSet  ) 

Restrict to specified subset.

Erases any elements no in the specified set. This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.

Parameters:
rOtherSet Elements to erase
template<class Attr >
void faudes::TaTransSet< Attr >::RestrictStates ( const StateSet rStateSet  )  [inline]

Restrict to transitions with states as specified.

Erases any transition with X1 or X2 not in the specified state set.

Parameters:
rStateSet Set of states to keep.

Reimplemented from faudes::TTransSet< Cmp >.

Definition at line 2020 of file cfl_transset.h.


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

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen