All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AbstractPrivateData Class Reference

the base class for all data to be used as private data of Qore objects More...

`#include <AbstractPrivateData.h>`

Inheritance diagram for AbstractPrivateData:
[legend]
Collaboration diagram for AbstractPrivateData:
[legend]

## Public Member Functions

virtual DLLLOCAL void | deref (ExceptionSink *xsink)
| decrements the reference count of the object More...
virtual DLLLOCAL void | deref ()
| decrements the reference count of the object without the possibility of throwing a Qore-language exception
DLLLOCAL void | ref ()
| increments the reference count of the object More...
Public Member Functions inherited from QoreReferenceCounter
DLLEXPORT | QoreReferenceCounter ()
| creates the reference counter object
DLLEXPORT | ~QoreReferenceCounter ()
| destroys the reference counter object
DLLLOCAL bool | is_unique () const
| returns true if the reference count is 1 More...
DLLLOCAL int | reference_count () const
| gets the reference count More...
DLLEXPORT bool | ROdereference () const
| atomically decrements the reference count More...
DLLEXPORT void | ROreference () const
| atomically increments the reference count

## Protected Member Functions

virtual DLLLOCAL | ~AbstractPrivateData ()
| as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually

## Additional Inherited Members

Protected Attributes inherited from QoreReferenceCounter
QoreThreadLock | mRO
| pthread lock to ensure atomicity of updates for architectures where we don't have an atomic increment and decrement implementation

## Detailed Description

the base class for all data to be used as private data of Qore objects

C++ constructor code for Qore classes must set private data of the class against the class ID using QoreObject::setPrivate()

## Member Function Documentation

virtual DLLLOCAL void AbstractPrivateData::deref | ( | ExceptionSink * | xsink | ) |

inline virtual

decrements the reference count of the object

Parameters

  xsink | any Qore-language exception information is stored here

Reimplemented in QoreProgram, and QoreHttpClientObject.

References QoreReferenceCounter::ROdereference().

DLLLOCAL void AbstractPrivateData::ref | ( |  | ) |

inline

increments the reference count of the object

FIXME: this function should be const

References QoreReferenceCounter::ROreference().

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

- include/qore/AbstractPrivateData.h (6de6cc3b438610bf03b2bec44a3d7c61f90e3165)