NAME
auto_array_ptr -
Implements an extension to the draft C++ standard auto_ptr
abstraction.
SYNOPSIS
#include <ace/Auto_Ptr.h>
template<class X>
class auto_array_ptr
{
public:
auto_array_ptr (X *p = 0);
auto_array_ptr (auto_array_ptr<X> &ap);
~auto_array_ptr (void);
void operator= (auto_array_ptr<X> &rhs);
X &operator* ();
X *operator-> ();
X &operator[] (int i);
X operator[] (int i) 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_array_ptr (X *p = 0);
auto_array_ptr (auto_array_ptr<X> &ap);
~auto_array_ptr (void);
void operator= (auto_array_ptr<X> &rhs);
Accessor methods.
X &operator* ();
X *operator-> ();
X &operator[] (int i);
X operator[] (int i) 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