| |
libFAUDES
Sections
Index
|
faudes::TaTransSet< Attr > Class Template Reference |
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 * | New (void) const |
Construct on heap with same type. | |
virtual TaTransSet & | operator= (const TaTransSet &rSrc) |
Assignment operator (uses copy). | |
virtual TaTransSet & | operator= (const TransSet &rSrc) |
Assignment operator (uses copy). | |
virtual void | Copy (TaTransSet< Attr > &rOtherSet) const |
Copy to other transition set with same attribute type. | |
virtual void | Copy (TransSet &rOtherSet) const |
Copy to other transition set. | |
virtual | ~TaTransSet () |
Virtual destructor. | |
Basic maintenance | |
void | Clear (void) |
Clear all transitions incl attributes. | |
virtual void | ClearAttributes (void) |
clear all attributes | |
virtual Idx | AttributesSize (void) const |
Get number of explicit (non-default) attributes. | |
virtual const Attr * | Attributep (void) const |
Attribute typeinfo. | |
virtual const AttributeVoid & | Attribute (void) const |
Attribute typeinfo. | |
virtual bool | AttributeTry (const Type &rAttr) const |
Attribute typeinfo. | |
Accessing individual transitions | |
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. | |
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. | |
virtual Attr * | Attributep (const Transition &rTrans) |
Get attribute reference by transition. | |
virtual const Attr & | Attribute (const Transition &rTrans) const |
Get const reference to attribute by transition. | |
virtual void | Attribute (const Transition &rTrans, const Attr &rAttr) |
Set attribute. | |
virtual void | Attribute (const Transition &rTrans, const Type &rAttr) |
Set attribute. | |
virtual void | AttributeTry (const Transition &rTrans, const Type &rAttr) |
Set attribute. | |
virtual void | Attributes (const TransSet &rOtherSet) |
Set attributes. | |
virtual void | Attributes (const TaTransSet &rOtherSet) |
Set attributes. | |
virtual void | ClrAttribute (const Transition &rTrans) |
Clear attribute to default. | |
Protected Attributes | |
std::map< Transition, Attr > | mAttributeMap |
Stored attributes. | |
Static Protected Attributes | |
static Attr | mDefAttribute |
default attribute | |
Friends | |
class | TaTransSet |
We implement "protected privacy for template classes" by friendship. |
faudes::TaTransSet< Attr >::TaTransSet | ( | void | ) | [inline] |
Construct an empty TaTransSet object.
doxygen group
faudes::TaTransSet< Attr >::TaTransSet | ( | const TaTransSet< Attr > & | rOtherSet | ) | [inline] |
Copy-constructor (incl attributes).
faudes::TaTransSet< Attr >::TaTransSet | ( | const TTransSet< TransSort::X1EvX2 > & | rOtherSet | ) | [inline] |
Copy-Constructor (set attributes to default).
virtual faudes::TaTransSet< Attr >::~TaTransSet | ( | ) | [inline, virtual] |
Virtual destructor.
TaTransSet< Attr > * faudes::TaTransSet< Attr >::New | ( | void | ) | const [inline, virtual] |
Construct on heap with same type.
Reimplemented from faudes::TTransSet< Cmp >.
virtual TaTransSet& faudes::TaTransSet< Attr >::operator= | ( | const TaTransSet< Attr > & | rSrc | ) | [inline, virtual] |
Assignment operator (uses copy).
rSrc | Source from which to assign |
virtual TaTransSet& faudes::TaTransSet< Attr >::operator= | ( | const TransSet & | rSrc | ) | [inline, virtual] |
Assignment operator (uses copy).
rSrc | Source from which to assign |
void faudes::TaTransSet< Attr >::Copy | ( | TaTransSet< Attr > & | rOtherSet | ) | const [inline, virtual] |
Copy to other transition set with same attribute type.
rOtherSet | Destination set |
void faudes::TaTransSet< Attr >::Copy | ( | TransSet & | rOtherSet | ) | const [inline, virtual] |
Copy to other transition set.
This function maintains attributes if types can be casted.
rOtherSet | Destination set |
void faudes::TaTransSet< Attr >::Clear | ( | void | ) | [inline, virtual] |
void faudes::TaTransSet< Attr >::ClearAttributes | ( | void | ) | [inline, virtual] |
Idx faudes::TaTransSet< Attr >::AttributesSize | ( | void | ) | const [inline, virtual] |
Get number of explicit (non-default) attributes.
Reimplemented from faudes::TBaseSet< T, Cmp >.
virtual const Attr* faudes::TaTransSet< Attr >::Attributep | ( | void | ) | const [inline, virtual] |
Attribute typeinfo.
Reimplemented from faudes::TBaseSet< T, Cmp >.
virtual const AttributeVoid& faudes::TaTransSet< Attr >::Attribute | ( | void | ) | const [inline, virtual] |
Attribute typeinfo.
Reimplemented from faudes::TBaseSet< T, Cmp >.
virtual bool faudes::TaTransSet< Attr >::AttributeTry | ( | const Type & | rAttr | ) | const [inline, virtual] |
Attribute typeinfo.
This set accepts all attributes that we can cast to our attribute type.
rAttr | Attribute type to test. |
Reimplemented from faudes::TBaseSet< T, Cmp >.
bool faudes::TaTransSet< Attr >::Insert | ( | Idx | x1, | |
Idx | ev, | |||
Idx | x2 | |||
) | [inline] |
Add a Transition by indices.
doxygen group
x1 | Predecessor state | |
ev | Event | |
x2 | Successor state |
Reimplemented from faudes::TTransSet< Cmp >.
bool faudes::TaTransSet< Attr >::Insert | ( | const Transition & | rTransition | ) | [inline] |
Add a Transition directly.
If the transition already exists, the attribute is maintained. Otherwise, the transition is inserted with default attribute.
rTransition | Reference to transition object |
Reimplemented from faudes::TTransSet< Cmp >.
bool faudes::TaTransSet< Attr >::Insert | ( | const Transition & | rTransition, | |
const Attr & | rAttr | |||
) | [inline] |
Add a Transition with attribute.
rTransition | Reference to transition object | |
rAttr | Reference to attribute |
bool faudes::TaTransSet< Attr >::Erase | ( | const Transition & | t | ) | [inline] |
Remove a Transition.
Reimplemented from faudes::TTransSet< Cmp >.
bool faudes::TaTransSet< Attr >::Erase | ( | Idx | x1, | |
Idx | ev, | |||
Idx | x2 | |||
) | [inline] |
Remove a Transition.
Reimplemented from faudes::TTransSet< Cmp >.
TaTransSet< Attr >::Iterator faudes::TaTransSet< Attr >::Erase | ( | const Iterator & | it | ) | [inline, virtual] |
Remove a Transition by iterator.
Reimplemented from faudes::TTransSet< Cmp >.
void faudes::TaTransSet< Attr >::EraseByX1 | ( | Idx | x1 | ) | [inline] |
Remove all transitions containing predecessor state x1.
x1 | State index |
Reimplemented from faudes::TTransSet< Cmp >.
void faudes::TaTransSet< Attr >::EraseByX2 | ( | Idx | x2 | ) | [inline] |
Remove all transitions containing successor state x2.
x2 | State index |
Reimplemented from faudes::TTransSet< Cmp >.
void faudes::TaTransSet< Attr >::EraseByEv | ( | Idx | ev | ) | [inline] |
Remove all transitions containing event ev.
ev | Event index |
Reimplemented from faudes::TTransSet< Cmp >.
void faudes::TaTransSet< Attr >::EraseByX1OrX2 | ( | Idx | x | ) | [inline] |
Remove all transitions containing state x.
x | State index |
Reimplemented from faudes::TTransSet< Cmp >.
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.
rStateSet | Set of states to remore |
Reimplemented from faudes::TTransSet< Cmp >.
Attr * faudes::TaTransSet< Attr >::Attributep | ( | const Transition & | rTrans | ) | [inline, virtual] |
Get attribute reference by transition.
Note that in order to produce a non-const reference this method will insert an explicit default attribute if necessary. If a const reference is sufficient, you should use Attribute(Idx) const instead.
rTrans | Transition |
const Attr & faudes::TaTransSet< Attr >::Attribute | ( | const Transition & | rTrans | ) | const [inline, virtual] |
Get const reference to attribute by transition.
rTrans | Transition |
void faudes::TaTransSet< Attr >::Attribute | ( | const Transition & | rTrans, | |
const Attr & | rAttr | |||
) | [inline, virtual] |
Set attribute.
Sets the attribute of the sepcified element to the given value.
rTrans | Transition to specify element | |
rAttr | Attribute value |
Exception |
|
void faudes::TaTransSet< Attr >::Attribute | ( | const Transition & | rTrans, | |
const Type & | rAttr | |||
) | [inline, virtual] |
Set attribute.
Sets the attribute of the sepcified element to the given value, provided that it can be dynamically casted. Throws an exception otherwise.
rTrans | Transition to specify element | |
rAttr | Attribute value |
Exception |
|
void faudes::TaTransSet< Attr >::AttributeTry | ( | const Transition & | rTrans, | |
const Type & | rAttr | |||
) | [inline, virtual] |
Set attribute.
Sets the attribute of the sepcified element to the given value, provided that it can be dynamically casted.
rTrans | Transition to specify element | |
rAttr | Attribute value |
Exception |
|
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.
rOtherSet | Other IndexSet |
Exception |
|
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.
rOtherSet | Other IndexSet |
void faudes::TaTransSet< Attr >::ClrAttribute | ( | const Transition & | rTrans | ) | [inline, virtual] |
friend class TaTransSet [friend] |
We implement "protected privacy for template classes" by friendship.
This is used for the pragmatic implemention conversion constructors.
std::map<Transition,Attr> faudes::TaTransSet< Attr >::mAttributeMap [protected] |
Stored attributes.
libFAUDES 2.13a c++ source docu by doxygen 1.5.6