CartoType API
Classes | Public Member Functions
CartoType::CCompactPointerArray< T > Class Template Reference

#include <cartotype_array.h>

Inheritance diagram for CartoType::CCompactPointerArray< T >:
CartoType::CCompactArrayBase

List of all members.

Classes

union  TWord

Public Member Functions

void Clear ()
int32 Count () const
T ** Data ()
const T *const * Data () const
T *& operator[] (int32 aIndex)
const T * operator[] (int32 aIndex) const
TResult Append (T *aElement)

Detailed Description

template<class T>
class CartoType::CCompactPointerArray< T >

A limited-functionality variable-size pointer array, optimised for the cases of 0 or 1 elements in the array, in which case only 8 bytes are used. The objects pointed to are owned by the array.


Member Function Documentation

template<class T>
TResult CartoType::CCompactPointerArray< T >::Append ( T *  aElement) [inline]

Append a single element.

template<class T>
void CartoType::CCompactPointerArray< T >::Clear ( ) [inline]

Delete all the elements.

template<class T>
int32 CartoType::CCompactPointerArray< T >::Count ( ) const [inline]

Return the number of elements.

template<class T>
T** CartoType::CCompactPointerArray< T >::Data ( ) [inline]

Return a writable pointer to the underlying C++ array of elements.

template<class T>
const T* const* CartoType::CCompactPointerArray< T >::Data ( ) const [inline]

Return a read-only pointer to the underlying C++ array of elements.

template<class T>
T*& CartoType::CCompactPointerArray< T >::operator[] ( int32  aIndex) [inline]

The writable array index operator, allowing the array to be treated like a C++ array.

template<class T>
const T* CartoType::CCompactPointerArray< T >::operator[] ( int32  aIndex) const [inline]

The constant array index operator, allowing the array to be treated like a C++ array.


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