Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::ListContainer< E, Master > Class Template Reference

#include <ogdf/basic/List.h>

+ Inheritance diagram for ogdf::ListContainer< E, Master >:

Public Types

using iterator = typename List< E >::const_iterator
 Provides a bidirectional iterator to an object in the container. More...
 
using reverse_iterator = typename List< E >::const_reverse_iterator
 Provides a bidirectional reverse iterator to an object in the container. More...
 

Public Member Functions

iterator begin () const
 Returns an iterator to the first element in the container. More...
 
iterator end () const
 Returns an iterator to the one-past-last element in the container. More...
 
reverse_iterator rbegin () const
 Returns a reverse iterator to the last element in the container. More...
 
reverse_iterator rend () const
 Returns a reverse iterator to the one-before-first element in the container. More...
 
int size () const
 Returns the number of elements in the container. More...
 
- Public Member Functions inherited from ogdf::List< E >
 List ()
 Constructs an empty doubly linked list. More...
 
 List (const List< E > &L)
 Constructs a doubly linked list that is a copy of L. More...
 
 List (List< E > &&L)
 Constructs a doubly linked list containing the elements of L (move semantics). More...
 
 List (std::initializer_list< E > init)
 Constructs a doubly linked list containing the elements in init. More...
 
int size () const
 Returns the number of elements in the list. More...
 
const ListPure< E > & getListPure () const
 Conversion to const ListPure. More...
 
List< E > & operator= (const List< E > &L)
 Assignment operator. More...
 
List< E > & operator= (List< E > &&L)
 Assignment operator (move semantics). More...
 
bool operator== (const List< E > &L) const
 Equality operator. More...
 
bool operator!= (const List< E > &L) const
 Inequality operator. More...
 
iterator pushFront (const E &x)
 Adds element x at the beginning of the list. More...
 
template<class ... Args>
iterator emplaceFront (Args &&... args)
 Adds a new element at the beginning of the list. More...
 
iterator pushBack (const E &x)
 Adds element x at the end of the list. More...
 
template<class ... Args>
iterator emplaceBack (Args &&... args)
 Adds a new element at the end of the list. More...
 
iterator insert (const E &x, iterator it, Direction dir=Direction::after)
 Inserts element x before or after it. More...
 
iterator insertBefore (const E &x, iterator it)
 Inserts element x before it. More...
 
iterator insertAfter (const E &x, iterator it)
 Inserts element x after it. More...
 
void popFront ()
 Removes the first element from the list. More...
 
popFrontRet ()
 Removes the first element from the list and returns it. More...
 
void popBack ()
 Removes the last element from the list. More...
 
popBackRet ()
 Removes the last element from the list and returns it. More...
 
void del (iterator it)
 Removes it from the list. More...
 
bool removeFirst (const E &x)
 Removes the first occurrence of x (if any) from the list. More...
 
void clear ()
 Removes all elements from the list. More...
 
void moveToFront (iterator it, List< E > &L2)
 Moves it to the begin of the list. More...
 
void moveToBack (iterator it, List< E > &L2)
 Moves it to the end of the list. More...
 
void moveToSucc (iterator it, List< E > &L2, iterator itBefore)
 Moves it after itBefore. More...
 
void moveToPrec (iterator it, List< E > &L2, iterator itAfter)
 Moves it before itAfter. More...
 
void conc (List< E > &L2)
 Appends L2 to this list and makes L2 empty. More...
 
void concFront (List< E > &L2)
 Prepends L2 to this list and makes L2 empty. More...
 
void swap (List< E > &other)
 Exchanges the contents of this list and other in constant time. More...
 
void split (iterator it, List< E > &L1, List< E > &L2, Direction dir=Direction::before)
 Splits the list at element it into lists L1 and L2. More...
 

Private Attributes

friend Master
 

Detailed Description

template<class E, class Master>
class ogdf::ListContainer< E, Master >

Definition at line 1645 of file List.h.

Member Typedef Documentation

◆ iterator

template<class E , class Master >
using ogdf::ListContainer< E, Master >::iterator = typename List<E>::const_iterator

Provides a bidirectional iterator to an object in the container.

Definition at line 1650 of file List.h.

◆ reverse_iterator

template<class E , class Master >
using ogdf::ListContainer< E, Master >::reverse_iterator = typename List<E>::const_reverse_iterator

Provides a bidirectional reverse iterator to an object in the container.

Definition at line 1652 of file List.h.

Member Function Documentation

◆ begin()

template<class E , class Master >
iterator ogdf::ListContainer< E, Master >::begin ( ) const
inline

Returns an iterator to the first element in the container.

Definition at line 1655 of file List.h.

◆ end()

template<class E , class Master >
iterator ogdf::ListContainer< E, Master >::end ( ) const
inline

Returns an iterator to the one-past-last element in the container.

Definition at line 1658 of file List.h.

◆ rbegin()

template<class E , class Master >
reverse_iterator ogdf::ListContainer< E, Master >::rbegin ( ) const
inline

Returns a reverse iterator to the last element in the container.

Definition at line 1661 of file List.h.

◆ rend()

template<class E , class Master >
reverse_iterator ogdf::ListContainer< E, Master >::rend ( ) const
inline

Returns a reverse iterator to the one-before-first element in the container.

Definition at line 1664 of file List.h.

◆ size()

template<class E , class Master >
int ogdf::ListContainer< E, Master >::size ( ) const
inline

Returns the number of elements in the container.

Definition at line 1667 of file List.h.

Member Data Documentation

◆ Master

template<class E , class Master >
friend ogdf::ListContainer< E, Master >::Master
private

Definition at line 1646 of file List.h.


The documentation for this class was generated from the following file: