Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

OSCtxtPtr Class Reference

Context reference counted pointer class. More...

#include <rtxCppContext.h>

List of all members.

Public Member Functions

 OSCtxtPtr (OSContext *rf=0)
 This constructor set the internal context pointer to the given value and, if it is non-zero, increases the reference count by one.
 OSCtxtPtr (const OSCtxtPtr &o)
 The copy constructor copies the pointer from the source pointer object and, if it is non-zero, increases the reference count by one.
 ~OSCtxtPtr ()
 The destructor decrements the reference counter to the internal context pointer object.
OSCtxtPtroperator= (const OSCtxtPtr &rf)
 This assignment operator assigns this OSCtxtPtr to another.
OSCtxtPtroperator= (OSContext *rf)
 This assignment operator assigns does a direct assignment of an OSContext object to this OSCtxtPtr object.
 operator OSContext * ()
 The 'OSContext*' operator returns the context object pointer.
 operator const OSContext * () const
OSContextoperator-> ()
 The '->' operator returns the context object pointer.
const OSContextoperator-> () const
OSBOOL operator== (const OSContext *o) const
 The '==' operator compares two OSContext pointer values.
OSBOOL isNull () const
 The isNull method returns TRUE if the underlying context pointer is NULL.
OSCTXT * getCtxtPtr ()
 This method returns the standard context pointer used in C function calls.

Protected Attributes

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


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 OSContext object.

Definition at line 237 of file rtxCppContext.h.


Constructor & Destructor Documentation

OSCtxtPtr::OSCtxtPtr OSContext 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 OSContext object

Definition at line 252 of file rtxCppContext.h.

OSCtxtPtr::OSCtxtPtr const OSCtxtPtr 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 OSCtxtPtr object to be copied

Definition at line 262 of file rtxCppContext.h.

OSCtxtPtr::~OSCtxtPtr  )  [inline]
 

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.

Definition at line 271 of file rtxCppContext.h.


Member Function Documentation

OSCtxtPtr& OSCtxtPtr::operator= const OSCtxtPtr rf  )  [inline]
 

This assignment operator assigns this OSCtxtPtr 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 OSCtxtPtr smart-pointer object

Definition at line 281 of file rtxCppContext.h.

References OSContext::_ref(), and mPointer.


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

This file was last modified on 8 Jan 2007.
XBinder, Version 1.1.9