vector_ptr< T > Class Template Reference

Manages resources for an array of objects. More...

## Public Member Functions

| vector_ptr (size_t size=0)
| Construct an arry of `T`. More...
T & | operator[] (size_t index)
const T & | operator[] (size_t index) const
size_t | size () const
void | resize (size_t newSize)
| operator const void * () const
| operator void * ()
| operator const T * () const
| operator T* ()

## Detailed Description

### template<class T>
class vector_ptr< T >

Manages resources for an array of objects.

Template Parameters

  T | class or type

`vector_ptr` is used frequently in the library to avoid large stack allocations, and manage resources and ensure cleanup under the RAII pattern (Resource Acquisition Is Initialization).

Definition at line 229 of file smartptr.h.

## Constructor & Destructor Documentation

## vector_ptr()

template<class T>

vector_ptr< T >::vector_ptr | ( | size_t | size = `0` | ) |

inline

Construct an arry of `T`.

Parameters

  size | the size of the array, in elements

If `T` is a Plain Old Dataype (POD), then the array is uninitialized.

Definition at line 235 of file smartptr.h.

The documentation for this class was generated from the following file:

- smartptr.h