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

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

ArraypItemstart
 The start link.
u32 m_iCount
 The count of the items.

Detailed Description

template<typename T, typename type = int>
class kge::core::ArrayPri< T, type >

This class is a dynamic array.

Definition at line 31 of file ArrayPriority.h.

Constructor & Destructor Documentation

template<typename T , typename type = int>
kge::core::ArrayPri< T, type >::~ArrayPri ( )
inline

Member Function Documentation

template<typename T , typename type = int>
void kge::core::ArrayPri< T, type >::Clear ( )
inline
template<typename T , typename type = int>
u32 kge::core::ArrayPri< T, type >::Count ( ) const
inline

Return Items count in the array.

Definition at line 259 of file ArrayPriority.h.

References kge::core::ArrayPri< T, type >::m_iCount.

template<typename T , typename type = int>
T& kge::core::ArrayPri< T, type >::GetItem ( u32  Index,
type &  Pri 
)
inline
template<typename T , typename type = int>
const T& kge::core::ArrayPri< T, type >::GetItem ( u32  Index,
type &  Pri 
) const
inline
template<typename T , typename type = int>
T& kge::core::ArrayPri< T, type >::operator[] ( u32  Index)
inline
template<typename T , typename type = int>
const T& kge::core::ArrayPri< T, type >::operator[] ( u32  Index) const
inline
template<typename T , typename type = int>
void kge::core::ArrayPri< T, type >::PushBack ( Item,
type  Priority 
)
inline
template<typename T , typename type = int>
void kge::core::ArrayPri< T, type >::PushBackOne ( Item,
type  Priority 
)
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.

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

Member Data Documentation

template<typename T , typename type = int>
u32 kge::core::ArrayPri< T, type >::m_iCount
protected

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