![]() |
Kochol Game Engine
0.1.0
|
This class is a dynamic array. More...
#include <ArrayPriority.h>
Classes | |
| struct | ArraypItem |
Public Member Functions | |
| ArrayPri () | |
| ArrayItem. | |
| ~ArrayPri () | |
| Destructor. | |
| void | PushBack (T Item, type Priority) |
| void | PushBackOne (T Item, type Priority) |
| T & | operator[] (u32 Index) |
| const T & | operator[] (u32 Index) const |
| T & | GetItem (u32 Index, type &Pri) |
| Directly access to an item in array. | |
| const T & | GetItem (u32 Index, type &Pri) const |
| Directly access to an item in array. | |
| void | remove (T Item) |
| Removes an item from array. | |
| u32 | Count () const |
| Return Items count in the array. | |
| void | Clear () |
| Clear the array. | |
Protected Attributes | |
| ArraypItem * | start |
| The start link. | |
| u32 | m_iCount |
| The count of the items. | |
This class is a dynamic array.
Definition at line 31 of file ArrayPriority.h.
|
inline |
ArrayItem.
Constructor.
Definition at line 93 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, KGE_NEW, kge::core::ArrayPri< T, type >::ArraypItem::next, NULL, kge::core::ArrayPri< T, type >::ArraypItem::prev, kge::core::ArrayPri< T, type >::ArraypItem::Pri, and kge::core::ArrayPri< T, type >::start.
|
inline |
Destructor.
Definition at line 107 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::Clear(), KGE_DELETE, and kge::core::ArrayPri< T, type >::start.
|
inline |
Clear the array.
Definition at line 266 of file ArrayPriority.h.
References KGE_DELETE, kge::core::ArrayPri< T, type >::ArraypItem::next, NULL, kge::core::ArrayPri< T, type >::ArraypItem::prev, and kge::core::ArrayPri< T, type >::start.
Referenced by kge::core::ArrayPri< T, type >::~ArrayPri().
|
inline |
Return Items count in the array.
Definition at line 259 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::m_iCount.
|
inline |
Directly access to an item in array.
Definition at line 210 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, kge::core::ArrayPri< T, type >::ArraypItem::next, kge::core::ArrayPri< T, type >::ArraypItem::Pri, and kge::core::ArrayPri< T, type >::start.
|
inline |
Directly access to an item in array.
Definition at line 225 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, kge::core::ArrayPri< T, type >::ArraypItem::next, kge::core::ArrayPri< T, type >::ArraypItem::Pri, and kge::core::ArrayPri< T, type >::start.
|
inline |
Definition at line 183 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, kge::core::ArrayPri< T, type >::ArraypItem::next, and kge::core::ArrayPri< T, type >::start.
|
inline |
Definition at line 196 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, kge::core::ArrayPri< T, type >::ArraypItem::next, and kge::core::ArrayPri< T, type >::start.
|
inline |
Adds an item to the Array with priority sort.
| Item | A pointer which will be added to the array. |
| Priority |
Definition at line 117 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, KGE_NEW, kge::core::ArrayPri< T, type >::m_iCount, kge::core::ArrayPri< T, type >::ArraypItem::next, NULL, kge::core::ArrayPri< T, type >::ArraypItem::prev, kge::core::ArrayPri< T, type >::ArraypItem::Pri, and kge::core::ArrayPri< T, type >::start.
|
inline |
Adds an item to the Array with priority sort but only one level of priority is avilable.
That means only the first item with the unique priority will be accepted.
| Item | A pointer which will be added to the array. |
| Priority |
Definition at line 150 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, KGE_DELETE, KGE_NEW, kge::core::ArrayPri< T, type >::m_iCount, kge::core::ArrayPri< T, type >::ArraypItem::next, NULL, kge::core::ArrayPri< T, type >::ArraypItem::prev, kge::core::ArrayPri< T, type >::ArraypItem::Pri, and kge::core::ArrayPri< T, type >::start.
|
inline |
Removes an item from array.
Definition at line 240 of file ArrayPriority.h.
References kge::core::ArrayPri< T, type >::ArraypItem::Item, kge::core::ArrayPri< T, type >::m_iCount, kge::core::ArrayPri< T, type >::ArraypItem::next, kge::core::ArrayPri< T, type >::ArraypItem::prev, and kge::core::ArrayPri< T, type >::start.
|
protected |
The count of the items.
Definition at line 288 of file ArrayPriority.h.
Referenced by kge::core::ArrayPri< T, type >::Count(), kge::core::ArrayPri< T, type >::PushBack(), kge::core::ArrayPri< T, type >::PushBackOne(), and kge::core::ArrayPri< T, type >::remove().
|
protected |
The start link.
Definition at line 285 of file ArrayPriority.h.
Referenced by kge::core::ArrayPri< T, type >::ArrayPri(), kge::core::ArrayPri< T, type >::Clear(), kge::core::ArrayPri< T, type >::GetItem(), kge::core::ArrayPri< T, type >::operator[](), kge::core::ArrayPri< T, type >::PushBack(), kge::core::ArrayPri< T, type >::PushBackOne(), kge::core::ArrayPri< T, type >::remove(), and kge::core::ArrayPri< T, type >::~ArrayPri().