torc::architecture::Array< T > Class Template Reference
Encapsulation of a static array.
More...
#include <Array.hpp>
List of all members.
|
Public Types |
typedef const T * | const_iterator |
| Constant T iterator type.
|
typedef T * | iterator |
| Non-constant T iterator type.
|
Public Member Functions |
| Array (void) |
| Null constructor.
|
| Array (uint32_t inSize) |
| Public constructor.
|
| ~Array (void) |
| Non-virtual destructor.
|
T * | begin (void) |
| Returns the non-constant begin iterator.
|
T * | end (void) |
| Returns the non-constant end iterator.
|
const T * | begin (void) const |
| Returns the constant begin iterator.
|
const T * | end (void) const |
| Returns the constant end iterator.
|
uint32_t | getSize (void) const |
| Returns the array size.
|
void | setSize (uint32_t inSize) |
| Discards all contents and resizes the array.
|
T & | operator[] (uint32_t inIndex) |
| Non-constant subscript operator.
|
const T & | operator[] (uint32_t inIndex) const |
| Constant subscript operator.
|
Protected Types |
typedef boost::uint32_t | uint32_t |
| Imported type name.
|
typedef boost::remove_const< T >
::type | T_non_const |
| A type identical to template parameter T, but with any 'const' trait removed.
|
Protected Attributes |
T * | mArray |
| The internal array.
|
uint32_t | mSize |
| The logical and actual size of the array.
|
Private Member Functions |
void | allocate (uint32_t inSize) |
| Allocate an array of the specified size.
|
void | deallocate (void) |
| Deallocate the array.
|
Detailed Description
template<class T>
class torc::architecture::Array< T >
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.
Definition at line 38 of file Array.hpp.
Member Typedef Documentation
Imported type name.
Definition at line 42 of file Array.hpp.
A type identical to template parameter T, but with any 'const' trait removed.
Definition at line 44 of file Array.hpp.
Constant T iterator type.
Definition at line 82 of file Array.hpp.
Non-constant T iterator type.
Definition at line 84 of file Array.hpp.
Constructor & Destructor Documentation
Member Function Documentation
Allocate an array of the specified size.
Definition at line 52 of file Array.hpp.
Deallocate the array.
Definition at line 61 of file Array.hpp.
Returns the non-constant begin iterator.
Definition at line 94 of file Array.hpp.
Returns the non-constant end iterator.
Definition at line 96 of file Array.hpp.
Returns the constant begin iterator.
Definition at line 98 of file Array.hpp.
Returns the constant end iterator.
Definition at line 100 of file Array.hpp.
Returns the array size.
Definition at line 103 of file Array.hpp.
Discards all contents and resizes the array.
Definition at line 106 of file Array.hpp.
Non-constant subscript operator.
Definition at line 109 of file Array.hpp.
Constant subscript operator.
Definition at line 114 of file Array.hpp.
Member Data Documentation
The internal array.
Definition at line 47 of file Array.hpp.
The logical and actual size of the array.
Definition at line 49 of file Array.hpp.
The documentation for this class was generated from the following file: