Horizon Official Technical Documentation
|
|
LinkedList Head class. This class is used to manage a linked list of Elements. It is used as a base class for other classes that need to manage a linked list. It is not intended to be used directly. More...
#include <Head.hpp>
Classes | |
class | Iterator |
Public Types | |
typedef Iterator< Element > | iterator |
Public Member Functions | |
Head () | |
bool | is_empty () const |
Returns true if the list is empty. More... | |
Element * | first () |
Returns the first Element in the list. More... | |
Element const * | first () const |
Element * | last () |
Returns the last Element in the list. More... | |
Element const * | last () const |
void | push_front (Element *pElem) |
push_front() and push_back() are used to add an Element to the list. More... | |
void | push_back (Element *pElem) |
uint32_t | get_size () const |
returns the number of Elements in the list (not including the head and tail Elements or the first and last Elements) More... | |
void | inc_size () |
void | dec_size () |
Protected Member Functions | |
~Head () | |
Private Member Functions | |
Head (Head const &)=delete | |
Head & | operator= (Head const &)=delete |
Private Attributes | |
Element | _first |
Element | _last |
uint32_t | _size |
LinkedList Head class. This class is used to manage a linked list of Elements. It is used as a base class for other classes that need to manage a linked list. It is not intended to be used directly.
|
inline |
References _first, _last, Horizon::Structures::LinkedList::Element::_next, and Horizon::Structures::LinkedList::Element::_prev.
|
privatedelete |
|
inlineprotected |
|
inline |
Returns the first Element in the list.
References _first, Horizon::Structures::LinkedList::Element::_next, and is_empty().
Referenced by Horizon::Structures::LinkedList::RefManager< TO, FROM >::first(), and get_size().
|
inline |
References _first, Horizon::Structures::LinkedList::Element::_next, and is_empty().
|
inline |
returns the number of Elements in the list (not including the head and tail Elements or the first and last Elements)
References _size, first(), and Horizon::Structures::LinkedList::Element::next().
Referenced by BOOST_AUTO_TEST_CASE(), GridUnitExistenceNotifier::notify(), GridUnitSpawnNotifier::notify(), GridUnitMovementNotifier::notify(), GridUnitSkillUseNotifier::notify(), GridUnitBasicAttackNotifier::notify(), GridUnitMovementStopNotifier::notify(), and GridUnitItemDropNotifier::notify().
|
inline |
|
inline |
Returns the last Element in the list.
References _last, Horizon::Structures::LinkedList::Element::_prev, and is_empty().
Referenced by BOOST_AUTO_TEST_CASE().
|
inline |
References _last, Horizon::Structures::LinkedList::Element::_prev, and is_empty().
|
inline |
pElem | The Element to add to the list. |
References _last, and Horizon::Structures::LinkedList::Element::push_before().
|
inline |
push_front() and push_back() are used to add an Element to the list.
pElem | The Element to add to the list. |
References _first, and Horizon::Structures::LinkedList::Element::push_after().
Referenced by BOOST_AUTO_TEST_CASE().
|
private |
Referenced by first(), Head(), is_empty(), and push_front().
|
private |
Referenced by Head(), is_empty(), last(), and push_back().
|
private |
Referenced by dec_size(), get_size(), and inc_size().