Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

sc::auto_vec Class Template Reference

The auto_vec class functions much like auto_ptr, except it reference to arrays. More...

#include <autovec.h>

Collaboration diagram for sc::auto_vec:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T element_type

Public Methods

 auto_vec (T *d) 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.

 ~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 * release () throw ()
 Release ownership.

void reset (T *d=0) throw ()
 Assign to a new value.


Detailed Description

template<class T>
class sc::auto_vec< T >

The auto_vec class functions much like auto_ptr, except it reference to arrays.

The delete[] operator will be used to deallocate data.


Constructor & Destructor Documentation

template<class T>
sc::auto_vec< T >::auto_vec T *    d 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[...].


The documentation for this class was generated from the following file:
Generated at Fri Dec 26 11:16:39 2003 for MPQC 2.2.1 using the documentation package Doxygen 1.2.14.