Main Page   Modules   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

OsclSharedPtr< TheClass > Class Template Reference
[OSCL Base]

A parameterized smart pointer class. More...

#include <oscl_shared_ptr.h>


Public Methods

 OsclSharedPtr ()
 Constructor.

 OsclSharedPtr (TheClass *inClassPtr, OsclRefCounter *in_refcnt)
 Constructor.

 OsclSharedPtr (const OsclSharedPtr &inSharedPtr)
 Copy constructor.

virtual ~OsclSharedPtr ()
 Destructor.

TheClass * operator-> ()
TheClass & operator * ()
 The indirection operator returns a reference to an object of the parameterized type.

 operator TheClass * ()
 Casting operator.

TheClass * GetRep ()
 Use this function to get a pointer to the wrapped object.

OsclRefCounterGetRefCounter ()
 Get the refcount pointer. This should primarily be used for conversion operations.

int get_count ()
 Get a count of how many references to the object exist.

void Bind (const OsclSharedPtr &inHandle)
 Use this function to bind an existing OsclSharedPtr to a already-wrapped object.

void Bind (TheClass *ptr, OsclRefCounter *in_refcnt)
 Use this function to bind an existing OsclSharedPtr to a new (unwrapped) object.

void Unbind ()
 Use this function of unbind an existing OsclSharedPtr.

OsclSharedPtr & operator= (const OsclSharedPtr &inSharedPtr)
 Assignment operator.

bool operator== (const OsclSharedPtr &b) const
 Test for equality to see if two PVHandles wrap the same object.


Detailed Description

template<class TheClass>
class OsclSharedPtr< TheClass >

A parameterized smart pointer class.


Constructor & Destructor Documentation

template<class TheClass>
OsclSharedPtr< TheClass >::OsclSharedPtr   [inline]
 

Constructor.

template<class TheClass>
OsclSharedPtr< TheClass >::OsclSharedPtr TheClass *    inClassPtr,
OsclRefCounter   in_refcnt
[inline]
 

Constructor.

Parameters:
inClassPtr  A pointer to an instance of the parameterized type that the new OsclSharedPtr will wrap.

template<class TheClass>
OsclSharedPtr< TheClass >::OsclSharedPtr const OsclSharedPtr< TheClass > &    inSharedPtr [inline]
 

Copy constructor.

template<class TheClass>
virtual OsclSharedPtr< TheClass >::~OsclSharedPtr   [inline, virtual]
 

Destructor.


Member Function Documentation

template<class TheClass>
int OsclSharedPtr< TheClass >::get_count   [inline]
 

Get a count of how many references to the object exist.

template<class TheClass>
OsclRefCounter* OsclSharedPtr< TheClass >::GetRefCounter   [inline]
 

Get the refcount pointer. This should primarily be used for conversion operations.

template<class TheClass>
TheClass* OsclSharedPtr< TheClass >::GetRep   [inline]
 

Use this function to get a pointer to the wrapped object.

template<class TheClass>
TheClass& OsclSharedPtr< TheClass >::operator *   [inline]
 

The indirection operator returns a reference to an object of the parameterized type.

template<class TheClass>
OsclSharedPtr< TheClass >::operator TheClass *   [inline]
 

Casting operator.

template<class TheClass>
TheClass* OsclSharedPtr< TheClass >::operator->   [inline]
 

The dereferencing operator returns a pointer to the parameterized type and can be used to access member elements of TheClass.

template<class TheClass>
OsclSharedPtr& OsclSharedPtr< TheClass >::operator= const OsclSharedPtr< TheClass > &    inSharedPtr [inline]
 

Assignment operator.

template<class TheClass>
void OsclSharedPtr< TheClass >::Unbind   [inline]
 

Use this function of unbind an existing OsclSharedPtr.


The documentation for this class was generated from the following file:
OSCL API
Posting Version: OPENCORE_20090310