|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
49 template<
class E,
class INDEX =
int>
84 Q.m_pStart = Q.m_pEnd = Q.m_pFirst = Q.m_pStop =
nullptr;
178 Q.m_pStart = Q.m_pEnd = Q.m_pFirst = Q.m_pStop =
nullptr;
206 void print(std::ostream& os,
char delim =
' ')
const {
220 int n = Q.
size() + 1;
237 template<
class E,
class INDEX>
The namespace for all OGDF objects.
BoundedQueue< E > & operator=(BoundedQueue< E > &&Q)
Assignment operator (move semantics).
Definition of exception classes.
E * m_pEnd
Pointer to first element of current sequence.
Exception thrown when not enough memory is available to execute an algorithm.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void clear()
Makes the queue empty.
void copy(const BoundedQueue< E > &Q)
E & bottom()
Returns back element.
bool full()
Returns true iff the queue is full.
BoundedQueue(INDEX n)
Constructs an empty bounded queue for at most n elements.
bool empty()
Returns true iff the queue is empty.
const E & bottom() const
Returns back element.
INDEX capacity() const
Returns the capacity of the bounded queue.
E & top()
Returns front element.
BoundedQueue(const BoundedQueue< E > &Q)
Constructs a bounded queue that is a copy of Q.
BoundedQueue(BoundedQueue< E > &&Q)
Constructs a bounded queue containing the elements of Q (move semantics).
BoundedQueue< E > & operator=(const BoundedQueue< E > &Q)
Assignment operator.
E pop()
Removes front element and returns it.
#define OGDF_THROW(CLASS)
Replacement for throw.
void init()
Reinitializes the bounded queue to a non-valid bounded queue.
The parameterized class BoundedQueue implements queues with bounded size.
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
INDEX size() const
Returns current size of the queue.
BoundedQueue()
Pointer to first element of total array.
void print(std::ostream &os, char delim=' ') const
Prints the queue to output stream os with the seperator delim.
E * m_pStop
Pointer to one past last element of current sequence.
~BoundedQueue()
Destruction.
Basic declarations, included by all source files.
const E & top() const
Returns front element.
void init(INDEX n)
Reinitializes the bounded queue to a bounded queue for at most n elements.
E * m_pFirst
Pointer to one past last element of total array.
void append(const E &x)
Adds x at the end of queue.