Dune::SmartPointer< T > Class Template Reference
[Common]
#include <smartpointer.hh>
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. | |
SmartPointer & | operator= (const SmartPointer< T > &pointer) |
Assignment operator. | |
MemberType & | operator * () |
Dereference as object. | |
MemberType * | operator-> () |
Dereference as pointer. | |
const MemberType & | operator * () const |
Dereference as const object. | |
const MemberType * | operator-> () 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: