NAME
auto_ptr -
Implements the draft C++ standard auto_ptr abstraction.
SYNOPSIS
#include <ace/Auto_Ptr.h>
template<class X>
class auto_ptr
{
public:
auto_ptr (X *p = 0);
auto_ptr (auto_ptr<X> &ap);
~auto_ptr (void);
void operator= (auto_ptr<X> &rhs);
X &operator *() const;
X *operator-> () const;
X *get (void) const;
X *release (void);
X *reset (X *p);
static void remove (X* &x);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
X *p_;
};
Initialization and termination methods
auto_ptr (X *p = 0);
auto_ptr (auto_ptr<X> &ap);
~auto_ptr (void);
void operator= (auto_ptr<X> &rhs);
Accessor methods.
X &operator *() const;
X *operator-> () const;
X *get (void) const;
X *release (void);
X *reset (X *p);
static void remove (X* &x);
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
AUTHOR
Doug Schmidt, based on code from Jack Reeves (jack@fx.com) and
Dr. Harald M. Mueller (mueller@garwein.hai.siemens.co.at)
LIBRARY
ace