#include <ScratchVect.h>
Public Types | |
typedef T * | iterator |
typedef const T * | const_iterator |
Public Member Functions | |
ScratchVect () | |
Create a new, empty ScratchVect. | |
ScratchVect (size_t size) | |
Create a new ScratchVect with 'size' (uninitialized) elements. | |
ScratchVect (size_t size, T elem) | |
Create a new ScratchVect with 'size' elements initialized to the value 'elem'. | |
ScratchVect (const std::vector< T > &vec) | |
Set the contents of this ScratchVect to be equal to that of the STL vector 'vec'. | |
template<typename RAIter> | |
ScratchVect (RAIter beg, RAIter end) | |
Set the contents of this ScratchVect to be equal to the contents of the range specified by 'beg' and 'end'. | |
template<int M> | |
ScratchVect (const ScratchVect< T, M > &orig) | |
Set the contents of this ScratchVector to be equal to that of the ScratchVector 'orig'. | |
ScratchVect & | operator= (const ScratchVect &orig) |
Assignment operator. | |
void | resize (size_t new_size) |
resize the ScratchVect | |
template<typename RAIter> | |
void | assign (RAIter beg, RAIter end) |
Set the contents of this ScratchVect to be equal to the contents of the range specified by 'beg' and 'end'. | |
iterator | begin () |
Get iterator to beginning of range. | |
const_iterator | begin () const |
Get constant iterator to beginning of range. | |
iterator | end () |
Get iterator to one-past-end of range. | |
const_iterator | end () const |
Get constant iterator to one-past-end of range. | |
size_t | size () const |
Get the number of elements in the ScratchVect. | |
const T & | operator[] (int i) const |
Element access operators (const and not-const). | |
T & | operator[] (int i) |
void | push_back (const T &e) |
Add an element to the back of the range. | |
void | clear () |
Clear ScratchVect. |
Definition at line 52 of file ScratchVect.h.
Go::ScratchVect< T, N >::ScratchVect | ( | const ScratchVect< T, M > & | orig | ) | [inline] |
Set the contents of this ScratchVector to be equal to that of the ScratchVector 'orig'.
(A templatized copy constructor, if you like).
Definition at line 115 of file ScratchVect.h.
References Go::ScratchVect< T, N >::assign(), Go::ScratchVect< T, N >::begin(), and Go::ScratchVect< T, N >::end().