#include <tpl_graph.H>
Inheritance diagram for Aleph::Path< GT >::Iterator:
Collaboration diagram for Aleph::Path< GT >::Iterator:Public Types | |
| using | Set_Type = DynDlist |
| The type of container. | |
| using | Item_Type = T |
| The type of element stored in the container. | |
Public Member Functions | |
| Iterator (const Path &path) noexcept | |
Create an iterator on the first node of path | |
| Node * | get_current_node () const |
| Node * | get_current_node_ne () const noexcept |
| Arc * | get_current_arc () const |
| Arc * | get_current_arc_ne () const noexcept |
| Node * | get_curr_ne () const noexcept |
| Node * | get_curr () const |
| pair< Node *, Arc * > | get_pair () const |
| tuple< Node *, Arc * > | get_tuple () const |
| tuple< Node *, Arc * > | get_tuple_ne () const noexcept |
| bool | has_current_arc () const noexcept |
| bool | has_current_node () const noexcept |
Return true if the iterator has a current node. | |
| long | get_pos () const noexcept |
| Return the ordinal position of current item. | |
| void | next_ne () noexcept |
| void | next () |
| void | prev () |
| void | reset_first () noexcept |
| Reset the iterator to the first item. | |
| void | reset_last () noexcept |
| Reset the iterator to the last item. | |
| void | end () noexcept |
| Put theiterator at the end state (where there is no current item) | |
| void | insert (const T &item) |
| void | insert (T &&item) |
| void | append (const T &item) |
| void | append (T &&item) |
| void | insert_list (DynDlist &list) |
| void | append_list (DynDlist &list) |
| T | del () |
| void | set (Dlink *new_curr) noexcept |
| bool | has_curr () const noexcept |
Return true if the iterator has current item. | |
| bool | is_last () const noexcept |
| bool | is_in_first () const noexcept |
Return true if the iterator is positiones on the first item. | |
| bool | is_in_last () const noexcept |
Return true if the iterator is positiones on the last item. | |
| void | prev_ne () noexcept |
| bool | operator== (const Iterator &it) const noexcept |
Return true if this and it are positioned on the same item. | |
| bool | operator!= (const Iterator &it) const noexcept |
Return true if this and it hace different states. | |
| Dlink * | del_ne () noexcept |
| bool | verify (Dlink *l) const |
Return true if the iterator is on the list pointed by l | |
| bool | verify (const Iterator &it) const |
Return true if this and it are on the same list. | |
Iterator on nodes and arcs of a path
|
inlineinherited |
Append by copy an item before the current item.
This method appends a copy of item before the current item of iterator. The current item is not moved.
| [in] | item | the item to append |
| bad_alloc | if there is no enough memory |
| overflow_error | if there is no current item |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Append by movement an item after the current item.
This method appends a new element in the list before the current and then item is moved. The current item is not moved.
| [in] | item | the item to append |
| bad_alloc | if there is no enough memory |
| overflow_error | if there is no current item |
Here is the call graph for this function:
|
inlineinherited |
Move and append all elements of list before the current item of iterator.
This operation takes constant time and puts the element of list just before the current item. The current item of iterator is not moved. A prev() operation will move forward the iterator to the last item of list.
After operation list becomes empty, since all its items were moved to the list on which one is iterating.
| [in,out] | list | to append after current item. It becomes empty. |
| overflow_error | if there is no current item |
Here is the call graph for this function:
|
inlineinherited |
Remove from the list the current node and move the iterator one position forward.
| overflow_error | if there is no current item |
Here is the call graph for this function:
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Return the current arc of path.
n nodes has n - 1 arcs. So if the iterator is pistioned on the last node, the get_current_arc() has not current arc and will throw exception.| overflow_error | if path is empty of iterator has not current node |
|
inline |
Return the current node of path. Throw overflow_error if path is empty of iterator has not current node
|
inline |
Return a pair with the current node and arc
nullptr.| overflow_error | if path is empty of iterator has not current node |
|
inline |
Return a tuple with the current node and arc
nullptr.| overflow_error | if path is empty of iterator has not current node |
|
inlinenoexcept |
Return true if iterator has current arc.
Here is the caller graph for this function:
|
inlineinherited |
Insert by copy an item after the current item.
This method inserts a copy of item after the current item of iterator. The current item is not moved.
| [in] | item | the item to insert |
| bad_alloc | if there is no enough memory |
| overflow_error | if there is no current item |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Insert by movement an item after the current item.
This method inserts a new element in the list after the current and then item is moved. The current item is not moved.
| [in] | item | the item to insert |
| bad_alloc | if there is no enough memory |
| overflow_error | if there is no current item |
Here is the call graph for this function:
|
inlineinherited |
Move and insert all elements of list after the current item of iterator.
This operation takes constant time and puts the element of list just after the current item. The current item of iterator is not moved. A next() operation will move forward the iterator to the first item of list.
After operation list becomes empty, since all its items were moved to the list on which one is iterating.
| [in,out] | list | to insert after current item. It becomes empty. |
| overflow_error | if there is no current item |
Here is the call graph for this function:
|
inlineinherited |
Move the iterator one item forward. Throw overflow_error if iterator has not current item
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexceptinherited |
Move the iterator one position forward guaranteeing no exception. Be careful.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Move the iterator one item backward. Throw underflow_error if iterator has not current item
Here is the call graph for this function:
|
inlinenoexceptinherited |
Move the iterator one position backward guaranteeing no exception. Be careful.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinenoexceptinherited |
Set the current node .
This method set the current node to new_curr, which of course must be a valid pointer to a item in the list.
| [in] | new_curr | pointer to the new current item |
Here is the caller graph for this function: