Qore Programming Language: QoreListNodeEvalOptionalRefHolder Class Reference

Qore Programming Language 0.8.11

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
QoreListNodeEvalOptionalRefHolder Class Reference

For use on the stack only: manages result of the optional evaluation of a QoreListNode. More...

`#include <QoreListNode.h>`

## Public Member Functions
DLLLOCAL | QoreListNodeEvalOptionalRefHolder (ExceptionSink *n_xsink)
| initializes an empty object and saves the ExceptionSink object
DLLLOCAL | QoreListNodeEvalOptionalRefHolder (const QoreListNode *exp, ExceptionSink *n_xsink)
| performs an optional evaluation of the list (sets the dereference flag)
DLLLOCAL | ~QoreListNodeEvalOptionalRefHolder ()
| clears the object (dereferences the old object if necessary)
DLLLOCAL void | assign (bool n_needs_deref, QoreListNode *n_val)
| assigns a new value and dereference flag to this object, dereferences the old object if necessary
DLLLOCAL void | assignEval (const QoreListNode *exp)
| assigns a new value by executing the given list and dereference flag to this object, dereferences the old object if necessary
DLLLOCAL void | discard ()
| clears the object (dereferences the old object if necessary)
DLLLOCAL void | edit ()
| will create a unique list so the list can be edited
DLLLOCAL QoreListNode * | getReferencedValue ()
| returns a referenced value - the caller will own the reference More...
DLLLOCAL bool | needsDeref () const
| returns true if the object contains a temporary (evaluated) value that needs a dereference
DLLLOCAL | operator bool () const
| returns true if a QoreListNode object pointer is being managed, false if the pointer is 0
DLLLOCAL const QoreListNode * | operator* () const
| returns a pointer to the QoreListNode object being managed
DLLLOCAL const QoreListNode * | operator-> () const
| returns a pointer to the QoreListNode object being managed More...

## Detailed Description

For use on the stack only: manages result of the optional evaluation of a QoreListNode.

## Member Function Documentation

DLLLOCAL QoreListNode* QoreListNodeEvalOptionalRefHolder::getReferencedValue | ( |  | ) |
| inline

returns a referenced value - the caller will own the reference

The list is referenced if necessary (if it was a temporary value)

Returns
  the list value, where the caller will own the reference count

References AbstractQoreNode::ref().

DLLLOCAL const QoreListNode* QoreListNodeEvalOptionalRefHolder::operator-> | ( |  | ) | const
| inline

returns a pointer to the QoreListNode object being managed

if you need a referenced value, use getReferencedValue()

Returns
  a pointer to the QoreListNode object being managed (or 0 if none)

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

- include/qore/QoreListNode.h (6585)