|  | Qore Programming Language 1.16.0
    | 
allows a reference to be passed as an argument to Qore code More...
#include <ReferenceArgumentHelper.h>
| Public Member Methods | |
| DLLEXPORT | ReferenceArgumentHelper (QoreValue val, const QoreTypeInfo *typeInfo, ExceptionSink *xsink) | 
| creates a fake local variable assigned to "val" and creates a reference to the local variable  More... | |
| DLLEXPORT | ReferenceArgumentHelper (QoreValue val, ExceptionSink *xsink) | 
| creates a fake local variable assigned to "val" and creates a reference to the local variable  More... | |
| DLLEXPORT | ~ReferenceArgumentHelper () | 
| frees all memory still managed by the object | |
| DLLEXPORT ReferenceNode * | getArg () const | 
| returns the reference to the fake local variable for use in an argument list, the caller owns the reference returned  More... | |
| DLLEXPORT QoreValue | getOutputValue () | 
| returns the value of the reference and leaves the reference empty, the caller owns the reference returned  More... | |
allows a reference to be passed as an argument to Qore code
this class creates a fake local variable and then creates a reference the local variable that can be used in an argument list to be passed to a function. Then the ReferenceArgumentHelper::getOutputValue() function can be called to retrieve the value of the local variable after the Qore-language code has been executed. This allows values to be passed by reference to Qore-language code and then the value of the variable read back out and processed.
| DLLEXPORT ReferenceArgumentHelper::ReferenceArgumentHelper | ( | QoreValue | val, | 
| ExceptionSink * | xsink | ||
| ) | 
creates a fake local variable assigned to "val" and creates a reference to the local variable
| val | the value to assign to the local variable | 
| xsink | this value is saved to be used for dereferencing the fake local variable in the destructor | 
| DLLEXPORT ReferenceArgumentHelper::ReferenceArgumentHelper | ( | QoreValue | val, | 
| const QoreTypeInfo * | typeInfo, | ||
| ExceptionSink * | xsink | ||
| ) | 
creates a fake local variable assigned to "val" and creates a reference to the local variable
| val | the value to assign to the local variable | 
| typeInfo | type information for the lvalue | 
| xsink | this value is saved to be used for dereferencing the fake local variable in the destructor | 
| DLLEXPORT ReferenceNode * ReferenceArgumentHelper::getArg | ( | ) | const | 
returns the reference to the fake local variable for use in an argument list, the caller owns the reference returned
| DLLEXPORT QoreValue ReferenceArgumentHelper::getOutputValue | ( | ) | 
returns the value of the reference and leaves the reference empty, the caller owns the reference returned