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

QoreNamespace.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3 QoreNamespace.h
4
5 Qore Programming Language
6
7 Copyright (C) 2003 - 2021 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
85 DLLEXPORT QoreNamespace(const QoreNamespace& old, int64 po);
86
88 DLLEXPORT virtual ~QoreNamespace();
89
91
95 DLLEXPORT void clear(ExceptionSink* xsink);
96
98
104 DLLEXPORT void addConstant(const char* name, QoreValue value);
105
107
113 DLLEXPORT void addConstant(const char* name, QoreValue value, const QoreTypeInfo* typeInfo);
114
116
119 DLLEXPORT void addSystemClass(QoreClass* oc);
120
122
127 DLLEXPORT void addSystemHashDecl(TypedHashDecl* hashdecl);
128
130
133 DLLEXPORT QoreNamespace* copy(int64 po = PO_DEFAULT) const;
134
136
141 DLLEXPORT QoreHashNode* getClassInfo() const;
142
144
149 DLLEXPORT QoreHashNode* getConstantInfo() const;
150
152
158 DLLEXPORT QoreHashNode* getInfo() const;
159
161
164 DLLEXPORT const char* getName() const;
165
167
170 DLLEXPORT void addNamespace(QoreNamespace* ns);
171
173
178 DLLEXPORT void addInitialNamespace(QoreNamespace* ns);
179
181
193 DLLEXPORT QoreNamespace* findCreateNamespacePath(const char* nspath);
194
196
208 DLLEXPORT QoreNamespace* findCreateNamespacePathAll(const char* nspath);
209
211
217 DLLEXPORT QoreClass* findLocalClass(const char* cname) const;
218
220
228 DLLEXPORT QoreClass* findLoadLocalClass(const char* cname);
229
231
235 DLLEXPORT QoreNamespace* findLocalNamespace(const char* nsname) const;
236
238
241 DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler);
242
244
246 DLLEXPORT const QoreNamespace* getParent() const;
247
249 DLLEXPORT void deleteData(ExceptionSink* xsink);
250
252 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, ...);
253
255
257 DLLEXPORT void addBuiltinVariant(void* ptr, const char* name, q_external_func_t f,
258 int64 code_flags = QCF_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT,
259 const QoreTypeInfo* returnTypeInfo = nullptr, unsigned num_params = 0, ...);
260
262
264 DLLEXPORT const QoreExternalFunction* findLocalFunction(const char* name) const;
265
267
269 DLLEXPORT const QoreExternalConstant* findLocalConstant(const char* name) const;
270
272
274 DLLEXPORT const QoreExternalGlobalVar* findLocalGlobalVar(const char* name) const;
275
277
279 DLLEXPORT const TypedHashDecl* findLocalTypedHash(const char* name) const;
280
282
286 DLLEXPORT std::string getPath(bool anchored = false) const;
287
289
291 DLLEXPORT bool isModulePublic() const;
292
294
296 DLLEXPORT bool isBuiltin() const;
297
299
301 DLLEXPORT bool isImported() const;
302
304
306 DLLEXPORT bool isRoot() const;
307
309
311 DLLEXPORT QoreProgram* getProgram() const;
312
314
316 DLLEXPORT const char* getModuleName() const;
317
318 private:
320 QoreNamespace(const QoreNamespace&) = delete;
321
323 QoreNamespace& operator=(const QoreNamespace&) = delete;
324
325 protected:
326 class qore_ns_private* priv; // private implementation
327
328 // protected, function not exported in the API
329 DLLLOCAL QoreNamespace(qore_ns_private* p);
330 };
331
333
337 class RootQoreNamespace : public QoreNamespace {
338 friend class qore_ns_private;
339 friend class qore_root_ns_private;
340 friend class StaticSystemNamespace;
341
342 public:
344
347 DLLEXPORT QoreNamespace* rootGetQoreNamespace() const;
348
350 DLLLOCAL virtual ~RootQoreNamespace();
351
353
355 DLLEXPORT QoreProgram* getProgram() const;
356
357 protected:
358 // private implementation
359 class qore_root_ns_private* rpriv;
360
361 private:
363 RootQoreNamespace(const RootQoreNamespace&) = delete;
364
366 RootQoreNamespace& operator=(const RootQoreNamespace&) = delete;
367
368 DLLLOCAL RootQoreNamespace(class qore_root_ns_private* p);
369 };
370
371 class QorePrivateNamespaceIterator;
372
374
376 class QoreNamespaceIterator {
377 public:
379 DLLEXPORT QoreNamespaceIterator(QoreNamespace& ns);
380
382 DLLEXPORT virtual ~QoreNamespaceIterator();
383
385 DLLEXPORT bool next();
386
388 DLLEXPORT QoreNamespace* operator->();
389
391 DLLEXPORT QoreNamespace* operator*();
392
394 DLLEXPORT QoreNamespace& get();
395
397 DLLEXPORT const QoreNamespace* operator->() const;
399 DLLEXPORT const QoreNamespace* operator*() const;
400
402 DLLEXPORT const QoreNamespace& get() const;
403
404 private:
406 QoreNamespaceIterator(const QoreNamespaceIterator&) = delete;
407
409 QoreNamespaceIterator& operator=(const QoreNamespaceIterator&) = delete;
410
411 QorePrivateNamespaceIterator* priv;
412 };
413
415
417 class QoreNamespaceConstIterator {
418 public:
420 DLLEXPORT QoreNamespaceConstIterator(const QoreNamespace& ns);
421
423 DLLEXPORT virtual ~QoreNamespaceConstIterator();
424
426 DLLEXPORT bool next();
427
429 DLLEXPORT const QoreNamespace* operator->() const;
430
432 DLLEXPORT const QoreNamespace* operator*() const;
433
435 DLLEXPORT const QoreNamespace& get() const;
436
437 private:
439 QoreNamespaceConstIterator(const QoreNamespaceConstIterator&) = delete;
440
442 QoreNamespaceConstIterator& operator=(const QoreNamespaceConstIterator&) = delete;
443
444 QorePrivateNamespaceIterator* priv;
445 };
446
448
450 class QoreNamespaceNamespaceIterator {
451 public:
453 DLLEXPORT QoreNamespaceNamespaceIterator(const QoreNamespace& ns);
454
456 DLLEXPORT virtual ~QoreNamespaceNamespaceIterator();
457
459 DLLEXPORT bool next();
460
462 DLLEXPORT const QoreNamespace& get() const;
463
464 private:
466 QoreNamespaceNamespaceIterator(const QoreNamespaceNamespaceIterator&) = delete;
467
469 QoreNamespaceNamespaceIterator& operator=(const QoreNamespaceNamespaceIterator&) = delete;
470
471 class qore_namespace_namespace_iterator* priv;
472 };
473
475
477 class QoreNamespaceFunctionIterator {
478 public:
480 DLLEXPORT QoreNamespaceFunctionIterator(const QoreNamespace& ns);
481
483 DLLEXPORT virtual ~QoreNamespaceFunctionIterator();
484
486 DLLEXPORT bool next();
487
489 DLLEXPORT const QoreExternalFunction& get() const;
490
491 private:
493 QoreNamespaceFunctionIterator(const QoreNamespaceFunctionIterator&) = delete;
494
496 QoreNamespaceFunctionIterator& operator=(const QoreNamespaceFunctionIterator&) = delete;
497
498 class qore_namespace_function_iterator* priv;
499 };
500
502
504 class QoreNamespaceConstantIterator {
505 public:
507 DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace& ns);
508
510 DLLEXPORT virtual ~QoreNamespaceConstantIterator();
511
513 DLLEXPORT bool next();
514
516 DLLEXPORT const QoreExternalConstant& get() const;
517
518 private:
520 QoreNamespaceConstantIterator(const QoreNamespaceConstantIterator&) = delete;
521
523 QoreNamespaceConstantIterator& operator=(const QoreNamespaceConstantIterator&) = delete;
524
525 class qore_namespace_constant_iterator* priv;
526 };
527
529
531 class QoreNamespaceClassIterator {
532 public:
534 DLLEXPORT QoreNamespaceClassIterator(const QoreNamespace& ns);
535
537 DLLEXPORT virtual ~QoreNamespaceClassIterator();
538
540 DLLEXPORT bool next();
541
543 DLLEXPORT const QoreClass& get() const;
544
545 private:
547 QoreNamespaceClassIterator(const QoreNamespaceClassIterator&) = delete;
548
550 QoreNamespaceClassIterator& operator=(const QoreNamespaceClassIterator&) = delete;
551
552 class ConstClassListIterator* priv;
553 };
554
556
558 class QoreNamespaceGlobalVarIterator {
559 public:
561 DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace& ns);
562
564 DLLEXPORT virtual ~QoreNamespaceGlobalVarIterator();
565
567 DLLEXPORT bool next();
568
570 DLLEXPORT const QoreExternalGlobalVar& get() const;
571
572 private:
574 QoreNamespaceGlobalVarIterator(const QoreNamespaceGlobalVarIterator&) = delete;
575
577 QoreNamespaceGlobalVarIterator& operator=(const QoreNamespaceGlobalVarIterator&) = delete;
578
579 class qore_namespace_globalvar_iterator* priv;
580 };
581
583
585 class QoreNamespaceTypedHashIterator {
586 public:
588 DLLEXPORT QoreNamespaceTypedHashIterator(const QoreNamespace& ns);
589
591 DLLEXPORT virtual ~QoreNamespaceTypedHashIterator();
592
594 DLLEXPORT bool next();
595
597 DLLEXPORT const TypedHashDecl& get() const;
598
599 private:
601 QoreNamespaceTypedHashIterator(const QoreNamespaceTypedHashIterator&) = delete;
602
604 QoreNamespaceTypedHashIterator& operator=(const QoreNamespaceTypedHashIterator&) = delete;
605
606 class ConstHashDeclListIterator* priv;
607 };
608
609 #endif // QORE_NAMESPACE_H
QoreNamespaceConstIterator::QoreNamespaceConstIterator
DLLEXPORT QoreNamespaceConstIterator(const QoreNamespace &ns)
creates the iterator; the namespace given will also be included in the iteration set ...
QoreNamespaceFunctionIterator
allows functions in a namespace to be iterated
Definition: QoreNamespace.h:477
QoreNamespaceConstIterator::operator*
DLLEXPORT const QoreNamespace * operator*() const
returns the namespace
PO_DEFAULT
#define PO_DEFAULT
no parse options set by default
Definition: Restrictions.h:107
QoreNamespaceIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:376
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
QoreNamespaceNamespaceIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespace::setClassHandler
DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler)
sets the namespace class handler
QoreNamespace::isRoot
DLLEXPORT bool isRoot() const
returns true if the namespace is the root namespace
QoreNamespaceFunctionIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceConstantIterator::~QoreNamespaceConstantIterator
virtual DLLEXPORT ~QoreNamespaceConstantIterator()
destroys the object
QoreNamespaceClassIterator::QoreNamespaceClassIterator
DLLEXPORT QoreNamespaceClassIterator(const QoreNamespace &ns)
creates the iterator
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::addNamespace
DLLEXPORT void addNamespace(QoreNamespace *ns)
adds a namespace to the namespace tree
QoreNamespaceIterator::operator*
DLLEXPORT QoreNamespace * operator*()
returns the namespace
QoreNamespaceTypedHashIterator::~QoreNamespaceTypedHashIterator
virtual DLLEXPORT ~QoreNamespaceTypedHashIterator()
destroys the object
QoreNamespace::clear
DLLEXPORT void clear(ExceptionSink *xsink)
clears the contents of the namespace before deleting
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::isModulePublic
DLLEXPORT bool isModulePublic() const
returns true if the namespace has its module public flag set
QoreNamespace
contains constants, classes, and subnamespaces in QoreProgram objects
Definition: QoreNamespace.h:65
QoreNamespaceConstIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
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::findLocalClass
DLLEXPORT QoreClass * findLocalClass(const char *cname) const
finds a class in this namespace, does not search child namespaces
QoreNamespaceConstIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:417
QoreNamespace::getParent
DLLEXPORT const QoreNamespace * getParent() const
returns a pointer to the parent namespace or nullptr if there is no parent
QoreNamespaceTypedHashIterator::QoreNamespaceTypedHashIterator
DLLEXPORT QoreNamespaceTypedHashIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceNamespaceIterator::~QoreNamespaceNamespaceIterator
virtual DLLEXPORT ~QoreNamespaceNamespaceIterator()
destroys the object
QoreNamespace::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
QoreNamespaceTypedHashIterator
allows typed hashes (hashdecls) in a namespace to be iterated
Definition: QoreNamespace.h:585
QoreNamespace::getPath
DLLEXPORT std::string getPath(bool anchored=false) const
returns the path for the namespace
RootQoreNamespace
the root namespace of a QoreProgram object
Definition: QoreNamespace.h:337
QoreNamespace::QoreNamespace
DLLEXPORT QoreNamespace(const char *n)
creates a namespace with the given name
QoreNamespaceIterator::QoreNamespaceIterator
DLLEXPORT QoreNamespaceIterator(QoreNamespace &ns)
creates the iterator; the namespace given will also be included in the iteration set ...
RootQoreNamespace::~RootQoreNamespace
virtual DLLLOCAL ~RootQoreNamespace()
destructor is not exported in the library&#39;s public API
QoreClass
defines a Qore-language class
Definition: QoreClass.h:239
QoreNamespaceIterator::operator->
DLLEXPORT QoreNamespace * operator->()
returns the namespace
QoreNamespace::copy
DLLEXPORT QoreNamespace * copy(int64 po=PO_DEFAULT) const
returns a deep copy of the namespace
QoreNamespaceGlobalVarIterator::~QoreNamespaceGlobalVarIterator
virtual DLLEXPORT ~QoreNamespaceGlobalVarIterator()
destroys the object
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:267
QoreNamespace::addInitialNamespace
DLLEXPORT void addInitialNamespace(QoreNamespace *ns)
adds a subnamespace to the namespace
QoreProgram
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only ...
Definition: QoreProgram.h:127
QoreNamespace::findCreateNamespacePath
DLLEXPORT QoreNamespace * findCreateNamespacePath(const char *nspath)
finds a Namespace based on the argument; creates it (or the whole path) if necessary ...
num_params
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:54
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
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreNamespace::getName
DLLEXPORT const char * getName() const
returns the name of the namespace
QoreNamespace::addSystemHashDecl
DLLEXPORT void addSystemHashDecl(TypedHashDecl *hashdecl)
adds a hashdecl to a namespace
QoreNamespace::isImported
DLLEXPORT bool isImported() const
returns true if the namespace was imported from another program object
QoreNamespaceClassIterator
allows classes in a namespace to be iterated
Definition: QoreNamespace.h:531
QoreNamespace::getModuleName
DLLEXPORT const char * getModuleName() const
Returns the module name the class was loaded from or nullptr if it is a builtin namespace.
QoreNamespaceGlobalVarIterator
allows global variables in a namespace to be iterated
Definition: QoreNamespace.h:558
QoreNamespaceConstIterator::~QoreNamespaceConstIterator
virtual DLLEXPORT ~QoreNamespaceConstIterator()
destroys the object
QoreNamespaceConstIterator::operator->
DLLEXPORT const QoreNamespace * operator->() const
returns the namespace
QoreNamespaceNamespaceIterator
allows local namespaces to be iterated
Definition: QoreNamespace.h:450
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
QoreNamespace::~QoreNamespace
virtual DLLEXPORT ~QoreNamespace()
destroys the object and frees memory
RootQoreNamespace::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
QoreNamespace::addConstant
DLLEXPORT void addConstant(const char *name, QoreValue value)
adds a constant definition to the namespace
QoreNamespaceClassIterator::~QoreNamespaceClassIterator
virtual DLLEXPORT ~QoreNamespaceClassIterator()
destroys the object
TypedHashDecl
typed hash declaration
Definition: TypedHashDecl.h:44
RootQoreNamespace::rootGetQoreNamespace
DLLEXPORT QoreNamespace * rootGetQoreNamespace() const
returns a pointer to the QoreNamespace for the "Qore" namespace
QoreNamespaceFunctionIterator::QoreNamespaceFunctionIterator
DLLEXPORT QoreNamespaceFunctionIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespace::getInfo
DLLEXPORT QoreHashNode * getInfo() const
returns a hash giving information about the definitions in the namespace
QoreNamespace::findLoadLocalClass
DLLEXPORT QoreClass * findLoadLocalClass(const char *cname)
finds a class in this namespace, does not search child namespaces
QoreNamespace::findLocalNamespace
DLLEXPORT QoreNamespace * findLocalNamespace(const char *nsname) const
finds a subnamespace in this namespace, does not search child namespaces
QoreNamespaceTypedHashIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
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...
QoreNamespaceIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceGlobalVarIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespace::findCreateNamespacePathAll
DLLEXPORT QoreNamespace * findCreateNamespacePathAll(const char *nspath)
finds a Namespace based on the argument; creates it (or the whole path) if necessary ...
QoreNamespace::addSystemClass
DLLEXPORT void addSystemClass(QoreClass *oc)
adds a class to a namespace
QoreNamespace::findLocalFunction
DLLEXPORT const QoreExternalFunction * findLocalFunction(const char *name) const
find a function in the current namespace; returns nullptr if not found
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...
QoreNamespaceConstantIterator::QoreNamespaceConstantIterator
DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceConstantIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceGlobalVarIterator::QoreNamespaceGlobalVarIterator
DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceFunctionIterator::~QoreNamespaceFunctionIterator
virtual DLLEXPORT ~QoreNamespaceFunctionIterator()
destroys the object
QoreNamespaceConstantIterator
allows constants in a namespace to be iterated
Definition: QoreNamespace.h:504
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
QoreNamespace::isBuiltin
DLLEXPORT bool isBuiltin() const
returns true if the namespace is builtin
QoreNamespace::findLocalConstant
DLLEXPORT const QoreExternalConstant * findLocalConstant(const char *name) const
find a constant in the current namespace; returns nullptr if not found
QoreNamespaceNamespaceIterator::QoreNamespaceNamespaceIterator
DLLEXPORT QoreNamespaceNamespaceIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceClassIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QDOM_DEFAULT
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:159
QoreNamespaceIterator::~QoreNamespaceIterator
virtual DLLEXPORT ~QoreNamespaceIterator()
destroys the object