OSRTCtxtPtr Class Reference

class OSRTCtxtPtr

Context reference counted pointer class. This class allows a context object to automatically be released when its reference count goes to zero. It is very similar to the standard C++ library auto_ptr smart pointer class but only works with an OSRTContext object.

Constructor & Destructor Documentation

OSRTCtxtPtr(OSRTContext *)

OSRTCtxtPtr(OSRTContext *rf = 0)[inline]

This constructor set the internal context pointer to the given value and, if it is non-zero, increases the reference count by one.

Parameters

OSRTContext * rf = 0- Pointer to OSRTContext object

OSRTCtxtPtr(const OSRTCtxtPtr &)

OSRTCtxtPtr(const OSRTCtxtPtr &o)[inline]

The copy constructor copies the pointer from the source pointer object and, if it is non-zero, increases the reference count by one.

Parameters

const OSRTCtxtPtr & o- Reference to OSRTCtxtPtr object to be copied

~OSRTCtxtPtr()

~OSRTCtxtPtr()[inline, virtual]

The destructor decrements the reference counter to the internal context pointer object. The context object will delete itself if its reference count goes to zero.

Member Functions Documentation

getCtxtPtr()

OSCTXT *getCtxtPtr()[inline]

This method returns the standard context pointer used in C function calls.

isNull()

OSBOOL isNull()const [inline]

The isNull method returns TRUE if the underlying context pointer is NULL.

operator OSRTContext *()

operator OSRTContext *()[inline]

The 'OSRTContext*' operator returns the context object pointer.

operator const OSRTContext *()

operator const OSRTContext *()const [inline]

operator->()

OSRTContext *operator->()[inline]

The '->' operator returns the context object pointer.

operator->()

const OSRTContext *operator->()const [inline]

operator=(const OSRTCtxtPtr &)

OSRTCtxtPtr &operator=(const OSRTCtxtPtr &rf)[inline]

This assignment operator assigns this OSRTCtxtPtr to another. The reference count of the context object managed by this object is first decremented. Then the new pointer is assigned and that object's reference count is incremented.

Parameters

const OSRTCtxtPtr & rf- Pointer to OSRTCtxtPtr smart-pointer object

operator=(OSRTContext *)

OSRTCtxtPtr &operator=(OSRTContext *rf)[inline]

This assignment operator assigns does a direct assignment of an OSRTContext object to this OSRTCtxtPtr object.

Parameters

OSRTContext * rf

operator==(const OSRTContext *)

OSBOOL operator==(const OSRTContext *o)const [inline]

The '==' operator compares two OSRTContext pointer values.

Parameters

const OSRTContext * o

Member Data Documentation

OSRTContext * mPointer

OSRTContext *mPointer[protected]

The mPointer member variable is a pointer to a reference-counted ASN.1 context wrapper class object.