Dune::Singleton< T >::InstancePointer Class Reference

A simple smart pointer responsible for creation and deletion of the instance. More...

#include <dune/common/singleton.hh>

List of all members.

Public Member Functions

 InstancePointer ()
 Construct a null pointer.
 ~InstancePointer ()
 Delete the instance we point to.
T * get ()
 Get a pointer to the instance.
void set (T *pointer)
 Set the pointer.

Detailed Description

template<class T>
class Dune::Singleton< T >::InstancePointer

A simple smart pointer responsible for creation and deletion of the instance.


Constructor & Destructor Documentation

template<class T >
Dune::Singleton< T >::InstancePointer::InstancePointer (  )  [inline]

Construct a null pointer.

template<class T >
Dune::Singleton< T >::InstancePointer::~InstancePointer (  )  [inline]

Delete the instance we point to.


Member Function Documentation

template<class T >
T* Dune::Singleton< T >::InstancePointer::get (  )  [inline]

Get a pointer to the instance.

Returns:
The instance we store.

Referenced by Dune::Singleton< T >::instance().

template<class T >
void Dune::Singleton< T >::InstancePointer::set ( T *  pointer  )  [inline]

Set the pointer.

Parameters:
pointer A pointer to the instance.

Referenced by Dune::Singleton< T >::instance().


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].