template<class Derived, class List = LinkedList<Derived>>
Corrade::Containers::LinkedListItem class

Item of LinkedList.

Template parameters
Derived Dervied object type, i.e. type you want returned from previous() and next().
List List object type, i.e. type you want returned from list().

This class is usually subclassed using CRTP, e.g.:

class Item: public LinkedListItem<Item> {
    // ...
};

Constructors, destructors, conversion operators

LinkedListItem() noexcept
Default constructor.
LinkedListItem(const LinkedListItem<Derived, List>&) deleted
Copying is not allowed.
LinkedListItem(LinkedListItem<Derived, List>&& other)
Move constructor.
~LinkedListItem() pure virtual
Destructor.

Public functions

auto operator=(const LinkedListItem<Derived, List>&) -> LinkedListItem<Derived, List>& deleted
Copying is not allowed.
auto operator=(LinkedListItem<Derived, List>&& other) -> LinkedListItem<Derived, List>&
Move assignment.
auto list() -> List*
List this item belongs to.
auto list() const -> const List*
auto previous() -> Derived*
Previous item or nullptr, if there is no previous item.
auto previous() const -> const Derived*
auto next() -> Derived*
Next item or nullptr, if there is no next item.
auto next() const -> const Derived*

Function documentation

template<class Derived, class List>
Corrade::Containers::LinkedListItem<Derived, List>::LinkedListItem() noexcept

Default constructor.

Creates item not connected to any list.

template<class Derived, class List>
Corrade::Containers::LinkedListItem<Derived, List>::~LinkedListItem() pure virtual

Destructor.

If the item is part of any list, it is removed from it.

template<class Derived, class List>
const List* Corrade::Containers::LinkedListItem<Derived, List>::list() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class Derived, class List>
const Derived* Corrade::Containers::LinkedListItem<Derived, List>::previous() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class Derived, class List>
const Derived* Corrade::Containers::LinkedListItem<Derived, List>::next() const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.