torc-master
|
Encapsulation of a static array. More...
#include <Array.hpp>
Public Types | |
typedef const T * | const_iterator |
Constant T iterator type. More... | |
typedef T * | iterator |
Non-constant T iterator type. More... | |
Public Member Functions | |
Array (void) | |
Null constructor. More... | |
Array (uint32_t inSize) | |
Public constructor. More... | |
~Array (void) | |
Non-virtual destructor. More... | |
T * | begin (void) |
Returns the non-constant begin iterator. More... | |
T * | end (void) |
Returns the non-constant end iterator. More... | |
const T * | begin (void) const |
Returns the constant begin iterator. More... | |
const T * | end (void) const |
Returns the constant end iterator. More... | |
uint32_t | getSize (void) const |
Returns the array size. More... | |
void | setSize (uint32_t inSize) |
Discards all contents and resizes the array. More... | |
T & | operator[] (uint32_t inIndex) |
Non-constant subscript operator. More... | |
const T & | operator[] (uint32_t inIndex) const |
Constant subscript operator. More... | |
Protected Types | |
typedef boost::uint32_t | uint32_t |
Imported type name. More... | |
typedef boost::remove_const< T > ::type | T_non_const |
A type identical to template parameter T, but with any 'const' trait removed. More... | |
Protected Attributes | |
T * | mArray |
The internal array. More... | |
uint32_t | mSize |
The logical and actual size of the array. More... | |
Private Member Functions | |
void | allocate (uint32_t inSize) |
Allocate an array of the specified size. More... | |
void | deallocate (void) |
Deallocate the array. More... | |
Encapsulation of a static array.
Arrays are intended for fixed-size operation without frills, and are used extensively to represent device wiring data. Although this class could be used more broadly, it is likely that most code would be better served by raw arrays or by STL containers.
Arrays can be resized, but their contents are not retained when resized, nor are the contents cleared upon initialization.
typedef const T* torc::architecture::Array< T >::const_iterator |
typedef T* torc::architecture::Array< T >::iterator |
|
protected |
|
protected |
|
inline |
Null constructor.
Definition at line 88 of file Array.hpp.
|
inline |
Public constructor.
Definition at line 90 of file Array.hpp.
|
inline |
Non-virtual destructor.
Definition at line 92 of file Array.hpp.
|
inlineprivate |
Allocate an array of the specified size.
Definition at line 53 of file Array.hpp.
|
inline |
|
inline |
|
inlineprivate |
Deallocate the array.
Definition at line 62 of file Array.hpp.
|
inline |
Returns the non-constant end iterator.
Definition at line 97 of file Array.hpp.
|
inline |
Returns the constant end iterator.
Definition at line 101 of file Array.hpp.
|
inline |
Returns the array size.
Definition at line 104 of file Array.hpp.
|
inline |
Non-constant subscript operator.
Definition at line 110 of file Array.hpp.
|
inline |
Constant subscript operator.
Definition at line 115 of file Array.hpp.
|
inline |
Discards all contents and resizes the array.
Definition at line 107 of file Array.hpp.
|
protected |
|
protected |