Template Class LinkedQueue
Defined in File LinkedQueue.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class LinkedQueue a QUEUE realized as a singly linked list with a front and a back
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using iterator = LinkedIterator<Cell, T, &Cell::next, &Cell::value>
-
using const_iterator = LinkedIterator<Cell, T, &Cell::next, &Cell::value>
Public Functions
-
LinkedQueue(void) = default
-
LinkedQueue(const LinkedQueue &other)
-
LinkedQueue(LinkedQueue &&other) noexcept
the cells of other, which is left empty
-
LinkedQueue &operator=(LinkedQueue other) noexcept
-
~LinkedQueue()
-
void swap(LinkedQueue &other) noexcept
-
bool empty(void) const
-
void enqueue(const T &v)
puts v at the back
- Post:
the queue is not empty, and v is at the front if it was empty
-
std::size_t size(void) const
the number of items, O( 1 )
-
bool operator==(const LinkedQueue &o) const
the same items in the same order
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
using size_type = std::size_t