Template Class List
Defined in File List.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T, bool Pooled = true>
class List a SEQUENCE realized as a bidirectional circular list with a sentinel, its cells from a pool if Pooled
Public Types
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
-
using const_reverse_iterator = std::reverse_iterator<const_iterator>
Public Functions
-
List(void)
the empty list: the sentinel alone, its own predecessor and successor
-
template<std::input_iterator I, std::sentinel_for<I> S>
List(I first, S last) the list of the items of [ first , last ), in their order
-
~List()
-
bool empty(void) const
true if the list is empty, i.e., the sentinel is its own successor
-
Pos insert(Pos p, const T &v)
puts v in position p, i.e., before the item in p, and returns its position
- Pre:
p is a position of this list (an audit)
- Post:
the list is not empty, the result precedes p and holds v
-
Pos remove(Pos p)
removes the item in position p, returning the position of its successor, which is now in its place
- Pre:
p holds an item of this list (an audit)
- Post:
the result follows the old predecessor of p
-
void write(Pos p, const T &v)
writes v in position p
- Pre:
p holds an item of this list (an audit)
- Post:
read( p ) is v
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
inline reverse_iterator rbegin(void)
-
inline reverse_iterator rend(void)
-
inline const_reverse_iterator rbegin(void) const
-
inline const_reverse_iterator rend(void) const
-
using size_type = std::size_t