OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Attributes | List of all members
OwnPtr< Object > Class Template Reference

A pointer which owns the object pointed at. More...

#include <OwnPtr.h>

Public Member Functions

 OwnPtr ()
 Default constructor. More...
 
 OwnPtr (const OwnPtr &)
 Copy constructor. More...
 
 OwnPtr (Object *)
 Constructor. More...
 
 ~OwnPtr ()
 Destructor. More...
 
OwnPtroperator= (const OwnPtr &)
 Assign. More...
 
OwnPtroperator= (Object *)
 Assign. More...
 
Objectoperator-> () const
 Delegation operator. More...
 
Objectoperator* () const
 Dereferencing operator. More...
 
bool isValid () const
 Test for validity. More...
 
Objectrelease ()
 Release ownership. More...
 

Private Attributes

Objectobject
 

Detailed Description

template<class Object>
class OwnPtr< Object >

A pointer which owns the object pointed at.

Definition at line 31 of file OwnPtr.h.

Constructor & Destructor Documentation

template<class Object >
OwnPtr< Object >::OwnPtr ( )
inline

Default constructor.

Definition at line 87 of file OwnPtr.h.

template<class Object >
OwnPtr< Object >::OwnPtr ( const OwnPtr< Object > &  rhs)
inline

Copy constructor.

Definition at line 93 of file OwnPtr.h.

References OwnPtr< Object >::object.

template<class Object>
OwnPtr< Object >::OwnPtr ( Object obj)
inline

Constructor.

Definition at line 100 of file OwnPtr.h.

template<class Object >
OwnPtr< Object >::~OwnPtr ( )
inline

Destructor.

Definition at line 106 of file OwnPtr.h.

Member Function Documentation

template<class Object >
bool OwnPtr< Object >::isValid ( ) const
inline
template<class Object >
Object & OwnPtr< Object >::operator* ( ) const
inline

Dereferencing operator.

Definition at line 138 of file OwnPtr.h.

template<class Object >
Object * OwnPtr< Object >::operator-> ( ) const
inline

Delegation operator.

Definition at line 132 of file OwnPtr.h.

template<class Object >
OwnPtr< Object > & OwnPtr< Object >::operator= ( const OwnPtr< Object > &  rhs)
inline

Assign.

Definition at line 112 of file OwnPtr.h.

References OwnPtr< Object >::object.

template<class Object>
OwnPtr< Object > & OwnPtr< Object >::operator= ( Object obj)
inline

Assign.

Definition at line 124 of file OwnPtr.h.

template<class Object >
Object * OwnPtr< Object >::release ( )
inline

Release ownership.

Definition at line 150 of file OwnPtr.h.

Member Data Documentation

template<class Object>
Object* OwnPtr< Object >::object
mutableprivate

Definition at line 79 of file OwnPtr.h.

Referenced by OwnPtr< Object >::operator=(), and OwnPtr< Object >::OwnPtr().


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