ASN1C C/C++ Common Runtime  ASN1C v7.4.x
Public Member Functions | Protected Attributes | List of all members
OSRTCtxtPtr Class Reference

#include <OSRTContext.h>

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() [1/2]

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

References OSRTContext::_ref().

◆ OSRTCtxtPtr() [2/2]

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

References OSRTContext::_ref().

◆ ~OSRTCtxtPtr()

virtual OSRTCtxtPtr::~OSRTCtxtPtr ( )
inlinevirtual

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.

References OSRTContext::_unref().

Member Function Documentation

◆ getCtxtPtr()

OSCTXT* OSRTCtxtPtr::getCtxtPtr ( )
inline

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

References OSRTContext::getPtr().

◆ isNull()

OSBOOL OSRTCtxtPtr::isNull ( ) const
inline

◆ operator OSRTContext *()

OSRTCtxtPtr::operator OSRTContext * ( )
inline

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

◆ operator->()

OSRTContext* OSRTCtxtPtr::operator-> ( )
inline

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

◆ operator=() [1/2]

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(), OSRTContext::_unref(), and mPointer.

◆ operator=() [2/2]

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(), and OSRTContext::_unref().

◆ operator==()

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

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

Member Data Documentation

◆ mPointer

OSRTContext* OSRTCtxtPtr::mPointer
protected

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: