Kochol Game Engine  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
kge::core::Array< T > Class Template Reference

This class is a dynamic array. More...

#include <Array.h>

Classes

struct  ArrayItem

Public Member Functions

 Array ()
 ArrayItem.
 ~Array ()
void PushBack (T Item)
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

ArrayItemstart
 The start link.
ArrayItemend
 The end link.
u32 m_iCount
 The count of the items.

Detailed Description

template<class T>
class kge::core::Array< T >

This class is a dynamic array.

Definition at line 24 of file Array.h.

Constructor & Destructor Documentation

template<class T >
kge::core::Array< T >::~Array ( )
inline

Definition at line 53 of file Array.h.

References kge::core::Array< T >::Clear(), KGE_DELETE, and kge::core::Array< T >::start.

Member Function Documentation

template<class T >
void kge::core::Array< T >::Clear ( bool  DeleteData = false)
inline

Removes all array data

Parameters
DeleteDataIf 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().

template<class T >
u32 kge::core::Array< T >::Count ( )
inline

Return Items count in the array.

Definition at line 127 of file Array.h.

References kge::core::Array< T >::m_iCount.

template<class T >
T kge::core::Array< T >::operator[] ( u32  Index)
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.

template<class T >
void kge::core::Array< T >::PushBack ( Item)
inline

Adds an item to the end of the Array.

Parameters
ItemA 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.

template<class T >
void kge::core::Array< T >::remove ( Item)
inline

Member Data Documentation

template<class T >
ArrayItem* kge::core::Array< T >::end
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().

template<class T >
u32 kge::core::Array< T >::m_iCount
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().


The documentation for this class was generated from the following file: