Qore Programming Language  0.9.16
FunctionCallNode.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  FunctionCallNode.h
4 
5  Qore Programming Language
6 
7  Copyright (C) 2003 - 2020 Qore Technologies, s.r.o.
8 
9  Permission is hereby granted, free of charge, to any person obtaining a
10  copy of this software and associated documentation files (the "Software"),
11  to deal in the Software without restriction, including without limitation
12  the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  and/or sell copies of the Software, and to permit persons to whom the
14  Software is furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in
17  all copies or substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  DEALINGS IN THE SOFTWARE.
26 
27  Note that the Qore library is released under a choice of three open-source
28  licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
29  information.
30 */
31 
32 #ifndef _QORE_FUNCTIONCALLNODE_H
33 
34 #define _QORE_FUNCTIONCALLNODE_H
35 
36 #include <qore/Qore.h>
37 #include "qore/intern/QoreParseListNode.h"
38 #include "qore/intern/FunctionList.h"
39 
40 class FunctionCallBase {
41 protected:
42  QoreParseListNode* parse_args = nullptr;
43  QoreListNode* args = nullptr;
44  const AbstractQoreFunctionVariant* variant = nullptr;
45 
46 public:
47  DLLLOCAL FunctionCallBase(QoreParseListNode* parse_args, QoreListNode* args = nullptr) : parse_args(parse_args), args(args) {
48  }
49 
50  DLLLOCAL FunctionCallBase(const FunctionCallBase& old) :
51  parse_args(old.parse_args ? old.parse_args->listRefSelf() : nullptr),
52  args(old.args ? old.args->listRefSelf() : nullptr),
53  variant(old.variant) {
54  }
55 
56  DLLLOCAL FunctionCallBase(const FunctionCallBase& old, QoreListNode* n_args) : args(n_args), variant(old.variant) {
57  }
58 
59  DLLLOCAL ~FunctionCallBase() {
60  if (parse_args)
61  parse_args->deref();
62  if (args)
63  args->deref(nullptr);
64  }
65 
66  DLLLOCAL const QoreParseListNode* getParseArgs() const { return parse_args; }
67 
68  DLLLOCAL const QoreListNode* getArgs() const { return args; }
69 
70  // ns can be nullptr if the function is a method
71  DLLLOCAL int parseArgsVariant(const QoreProgramLocation* loc, LocalVar* oflag, int pflag, QoreFunction* func, qore_ns_private* ns, const QoreTypeInfo*& returnTypeInfo);
72 
73  DLLLOCAL const AbstractQoreFunctionVariant* getVariant() const {
74  return variant;
75  }
76 };
77 
78 class AbstractFunctionCallNode : public ParseNode, public FunctionCallBase {
79 protected:
80  // set to true if the arg list is a temporary list and can be destroyed when evaluating
81  // such as when the node was created during background operation execution
82  bool tmp_args = false;
83 
84  DLLLOCAL virtual QoreValue evalImpl(bool& needs_deref, ExceptionSink* xsink) const = 0;
85 
86  DLLLOCAL void doFlags(int64 flags) {
87  if (flags & QCF_RET_VALUE_ONLY) {
88  set_effect(false);
89  set_effect_as_root(false);
90  }
91  if (flags & QCF_CONSTANT) {
92  set_effect_as_root(false);
93  }
94  }
95 
96 public:
97  DLLLOCAL AbstractFunctionCallNode(const QoreProgramLocation* loc, qore_type_t t, QoreParseListNode* n_args, bool needs_eval = true) : ParseNode(loc, t, needs_eval), FunctionCallBase(n_args) {
98  }
99 
100  DLLLOCAL AbstractFunctionCallNode(const QoreProgramLocation* loc, qore_type_t t, QoreParseListNode* parse_args, QoreListNode* args, bool needs_eval = true) : ParseNode(loc, t, needs_eval), FunctionCallBase(parse_args, args) {
101  }
102 
103  DLLLOCAL AbstractFunctionCallNode(const AbstractFunctionCallNode& old) : ParseNode(old), FunctionCallBase(old) {
104  }
105 
106  DLLLOCAL AbstractFunctionCallNode(const AbstractFunctionCallNode& old, QoreListNode* n_args) : ParseNode(old), FunctionCallBase(old, n_args), tmp_args(true) {
107  }
108 
109  DLLLOCAL virtual ~AbstractFunctionCallNode() {
110  // there could be an object here in the case of a background expression
111  if (args) {
112  ExceptionSink xsink;
113  args->deref(&xsink);
114  args = nullptr;
115  }
116  }
117 
118  // ns can be nullptr if the function is a method
119  DLLLOCAL int parseArgs(LocalVar* oflag, int pflag, QoreFunction* func, qore_ns_private* ns, const QoreTypeInfo*& returnTypeInfo) {
120  int lvids = parseArgsVariant(loc, oflag, pflag, func, ns, returnTypeInfo);
121  // clear "effect" flag if possible, only if QCF_CONSTANT is set on the variant or function
122  if (variant)
123  doFlags(variant->getFlags());
124  else if (func)
125  doFlags(func->parseGetUniqueFlags());
126  return lvids;
127  }
128 
129  DLLLOCAL virtual const char* getName() const = 0;
130 };
131 
132 class FunctionCallNode : public AbstractFunctionCallNode {
133 public:
134  DLLLOCAL FunctionCallNode(const FunctionCallNode& old, QoreListNode* args) : AbstractFunctionCallNode(old, args), fe(old.fe), pgm(old.pgm), finalized(old.finalized) {
135  }
136 
137  DLLLOCAL FunctionCallNode(const QoreProgramLocation* loc, const FunctionEntry* f, QoreParseListNode* a) : AbstractFunctionCallNode(loc, NT_FUNCTION_CALL, a), fe(f) {
138  }
139 
140  DLLLOCAL FunctionCallNode(const QoreProgramLocation* loc, const FunctionEntry* f, QoreListNode* a, QoreProgram* n_pgm) : AbstractFunctionCallNode(loc, NT_FUNCTION_CALL, nullptr, a), fe(f), pgm(n_pgm) {
141  }
142 
143  // normal function call constructor
144  DLLLOCAL FunctionCallNode(const QoreProgramLocation* loc, char* name, QoreParseListNode* a) : AbstractFunctionCallNode(loc, NT_FUNCTION_CALL, a), c_str(name) {
145  }
146 
147  DLLLOCAL virtual ~FunctionCallNode() {
148  printd(5, "FunctionCallNode::~FunctionCallNode(): fe: %p c_str: %p (%s) args: %p\n", fe, c_str, c_str ? c_str : "n/a", args);
149  if (c_str)
150  free(c_str);
151  }
152 
153  DLLLOCAL virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const;
154  DLLLOCAL virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const;
155 
156  // returns the type name as a c string
157  DLLLOCAL virtual const char* getTypeName() const {
158  return "function call";
159  }
160 
161  DLLLOCAL QoreProgram* getProgram() const {
162  return const_cast<QoreProgram*>(pgm);
163  }
164 
165  DLLLOCAL void parseInitCall(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo);
166 
167  DLLLOCAL void parseInitFinalizedCall(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo);
168 
169  DLLLOCAL virtual const char* getName() const {
170  return fe ? fe->getName() : c_str;
171  }
172 
173  DLLLOCAL const QoreFunction* getFunction() const {
174  return fe ? fe->getFunction() : nullptr;
175  }
176 
177  // FIXME: delete when unresolved function call node implemented properly
178  DLLLOCAL char* takeName() {
179  char* str = c_str;
180  c_str = 0;
181  return str;
182  }
183 
184  // FIXME: delete when unresolved function call node implemented properly
185  DLLLOCAL QoreParseListNode* takeParseArgs() {
186  QoreParseListNode* rv = parse_args;
187  parse_args = nullptr;
188  return rv;
189  }
190 
191  DLLLOCAL QoreListNode* takeArgs() {
192  QoreListNode* rv = args;
193  args = nullptr;
194  return rv;
195  }
196 
197  DLLLOCAL AbstractQoreNode* makeReferenceNodeAndDeref() {
198  if (args) {
199  parse_error(*loc, "argument given to call reference");
200  return this;
201  }
202 
203  assert(!fe);
204  AbstractQoreNode* rv = makeReferenceNodeAndDerefImpl();
205  deref();
206  return rv;
207  }
208 
209  DLLLOCAL virtual AbstractQoreNode* makeReferenceNodeAndDerefImpl();
210 
211  DLLLOCAL bool isFinalized() const {
212  return finalized;
213  }
214 
215  DLLLOCAL void setFinalized() {
216  finalized = true;
217  }
218 
219 protected:
220  const FunctionEntry* fe = nullptr;
221  QoreProgram* pgm = nullptr;
222  char* c_str = nullptr;
223  // was this call enclosed in parentheses (in which case it will not be converted to a method call)
224  bool finalized = false;
225 
226  using AbstractFunctionCallNode::evalImpl;
227  DLLLOCAL virtual QoreValue evalImpl(bool& needs_deref, ExceptionSink* xsink) const;
228 
229  DLLLOCAL FunctionCallNode(const QoreProgramLocation* loc, char* name, QoreParseListNode* a, qore_type_t n_type) : AbstractFunctionCallNode(loc, n_type, a), c_str(name), finalized(false) {
230  }
231 
232  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo);
233 
234  DLLLOCAL virtual const QoreTypeInfo* getTypeInfo() const {
235  return variant ? variant->parseGetReturnTypeInfo() : (fe ? fe->getFunction()->parseGetUniqueReturnTypeInfo() : nullptr);
236  }
237 };
238 
239 class ProgramFunctionCallNode : public FunctionCallNode {
240 public:
241  DLLLOCAL ProgramFunctionCallNode(const QoreProgramLocation* loc, char* name, QoreParseListNode* a) : FunctionCallNode(loc, name, a, NT_PROGRAM_FUNC_CALL) {
242  }
243 
244  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo) {
245  parseInitCall(val, oflag, pflag, lvids, typeInfo);
246  }
247 
248  DLLLOCAL virtual AbstractQoreNode* makeReferenceNodeAndDerefImpl();
249 };
250 
251 class AbstractMethodCallNode : public AbstractFunctionCallNode {
252 protected:
253  // if a method pointer can be resolved at parse time, then the class
254  // is used to compare the runtime class; if they are equal, then no search
255  // is needed
256  const QoreClass* qc;
257  const QoreMethod* method;
258 
259  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo) = 0;
260 
261  DLLLOCAL virtual const QoreTypeInfo* getTypeInfo() const;
262 
263 public:
264  DLLLOCAL AbstractMethodCallNode(const QoreProgramLocation* loc, qore_type_t t, QoreParseListNode* n_args, const QoreClass* n_qc = nullptr, const QoreMethod* m = nullptr) : AbstractFunctionCallNode(loc, t, n_args), qc(n_qc), method(m) {
265  }
266 
267  DLLLOCAL AbstractMethodCallNode(const AbstractMethodCallNode& old) : AbstractFunctionCallNode(old), qc(old.qc), method(old.method) {
268  }
269 
270  DLLLOCAL AbstractMethodCallNode(const AbstractMethodCallNode& old, QoreListNode* n_args) : AbstractFunctionCallNode(old, n_args), qc(old.qc), method(old.method) {
271  }
272 
273  DLLLOCAL QoreValue exec(QoreObject* o, const char* cstr, const qore_class_private* ctx, ExceptionSink* xsink) const;
274 
275  DLLLOCAL const QoreClass* getClass() const {
276  return qc;
277  }
278 
279  DLLLOCAL const QoreMethod* getMethod() const {
280  return method;
281  }
282 };
283 
284 class MethodCallNode : public AbstractMethodCallNode {
285 protected:
286  char* c_str;
287  const QoreTypeInfo* pseudoTypeInfo = nullptr;
288  bool pseudo = false;
289 
290  using AbstractFunctionCallNode::evalImpl;
291  DLLLOCAL virtual QoreValue evalImpl(bool& needs_deref, ExceptionSink* xsink) const {
292  assert(false);
293  return QoreValue();
294  }
295 
296  // note that the class and method are set in QoreDotEvalOperatorNode::parseInitImpl()
297  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo) {
298  typeInfo = nullptr;
299  lvids += parseArgs(oflag, pflag, nullptr, nullptr, typeInfo);
300  }
301 
302 public:
303  DLLLOCAL MethodCallNode(const QoreProgramLocation* loc, char* name, QoreParseListNode* n_args) : AbstractMethodCallNode(loc, NT_METHOD_CALL, n_args), c_str(name) {
304  //printd(0, "MethodCallNode::MethodCallNode() this=%p name='%s' args=%p (len=%d)\n", this, c_str, args, args ? args->size() : -1);
305  }
306 
307  DLLLOCAL MethodCallNode(const MethodCallNode &old, QoreListNode* n_args) : AbstractMethodCallNode(old, n_args), c_str(old.c_str ? strdup(old.c_str) : nullptr), pseudo(old.pseudo) {
308  }
309 
310  DLLLOCAL virtual ~MethodCallNode() {
311  if (c_str)
312  free(c_str);
313  }
314 
315  using AbstractMethodCallNode::exec;
316  DLLLOCAL QoreValue exec(QoreObject* o, ExceptionSink* xsink) const;
317 
318  DLLLOCAL QoreValue execPseudo(const QoreValue n, ExceptionSink* xsink) const;
319 
320  DLLLOCAL virtual const char* getName() const {
321  return c_str ? c_str : "copy";
322  }
323 
324  DLLLOCAL const char* getRawName() const {
325  return c_str;
326  }
327 
328  DLLLOCAL virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const {
329  str.sprintf("'%s' %smethod call (%p)", getName(), pseudo ? "pseudo " : "", this);
330  return 0;
331  }
332 
333  DLLLOCAL virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const {
334  del = true;
335  QoreString* rv = new QoreString();
336  getAsString(*rv, foff, xsink);
337  return rv;
338  }
339 
340  DLLLOCAL char* takeName() {
341  char* rv = c_str;
342  c_str = 0;
343  return rv;
344  }
345 
346  // returns the type name as a c string
347  DLLLOCAL virtual const char* getTypeName() const {
348  return getStaticTypeName();
349  }
350 
351  DLLLOCAL static const char* getStaticTypeName() {
352  return "method call";
353  }
354 
355  DLLLOCAL void parseSetClassAndMethod(const QoreClass* n_qc, const QoreMethod* n_method) {
356  assert(!qc);
357  assert(!method);
358  qc = n_qc;
359  method = n_method;
360  assert(qc);
361  assert(method);
362  }
363 
364  DLLLOCAL void setPseudo(const QoreTypeInfo* pti) {
365  assert(!pseudo && !pseudoTypeInfo);
366  pseudo = true;
367  pseudoTypeInfo = pti;
368  }
369 
370  DLLLOCAL bool isPseudo() const {
371  return pseudo;
372  }
373 
374  DLLLOCAL const QoreTypeInfo* getPseudoTypeInfo() const {
375  return pseudoTypeInfo;
376  }
377 };
378 
379 class SelfFunctionCallNode : public AbstractMethodCallNode {
380 protected:
381  NamedScope ns;
382  const qore_class_private* class_ctx = nullptr;
383  bool is_copy;
384 
385  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo);
386 
387 public:
388  DLLLOCAL SelfFunctionCallNode(const QoreProgramLocation* loc, char* n, QoreParseListNode* n_args) : AbstractMethodCallNode(loc, NT_SELF_CALL, n_args, parse_get_class()), ns(n), is_copy(false) {
389  }
390 
391  DLLLOCAL SelfFunctionCallNode(const QoreProgramLocation* loc, char* n, QoreParseListNode* n_args,
392  const QoreMethod* m, const QoreClass* n_qc, const qore_class_private* class_ctx) :
393  AbstractMethodCallNode(loc, NT_SELF_CALL, n_args, n_qc, m), ns(n),
394  class_ctx(class_ctx), is_copy(false) {
395  }
396 
397  DLLLOCAL SelfFunctionCallNode(const QoreProgramLocation* loc, char* n, QoreParseListNode* n_args, const QoreClass* n_qc) : AbstractMethodCallNode(loc, NT_SELF_CALL, n_args, n_qc), ns(n), is_copy(false) {
398  }
399 
400  DLLLOCAL SelfFunctionCallNode(const QoreProgramLocation* loc, NamedScope* n_ns, QoreParseListNode* n_args) : AbstractMethodCallNode(loc, NT_SELF_CALL, n_args, parse_get_class()), ns(n_ns), is_copy(false) {
401  }
402 
403  DLLLOCAL SelfFunctionCallNode(const SelfFunctionCallNode& old, QoreListNode* n_args) : AbstractMethodCallNode(old, n_args), ns(old.ns), is_copy(old.is_copy) {
404  }
405 
406  DLLLOCAL void parseInitCall(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& returnTypeInfo);
407 
408  DLLLOCAL virtual ~SelfFunctionCallNode() {
409  }
410 
411  DLLLOCAL virtual const char* getTypeName() const {
412  return "in-object method call";
413  }
414 
415  DLLLOCAL virtual const char* getName() const {
416  return ns.ostr;
417  }
418 
419  using AbstractFunctionCallNode::evalImpl;
420  DLLLOCAL virtual QoreValue evalImpl(bool& needs_deref, ExceptionSink* xsink) const;
421 
422  DLLLOCAL virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const;
423  DLLLOCAL virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const;
424 
425  DLLLOCAL AbstractQoreNode* makeReferenceNodeAndDeref();
426 };
427 
428 class StaticMethodCallNode : public AbstractFunctionCallNode {
429 protected:
430  NamedScope* scope = nullptr;
431  const QoreMethod* method = nullptr;
432 
433  using AbstractFunctionCallNode::evalImpl;
434  DLLLOCAL virtual QoreValue evalImpl(bool& needs_deref, ExceptionSink* xsink) const;
435 
436  DLLLOCAL virtual void parseInitImpl(QoreValue& val, LocalVar* oflag, int pflag, int& lvids, const QoreTypeInfo*& typeInfo);
437 
438  DLLLOCAL virtual const QoreTypeInfo* getTypeInfo() const;
439 
440 public:
441  DLLLOCAL StaticMethodCallNode(const QoreProgramLocation* loc, NamedScope* n_scope, QoreParseListNode* args) : AbstractFunctionCallNode(loc, NT_STATIC_METHOD_CALL, args), scope(n_scope) {
442  }
443 
444  // used when copying (for background expressions with processed arguments)
445  DLLLOCAL StaticMethodCallNode(const StaticMethodCallNode& old, QoreListNode* args) : AbstractFunctionCallNode(old, args), method(old.method) {
446  }
447 
448  DLLLOCAL StaticMethodCallNode(const QoreProgramLocation* loc, const QoreMethod* m, QoreParseListNode* args) : AbstractFunctionCallNode(loc, NT_STATIC_METHOD_CALL, args), method(m) {
449  }
450 
451  DLLLOCAL virtual ~StaticMethodCallNode() {
452  delete scope;
453  }
454 
455  DLLLOCAL const QoreMethod* getMethod() const {
456  return method;
457  }
458 
459  DLLLOCAL virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const {
460  str.sprintf("static method call %s::%s() (%p)", method->getClass()->getName(), method->getName(), this);
461  return 0;
462  }
463 
464  DLLLOCAL virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const {
465  del = true;
466  QoreString* rv = new QoreString();
467  getAsString(*rv, foff, xsink);
468  return rv;
469  }
470 
471  DLLLOCAL virtual const char* getName() const {
472  return method->getName();
473  }
474 
475  // returns the type name as a c string
476  DLLLOCAL virtual const char* getTypeName() const {
477  return getStaticTypeName();
478  }
479 
480  DLLLOCAL AbstractQoreNode* makeReferenceNodeAndDeref();
481 
482  DLLLOCAL static const char* getStaticTypeName() {
483  return "static method call";
484  }
485 
486  DLLLOCAL NamedScope* takeScope() {
487  NamedScope* rv = scope;
488  scope = 0;
489  return rv;
490  }
491 
492  DLLLOCAL QoreParseListNode* takeParseArgs() {
493  QoreParseListNode* rv = parse_args;
494  parse_args = nullptr;
495  return rv;
496  }
497 };
498 
499 #endif
NT_STATIC_METHOD_CALL
const qore_type_t NT_STATIC_METHOD_CALL
type value for StaticMethodCallNode (private class)
Definition: node_types.h:74
NT_METHOD_CALL
const qore_type_t NT_METHOD_CALL
type value for MethodCallNode (private class)
Definition: node_types.h:73
AbstractQoreNode::needs_eval
DLLLOCAL bool needs_eval() const
returns true if the object needs evaluation to return a value, false if not
Definition: AbstractQoreNode.h:142
NT_PROGRAM_FUNC_CALL
const qore_type_t NT_PROGRAM_FUNC_CALL
type value for ProgramFunctionCallNode (private class)
Definition: node_types.h:79
QoreProgram
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition: QoreProgram.h:126
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262
QoreMethod::getName
const DLLEXPORT char * getName() const
returns the method's name
QoreClass
defines a Qore-language class
Definition: QoreClass.h:239
NT_SELF_CALL
const qore_type_t NT_SELF_CALL
type value for SelfFunctionCallNode (private class)
Definition: node_types.h:75
QoreClass::getName
const DLLEXPORT char * getName() const
returns the class name
QoreListNode
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
int64
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260
QoreString::sprintf
DLLEXPORT int sprintf(const char *fmt,...)
this will concatentate a formatted string to the existing string according to the format string and t...
QoreString
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:81
NT_FUNCTION_CALL
const qore_type_t NT_FUNCTION_CALL
type value for FunctionCallNode
Definition: node_types.h:59
QoreObject
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:61
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreMethod::getClass
const DLLEXPORT QoreClass * getClass() const
returns a pointer to the parent class
Qore.h
AbstractQoreNode::deref
DLLEXPORT void deref(ExceptionSink *xsink)
decrements the reference count and calls derefImpl() if there_can_be_only_one is false,...
QoreMethod
a method in a QoreClass
Definition: QoreClass.h:125
getProgram
DLLEXPORT QoreProgram * getProgram()
returns the current QoreProgram
AbstractQoreNode
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:54
qore_type_t
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode)
Definition: common.h:70