Horizon Official Technical Documentation
|
|
This class is used to manage a linked list of Elements. It is not intended to be used directly. It is used as a base class for other classes that need to manage a linked list. The Head class is a friend of this class to allow it to access the private members of this class. More...
#include <Element.hpp>
Public Member Functions | |
Element () | |
bool | has_next () const |
Returns true if this Element has a next Element in the list. More... | |
bool | has_prev () const |
Returns true if this Element has a previous Element in the list. More... | |
bool | is_in_list () const |
Returns true if this Element is in a list. More... | |
Element * | next () |
Returns the next Element in the list. More... | |
Element const * | next () const |
Element * | prev () |
Returns the previous Element in the list. More... | |
Element const * | prev () const |
Element * | nocheck_next () |
Returns the next Element in the list without checking if it exists. More... | |
Element const * | nocheck_next () const |
Element * | nocheck_prev () |
Returns the previous Element in the list without checking if it exists. More... | |
Element const * | nocheck_prev () const |
void | delink () |
Removes this Element from the list. More... | |
void | push_before (Element *pElem) |
Pushes this Element before the given Element. More... | |
void | push_after (Element *pElem) |
Pushes this Element after the given Element. More... | |
Protected Member Functions | |
~Element () | |
Private Member Functions | |
Element (Element const &)=delete | |
Element & | operator= (Element const &)=delete |
Private Attributes | |
Element * | _next |
Element * | _prev |
Friends | |
class | Head |
This class is used to manage a linked list of Elements. It is not intended to be used directly. It is used as a base class for other classes that need to manage a linked list. The Head class is a friend of this class to allow it to access the private members of this class.
|
inline |
|
privatedelete |
|
inlineprotected |
|
inline |
Removes this Element from the list.
References _next, _prev, and is_in_list().
Referenced by Horizon::Structures::LinkedList::Reference< TO, FROM >::invalidate(), Horizon::Structures::LinkedList::Reference< TO, FROM >::remove(), and ~Element().
|
inline |
|
inline |
|
inline |
|
inline |
Returns the next Element in the list.
References _next, and has_next().
Referenced by BOOST_AUTO_TEST_CASE(), Horizon::Structures::LinkedList::Head::get_size(), and Horizon::Structures::LinkedList::Reference< TO, FROM >::next().
|
inline |
|
inline |
Returns the next Element in the list without checking if it exists.
References _next.
Referenced by Horizon::Structures::LinkedList::Reference< TO, FROM >::nocheck_next().
|
inline |
|
inline |
Returns the previous Element in the list without checking if it exists.
References _prev.
Referenced by Horizon::Structures::LinkedList::Reference< TO, FROM >::nocheck_prev().
|
inline |
|
inline |
Returns the previous Element in the list.
References _prev, and has_prev().
Referenced by Horizon::Structures::LinkedList::Reference< TO, FROM >::prev().
|
inline |
|
inline |
|
inline |
|
friend |
|
private |
|
private |