Template Class CursorList
Defined in File CursorList.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class CursorList a SEQUENCE realized with cursors in a CursorSpace
Public Types
-
using Pos = long
the cursor of the cell before the item
-
using size_type = std::size_t
-
using difference_type = std::ptrdiff_t
Public Functions
-
CursorList(void)
the empty list, in a space of its own
the empty list in the space S, shared with other lists
-
CursorList(const CursorList &other)
a copy of the items of other, in the same space
-
CursorList(CursorList &&other) noexcept
the cells of other, which is left empty in the same space
-
CursorList &operator=(CursorList other) noexcept
-
~CursorList()
-
void swap(CursorList &other) noexcept
-
bool empty(void) const
-
Pos insert(Pos p, const T &v)
puts v in position p, the new item taking 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 CursorList &o) const
the same items in the same order
-
const CursorSpace<T> &space(void) const
the space of the list
-
long first(void) const
the cursor of the first cell, 0 if the list is empty
-
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 Pos = long