rutz::scoped_ptr< T > Class Template Reference

A smart-pointer for unshared objects. More...

#include <rutz/scopedptr.h>

Inheritance diagram for rutz::scoped_ptr< T >:

Inheritance graph
[legend]
Collaboration diagram for rutz::scoped_ptr< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 scoped_ptr (T *p=0) throw ()
 Construct with pointer to given object (or null).
template<class TT>
 scoped_ptr (TT *p) throw ()
 Construct with pointer to given object of related type.
 ~scoped_ptr ()
 Destructor.
void reset (T *p=0)
 Reset with pointer to different object (or null).
T & operator* () const throw ()
 Dereference.
T * operator-> () const throw ()
 Dereference for member access.
T * get () const throw ()
 Get a pointer to the referred-to object.


Detailed Description

template<class T>
class rutz::scoped_ptr< T >

A smart-pointer for unshared objects.

scoped_ptr mimics a built-in pointer except that it guarantees deletion of the object pointed to, either on destruction of the scoped_ptr or via an explicit reset().

Definition at line 52 of file scopedptr.h.


The documentation for this class was generated from the following file:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:45 2008 by Doxygen version 1.5.5.