#include <base_types_array.hh>
Public Types | |
| typedef T | Type |
Public Member Functions | |
| TinyArray (void) | |
| Template arg cnt implicitly defines the array's length. | |
| TinyArray (const T val) | |
| Construct all elements with the same value. | |
| TinyArray (const TinyArray< CNT, T > &src) | |
| Copy constructor. | |
| TinyArray (const T src[]) | |
| uint | GetCnt (void) const |
| |
| void | Fill (T val) |
| Assign every element the same value. | |
| T & | operator[] (uint i) |
| const T & | operator[] (uint i) const |
| TinyArray< CNT, T > & | operator= (const TinyArray< CNT, T > &src) |
| Amazing that a C++ compiler will accept how this type is written. | |
| bool | operator== (const TinyArray< CNT, T > &src) const |
| bool | operator!= (const TinyArray< CNT, T > &src) const |
| bool | operator< (const TinyArray< CNT, T > &src) const |
| T * | PTR (void) const |
| const T * | CONST_PTR (void) const |
| uint | size (void) const |
| Limited STL compatibility. Obviously, resize() omitted. | |
| bool | empty (void) const |
Private Attributes | |
| T | mArray [CNT] |
Meant for small arrays. Auto-destroys itself. TinyArray is smaller/faster than STL vector but its size is fixed. If instantiated on a function, TinyArray will be stored on call stack. The size of the array is part of TinyArray's type. Tested by base/tests/basic_types.cc.
| typedef T base::TinyArray< CNT, T >::Type |
| base::TinyArray< CNT, T >::TinyArray | ( | void | ) | [inline] |
Template arg cnt implicitly defines the array's length.
| base::TinyArray< CNT, T >::TinyArray | ( | const T | val | ) | [inline, explicit] |
Construct all elements with the same value.
| base::TinyArray< CNT, T >::TinyArray | ( | const TinyArray< CNT, T > & | src | ) | [inline] |
Copy constructor.
| base::TinyArray< CNT, T >::TinyArray | ( | const T | src[] | ) | [inline] |
| uint base::TinyArray< CNT, T >::GetCnt | ( | void | ) | const [inline] |
| void base::TinyArray< CNT, T >::Fill | ( | T | val | ) | [inline] |
Assign every element the same value.
| T& base::TinyArray< CNT, T >::operator[] | ( | uint | i | ) | [inline] |
Catching access to an uninitialized element would be ideal but there's no way to tell if the element is being read or written.
| const T& base::TinyArray< CNT, T >::operator[] | ( | uint | i | ) | const [inline] |
| TinyArray<CNT,T>& base::TinyArray< CNT, T >::operator= | ( | const TinyArray< CNT, T > & | src | ) | [inline] |
Amazing that a C++ compiler will accept how this type is written.
| bool base::TinyArray< CNT, T >::operator== | ( | const TinyArray< CNT, T > & | src | ) | const [inline] |
| bool base::TinyArray< CNT, T >::operator!= | ( | const TinyArray< CNT, T > & | src | ) | const [inline] |
| bool base::TinyArray< CNT, T >::operator< | ( | const TinyArray< CNT, T > & | src | ) | const [inline] |
| T* base::TinyArray< CNT, T >::PTR | ( | void | ) | const [inline] |
| const T* base::TinyArray< CNT, T >::CONST_PTR | ( | void | ) | const [inline] |
| uint base::TinyArray< CNT, T >::size | ( | void | ) | const [inline] |
Limited STL compatibility. Obviously, resize() omitted.
| bool base::TinyArray< CNT, T >::empty | ( | void | ) | const [inline] |
T base::TinyArray< CNT, T >::mArray[CNT] [private] |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:20 2007