OSRTCtxtPtr Class Reference

#include <OSRTContext.h>

List of all members.

Public Member Functions

 OSRTCtxtPtr (OSRTContext *rf=0)
 OSRTCtxtPtr (const OSRTCtxtPtr &o)
virtual ~OSRTCtxtPtr ()
OSRTCtxtPtroperator= (const OSRTCtxtPtr &rf)
OSRTCtxtPtroperator= (OSRTContext *rf)
 operator OSRTContext * ()
 operator const OSRTContext * () const
OSRTContextoperator-> ()
const OSRTContextoperator-> () const
OSBOOL operator== (const OSRTContext *o) const
OSBOOL isNull () const
OSCTXTgetCtxtPtr ()

Protected Attributes

OSRTContextmPointer

Detailed Description

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::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:
rf - Pointer to OSRTContext object
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:
o - Reference to OSRTCtxtPtr object to be copied
virtual 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 Function Documentation

OSCTXT* OSRTCtxtPtr::getCtxtPtr (  )  [inline]

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

OSBOOL OSRTCtxtPtr::isNull (  )  const [inline]

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

OSRTCtxtPtr::operator OSRTContext * (  )  [inline]

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

OSRTContext* OSRTCtxtPtr::operator-> (  )  [inline]

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

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

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

References OSRTContext::_ref().

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:
rf - Pointer to OSRTCtxtPtr smart-pointer object

References OSRTContext::_ref(), and mPointer.

OSBOOL OSRTCtxtPtr::operator== ( const OSRTContext o  )  const [inline]

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


Member Data Documentation

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

Referenced by operator=().


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