![]() |
Kochol Game Engine
0.1.0
|
This class is a dynamic array. More...
#include <Array.h>
Classes | |
struct | ArrayItem |
Public Member Functions | |
Array () | |
ArrayItem. | |
~Array () | |
void | PushBack (T Item) |
T | operator[] (u32 Index) |
Directly access to an item in array. | |
void | remove (T Item) |
Removes an item from array. | |
void | Clear (bool DeleteData=false) |
u32 | Count () |
Return Items count in the array. |
Protected Attributes | |
ArrayItem * | start |
The start link. | |
ArrayItem * | end |
The end link. | |
u32 | m_iCount |
The count of the items. |
This class is a dynamic array.
|
inline |
Constructor.
Definition at line 39 of file Array.h.
References kge::core::Array< T >::end, kge::core::Array< T >::ArrayItem::Item, KGE_NEW, kge::core::Array< T >::m_iCount, kge::core::Array< T >::ArrayItem::next, NULL, kge::core::Array< T >::ArrayItem::prev, and kge::core::Array< T >::start.
|
inline |
Definition at line 53 of file Array.h.
References kge::core::Array< T >::Clear(), KGE_DELETE, and kge::core::Array< T >::start.
|
inline |
Removes all array data
DeleteData | If you pass true the array data will be deleted with KGE_DELETE macro |
Definition at line 109 of file Array.h.
References kge::core::Array< T >::end, kge::core::Array< T >::ArrayItem::Item, KGE_DELETE, kge::core::Array< T >::ArrayItem::next, NULL, and kge::core::Array< T >::start.
Referenced by kge::core::Array< T >::~Array().
|
inline |
Return Items count in the array.
Definition at line 127 of file Array.h.
References kge::core::Array< T >::m_iCount.
|
inline |
Directly access to an item in array.
Definition at line 76 of file Array.h.
References kge::core::Array< T >::ArrayItem::Item, kge::core::Array< T >::ArrayItem::next, and kge::core::Array< T >::start.
|
inline |
Adds an item to the end of the Array.
Item | A pointer which will be add to the end of the array. |
Definition at line 63 of file Array.h.
References kge::core::Array< T >::end, kge::core::Array< T >::ArrayItem::Item, KGE_NEW, kge::core::Array< T >::m_iCount, kge::core::Array< T >::ArrayItem::next, NULL, and kge::core::Array< T >::ArrayItem::prev.
|
inline |
Removes an item from array.
Definition at line 90 of file Array.h.
References kge::core::Array< T >::ArrayItem::Item, KGE_DELETE, kge::core::Array< T >::ArrayItem::next, kge::core::Array< T >::ArrayItem::prev, and kge::core::Array< T >::start.
|
protected |
The end link.
Definition at line 137 of file Array.h.
Referenced by kge::core::Array< T >::Array(), kge::core::Array< T >::Clear(), and kge::core::Array< T >::PushBack().
|
protected |
The count of the items.
Definition at line 140 of file Array.h.
Referenced by kge::core::Array< T >::Array(), kge::core::Array< T >::Count(), and kge::core::Array< T >::PushBack().
|
protected |
The start link.
Definition at line 135 of file Array.h.
Referenced by kge::core::Array< T >::Array(), kge::core::Array< T >::Clear(), kge::core::Array< T >::operator[](), kge::core::Array< T >::remove(), and kge::core::Array< T >::~Array().