Scopira
20080306
|
#include <array.h>
Public Types | |
enum | { size_c = N } |
typedef T | data_type |
typedef T * | iterator |
typedef const T * | const_iterator |
Public Member Functions | |
T * | array (void) |
const T * | array (void) const |
T * | c_array (void) |
const T * | c_array (void) const |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
void | clear_zero (void) |
size_t | size (void) const |
bool | empty (void) const |
void | set (size_t idx, const T &v) |
const T & | get (size_t idx) const |
T & | get (size_t idx) |
const T & | operator[] (size_t idx) const |
T & | operator[] (size_t idx) |
Protected Attributes | |
T | dm_ary [N] |
A FIXED size array of type T and length N. This is exactly the same as doing T[N], but nicer.
Default constructors and destructors are fine. This object is POD-like and thus is fully copyable.
See tool/util for a handy string to fixed_array routine (string_to_array) if you'd like to use fixed_array as a safe C string.
|
inline |
Raw access to the array
|
inline |
Raw access to the array
|
inline |
STL-like iteration
Referenced by scopira::basekit::nslice< T, DIM >::load(), scopira::basekit::nslice< T, DIM >::save(), and scopira::basekit::const_nslice< T, DIM >::save().
|
inline |
STL-like iteration
|
inline |
Raw access to the array
Referenced by scopira::tool::hybrid_array< T, RES >::resize().
|
inline |
Raw access to the array
|
inline |
Clears all the array values to binary 0. Does not resize the array. This is dangerous on non-POD classes.
|
inline |
Is the array empty (0 length)?
|
inline |
STL-like iteration
Referenced by scopira::basekit::nindex< DIM >::nindex(), scopira::basekit::nindex< DIM >::product(), scopira::basekit::nslice< T, DIM >::save(), and scopira::basekit::const_nslice< T, DIM >::save().
|
inline |
STL-like iteration
|
inline |
Individual element setter
Referenced by scopira::basekit::nindex< DIM >::offset(), scopira::basekit::nindex< DIM >::operator<(), and scopira::basekit::nindex< DIM >::operator==().
|
inline |
Individual element setter
|
inline |
Nice reference access
|
inline |
Nice reference access
|
inline |
Individual element setter
|
inline |
Gets the size of the array
Referenced by scopira::basekit::nslice< T, DIM >::load().