Public Member Functions | Private Attributes | List of all members
karto::LookupArray Class Reference

#include <GridIndexLookup.h>

Public Member Functions

void Clear ()
 
kt_int32sGetArrayPointer ()
 
kt_int32sGetArrayPointer () const
 
kt_int32u GetSize () const
 
 LookupArray ()
 
kt_int32soperator[] (kt_int32u index)
 
kt_int32s operator[] (kt_int32u index) const
 
void SetSize (kt_int32u size)
 
virtual ~LookupArray ()
 

Private Attributes

kt_int32u m_Capacity
 
kt_int32sm_pArray
 
kt_int32u m_Size
 

Detailed Description

Resizable array whose contents are not preseved upon resizing.

Todo:
Consider replacing with List<kt_int32s>

Definition at line 40 of file GridIndexLookup.h.

Constructor & Destructor Documentation

karto::LookupArray::LookupArray ( )

Constructs empty array

Definition at line 23 of file GridIndexLookup.cpp.

karto::LookupArray::~LookupArray ( )
virtual

Destructor

Definition at line 30 of file GridIndexLookup.cpp.

Member Function Documentation

void karto::LookupArray::Clear ( )

Clears array

Definition at line 38 of file GridIndexLookup.cpp.

kt_int32s* karto::LookupArray::GetArrayPointer ( )
inline

Gets array pointer

Returns
array pointer

Definition at line 99 of file GridIndexLookup.h.

kt_int32s* karto::LookupArray::GetArrayPointer ( ) const
inline

Gets array pointer (const version)

Returns
array pointer

Definition at line 108 of file GridIndexLookup.h.

kt_int32u karto::LookupArray::GetSize ( ) const

Gets size of this array

Returns
size of this array

Definition at line 43 of file GridIndexLookup.cpp.

kt_int32s& karto::LookupArray::operator[] ( kt_int32u  index)
inline

Gets reference to value at given index

Parameters
indexindex
Returns
reference to value at given index

Definition at line 76 of file GridIndexLookup.h.

kt_int32s karto::LookupArray::operator[] ( kt_int32u  index) const
inline

Gets value at given index

Parameters
indexindex
Returns
value at given index

Definition at line 88 of file GridIndexLookup.h.

void karto::LookupArray::SetSize ( kt_int32u  size)

Sets size of this array (resize if not big enough)

Parameters
sizenew size

Definition at line 48 of file GridIndexLookup.cpp.

Member Data Documentation

kt_int32u karto::LookupArray::m_Capacity
private

Definition at line 115 of file GridIndexLookup.h.

kt_int32s* karto::LookupArray::m_pArray
private

Definition at line 114 of file GridIndexLookup.h.

kt_int32u karto::LookupArray::m_Size
private

Definition at line 116 of file GridIndexLookup.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36