|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
38 #include <initializer_list>
177 template<
class... Args>
222 Queue(std::initializer_list<E> initList) :
SList<E>(initList) { }
330 template<
class... Args>
The namespace for all OGDF objects.
reference bottom()
Returns a reference to the back element.
iterator append(const E &x)
Adds x at the end of queue.
Queue< E > & operator=(Queue< E > &&Q)
Assignment operator (move semantics).
void clear()
Makes the queue empty.
iterator backIterator()
Returns an iterator to the last element of the list.
iterator emplace(Args &&... args)
Adds a new element at the end of the queue.
const_reference front() const
Returns a reference to the first element.
reference top()
Returns a reference to the front element.
SList< E > & operator=(const SList< E > &L)
Assignment operator.
Encapsulates a pointer to an ogdf::SList element.
Singly linked lists (maintaining the length of the list).
const_iterator cbegin() const
Returns a const iterator to the first element of the queue.
QueuePure< E > & operator=(const QueuePure< E > &Q)
Assignment operator.
const_reference top() const
Returns a reference to the front element.
const SListPure< E > & getListPure() const
Conversion to const SListPure.
void clear()
Removes all elements from the list.
Queue(const Queue< E > &Q)
Constructs a queue that is a copy of Q.
bool empty() const
Returns true iff the queue is empty.
iterator end()
Returns an iterator to one-past-last element of the queue.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
iterator emplace(Args &&... args)
Adds a new element at the end of the queue.
iterator begin()
Returns an iterator to the first element of the list.
const_iterator cend() const
Returns a const iterator to one-past-last element of the list.
const_reference back() const
Returns a reference to the last element.
bool empty() const
Returns true iff the list is empty.
iterator emplaceBack(Args &&... args)
Adds a new element at the end of the list.
void clear()
Makes the queue empty.
QueuePure< E > & operator=(QueuePure< E > &&Q)
Assignment operator (move semantics).
QueuePure()
Constructs an empty queue.
iterator append(const E &x)
Adds x at the end of queue.
const_reference bottom() const
Returns a reference to the back element.
iterator end()
Returns an iterator to one-past-last element of the list.
QueuePure(const QueuePure< E > &Q)
Constructs a queue that is a copy of Q.
E pop()
Removes front element and returns it.
const T & move(const T &v)
int size() const
Returns the number of elements in the list.
Declaration of singly linked lists and iterators.
int size() const
Returns the number of elements in the queue.
E & reference
Provides a reference to an element stored in a queue.
iterator end()
Returns an iterator to one-past-last element of the queue.
E value_type
Represents the data type stored in a queue element.
const_iterator end() const
Returns a const iterator to one-past-last element of the queue.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
const_reference bottom() const
Returns a reference to the back element.
The parameterized class Queue<E> implements list-based queues.
Queue()
Constructs an empty queue.
Queue(std::initializer_list< E > initList)
Constructs a queue and appends the elements in initList to it.
const_iterator begin() const
Returns a const iterator to the first element of the queue.
void clear()
Removes all elements from the list.
const_iterator cend() const
Returns a const iterator to one-past-last element of the queue.
bool empty() const
Returns true iff the queue is empty.
iterator begin()
Returns an iterator to the first element of the queue.
reference top()
Returns a reference to the front element.
const_iterator cbegin() const
Returns a const iterator to the first element of the list.
const_iterator begin() const
Returns a const iterator to the first element of the queue.
QueuePure(QueuePure< E > &&Q)
Constructs a queue containing the elements of Q (move semantics).
const E & const_reference
Provides a reference to a const element stored in a queue for reading and performing const operations...
const_iterator cbegin() const
Returns a const iterator to the first element of the queue.
Implementation of list-based queues.
reference bottom()
Returns a reference to the back element.
iterator emplaceBack(Args &&... args)
Adds a new element at the end of the list.
void print(std::ostream &os, const Array< E, INDEX > &a, char delim=' ')
Prints array a to output stream os using delimiter delim.
const_iterator cend() const
Returns a const iterator to one-past-last element of the queue.
QueuePure(std::initializer_list< E > initList)
Constructs a queue and appends the elements in initList to it.
iterator pushBack(const E &x)
Adds element x at the end of the list.
const_iterator end() const
Returns a const iterator to one-past-last element of the queue.
iterator begin()
Returns an iterator to the first element of the queue.
iterator backIterator()
Returns an iterator to the last element of the queue.
Queue< E > & operator=(const Queue< E > &Q)
Assignment operator.
E pop()
Removes front element and returns it.
const_iterator backIterator() const
Returns a const iterator to the last element of the queue.
const_reference top() const
Returns a reference to the front element.
const_iterator backIterator() const
Returns a const iterator to the last element of the queue.
Class for the representation of nodes.
void popFront()
Removes the first element from the list.
Declaration of memory manager for allocating small pieces of memory.
SListPure< E > & operator=(const SListPure< E > &L)
Assignment operator.
SListIterator< E > pushBack(const E &x)
Adds element x at the end of the list.
const SList< E > & getList() const
Conversion to const SList.
iterator backIterator()
Returns an iterator to the last element of the queue.
Queue(Queue< E > &&Q)
Constructs a queue containing the elements of Q (move semantics).
void popFront()
Removes the first element from the list.