|
MPQC
2.3.1
|
The auto_vec class functions much like auto_ptr, except it contains references to arrays. More...
#include <autovec.h>
Public Types | |
| typedef T | element_type |
Public Member Functions | |
| auto_vec (T *d=0) throw () | |
| Creates a new auto_vec for a vector, d, of type T. More... | |
| auto_vec (auto_vec &av) throw () | |
| Create a auto_vec, transferring the storage from another. More... | |
| ~auto_vec () throw () | |
| This will delete the vector. More... | |
| auto_vec & | operator= (auto_vec &av) throw () |
| This member transfers the data from av to this. More... | |
| T * | get () const throw () |
| Returns the pointer. More... | |
| T & | operator[] (size_t i) throw () |
| Returns the i'th element. More... | |
| T * | release () throw () |
| Release ownership. More... | |
| void | reset (T *d=0) throw () |
| Assign to a new value. More... | |
The auto_vec class functions much like auto_ptr, except it contains references to arrays.
The delete[] operator will be used to deallocate data.
|
inlineexplicit | ||||||||||||||
Creates a new auto_vec for a vector, d, of type T.
The d argument must be created with the vector new operator: new T[...].
|
inline | ||||||||||||||
Create a auto_vec, transferring the storage from another.
|
inline | |||||||||||||
This will delete the vector.
|
inline | |||||||||||||
Returns the pointer.
|
inline | ||||||||||||||
This member transfers the data from av to this.
|
inline | ||||||||||||||
Returns the i'th element.
|
inline | |||||||||||||
Release ownership.
|
inline | ||||||||||||||
Assign to a new value.
Referenced by sc::auto_vec< double >::operator=().