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

OsclRefCounterSA< DeallocType > Class Template Reference
[OSCL Base]

#include <oscl_refcounter.h>

Inheritance diagram for OsclRefCounterSA< DeallocType >:

OsclRefCounter

Public Methods

 OsclRefCounterSA (OsclAny *p)
virtual ~OsclRefCounterSA ()
void addRef ()
void removeRef ()
uint32 getCount ()

Detailed Description

template<class DeallocType>
class OsclRefCounterSA< DeallocType >

Implementation of an OsclRefCounter that uses a statically created deallocator.


Constructor & Destructor Documentation

template<class DeallocType>
OsclRefCounterSA< DeallocType >::OsclRefCounterSA OsclAny   p [inline]
 

Constructor Takes a pointer to the buffer to track.

When the reference count reaches zero, the buffer will be deleted by the deallocator. Also, the OsclRefCounter object (this) will self-destruct when the reference count is zero. In some cases the OsclRefCounter object will be part of the buffer being deleted. For such cases, the object pointer must be equal to the buffer pointer given at construction. If the object is not part of the buffer being deleted, it will self-destruct with a call to delete().

Parameters:
p  pointer to the buffer to track

template<class DeallocType>
virtual OsclRefCounterSA< DeallocType >::~OsclRefCounterSA   [inline, virtual]
 

Destructor empty


Member Function Documentation

template<class DeallocType>
void OsclRefCounterSA< DeallocType >::addRef   [inline, virtual]
 

Add to the reference count

Implements OsclRefCounter.

template<class DeallocType>
uint32 OsclRefCounterSA< DeallocType >::getCount   [inline, virtual]
 

Gets the current number of references

Implements OsclRefCounter.

template<class DeallocType>
void OsclRefCounterSA< DeallocType >::removeRef   [inline, virtual]
 

Remove from the reference count

Implements OsclRefCounter.


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