| Qore Programming Language - C/C++ Library 0.9.14

QoreNamespace.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3 QoreNamespace.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 /*
33 namespaces are children of a program object. there is a parse
34 lock per program object to ensure that objects are added (or backed out)
35 atomically per program object. All the objects referenced here should
36 be safe to read & copied at all times. They will only be deleted when the
37 program object is deleted (except the pending structures, which will be
38 deleted any time there is a parse error, together with all other
39 pending structures)
40 */
41
42 #ifndef _QORE_QORENAMESPACE_H
43
44 #define _QORE_QORENAMESPACE_H
45
46 #include <cstdlib>
47 #include <cstring>
48 #include <string>
49
50 // forward declarations
51 class QoreExternalFunction;
52 class QoreExternalConstant;
53 class QoreExternalGlobalVar;
54 class QoreProgram;
55
57
62 typedef QoreClass* (*q_ns_class_handler_t)(QoreNamespace* ns, const char* cname);
63
65 class QoreNamespace {
66 friend class QoreNamespaceList;
67 friend class RootQoreNamespace;
68 friend class qore_ns_private;
69 friend class qore_root_ns_private;
70 friend struct NSOInfoBase;
71
72 public:
74
77 DLLEXPORT QoreNamespace(const char* n);
78
80 DLLEXPORT virtual ~QoreNamespace();
81
83
87 DLLEXPORT void clear(ExceptionSink* xsink);
88
90
96 DLLEXPORT void addConstant(const char* name, QoreValue value);
97
99
105 DLLEXPORT void addConstant(const char* name, QoreValue value, const QoreTypeInfo* typeInfo);
106
108
111 DLLEXPORT void addSystemClass(QoreClass* oc);
112
114
119 DLLEXPORT void addSystemHashDecl(TypedHashDecl* hashdecl);
120
122
125 DLLEXPORT QoreNamespace* copy(int po) const;
126
128
131 DLLEXPORT QoreNamespace* copy(int64 po = PO_DEFAULT) const;
132
134
139 DLLEXPORT QoreHashNode* getClassInfo() const;
140
142
147 DLLEXPORT QoreHashNode* getConstantInfo() const;
148
150
156 DLLEXPORT QoreHashNode* getInfo() const;
157
159
162 DLLEXPORT const char* getName() const;
163
165
168 DLLEXPORT void addNamespace(QoreNamespace* ns);
169
171
176 DLLEXPORT void addInitialNamespace(QoreNamespace* ns);
177
179
191 DLLEXPORT QoreNamespace* findCreateNamespacePath(const char* nspath);
192
194
206 DLLEXPORT QoreNamespace* findCreateNamespacePathAll(const char* nspath);
207
209
215 DLLEXPORT QoreClass* findLocalClass(const char* cname) const;
216
218
226 DLLEXPORT QoreClass* findLoadLocalClass(const char* cname);
227
229
233 DLLEXPORT QoreNamespace* findLocalNamespace(const char* nsname) const;
234
236
239 DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler);
240
242
244 DLLEXPORT const QoreNamespace* getParent() const;
245
247 DLLEXPORT void deleteData(ExceptionSink* xsink);
248
250 DLLEXPORT void addBuiltinVariant(const char* name, q_func_n_t f, int64 code_flags = QCF_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
251
253
255 DLLEXPORT void addBuiltinVariant(void* ptr, const char* name, q_external_func_t f,
256 int64 code_flags = QCF_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT,
257 const QoreTypeInfo* returnTypeInfo = nullptr, unsigned num_params = 0, ...);
258
260
262 DLLEXPORT const QoreExternalFunction* findLocalFunction(const char* name) const;
263
265
267 DLLEXPORT const QoreExternalConstant* findLocalConstant(const char* name) const;
268
270
272 DLLEXPORT const QoreExternalGlobalVar* findLocalGlobalVar(const char* name) const;
273
275
277 DLLEXPORT const TypedHashDecl* findLocalTypedHash(const char* name) const;
278
280
284 DLLEXPORT std::string getPath(bool anchored = false) const;
285
287
289 DLLEXPORT bool isModulePublic() const;
290
292
294 DLLEXPORT bool isBuiltin() const;
295
297
299 DLLEXPORT bool isImported() const;
300
302
304 DLLEXPORT bool isRoot() const;
305
307
309 DLLEXPORT QoreProgram* getProgram() const;
310
312
314 DLLEXPORT const char* getModuleName() const;
315
316 private:
318 QoreNamespace(const QoreNamespace&) = delete;
319
321 QoreNamespace& operator=(const QoreNamespace&) = delete;
322
323 protected:
324 class qore_ns_private* priv; // private implementation
325
326 // protected, function not exported in the API
327 DLLLOCAL QoreNamespace(qore_ns_private* p);
328 };
329
331
335 class RootQoreNamespace : public QoreNamespace {
336 friend class qore_ns_private;
337 friend class qore_root_ns_private;
338 friend class StaticSystemNamespace;
339
340 public:
342
345 DLLEXPORT QoreNamespace* rootGetQoreNamespace() const;
346
348 DLLLOCAL virtual ~RootQoreNamespace();
349
351
353 DLLEXPORT QoreProgram* getProgram() const;
354
355 protected:
356 // private implementation
357 class qore_root_ns_private* rpriv;
358
359 private:
361 RootQoreNamespace(const RootQoreNamespace&) = delete;
362
364 RootQoreNamespace& operator=(const RootQoreNamespace&) = delete;
365
366 DLLLOCAL RootQoreNamespace(class qore_root_ns_private* p);
367 };
368
369 class QorePrivateNamespaceIterator;
370
372
374 class QoreNamespaceIterator {
375 public:
377 DLLEXPORT QoreNamespaceIterator(QoreNamespace& ns);
378
380 DLLEXPORT virtual ~QoreNamespaceIterator();
381
383 DLLEXPORT bool next();
384
386 DLLEXPORT QoreNamespace* operator->();
387
389 DLLEXPORT QoreNamespace* operator*();
390
392 DLLEXPORT QoreNamespace& get();
393
395 DLLEXPORT const QoreNamespace* operator->() const;
397 DLLEXPORT const QoreNamespace* operator*() const;
398
400 DLLEXPORT const QoreNamespace& get() const;
401
402 private:
404 QoreNamespaceIterator(const QoreNamespaceIterator&) = delete;
405
407 QoreNamespaceIterator& operator=(const QoreNamespaceIterator&) = delete;
408
409 QorePrivateNamespaceIterator* priv;
410 };
411
413
415 class QoreNamespaceConstIterator {
416 public:
418 DLLEXPORT QoreNamespaceConstIterator(const QoreNamespace& ns);
419
421 DLLEXPORT virtual ~QoreNamespaceConstIterator();
422
424 DLLEXPORT bool next();
425
427 DLLEXPORT const QoreNamespace* operator->() const;
428
430 DLLEXPORT const QoreNamespace* operator*() const;
431
433 DLLEXPORT const QoreNamespace& get() const;
434
435 private:
437 QoreNamespaceConstIterator(const QoreNamespaceConstIterator&) = delete;
438
440 QoreNamespaceConstIterator& operator=(const QoreNamespaceConstIterator&) = delete;
441
442 QorePrivateNamespaceIterator* priv;
443 };
444
446
448 class QoreNamespaceNamespaceIterator {
449 public:
451 DLLEXPORT QoreNamespaceNamespaceIterator(const QoreNamespace& ns);
452
454 DLLEXPORT virtual ~QoreNamespaceNamespaceIterator();
455
457 DLLEXPORT bool next();
458
460 DLLEXPORT const QoreNamespace& get() const;
461
462 private:
464 QoreNamespaceNamespaceIterator(const QoreNamespaceNamespaceIterator&) = delete;
465
467 QoreNamespaceNamespaceIterator& operator=(const QoreNamespaceNamespaceIterator&) = delete;
468
469 class qore_namespace_namespace_iterator* priv;
470 };
471
473
475 class QoreNamespaceFunctionIterator {
476 public:
478 DLLEXPORT QoreNamespaceFunctionIterator(const QoreNamespace& ns);
479
481 DLLEXPORT virtual ~QoreNamespaceFunctionIterator();
482
484 DLLEXPORT bool next();
485
487 DLLEXPORT const QoreExternalFunction& get() const;
488
489 private:
491 QoreNamespaceFunctionIterator(const QoreNamespaceFunctionIterator&) = delete;
492
494 QoreNamespaceFunctionIterator& operator=(const QoreNamespaceFunctionIterator&) = delete;
495
496 class qore_namespace_function_iterator* priv;
497 };
498
500
502 class QoreNamespaceConstantIterator {
503 public:
505 DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace& ns);
506
508 DLLEXPORT virtual ~QoreNamespaceConstantIterator();
509
511 DLLEXPORT bool next();
512
514 DLLEXPORT const QoreExternalConstant& get() const;
515
516 private:
518 QoreNamespaceConstantIterator(const QoreNamespaceConstantIterator&) = delete;
519
521 QoreNamespaceConstantIterator& operator=(const QoreNamespaceConstantIterator&) = delete;
522
523 class qore_namespace_constant_iterator* priv;
524 };
525
527
529 class QoreNamespaceClassIterator {
530 public:
532 DLLEXPORT QoreNamespaceClassIterator(const QoreNamespace& ns);
533
535 DLLEXPORT virtual ~QoreNamespaceClassIterator();
536
538 DLLEXPORT bool next();
539
541 DLLEXPORT const QoreClass& get() const;
542
543 private:
545 QoreNamespaceClassIterator(const QoreNamespaceClassIterator&) = delete;
546
548 QoreNamespaceClassIterator& operator=(const QoreNamespaceClassIterator&) = delete;
549
550 class ConstClassListIterator* priv;
551 };
552
554
556 class QoreNamespaceGlobalVarIterator {
557 public:
559 DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace& ns);
560
562 DLLEXPORT virtual ~QoreNamespaceGlobalVarIterator();
563
565 DLLEXPORT bool next();
566
568 DLLEXPORT const QoreExternalGlobalVar& get() const;
569
570 private:
572 QoreNamespaceGlobalVarIterator(const QoreNamespaceGlobalVarIterator&) = delete;
573
575 QoreNamespaceGlobalVarIterator& operator=(const QoreNamespaceGlobalVarIterator&) = delete;
576
577 class qore_namespace_globalvar_iterator* priv;
578 };
579
581
583 class QoreNamespaceTypedHashIterator {
584 public:
586 DLLEXPORT QoreNamespaceTypedHashIterator(const QoreNamespace& ns);
587
589 DLLEXPORT virtual ~QoreNamespaceTypedHashIterator();
590
592 DLLEXPORT bool next();
593
595 DLLEXPORT const TypedHashDecl& get() const;
596
597 private:
599 QoreNamespaceTypedHashIterator(const QoreNamespaceTypedHashIterator&) = delete;
600
602 QoreNamespaceTypedHashIterator& operator=(const QoreNamespaceTypedHashIterator&) = delete;
603
604 class ConstHashDeclListIterator* priv;
605 };
606
607 #endif // QORE_NAMESPACE_H
QDOM_DEFAULT
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:156
PO_DEFAULT
#define PO_DEFAULT
no parse options set by default
Definition: Restrictions.h:106
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreClass
defines a Qore-language class
Definition: QoreClass.h:239
QoreExternalConstant
external wrapper class for constants
Definition: QoreReflection.h:200
QoreHashNode
This is the hash or associative list container type in Qore, dynamically allocated only,...
Definition: QoreHashNode.h:50
QoreNamespaceClassIterator
allows classes in a namespace to be iterated
Definition: QoreNamespace.h:529
QoreNamespaceClassIterator::~QoreNamespaceClassIterator
virtual DLLEXPORT ~QoreNamespaceClassIterator()
destroys the object
QoreNamespaceClassIterator::get
DLLEXPORT const QoreClass & get() const
returns the class
QoreNamespaceClassIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceClassIterator::QoreNamespaceClassIterator
DLLEXPORT QoreNamespaceClassIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceConstIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:415
QoreNamespaceConstIterator::~QoreNamespaceConstIterator
virtual DLLEXPORT ~QoreNamespaceConstIterator()
destroys the object
QoreNamespaceConstIterator::QoreNamespaceConstIterator
DLLEXPORT QoreNamespaceConstIterator(const QoreNamespace &ns)
creates the iterator; the namespace given will also be included in the iteration set
QoreNamespaceConstIterator::operator->
DLLEXPORT const QoreNamespace * operator->() const
returns the namespace
QoreNamespaceConstIterator::operator*
DLLEXPORT const QoreNamespace * operator*() const
returns the namespace
QoreNamespaceConstIterator::get
DLLEXPORT const QoreNamespace & get() const
returns the namespace
QoreNamespaceConstIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceConstantIterator
allows constants in a namespace to be iterated
Definition: QoreNamespace.h:502
QoreNamespaceConstantIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceConstantIterator::~QoreNamespaceConstantIterator
virtual DLLEXPORT ~QoreNamespaceConstantIterator()
destroys the object
QoreNamespaceConstantIterator::QoreNamespaceConstantIterator
DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceConstantIterator::get
DLLEXPORT const QoreExternalConstant & get() const
returns the constant
QoreNamespaceFunctionIterator
allows functions in a namespace to be iterated
Definition: QoreNamespace.h:475
QoreNamespaceFunctionIterator::get
DLLEXPORT const QoreExternalFunction & get() const
returns the function
QoreNamespaceFunctionIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceFunctionIterator::QoreNamespaceFunctionIterator
DLLEXPORT QoreNamespaceFunctionIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceFunctionIterator::~QoreNamespaceFunctionIterator
virtual DLLEXPORT ~QoreNamespaceFunctionIterator()
destroys the object
QoreNamespaceGlobalVarIterator
allows global variables in a namespace to be iterated
Definition: QoreNamespace.h:556
QoreNamespaceGlobalVarIterator::QoreNamespaceGlobalVarIterator
DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceGlobalVarIterator::get
DLLEXPORT const QoreExternalGlobalVar & get() const
returns the global variable
QoreNamespaceGlobalVarIterator::~QoreNamespaceGlobalVarIterator
virtual DLLEXPORT ~QoreNamespaceGlobalVarIterator()
destroys the object
QoreNamespaceGlobalVarIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespace
contains constants, classes, and subnamespaces in QoreProgram objects
Definition: QoreNamespace.h:65
QoreNamespace::addNamespace
DLLEXPORT void addNamespace(QoreNamespace *ns)
adds a namespace to the namespace tree
QoreNamespace::findLocalNamespace
DLLEXPORT QoreNamespace * findLocalNamespace(const char *nsname) const
finds a subnamespace in this namespace, does not search child namespaces
QoreNamespace::getClassInfo
DLLEXPORT QoreHashNode * getClassInfo() const
gets a hash of all classes in the namespace, the hash keys are the class names and the values are lis...
QoreNamespace::isRoot
DLLEXPORT bool isRoot() const
returns true if the namespace is the root namespace
QoreNamespace::addSystemClass
DLLEXPORT void addSystemClass(QoreClass *oc)
adds a class to a namespace
QoreNamespace::getInfo
DLLEXPORT QoreHashNode * getInfo() const
returns a hash giving information about the definitions in the namespace
QoreNamespace::copy
DLLEXPORT QoreNamespace * copy(int po) const
returns a deep copy of the namespace; DEPRECATED: use copy(int64) instead
QoreNamespace::isBuiltin
DLLEXPORT bool isBuiltin() const
returns true if the namespace is builtin
QoreNamespace::findLocalTypedHash
DLLEXPORT const TypedHashDecl * findLocalTypedHash(const char *name) const
find a typed hash (hashdecl) in the current namespace; returns nullptr if not found
QoreNamespace::addBuiltinVariant
DLLEXPORT void addBuiltinVariant(const char *name, q_func_n_t f, int64 code_flags=QCF_NO_FLAGS, int64 functional_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a function variant
QoreNamespace::findLocalFunction
DLLEXPORT const QoreExternalFunction * findLocalFunction(const char *name) const
find a function in the current namespace; returns nullptr if not found
QoreNamespace::deleteData
DLLEXPORT void deleteData(ExceptionSink *xsink)
this function must be called before the QoreNamespace object is deleted or a crash could result due i...
QoreNamespace::addConstant
DLLEXPORT void addConstant(const char *name, QoreValue value)
adds a constant definition to the namespace
QoreNamespace::getName
DLLEXPORT const char * getName() const
returns the name of the namespace
QoreNamespace::findCreateNamespacePathAll
DLLEXPORT QoreNamespace * findCreateNamespacePathAll(const char *nspath)
finds a Namespace based on the argument; creates it (or the whole path) if necessary
QoreNamespace::getPath
DLLEXPORT std::string getPath(bool anchored=false) const
returns the path for the namespace
QoreNamespace::findLocalConstant
DLLEXPORT const QoreExternalConstant * findLocalConstant(const char *name) const
find a constant in the current namespace; returns nullptr if not found
QoreNamespace::findCreateNamespacePath
DLLEXPORT QoreNamespace * findCreateNamespacePath(const char *nspath)
finds a Namespace based on the argument; creates it (or the whole path) if necessary
QoreNamespace::getParent
DLLEXPORT const QoreNamespace * getParent() const
returns a pointer to the parent namespace or nullptr if there is no parent
QoreNamespace::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
QoreNamespace::addSystemHashDecl
DLLEXPORT void addSystemHashDecl(TypedHashDecl *hashdecl)
adds a hashdecl to a namespace
QoreNamespace::setClassHandler
DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler)
sets the namespace class handler
QoreNamespace::getModuleName
DLLEXPORT const char * getModuleName() const
Returns the module name the class was loaded from or nullptr if it is a builtin namespace.
QoreNamespace::QoreNamespace
DLLEXPORT QoreNamespace(const char *n)
creates a namespace with the given name
QoreNamespace::clear
DLLEXPORT void clear(ExceptionSink *xsink)
clears the contents of the namespace before deleting
QoreNamespace::findLocalGlobalVar
DLLEXPORT const QoreExternalGlobalVar * findLocalGlobalVar(const char *name) const
find a global variable in the current namespace; returns nullptr if not found
QoreNamespace::getConstantInfo
DLLEXPORT QoreHashNode * getConstantInfo() const
a hash of all constants in the namespace, the hash keys are the constant names and the values are the...
QoreNamespace::findLoadLocalClass
DLLEXPORT QoreClass * findLoadLocalClass(const char *cname)
finds a class in this namespace, does not search child namespaces
QoreNamespace::~QoreNamespace
virtual DLLEXPORT ~QoreNamespace()
destroys the object and frees memory
QoreNamespace::addInitialNamespace
DLLEXPORT void addInitialNamespace(QoreNamespace *ns)
adds a subnamespace to the namespace
QoreNamespace::isModulePublic
DLLEXPORT bool isModulePublic() const
returns true if the namespace has its module public flag set
QoreNamespace::isImported
DLLEXPORT bool isImported() const
returns true if the namespace was imported from another program object
QoreNamespace::findLocalClass
DLLEXPORT QoreClass * findLocalClass(const char *cname) const
finds a class in this namespace, does not search child namespaces
QoreNamespaceIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:374
QoreNamespaceIterator::operator*
DLLEXPORT QoreNamespace * operator*()
returns the namespace
QoreNamespaceIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceIterator::operator->
DLLEXPORT QoreNamespace * operator->()
returns the namespace
QoreNamespaceIterator::get
DLLEXPORT QoreNamespace & get()
returns the namespace
QoreNamespaceIterator::~QoreNamespaceIterator
virtual DLLEXPORT ~QoreNamespaceIterator()
destroys the object
QoreNamespaceIterator::QoreNamespaceIterator
DLLEXPORT QoreNamespaceIterator(QoreNamespace &ns)
creates the iterator; the namespace given will also be included in the iteration set
QoreNamespaceNamespaceIterator
allows local namespaces to be iterated
Definition: QoreNamespace.h:448
QoreNamespaceNamespaceIterator::~QoreNamespaceNamespaceIterator
virtual DLLEXPORT ~QoreNamespaceNamespaceIterator()
destroys the object
QoreNamespaceNamespaceIterator::get
DLLEXPORT const QoreNamespace & get() const
returns the namespace
QoreNamespaceNamespaceIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceNamespaceIterator::QoreNamespaceNamespaceIterator
DLLEXPORT QoreNamespaceNamespaceIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceTypedHashIterator
allows typed hashes (hashdecls) in a namespace to be iterated
Definition: QoreNamespace.h:583
QoreNamespaceTypedHashIterator::get
DLLEXPORT const TypedHashDecl & get() const
returns the typed hash (hashdecl)
QoreNamespaceTypedHashIterator::~QoreNamespaceTypedHashIterator
virtual DLLEXPORT ~QoreNamespaceTypedHashIterator()
destroys the object
QoreNamespaceTypedHashIterator::QoreNamespaceTypedHashIterator
DLLEXPORT QoreNamespaceTypedHashIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceTypedHashIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreProgram
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only
Definition: QoreProgram.h:126
RootQoreNamespace
the root namespace of a QoreProgram object
Definition: QoreNamespace.h:335
RootQoreNamespace::rootGetQoreNamespace
DLLEXPORT QoreNamespace * rootGetQoreNamespace() const
returns a pointer to the QoreNamespace for the "Qore" namespace
RootQoreNamespace::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
RootQoreNamespace::~RootQoreNamespace
virtual DLLLOCAL ~RootQoreNamespace()
destructor is not exported in the library's public API
TypedHashDecl
typed hash declaration
Definition: TypedHashDecl.h:44
q_func_n_t
QoreValue(* q_func_n_t)(const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures
Definition: common.h:307
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
q_external_func_t
QoreValue(* q_external_func_t)(const void *ptr, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures for external functions
Definition: common.h:319
num_params
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:54
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262