Dune::SmartPointer< T > Class Template Reference
[Common]

#include <smartpointer.hh>

List of all members.


Detailed Description

template<class T>
class Dune::SmartPointer< T >

A reference counting smart pointer.

It is designed such that it is usable within a std::vector. The contained object is destroyed only if there are no more references to it.


Public Types

typedef T MemberType
 The data type we are a pointer for.

Public Member Functions

 SmartPointer ()
 Constructs a new smart pointer and allocates the referenced Object.
 SmartPointer (const SmartPointer< T > &pointer)
 Copy constructor.
 ~SmartPointer ()
 Destructor.
SmartPointeroperator= (const SmartPointer< T > &pointer)
 Assignment operator.
MemberTypeoperator* ()
 Dereference as object.
MemberTypeoperator-> ()
 Dereference as pointer.
const MemberTypeoperator* () const
 Dereference as const object.
const MemberTypeoperator-> () const
 Dereference as const pointer.
void deallocate ()
 Deallocates the references object if no other pointers reference it.

Member Typedef Documentation

template<class T>
typedef T Dune::SmartPointer< T >::MemberType

The data type we are a pointer for.

This has to have a parameterless constructor.


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

Generated on 6 Nov 2008 with Doxygen (ver 1.5.6) [logfile].