|
Overture
Version 25
|
A class for one dimensional dynamically allocated arrays. More...
#include <VectorSimple.h>
Public Member Functions | |
| VectorSimple () | |
| default constructor | |
| EXPLICIT | VectorSimple (const int &s) |
| basic constructor with size information | |
| VectorSimple (const VectorSimple< T > &a) | |
| copy constructor | |
| ~VectorSimple () | |
| destructor | |
| int | size () const |
| return the length of the array | |
| T * | ptr () |
| get the data pointer | |
| VectorSimple< T > & | operator= (const VectorSimple< T > &a) |
| assignment operator | |
| VectorSimple< T > & | operator= (const T &a) |
| T & | operator() (const int &i) |
| index operator | |
| const T & | operator() (const int &i) const |
| const index operator | |
| T & | operator[] (const int &i) |
| yet another index operator | |
| const T & | operator[] (const int &i) const |
| yet another const index operator | |
A class for one dimensional dynamically allocated arrays.
VectorSimple provides templatized, dynamically allocated 1D arrays. It takes only one template parameter specifying the type contained in the array.
|
inline |
default constructor
creates an instance suitable only for copying into
|
inline |
basic constructor with size information
create an array of a specified size
| s | the requested size of the array |
References s.
|
inline |
copy constructor
perform a deep copy of one VectorSimple<T> into another, only allocate new space if the size of the sink array is different from the source.
| a | the source array |
References s, and VectorSimple< T >::size().
|
inline |
destructor
|
inline |
|
inline |
|
inline |
assignment operator
Perform an assignment of the sink array into the current instance. A deep copy is conducted, resizing the current array to the source if neccessary
References s, and VectorSimple< T >::size().
|
inline |
References s.
|
inline |
yet another index operator
offered for consistency with the other ArraySimple classes
| i | the requested index |
|
inline |
yet another const index operator
offered for consistency with the other ArraySimple classes
| i | the requested index |
|
inline |
get the data pointer
this method is usefull for communicating the data to other languages/libraries
|
inline |
return the length of the array
Referenced by VectorSimple< T >::operator=(), and VectorSimple< T >::VectorSimple().
1.8.3