#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. | |
auto_vec (auto_vec &av) throw () | |
Create a auto_vec, transferring the storage from another. | |
~auto_vec () throw () | |
This will delete the vector. | |
auto_vec & | operator= (auto_vec &av) throw () |
This member transfers the data from av to this. | |
T * | get () const throw () |
Returns the pointer. | |
T & | operator[] (size_t i) throw () |
Returns the i'th element. | |
T * | release () throw () |
Release ownership. | |
void | reset (T *d=0) throw () |
Assign to a new value. |
The delete[] operator will be used to deallocate data.
sc::auto_vec< T >::auto_vec | ( | T * | d = 0 |
) | throw () [inline, explicit] |
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[...].
sc::auto_vec< T >::auto_vec | ( | auto_vec< T > & | av | ) | throw () [inline] |
Create a auto_vec, transferring the storage from another.
sc::auto_vec< T >::~auto_vec | ( | ) | throw () [inline] |
This will delete the vector.
auto_vec& sc::auto_vec< T >::operator= | ( | auto_vec< T > & | av | ) | throw () [inline] |
This member transfers the data from av to this.
T* sc::auto_vec< T >::get | ( | ) | const throw () [inline] |
Returns the pointer.
T& sc::auto_vec< T >::operator[] | ( | size_t | i | ) | throw () [inline] |
Returns the i'th element.
T* sc::auto_vec< T >::release | ( | ) | throw () [inline] |
Release ownership.
void sc::auto_vec< T >::reset | ( | T * | d = 0 |
) | throw () [inline] |
Assign to a new value.