|
Qore Programming Language
0.9.16
|
35 #ifndef QORE_REFERENCE_HOLDER_H_
36 #define QORE_REFERENCE_HOLDER_H_
51 template<
typename T =
class AbstractQoreNode>
90 DLLLOCAL
operator bool()
const {
return p !=
nullptr; }
105 void*
operator new(size_t) =
delete;
117 template<
typename T =
class SimpleQoreNode>
132 DLLLOCAL T* operator->() {
return p; }
133 DLLLOCAL T* operator*() {
return p; }
134 DLLLOCAL
const T* operator->()
const {
return p; }
135 DLLLOCAL
const T* operator*()
const {
return p; }
136 DLLLOCAL
void operator=(T* nv) {
141 DLLLOCAL T *release() {
146 DLLLOCAL
operator bool()
const {
return p != 0; }
154 void*
operator new(size_t) =
delete;
manages a reference count of a pointer to a class that takes a simple "deref()" call with no argument...
Definition: ReferenceHolder.h:118
DLLLOCAL T *& getRef()
returns a reference to the ptr being managed
Definition: ReferenceHolder.h:96
DLLLOCAL void operator=(T *nv)
assigns a new pointer to the holder, dereferences the current pointer if any
Definition: ReferenceHolder.h:76
DLLLOCAL T * operator->()
returns the pointer being managed
Definition: ReferenceHolder.h:64
DLLLOCAL T * release()
releases the pointer to the caller
Definition: ReferenceHolder.h:83
a templated class to manage a reference count of an object that can throw a Qore-language exception w...
Definition: ReferenceHolder.h:52
DLLLOCAL T ** getPtrPtr()
returns a pointer to the pointer being managed
Definition: ReferenceHolder.h:93
DLLLOCAL T * operator*()
returns the pointer being managed
Definition: ReferenceHolder.h:67
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
DLLLOCAL ~ReferenceHolder()
calls deref(ExceptionSink *) on the pointer being managed if not 0
Definition: ReferenceHolder.h:61
DLLLOCAL ReferenceHolder(ExceptionSink *xsink_)
creates an empty ReferenceHolder
Definition: ReferenceHolder.h:55