In file array.hpp:template<class T> class FlatArray
A simple array container.
Documentation
A simple array container.
Array represented by size and data-pointer.
No memory allocation and deallocation, must be provided by user.
Helper functions for printing.
Optional range check by macro RANGE_CHECK
Inheritance:
Public Methods
-
FlatArray(int asize, T* adata)
- provide size and memory
-
FlatArray(int asize, LocalHeap & lh)
- memory from local heap
-
int Size() const
- the size
-
T& operator[] (int i)
- access array.
-
const T& operator[] (int i) const
- Access array.
-
T& Last()
- access last element.
-
const T& Last() const
- access last element.
-
FlatArray& operator= (const T & val)
- Fill array with value val
Protected Fields
-
int size
- the size
-
T* data
- the data
int size
- the size
T* data
- the data
FlatArray(int asize, T* adata)
- provide size and memory
FlatArray(int asize, LocalHeap & lh)
- memory from local heap
int Size() const
- the size
T& operator[] (int i)
- access array. range check by macro CHECK_RANGE
const T& operator[] (int i) const
- Access array. range check by macro CHECK_RANGE
T& Last()
- access last element. check by macro CHECK_RANGE
const T& Last() const
- access last element. check by macro CHECK_RANGE
FlatArray& operator= (const T & val)
- Fill array with value val
- Direct child classes:
- ARRAY
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.