| OpenTTD
    | 
Flexible array with size limit. More...
#include <array.hpp>
| Public Member Functions | |
| SmallArray () | |
| implicit constructor | |
| void | Clear () | 
| Clear (destroy) all items. | |
| uint | Length () const | 
| Return actual number of items. | |
| bool | IsEmpty () | 
| return true if array is empty | |
| bool | IsFull () | 
| return true if array is full | |
| T * | Append () | 
| allocate but not construct new item | |
| T * | AppendC () | 
| allocate and construct new item | |
| T & | operator[] (uint index) | 
| indexed access (non-const) | |
| const T & | operator[] (uint index) const | 
| indexed access (const) | |
| template<typename D > | |
| void | Dump (D &dmp) const | 
| Helper for creating a human readable output of this data. | |
| Protected Types | |
| typedef FixedSizeArray< T, B > | SubArray | 
| inner array | |
| typedef FixedSizeArray < SubArray, N > | SuperArray | 
| outer array | |
| Protected Member Functions | |
| SubArray & | FirstFreeSubArray () | 
| return first sub-array with free space for new item | |
| Protected Attributes | |
| SuperArray | data | 
| array of arrays of items | |
| Static Protected Attributes | |
| static const uint | Tcapacity = B * N | 
| total max number of items | |
Flexible array with size limit.
Implemented as fixed size array of fixed size arrays
| 
 | inline | 
 1.8.1.2
 1.8.1.2