Qore Programming Language - C/C++ Library
0.8.13.6
|
evaluates an AbstractQoreNode and dereferences the stored value in the destructor More...
#include <QoreValue.h>
Public Member Functions | |
DLLEXPORT | ValueEvalRefHolder (const AbstractQoreNode *exp, ExceptionSink *xs) |
evaluates the AbstractQoreNode argument | |
DLLEXPORT | ValueEvalRefHolder (ExceptionSink *xs) |
creates the object with with no evaluation More... | |
DLLEXPORT int | eval (const AbstractQoreNode *exp) |
evaluates the argument, returns -1 for error, 0 = OK More... | |
![]() | |
DLLLOCAL | ValueOptionalRefHolder (QoreValue n_v, bool nd, ExceptionSink *xs) |
creates the object with the given values | |
DLLLOCAL | ValueOptionalRefHolder (ExceptionSink *xs) |
creates an empty object | |
DLLLOCAL void | clearTemp () |
sets needs_deref = false | |
DLLEXPORT void | ensureReferencedValue () |
DLLEXPORT AbstractQoreNode * | getReferencedValue () |
returns a referenced AbstractQoreNode ptr; caller owns the reference; the current object is left empty | |
DLLLOCAL bool | isTemp () const |
returns true if the value is temporary (needs dereferencing) | |
DLLLOCAL | operator bool () const |
returns true if holding an AbstractQoreNode reference | |
DLLEXPORT void | sanitize () |
converts pointers to efficient representations and manages the reference count | |
DLLLOCAL void | setValue (QoreValue nv) |
assigns a new non-temporary value | |
DLLLOCAL void | setValue (QoreValue nv, bool temp) |
assigns a new value | |
DLLLOCAL AbstractQoreNode * | takeNode (bool &nd) |
returns the stored AbstractQoreNode pointer and sets the dereference flag as an output variable | |
template<typename T > | |
DLLLOCAL T * | takeReferencedNode () |
returns the stored node value and leaves the current object empty | |
DLLEXPORT QoreValue | takeReferencedValue () |
returns a QoreValue after incrementing the reference count of any node value stored | |
DLLLOCAL QoreValue | takeValue (bool &nd) |
returns the stored value and sets the dereference flag as an output variable | |
DLLLOCAL void | takeValueFrom (ValueOptionalRefHolder &val) |
returns the stored value which must be dereferenced if it is a node object (i.e. type == QV_Node) | |
![]() | |
DLLLOCAL | ValueHolderBase (ExceptionSink *xs) |
creates an ampty object | |
DLLLOCAL | ValueHolderBase (QoreValue n_v, ExceptionSink *xs) |
creates the object with the given value | |
DLLLOCAL QoreValue & | operator* () |
returns the value being managed | |
DLLLOCAL QoreValue * | operator-> () |
returns the value being managed | |
Protected Member Functions | |
DLLLOCAL void | evalIntern (const AbstractQoreNode *exp) |
evaluates the argument, returns -1 for error, 0 = OK More... | |
Additional Inherited Members | |
![]() | |
bool | needs_deref |
flag indicating if the value should be dereferenced in the destructor or not | |
![]() | |
QoreValue | v |
the vlaue held | |
ExceptionSink * | xsink |
for possible Qore-language exceptions | |
evaluates an AbstractQoreNode and dereferences the stored value in the destructor
DLLEXPORT ValueEvalRefHolder::ValueEvalRefHolder | ( | ExceptionSink * | xs | ) |
creates the object with with no evaluation
DLLEXPORT int ValueEvalRefHolder::eval | ( | const AbstractQoreNode * | exp | ) |
evaluates the argument, returns -1 for error, 0 = OK
|
protected |
evaluates the argument, returns -1 for error, 0 = OK