stlab.adobe.com Adobe Systems Incorporated

auto_resource< X, Traits > Class Template Reference
[Memory]

The template class auto_resource< X, Traits > provides similar functionality to auto_ptr for resources for which the pointer is opaque refered to by a non-pointer type. More...

#include <memory.hpp>

List of all members.

Classes

struct  clear_type
struct  error_on_const_auto_type< auto_resource< Y, typename traits_type::template rebind< Y >::other > const >

Public Types

typedef traits_type::element_type element_type
typedef traits_type::pointer_type pointer_type
typedef Traits traits_type

Public Member Functions

 auto_resource (pointer_type p=0) throw ()
 auto_resource (auto_resource &) throw ()
template<typename Y >
 auto_resource (const auto_resource< Y, typename traits_type::template rebind< Y >::other > &) throw ()
pointer_type get () const throw ()
 operator bool () const throw ()
bool operator! () const throw ()
auto_resourceoperator= (const clear_type *) throw ()
auto_resourceoperator= (auto_resource &) throw ()
template<typename Y >
auto_resourceoperator= (auto_resource< Y, typename traits_type::template rebind< Y >::other >) throw ()
pointer_type release () throw ()
void reset (pointer_type p=0) throw ()
 ~auto_resource () throw ()

Detailed Description

template<typename X, class Traits = ptr_traits<X>>
class adobe::auto_resource< X, Traits >

auto_ptr< Item > is equivalent to auto_resource< Item* > with the addition of operator *() and operator ->().

Example:

Definition at line 282 of file memory.hpp.


Member Typedef Documentation


Constructor & Destructor Documentation

auto_resource ( pointer_type  p = 0 ) throw () [explicit]

Definition at line 447 of file memory.hpp.

auto_resource ( auto_resource< X, Traits > &  x ) throw ()

Definition at line 452 of file memory.hpp.

auto_resource ( const auto_resource< Y, typename traits_type::template rebind< Y >::other > &  x ) throw ()

Definition at line 458 of file memory.hpp.

~auto_resource (  ) throw ()

Definition at line 479 of file memory.hpp.


Member Function Documentation

auto_resource< X, Traits >::pointer_type get (  ) const throw ()

Definition at line 494 of file memory.hpp.

operator bool (  ) const throw ()

Definition at line 312 of file memory.hpp.

bool operator! (  ) const throw ()

Definition at line 520 of file memory.hpp.

auto_resource< X, Traits > & operator= ( const clear_type *   ) throw ()
auto_resource< X, Traits > & operator= ( auto_resource< X, Traits > &  x ) throw ()

Definition at line 463 of file memory.hpp.

auto_resource< X, Traits > & operator= ( auto_resource< Y, typename traits_type::template rebind< Y >::other >  x ) throw ()

Definition at line 471 of file memory.hpp.

auto_resource< X, Traits >::pointer_type release (  ) throw ()

Definition at line 500 of file memory.hpp.

void reset ( pointer_type  p = 0 ) throw ()

Definition at line 508 of file memory.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google