STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

auto_array_destructor Class Template Reference

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

#include <stlsoft_auto_destructor.h>

List of all members.

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

typedef return_value_type
const & 
return_value_rhs_type
 The move construction type.


Public Methods

 auto_array_destructor (value_type t[])
 Constructs from the pointer to the array whose lifetimes will be managedd.

 auto_array_destructor (return_value_rhs_type rhs)
 Construct from an return_value_array_destructor<T>, transferring the managed instance from it.

 ~auto_array_destructor ()
 Destroys the managed array.

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

 operator value_type * ()
 Implicit conversion to pointer to the managed instance.

 operator const value_type * () const
 Implicit conversion to pointer-to-const to the managed instance.


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


Member Typedef Documentation

typedef auto_array_destructor<T> class_type
 

The current parameterisation of the type.

typedef return_value_type const& return_value_rhs_type
 

The move construction type.

typedef return_value_array_destructor<T> return_value_type
 

The return value type.

typedef T value_type
 

The 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 return_value_rhs_type    rhs [inline]
 

Construct from an return_value_array_destructor<T>, transferring the managed instance from it.

~auto_array_destructor   [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.

operator const value_type *   const [inline]
 

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

operator value_type *   [inline]
 

Implicit conversion to pointer to the managed instance.


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

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004