InstantIO::SmartPtr< T > Class Template Reference

Smartpointer class. More...

#include <InstantIO/SmartPtr.h>

List of all members.

Public Member Functions

 SmartPtr ()
 Constructor.
 SmartPtr (const SmartPtr &other)
 Copy constructor.
 ~SmartPtr ()
 Destructor.
const SmartPtr< T > & operator= (const SmartPtr< T > &other)
 Copy operator.
const T & operator* () const
 Dereferenciation operator.
T & operator* ()
 Dereferenciation operator.
const T * operator-> () const
 Pointer operator.
T * operator-> ()
 Pointer operator.
void newObject ()
 Lets the pointer point to a new object.

Detailed Description

template<class T>
class InstantIO::SmartPtr< T >

Smartpointer class.


Constructor & Destructor Documentation

template<class T>
InstantIO::SmartPtr< T >::SmartPtr (  )  [inline]

Constructor.

Creates a new SmartPtr object.

template<class T>
InstantIO::SmartPtr< T >::SmartPtr ( const SmartPtr< T > &  other  )  [inline]

Copy constructor.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
InstantIO::SmartPtr< T >::~SmartPtr (  )  [inline]

Destructor.

Destroys a SmartPtr object.


Member Function Documentation

template<class T>
const SmartPtr<T>& InstantIO::SmartPtr< T >::operator= ( const SmartPtr< T > &  other  )  [inline]

Copy operator.

Copies the value from another smartpointer.

Parameters:
other The other smartpointer
Returns:
Itself
template<class T>
const T& InstantIO::SmartPtr< T >::operator* (  )  const [inline]

Dereferenciation operator.

Returns the value the smartpointer points at.

Returns:
The value
template<class T>
T& InstantIO::SmartPtr< T >::operator* (  )  [inline]

Dereferenciation operator.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
const T* InstantIO::SmartPtr< T >::operator-> (  )  const [inline]

Pointer operator.

Returns a pointer of the value the smartpointer points at.

Returns:
The pointer to the value
template<class T>
T* InstantIO::SmartPtr< T >::operator-> (  )  [inline]

Pointer operator.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T>
void InstantIO::SmartPtr< T >::newObject (  )  [inline]

Lets the pointer point to a new object.

Calling this methods lets the pointer point to a new object.


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 17:17:32 2014 by  doxygen 1.6.3