s11n::Detail::auto_ptr< T > Struct Template Reference

We use a custom auto_ptr<> work-alike in place of std::auto_ptr so that s11n compiles cleanly under C++0x, where auto_ptr is apparently deprecated. More...

#include <memory.hpp>

Collaboration diagram for s11n::Detail::auto_ptr< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 auto_ptr (T *t)
 ~auto_ptr ()
T * get () const
T * release ()
T * operator-> () const
void reset (T *x)
T & operator * () const
 Throws if !this->get().


Detailed Description

template<typename T>
struct s11n::Detail::auto_ptr< T >

We use a custom auto_ptr<> work-alike in place of std::auto_ptr so that s11n compiles cleanly under C++0x, where auto_ptr is apparently deprecated.

This type is a subset of std::auto_ptr, the main difference being that it's not copyable.

Note that this type is functionally very different from s11n::cleanup_ptr, which specifically handles the details of cleaning up Serializables, whereas this type simply uses delete to destroy its contents.

Definition at line 297 of file memory.hpp.


Constructor & Destructor Documentation

template<typename T>
s11n::Detail::auto_ptr< T >::auto_ptr ( T *  t  )  [inline]

Definition at line 298 of file memory.hpp.

template<typename T>
s11n::Detail::auto_ptr< T >::~auto_ptr (  )  [inline]

Definition at line 299 of file memory.hpp.


Member Function Documentation

template<typename T>
T* s11n::Detail::auto_ptr< T >::get (  )  const [inline]

Definition at line 300 of file memory.hpp.

Referenced by s11n::io::deserialize_lex_forwarder(), s11n::io::guess_serializer(), s11nlite::load_node(), s11n::serialize_to_subnode_unary_f< NodeType, BinaryFunctorT >::operator()(), and s11n::io::data_node_serializer< NodeType >::serialize().

template<typename T>
T* s11n::Detail::auto_ptr< T >::release (  )  [inline]

Definition at line 301 of file memory.hpp.

Referenced by s11n::serialize_to_subnode_unary_f< NodeType, BinaryFunctorT >::operator()(), and s11n::serialize_to_subnode_f< BinaryFunctorT >::operator()().

template<typename T>
T* s11n::Detail::auto_ptr< T >::operator-> (  )  const [inline]

Definition at line 302 of file memory.hpp.

template<typename T>
void s11n::Detail::auto_ptr< T >::reset ( T *  x  )  [inline]

Definition at line 303 of file memory.hpp.

template<typename T>
T& s11n::Detail::auto_ptr< T >::operator * (  )  const [inline]

Throws if !this->get().

Definition at line 309 of file memory.hpp.

References S11N_SOURCEINFO.


The documentation for this struct was generated from the following file:
Generated on Wed Jun 4 21:47:19 2008 for libs11n by  doxygen 1.5.3