NAME

auto_basic_ptr - Implements the draft C++ standard auto_ptr abstraction. This class allows one to work on non-object (basic) types

SYNOPSIS

#include <ace/Auto_Ptr.h>

template<class X> class auto_basic_ptr { public: auto_basic_ptr (X *p = 0); auto_basic_ptr (auto_basic_ptr<X> &ap); ~auto_basic_ptr (void); void operator= (auto_basic_ptr<X> &rhs); 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; protected: X *p_; };

Initialization and termination methods

auto_basic_ptr (X *p = 0);

auto_basic_ptr (auto_basic_ptr<X> &ap);

~auto_basic_ptr (void);

void operator= (auto_basic_ptr<X> &rhs);

Accessor methods.

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;

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