Declaration of doubly linked lists and iterators. More...
#include <ogdf/internal/basic/list_templates.h>Go to the source code of this file.
Classes | |
| class | ogdf::List< E > |
| The parameterized class ListPure<E> represents doubly linked lists with content type E. More... | |
| class | ogdf::ListConstIterator< E > |
| The parameterized class ListIterator<E> encapsulates a constant pointer to a list element. More... | |
| class | ogdf::ListElement< E > |
| The parameterized class ListElement<E> represents the structure for elements of doubly linked lists. More... | |
| class | ogdf::ListIterator< E > |
| The parameterized class ListIterator<E> encapsulates a pointer to a dlist element. More... | |
| class | ogdf::ListPure< E > |
| The parameterized class ListPure<E> represents doubly linked lists with content type E. More... | |
Namespaces | |
| namespace | ogdf |
| The namespace for all OGDF objects. | |
Macros | |
| #define | forall_listiterators(type, it, L) for(ListConstIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all iterators it of a list L, where L is of Type List<type>. | |
| #define | forall_nonconst_listiterators(type, it, L) for(ListIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all non-const iterators it of a list L, where L is of Type List<type>. | |
| #define | forall_nonconst_slistiterators(type, it, L) for(SListIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all non-const iterators it of a list L, where L is of Type SList<type>. | |
| #define | forall_rev_listiterators(type, it, L) for(ListConstIterator< type > it = (L).rbegin(); it.valid(); --it) |
Iteration over all iterators it of a list L, where L is of Type List<type>, in reverse order. | |
| #define | forall_rev_nonconst_listiterators(type, it, L) for(ListIterator< type > it = (L).rbegin(); it.valid(); --it) |
Iteration over all non-const iterators it of a list L, where L is of Type List<type>, in reverse order. | |
| #define | forall_slistiterators(type, it, L) for(SListConstIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all iterators it of a list L, where L is of Type SList<type>. | |
| #define | OGDF_LIST_H |
Functions | |
| template<class E > | |
| ostream & | ogdf::operator<< (ostream &os, const ListPure< E > &L) |
| template<class E > | |
| ostream & | ogdf::operator<< (ostream &os, const List< E > &L) |
| template<class E > | |
| void | ogdf::print (ostream &os, const ListPure< E > &L, char delim= ' ') |
| template<class E > | |
| void | ogdf::print (ostream &os, const List< E > &L, char delim= ' ') |
Declaration of doubly linked lists and iterators.
Definition in file List.h.
| #define forall_listiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(ListConstIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all iterators it of a list L, where L is of Type List<type>.
Automagically creates a ListConstIterator<type> named it, and runs through the List L.
The following code runs through the list L, and prints each item
Note that this code is equivalent to the following tedious long version
| #define forall_nonconst_listiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(ListIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all non-const iterators it of a list L, where L is of Type List<type>.
Automagically creates a ListIterator<type> named it, and runs through the List L. See forall_listiterators for an example.
| #define forall_nonconst_slistiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(SListIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all non-const iterators it of a list L, where L is of Type SList<type>.
Automagically creates a SListIterator<type> named it, and runs through the SList L. See forall_listiterators for an example.
| #define forall_rev_listiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(ListConstIterator< type > it = (L).rbegin(); it.valid(); --it) |
Iteration over all iterators it of a list L, where L is of Type List<type>, in reverse order.
Automagically creates a ListConstIterator<type> named it, and runs through the List L, in reverse order. See forall_listiterators for an example.
| #define forall_rev_nonconst_listiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(ListIterator< type > it = (L).rbegin(); it.valid(); --it) |
Iteration over all non-const iterators it of a list L, where L is of Type List<type>, in reverse order.
Automagically creates a ListIterator<type> named it, and runs through the List L, in reverse order. See forall_listiterators for an example.
| #define forall_slistiterators | ( | type, | |
| it, | |||
| L | |||
| ) | for(SListConstIterator< type > it = (L).begin(); it.valid(); ++it) |
Iteration over all iterators it of a list L, where L is of Type SList<type>.
Automagically creates a SListConstIterator<type> named it, and runs through the SList L. See forall_listiterators for an example.