OPAL (Object Oriented Parallel Accelerator Library) 2022.1
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>

Collaboration diagram for OwnPtr< Object >:
Collaboration graph
[legend]

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

◆ OwnPtr() [1/3]

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

Default constructor.

Definition at line 87 of file OwnPtr.h.

◆ OwnPtr() [2/3]

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.

◆ OwnPtr() [3/3]

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

Constructor.

Definition at line 100 of file OwnPtr.h.

◆ ~OwnPtr()

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

Destructor.

Definition at line 106 of file OwnPtr.h.

Member Function Documentation

◆ isValid()

template<class Object >
bool OwnPtr< Object >::isValid
inline

Test for validity.

Definition at line 144 of file OwnPtr.h.

Referenced by Expressions::parsePrimary().

◆ operator*()

template<class Object >
Object & OwnPtr< Object >::operator*
inline

Dereferencing operator.

Definition at line 138 of file OwnPtr.h.

◆ operator->()

template<class Object >
Object * OwnPtr< Object >::operator->
inline

Delegation operator.

Definition at line 132 of file OwnPtr.h.

◆ operator=() [1/2]

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.

◆ operator=() [2/2]

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

Assign.

Definition at line 124 of file OwnPtr.h.

◆ release()

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

Member Data Documentation

◆ object

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: