DiaDes
0.1
DIAgnosis of Discrete-Event System
|
#include <EdgeMap.hh>
Public Types | |
typedef Diades::Utils::Exception< EdgeMap > | Exception |
typedef vector< T >::reference | Reference |
typedef vector< T >::const_reference | ConstReference |
typedef vector< T >::value_type | ValueType |
typedef vector< T >::iterator | Iterator |
typedef vector< T >::const_iterator | ConstIterator |
typedef vector< T >::size_type | SizeType |
typedef vector< T >::difference_type | DifferenceType |
typedef vector< T >::allocator_type | AllocatorType |
typedef vector< T >::pointer | Pointer |
typedef vector< T >::const_pointer | ConstPointer |
typedef vector< T >::reverse_iterator | ReverseIterator |
typedef vector< T >::const_reverse_iterator | ConstReverseIterator |
Public Member Functions | |
Constructors | |
EdgeMap () | |
EdgeMap (Graph &g, SizeType capacity=0, ValueType dflt=ValueType()) | |
~EdgeMap () | |
Others | |
void | init (Graph &g, SizeType capacity=0, ValueType dflt=ValueType()) |
void | clear () |
const Graph & | owner () const |
Graph & | owner () |
Reference | operator[] (Edge edge) |
ConstReference | operator[] (Edge edge) const |
bool | valid () const |
EdgeIterator | initValue (EdgeIterator begin, EdgeIterator end, ConstReference value) |
LocalEdgeIterator | initValue (LocalEdgeIterator begin, LocalEdgeIterator end, ConstReference value) |
EdgeMapIterator< ValueType > | edgeBegin (ConstReference value) const |
EdgeMapIterator< ValueType > | egdeEnd (ConstReference value) const |
Static Public Member Functions | |
static string | typeName () |
Private Attributes | |
vector< ValueType > | _tabData |
Graph * | _owner |
T | _dflt |
Association between a edge of a graph (Edge) and a object T.
A EdgeMap defines a map between each edge of a Graph and objects of type T. This map is more efficient than the map developped in the STL.
Definition at line 29 of file EdgeMap.hh.
typedef vector<T>::allocator_type Diades::Graph::EdgeMap< T >::AllocatorType |
AllocatorType
the type of the allocator (use it at your own risk)
Definition at line 69 of file EdgeMap.hh.
typedef vector<T>::const_iterator Diades::Graph::EdgeMap< T >::ConstIterator |
Iterator
internal constant iterator of the mapping (use it at your own risk)
Definition at line 57 of file EdgeMap.hh.
typedef vector<T>::const_pointer Diades::Graph::EdgeMap< T >::ConstPointer |
ConstPointer
constant pointer on the element of the map
Definition at line 77 of file EdgeMap.hh.
typedef vector<T>::const_reference Diades::Graph::EdgeMap< T >::ConstReference |
ConstReference
constant reference of the mapped element of type T
Definition at line 45 of file EdgeMap.hh.
typedef vector<T>::const_reverse_iterator Diades::Graph::EdgeMap< T >::ConstReverseIterator |
ConstReverseIterator
internal constant reverse iterator of the mapping (use it at your own risk)
Definition at line 85 of file EdgeMap.hh.
typedef vector<T>::difference_type Diades::Graph::EdgeMap< T >::DifferenceType |
DifferenceType
the type of the distance in the map (use it at your own risk)
Definition at line 65 of file EdgeMap.hh.
typedef Diades::Utils::Exception<EdgeMap> Diades::Graph::EdgeMap< T >::Exception |
Definition at line 35 of file EdgeMap.hh.
typedef vector<T>::iterator Diades::Graph::EdgeMap< T >::Iterator |
Iterator
internal iterator of the mapping (use it at your own risk)
Definition at line 53 of file EdgeMap.hh.
typedef vector<T>::pointer Diades::Graph::EdgeMap< T >::Pointer |
Pointer
pointer on the element of the map
Definition at line 73 of file EdgeMap.hh.
typedef vector<T>::reference Diades::Graph::EdgeMap< T >::Reference |
Reference
reference of the mapped element of type T
Definition at line 41 of file EdgeMap.hh.
typedef vector<T>::reverse_iterator Diades::Graph::EdgeMap< T >::ReverseIterator |
ReverseIterator
internal reverse iterator of the mapping (use it at your own risk)
Definition at line 81 of file EdgeMap.hh.
typedef vector<T>::size_type Diades::Graph::EdgeMap< T >::SizeType |
SizeType
the type of the size of the map
Definition at line 61 of file EdgeMap.hh.
typedef vector<T>::value_type Diades::Graph::EdgeMap< T >::ValueType |
ValueType
the type T
Definition at line 49 of file EdgeMap.hh.
Diades::Graph::EdgeMap< T >::EdgeMap | ( | ) |
Default constructor
Make an invalid map (empty). You must initilialize it with init
Definition at line 295 of file EdgeMap.hh.
|
explicit |
Parametrized constructor
g | Graph whose edges will be associated in the map |
capacity | Edge capacity (memory allocation). This parameter is considered only if it is greater than the edge capacity of the graph |
dflt | T default value associated to each edge of the graph |
Construction of a map for the edges of Graph g to the value dflt
Definition at line 299 of file EdgeMap.hh.
|
inline |
destructor
Definition at line 117 of file EdgeMap.hh.
|
inline |
clear the map (must call init to use again)
Definition at line 145 of file EdgeMap.hh.
Referenced by Diades::Automata::Experimental::StateMachine< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clear(), and Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::~EdgeMap().
EdgeMapIterator< ValueType > Diades::Graph::EdgeMap< T >::edgeBegin | ( | ConstReference | value | ) | const |
EdgeMapIterator< ValueType > Diades::Graph::EdgeMap< T >::egdeEnd | ( | ConstReference | value | ) | const |
void Diades::Graph::EdgeMap< T >::init | ( | Graph & | g, |
SizeType | capacity = 0 , |
||
ValueType | dflt = ValueType() |
||
) |
Initialization of the map
g | Graph whose edges will be associated in the map |
capacity | Edge capacity (memory allocation). This parameter is considered only if it is greater than the edge capacity of the graph |
dflt | T default value associated to each edge of the graph |
Initialization of the map for the edges of Graph g to the value dflt
Definition at line 314 of file EdgeMap.hh.
Referenced by Diades::Automata::Experimental::StateMachine< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::clear(), Diades::Automata::Component::Component(), exportBackwardToDot(), exportToDot(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::finaliseEventPropertyIds(), Diades::Petri::MarkingGraph::MarkingGraph(), Diades::Automata::Experimental::StateMachine< _StatePropertyId, _InputSymbolId, _NullStatePropertyId, _NullInputSymbolId >::StateMachine(), and Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::~EdgeMap().
EdgeIterator Diades::Graph::EdgeMap< T >::initValue | ( | EdgeIterator | begin, |
EdgeIterator | end, | ||
ConstReference | value | ||
) |
LocalEdgeIterator Diades::Graph::EdgeMap< T >::initValue | ( | LocalEdgeIterator | begin, |
LocalEdgeIterator | end, | ||
ConstReference | value | ||
) |
EdgeMap< T >::Reference Diades::Graph::EdgeMap< T >::operator[] | ( | Edge | edge | ) |
Read/write accessor function
edge | Edge to read/write the associated information |
Use this function to change the value of an element in the map
Definition at line 331 of file EdgeMap.hh.
Referenced by Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::owner().
EdgeMap< T >::ConstReference Diades::Graph::EdgeMap< T >::operator[] | ( | Edge | edge | ) | const |
Read-only accessor function
edge | Edge to read the associated information |
Be careful, this operator returns an undefined value if not initialized before.
Definition at line 345 of file EdgeMap.hh.
|
inline |
Definition at line 154 of file EdgeMap.hh.
Referenced by Diades::Graph::EdgeMapIterator< T >::EdgeMapIterator(), and Diades::Graph::EdgeMapIterator< T >::operator++().
|
inline |
Definition at line 163 of file EdgeMap.hh.
|
inlinestatic |
Definition at line 32 of file EdgeMap.hh.
|
inline |
|
private |
Definition at line 216 of file EdgeMap.hh.
|
mutableprivate |
Definition at line 215 of file EdgeMap.hh.
Referenced by Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::owner(), and Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::valid().
|
mutableprivate |
Definition at line 214 of file EdgeMap.hh.
Referenced by Diades::Graph::EdgeMap< Diades::Automata::FaultPattern::EventOccurrence >::clear().