Template Class SinglyList
Defined in File SinglyList.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class SinglyList a SEQUENCE realized as a singly linked list with no sentinel
Public Functions
-
SinglyList(void) = default
-
SinglyList(const SinglyList &other)
-
SinglyList(SinglyList &&other) noexcept
the cells of other, which is left empty
-
SinglyList &operator=(SinglyList other) noexcept
-
~SinglyList()
-
void swap(SinglyList &other) noexcept
-
bool empty(void) const
-
bool finished(Pos p) const
true on \( pos_{-1} \) and on \( pos_n \), the address of the last cell (nil if the list is empty)
-
Pos insert(Pos p, const T &v)
puts v in position p, i.e., before the item in p; the new item takes the position p
- Pre:
p is not \( pos_{-1} \)
- Post:
read( p ) is v
-
Pos remove(Pos p)
removes the item in position p, whose successor takes the position p
- Pre:
p holds an item
-
bool operator==(const SinglyList &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
-
struct Cell
a cell of the list
-
SinglyList(void) = default