auto_array_destructor Class Template Reference
[Memory Library]

#include <stlsoft/memory/auto_destructor.hpp>

List of all members.


Detailed Description

template<typename T>
class stlsoft::auto_array_destructor< T >

This class acts as an automatic frame scope variable that manages heap-allocated object arrays.

Parameters:
T The value type
A detailed explanation of the use of resource management is given for stlsoft::auto_destructor. The same explanation applies directly to auto_array_destructor, substituting auto_array_destructor for auto_destructor, return_value_destructor for return_value_array_destructor, and vector new for scalar new.

See also:
stlsoft::return_value_array_destructor

Types

typedef T value_type
 The value type.
typedef auto_array_destructor< T > class_type
 The current parameterisation of the type.
typedef
return_value_array_destructor
< T > 
return_value_type
 The return value type.

Public Member Functions

Construction
 auto_array_destructor (value_type t[])
 Constructs from the pointer to the array whose lifetimes will be managedd.
 auto_array_destructor (proxy_type rhs)
 Proxy move constructor.
 ~auto_array_destructor () throw ()
 Destroys the managed array.
Operations
value_typedetach ()
 Detaches the managed instance from the auto_array_destructor and returns a pointer to it to the caller.
Accessors
value_typeoperator-> ()
 Implicit conversion to pointer to the managed instance.
value_type const * operator-> () const
 Implicit conversion to pointer-to-const to the managed instance.
value_typeget_ptr () const
 Returns the pointer.
value_typeget () const
 Returns the pointer.

Member Typedef Documentation

typedef T value_type

The value type.

The current parameterisation of the type.

The return value type.


Constructor & Destructor Documentation

auto_array_destructor ( value_type  t[]  )  [inline, explicit]

Constructs from the pointer to the array whose lifetimes will be managedd.

auto_array_destructor ( proxy_type  rhs  )  [inline]

Proxy move constructor.

~auto_array_destructor (  )  throw () [inline]

Destroys the managed array.


Member Function Documentation

value_type* detach (  )  [inline]

Detaches the managed instance from the auto_array_destructor and returns a pointer to it to the caller.

Note:
The caller becomes responsible for destroying the instance.

value_type* operator-> (  )  [inline]

Implicit conversion to pointer to the managed instance.

value_type const* operator-> (  )  const [inline]

Implicit conversion to pointer-to-const to the managed instance.

value_type* get_ptr (  )  const [inline]

Returns the pointer.

Deprecated:
This function will be removed in a future release. Users should instead invoke get()

value_type* get (  )  const [inline]

Returns the pointer.


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

Generated on Thu Jun 10 08:58:53 2010 for STLSoft by  doxygen 1.5.6