Otawa
0.10
|
#include <otawa/tsim/TreePath.h>
Classes | |
class | Iterator |
Public Member Functions | |
TreePath (int max_childs=DEFAULT_MAX_CHILDS) | |
Builds a new empty TreePath. More... | |
TreePath (const T1 label, const T2 data, int max_childs=DEFAULT_MAX_CHILDS) | |
Builds a new TreePath with initial values for its root. More... | |
TreePath (elm::genstruct::Vector< T1 > &path, const T2 data, int max_childs=DEFAULT_MAX_CHILDS) | |
Builds a new TreePath with initial values for an initial path. More... | |
TreePath (elm::genstruct::Vector< T1 > *path, const T2 data, int max_childs=DEFAULT_MAX_CHILDS) | |
Builds a new TreePath with initial values for an initial path. More... | |
~TreePath () | |
Destroys all his childs. More... | |
T1 | rootLabel () const |
T2 | rootData () const |
elm::Option< T2 > | get (const elm::genstruct::Vector< T1 > &path, int from_index=0) |
Gives an optional value attached to the path given. More... | |
void | add (elm::genstruct::Vector< T1 > &path, const T2 data, int from_index=0) |
Adds a value attached to the path given. More... | |
void | add (elm::genstruct::Vector< T1 > *path, const T2 data, int from_index=0) |
Adds a value attached to the path given. More... | |
Private Member Functions | |
TreePath (const T1 label, int max_childs=DEFAULT_MAX_CHILDS) | |
TreePath< T1, T2 > * | searchChild (const T1 &label) const |
Private Attributes | |
T1 | _label |
elm::Option< T2 > | _data |
int | _max_childs |
elm::genstruct::Vector < TreePath< T1, T2 > * > | _childs |
This class is used for holding unique sequences in a tree so that it is very fast to retrieve the matched sequence with a list of elements
T1 | element of the sequence |
T2 | type holding the data of the sequence |
|
inlineprivate |
|
inline |
Builds a new empty TreePath.
max_childs | for speed only: gives this initial capacity for the size of the vector holding childs |
References otawa::tsim::TreePath< T1, T2 >::_data, and elm::none.
|
inline |
Builds a new TreePath with initial values for its root.
label | element of the sequence |
data | data attached to the sequence [label] (length=1) |
max_childs | for speed only: gives this initial capacity for the size of the vector holding childs |
References otawa::tsim::TreePath< T1, T2 >::_data, and otawa::tsim::TreePath< T1, T2 >::_label.
|
inline |
Builds a new TreePath with initial values for an initial path.
path | first path in the tree |
data | data attached to the path |
max_childs | for speed only: gives this initial capacity for the size of the vector holding childs |
References otawa::tsim::TreePath< T1, T2 >::_data, otawa::tsim::TreePath< T1, T2 >::_label, otawa::tsim::TreePath< T1, T2 >::add(), and elm::none.
|
inline |
Builds a new TreePath with initial values for an initial path.
path | first path in the tree |
data | data attached to the path |
max_childs | for speed only: gives this initial capacity for the size of the vector holding childs |
References otawa::tsim::TreePath< T1, T2 >::_data, otawa::tsim::TreePath< T1, T2 >::_label, otawa::tsim::TreePath< T1, T2 >::add(), and elm::none.
|
inline |
Destroys all his childs.
|
inline |
Adds a value attached to the path given.
path | the path wich we want to attach some data |
data | data to attach to the path |
from_index | if we don't want to start searching the path with the index 0 of the Vector |
References otawa::tsim::TreePath< T1, T2 >::_childs, otawa::tsim::TreePath< T1, T2 >::_data, elm::genstruct::Vector< T >::add(), elm::genstruct::Vector< T >::length(), and otawa::tsim::TreePath< T1, T2 >::searchChild().
Referenced by otawa::tsim::BBPath::getBBPath(), and otawa::tsim::TreePath< T1, T2 >::TreePath().
|
inline |
Adds a value attached to the path given.
path | the path wich we want to attach some data |
data | data to attach to the path |
from_index | if we don't want to start searching the path with the index 0 of the Vector |
References otawa::sem::add().
|
inline |
Gives an optional value attached to the path given.
path | path searched |
from_index | if we don't want to start searching the path with the index 0 of the Vector |
References otawa::tsim::TreePath< T1, T2 >::_data, elm::genstruct::Vector< T >::length(), elm::none, and otawa::tsim::TreePath< T1, T2 >::searchChild().
Referenced by otawa::tsim::BBPath::getBBPath().
|
inline |
Referenced by otawa::tsim::BBPath::getBBPath().
|
inline |
|
inlineprivate |
References otawa::tsim::TreePath< T1, T2 >::_label.
Referenced by otawa::tsim::TreePath< T1, T2 >::add(), and otawa::tsim::TreePath< T1, T2 >::get().
|
private |
Referenced by otawa::tsim::TreePath< T1, T2 >::add().
|
private |
|
private |
|
private |