sc_auto_vec(3)

sc_auto_vec3

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

Usage

#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.

Detailed Description

template<class T>

class sc::auto_vec< T >"The auto_vec class functions much like auto_ptr, except it contains references 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 = 0) [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[...].

Releases

6 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 11
  6. 12

Author

Generated automatically by Doxygen for MPQC from the source code.

From libsc-doc 2.3.1-22 in Debian 12 (Bookworm). Parsed by carta from the page's man source.