32 #ifndef _QORE_INTERN_FUNCTIONREFERENCENODE_H
34 #define _QORE_INTERN_FUNCTIONREFERENCENODE_H
40 hashdecl 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) :
61 class AbstractUnresolvedCallReferenceNode :
public AbstractCallReferenceNodeIntern {
63 DLLLOCAL AbstractUnresolvedCallReferenceNode(
const QoreProgramLocation* loc,
bool n_needs_eval) : AbstractCallReferenceNodeIntern(loc, n_needs_eval) {
120 const qore_class_private* class_ctx;
125 DLLLOCAL StaticMethodCallReferenceNode(
const QoreProgramLocation* loc,
const QoreMethod *n_method,
QoreProgram *n_pgm,
const qore_class_private* n_class_ctx);
127 DLLLOCAL ~StaticMethodCallReferenceNode() {
167 DLLLOCAL MethodCallReferenceNode(
const QoreProgramLocation* loc,
const QoreMethod* n_method,
QoreProgram* n_pgm);
186 return const_cast<QoreFunction*
>(uf);
190 const QoreFunction* uf;
229 DLLLOCAL
void deref() {
237 class ImportedFunctionEntry;
244 const qore_class_private* qc;
250 const char* n_method);
274 const qore_class_private* qc;
280 const QoreMethod* n_method,
const qore_class_private* ctx = runtime_get_class());
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
virtual DLLEXPORT bool derefImpl(ExceptionSink *xsink)
decrements the reference count
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:48
a call reference to a user function
Definition: CallReferenceNode.h:200
virtual DLLLOCAL QoreValue execValue(const QoreListNode *args, ExceptionSink *xsink) const
pure virtual function for executing the function reference
virtual DLLLOCAL bool derefImpl(ExceptionSink *xsink)
decrements the reference count
a call reference to a user function from within the same QoreProgram object
Definition: CallReferenceNode.h:173
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:179
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:185
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:135
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:151
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 QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
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:106
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:135
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:60
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition: QoreProgram.h:127
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:109
a run-time call reference to a method of a particular object
Definition: CallReferenceNode.h:240
virtual DLLLOCAL QoreFunction * getFunction()
Returns the internal function object, if any; can return nullptr.
Definition: CallReferenceNode.h:262
virtual DLLLOCAL QoreProgram * getProgram() const
returns a pointer to the QoreProgram object associated with this reference (can be nullptr)
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:256
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
a run-time call reference to a method of a particular object where the method's class
Definition: CallReferenceNode.h:270
virtual DLLLOCAL QoreProgram * getProgram() const
returns a pointer to the QoreProgram object associated with this reference (can be nullptr)
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:286
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:219
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:275