The ChainCon Software (Release 0.03)
|
A simple extendible array that extends automatically when needed. More...
#include <extarray.h>
Public Member Functions | |
extarray () | |
Default constructor. More... | |
~extarray () | |
Destructor. More... | |
extarray (const extarray< ElemT > &other) | |
Copy constructor. More... | |
extarray< ElemT > & | operator= (const extarray< ElemT > &other) |
Assignment operator. More... | |
ElemT & | operator[] (int_t n) |
Accesses a given element, and extends the array if necessary. More... | |
const ElemT & | operator[] (int_t n) const |
Accesses a given element without modifying the array. More... | |
void | swap (extarray< ElemT > &other) |
Swaps contents with another extensible array. More... | |
Private Attributes | |
int_t | len |
The length of the allocated array. More... | |
ElemT * | arr |
The array of elements. More... | |
A simple extendible array that extends automatically when needed.
Definition at line 42 of file extarray.h.
Default constructor.
Definition at line 78 of file extarray.h.
Destructor.
Definition at line 85 of file extarray.h.
Copy constructor.
Definition at line 93 of file extarray.h.
|
inline |
Assignment operator.
Definition at line 103 of file extarray.h.
|
inline |
Accesses a given element, and extends the array if necessary.
Definition at line 122 of file extarray.h.
|
inline |
Accesses a given element without modifying the array.
Definition at line 147 of file extarray.h.
Swaps contents with another extensible array.
Definition at line 157 of file extarray.h.
|
private |
The array of elements.
Definition at line 71 of file extarray.h.
Referenced by extarray< CoefT >::extarray(), and extarray< CoefT >::~extarray().
|
private |
The length of the allocated array.
Definition at line 68 of file extarray.h.
Referenced by extarray< CoefT >::extarray().