32#ifndef _QORE_INTERN_FUNCTIONREFERENCENODE_H
34#define _QORE_INTERN_FUNCTIONREFERENCENODE_H
40hashdecl CallReferenceNodeLocation {
41 const QoreProgramLocation* loc;
43 DLLLOCAL CallReferenceNodeLocation(
const QoreProgramLocation* loc) : loc(loc) {
49 DLLLOCAL AbstractCallReferenceNodeIntern(
const QoreProgramLocation* loc,
bool n_needs_eval) :
56 DLLLOCAL ResolvedCallReferenceNodeIntern(
const QoreProgramLocation* loc,
bool n_needs_eval =
false) :
61class AbstractUnresolvedCallReferenceNode :
public AbstractCallReferenceNodeIntern {
63 DLLLOCAL AbstractUnresolvedCallReferenceNode(
const QoreProgramLocation* loc,
bool n_needs_eval) : AbstractCallReferenceNodeIntern(loc, n_needs_eval) {
91 : ResolvedCallReferenceNodeIntern(loc,
true), method(n_method) {
114 bool n_needs_eval) : ResolvedCallReferenceNodeIntern(loc, n_needs_eval), method(n_method) {
123 const qore_class_private* class_ctx;
128 DLLLOCAL StaticMethodCallReferenceNode(
const QoreProgramLocation* loc,
const QoreMethod* n_method,
129 QoreProgram* n_pgm,
const qore_class_private* n_class_ctx);
131 DLLLOCAL ~StaticMethodCallReferenceNode() {
171 DLLLOCAL MethodCallReferenceNode(
const QoreProgramLocation* loc,
const QoreMethod* n_method,
QoreProgram* n_pgm);
190 return const_cast<QoreFunction*
>(uf);
194 const QoreFunction* uf;
230 DLLLOCAL
void deref() {
241class ImportedFunctionEntry;
247 const char* n_method);
267 const qore_class_private* qc;
277 const QoreMethod* n_method,
const qore_class_private* ctx = runtime_get_class());
294 const qore_class_private* qc;
base class for call references, reference-counted, dynamically allocated only
Definition CallReferenceNode.h:39
The base class for all value and parse types in Qore expression trees.
Definition AbstractQoreNode.h:57
DLLEXPORT void deref(ExceptionSink *xsink)
decrements the reference count and calls derefImpl() if there_can_be_only_one is false,...
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition ExceptionSink.h:50
a call reference to a user function
Definition CallReferenceNode.h:204
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL bool derefImpl(ExceptionSink *xsink)
Called when the strong reference count reaches zero.
a call reference to a user function from within the same QoreProgram object
Definition CallReferenceNode.h:177
virtual DLLLOCAL bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
Definition CallReferenceNode.h:183
virtual DLLLOCAL QoreValue evalImpl(bool &needs_deref, ExceptionSink *xsink) const
this function should never be called for function references; this function should never be called di...
virtual DLLLOCAL QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
Definition CallReferenceNode.h:189
virtual DLLLOCAL bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
a call reference to a static user method
Definition CallReferenceNode.h:139
virtual DLLLOCAL bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
Definition CallReferenceNode.h:155
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
virtual DLLLOCAL QoreValue evalImpl(bool &needs_deref, ExceptionSink *xsink) const
this function should never be called for function references; this function should never be called di...
a call reference to a static user method
Definition CallReferenceNode.h:88
virtual DLLLOCAL QoreValue evalImpl(bool &needs_deref, ExceptionSink *xsink) const
this function should never be called for function references; this function should never be called di...
virtual DLLLOCAL bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
Definition CallReferenceNode.h:99
virtual DLLLOCAL QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition QoreListNode.h:52
a method in a QoreClass
Definition QoreClass.h:143
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition QoreObject.h:61
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition QoreProgram.h:128
DLLEXPORT void depRef()
incremements the weak reference count for the program object
DLLEXPORT bool ROdereference() const
Atomically decrements the reference count.
base class for resolved call references
Definition CallReferenceNode.h:115
virtual DLLEXPORT bool derefImpl(ExceptionSink *xsink)
Called when the strong reference count reaches zero.
a run-time call reference to a method of a particular object
Definition CallReferenceNode.h:244
virtual DLLLOCAL QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
Definition CallReferenceNode.h:259
virtual DLLLOCAL bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
Definition CallReferenceNode.h:253
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL QoreProgram * getProgram() const
returns a pointer to the QoreProgram object associated with this reference (can be nullptr)
virtual DLLLOCAL bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
a run-time call reference to a method of a particular object where the method's class
Definition CallReferenceNode.h:274
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
virtual DLLLOCAL bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
virtual DLLLOCAL bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
returns true if the other node is the same value
Definition CallReferenceNode.h:283
virtual DLLLOCAL QoreProgram * getProgram() const
returns a pointer to the QoreProgram object associated with this reference (can be nullptr)
an unresolved call reference, only present temporarily in the parse tree
Definition CallReferenceNode.h:68
virtual DLLLOCAL int parseInit(QoreValue &val, QoreParseContext &parse_context)
for use by parse types to initialize them for execution during stage 1 parsing
an unresolved static method call reference, only present temporarily in the parse tree
Definition CallReferenceNode.h:223
virtual DLLLOCAL int parseInit(QoreValue &val, QoreParseContext &parse_context)
for use by parse types to initialize them for execution during stage 1 parsing
The main value class in Qore, designed to be passed by value.
Definition QoreValue.h:279