33 return add(const_cast<LinkedObject*>(
object));
55 return mHead ==
nullptr;
73 return reinterpret_cast<ObjectType*
>(
mHead);
76 const ObjectType*
head()
const 78 return reinterpret_cast<const ObjectType*
>(
mHead);
81 typename ObjectType::Iterator
begin()
86 typename ObjectType::Iterator
end()
91 typename ObjectType::ConstIterator
begin()
const 96 typename ObjectType::ConstIterator
end()
const 104 for(
auto p =
mHead; p !=
nullptr; ++n, p = p->
next()) {
111 return std::find(begin(), end(),
object);
127 bool remove(ObjectType* object)
136 while(
remove(this->
head())) {
const LinkedObject * head() const
Definition: LinkedObjectList.h:48
ObjectType::Iterator end()
Definition: LinkedObjectList.h:86
Definition: LinkedObjectList.h:62
bool add(LinkedObject *object)
bool contains(const ObjectType &object) const
Definition: LinkedObjectList.h:109
LinkedObjectListTemplate(ObjectType *object)
Definition: LinkedObjectList.h:67
LinkedObject * head()
Definition: LinkedObjectList.h:43
LinkedObjectList()
Definition: LinkedObjectList.h:21
LinkedObjectList(LinkedObject *object)
Definition: LinkedObjectList.h:25
bool isEmpty() const
Definition: LinkedObjectList.h:53
bool remove(LinkedObject *object)
void clear()
Definition: LinkedObjectList.h:38
Class template for singly-linked list of objects.
Definition: LinkedObjectList.h:119
Base virtual class to allow objects to be linked together.
Definition: LinkedObject.h:21
ObjectType::ConstIterator begin() const
Definition: LinkedObjectList.h:91
Singly-linked list of objects.
Definition: LinkedObjectList.h:18
const ObjectType * head() const
Definition: LinkedObjectList.h:76
ObjectType::ConstIterator end() const
Definition: LinkedObjectList.h:96
ObjectType::Iterator begin()
Definition: LinkedObjectList.h:81
virtual LinkedObject * next() const
Definition: LinkedObject.h:28
void clear()
Definition: LinkedObjectList.h:134
LinkedObject * mHead
Definition: LinkedObjectList.h:59
bool add(const LinkedObject *object)
Definition: LinkedObjectList.h:31
ObjectType * head()
Definition: LinkedObjectList.h:71
~OwnedLinkedObjectListTemplate()
Definition: LinkedObjectList.h:122
size_t count() const
Definition: LinkedObjectList.h:101