Loading...
Searching...
No Matches
QoreNamespace.h
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
QoreNamespace.h
Qore Programming Language
Copyright (C) 2003 - 2022 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Note that the Qore library is released under a choice of three open-source
licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
information.
*/
/*
namespaces are children of a program object. there is a parse
lock per program object to ensure that objects are added (or backed out)
atomically per program object. All the objects referenced here should
be safe to read & copied at all times. They will only be deleted when the
program object is deleted (except the pending structures, which will be
deleted any time there is a parse error, together with all other
pending structures)
*/
#ifndef _QORE_QORENAMESPACE_H
#define _QORE_QORENAMESPACE_H
#include <cstdlib>
#include <cstring>
#include <string>
// forward declarations
class QoreExternalFunction;
class QoreExternalConstant;
class QoreExternalGlobalVar;
class QoreProgram;
typedef QoreClass* (*q_ns_class_handler_t)(QoreNamespace* ns, const char* cname);
class QoreNamespace {
friend class QoreNamespaceList;
friend class RootQoreNamespace;
friend class qore_ns_private;
friend class qore_root_ns_private;
friend struct NSOInfoBase;
public:
DLLEXPORT QoreNamespace(const char* n);
DLLEXPORT QoreNamespace(const QoreNamespace& old, int64 po);
DLLEXPORT virtual ~QoreNamespace();
DLLEXPORT void clear(ExceptionSink* xsink);
DLLEXPORT void addConstant(const char* name, QoreValue value);
DLLEXPORT void addConstant(const char* name, QoreValue value, const QoreTypeInfo* typeInfo);
DLLEXPORT void addSystemClass(QoreClass* oc);
DLLEXPORT void addSystemHashDecl(TypedHashDecl* hashdecl);
DLLEXPORT QoreNamespace* copy(int64 po = PO_DEFAULT) const;
DLLEXPORT QoreHashNode* getClassInfo() const;
DLLEXPORT QoreHashNode* getConstantInfo() const;
DLLEXPORT QoreHashNode* getInfo() const;
DLLEXPORT const char* getName() const;
DLLEXPORT void addNamespace(QoreNamespace* ns);
DLLEXPORT void addInitialNamespace(QoreNamespace* ns);
DLLEXPORT QoreNamespace* findCreateNamespacePath(const char* nspath);
DLLEXPORT QoreNamespace* findCreateNamespacePathAll(const char* nspath);
DLLEXPORT QoreClass* findLocalClass(const char* cname) const;
DLLEXPORT QoreClass* findLoadLocalClass(const char* cname);
DLLEXPORT QoreNamespace* findLocalNamespace(const char* nsname) const;
DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler);
DLLEXPORT const QoreNamespace* getParent() const;
DLLEXPORT void deleteData(ExceptionSink* xsink);
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, ...);
DLLEXPORT void addBuiltinVariant(void* ptr, const char* name, q_external_func_t f,
int64 code_flags = QCF_NO_FLAGS, int64 functional_domain = QDOM_DEFAULT,
const QoreTypeInfo* returnTypeInfo = nullptr, unsigned num_params = 0, ...);
DLLEXPORT const QoreExternalFunction* findLocalFunction(const char* name) const;
DLLEXPORT const QoreExternalConstant* findLocalConstant(const char* name) const;
DLLEXPORT const QoreExternalGlobalVar* findLocalGlobalVar(const char* name) const;
DLLEXPORT const TypedHashDecl* findLocalTypedHash(const char* name) const;
DLLEXPORT std::string getPath(bool anchored = false) const;
DLLEXPORT bool isModulePublic() const;
DLLEXPORT bool isBuiltin() const;
DLLEXPORT bool isImported() const;
DLLEXPORT bool isRoot() const;
DLLEXPORT QoreProgram* getProgram() const;
DLLEXPORT const char* getModuleName() const;
DLLEXPORT QoreValue setKeyValue(const std::string& key, QoreValue val);
DLLEXPORT QoreValue setKeyValueIfNotSet(const std::string& key, QoreValue val);
DLLEXPORT bool setKeyValueIfNotSet(const std::string& key, const char* str);
DLLEXPORT QoreValue getReferencedKeyValue(const std::string& key) const;
DLLEXPORT QoreValue getReferencedKeyValue(const char* key) const;
private:
QoreNamespace(const QoreNamespace&) = delete;
QoreNamespace& operator=(const QoreNamespace&) = delete;
protected:
class qore_ns_private* priv; // private implementation
// protected, function not exported in the API
DLLLOCAL QoreNamespace(qore_ns_private* p);
};
class RootQoreNamespace : public QoreNamespace {
friend class qore_ns_private;
friend class qore_root_ns_private;
friend class StaticSystemNamespace;
public:
DLLEXPORT QoreNamespace* rootGetQoreNamespace() const;
DLLLOCAL virtual ~RootQoreNamespace();
DLLEXPORT QoreProgram* getProgram() const;
protected:
// private implementation
class qore_root_ns_private* rpriv;
private:
RootQoreNamespace(const RootQoreNamespace&) = delete;
RootQoreNamespace& operator=(const RootQoreNamespace&) = delete;
DLLLOCAL RootQoreNamespace(class qore_root_ns_private* p);
};
class QorePrivateNamespaceIterator;
class QoreNamespaceIterator {
public:
DLLEXPORT QoreNamespaceIterator(QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceIterator();
DLLEXPORT bool next();
DLLEXPORT QoreNamespace* operator->();
DLLEXPORT QoreNamespace* operator*();
DLLEXPORT QoreNamespace& get();
DLLEXPORT const QoreNamespace* operator->() const;
DLLEXPORT const QoreNamespace* operator*() const;
DLLEXPORT const QoreNamespace& get() const;
private:
QoreNamespaceIterator(const QoreNamespaceIterator&) = delete;
QoreNamespaceIterator& operator=(const QoreNamespaceIterator&) = delete;
QorePrivateNamespaceIterator* priv;
};
class QoreNamespaceConstIterator {
public:
DLLEXPORT QoreNamespaceConstIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceConstIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreNamespace* operator->() const;
DLLEXPORT const QoreNamespace* operator*() const;
DLLEXPORT const QoreNamespace& get() const;
private:
QoreNamespaceConstIterator(const QoreNamespaceConstIterator&) = delete;
QoreNamespaceConstIterator& operator=(const QoreNamespaceConstIterator&) = delete;
QorePrivateNamespaceIterator* priv;
};
class QoreNamespaceNamespaceIterator {
public:
DLLEXPORT QoreNamespaceNamespaceIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceNamespaceIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreNamespace& get() const;
private:
QoreNamespaceNamespaceIterator(const QoreNamespaceNamespaceIterator&) = delete;
QoreNamespaceNamespaceIterator& operator=(const QoreNamespaceNamespaceIterator&) = delete;
class qore_namespace_namespace_iterator* priv;
};
class QoreNamespaceFunctionIterator {
public:
DLLEXPORT QoreNamespaceFunctionIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceFunctionIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreExternalFunction& get() const;
private:
QoreNamespaceFunctionIterator(const QoreNamespaceFunctionIterator&) = delete;
QoreNamespaceFunctionIterator& operator=(const QoreNamespaceFunctionIterator&) = delete;
class qore_namespace_function_iterator* priv;
};
class QoreNamespaceConstantIterator {
public:
DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceConstantIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreExternalConstant& get() const;
private:
QoreNamespaceConstantIterator(const QoreNamespaceConstantIterator&) = delete;
QoreNamespaceConstantIterator& operator=(const QoreNamespaceConstantIterator&) = delete;
class qore_namespace_constant_iterator* priv;
};
class QoreNamespaceClassIterator {
public:
DLLEXPORT QoreNamespaceClassIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceClassIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreClass& get() const;
private:
QoreNamespaceClassIterator(const QoreNamespaceClassIterator&) = delete;
QoreNamespaceClassIterator& operator=(const QoreNamespaceClassIterator&) = delete;
class ConstClassListIterator* priv;
};
class QoreNamespaceGlobalVarIterator {
public:
DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceGlobalVarIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreExternalGlobalVar& get() const;
private:
QoreNamespaceGlobalVarIterator(const QoreNamespaceGlobalVarIterator&) = delete;
QoreNamespaceGlobalVarIterator& operator=(const QoreNamespaceGlobalVarIterator&) = delete;
class qore_namespace_globalvar_iterator* priv;
};
class QoreNamespaceTypedHashIterator {
public:
DLLEXPORT QoreNamespaceTypedHashIterator(const QoreNamespace& ns);
DLLEXPORT virtual ~QoreNamespaceTypedHashIterator();
DLLEXPORT bool next();
DLLEXPORT const TypedHashDecl& get() const;
private:
QoreNamespaceTypedHashIterator(const QoreNamespaceTypedHashIterator&) = delete;
QoreNamespaceTypedHashIterator& operator=(const QoreNamespaceTypedHashIterator&) = delete;
class ConstHashDeclListIterator* priv;
};
#endif // QORE_NAMESPACE_H
QDOM_DEFAULT
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:159
PO_DEFAULT
#define PO_DEFAULT
no parse options set by default
Definition: Restrictions.h:107
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:249
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:591
QoreNamespaceClassIterator::~QoreNamespaceClassIterator
virtual DLLEXPORT ~QoreNamespaceClassIterator()
destroys the object
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
QoreNamespaceClassIterator::get
DLLEXPORT const QoreClass & get() const
returns the class
QoreNamespaceConstIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:477
QoreNamespaceConstIterator::~QoreNamespaceConstIterator
virtual DLLEXPORT ~QoreNamespaceConstIterator()
destroys the object
QoreNamespaceConstIterator::get
DLLEXPORT const QoreNamespace & get() const
returns the namespace
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::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:564
QoreNamespaceConstantIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceConstantIterator::get
DLLEXPORT const QoreExternalConstant & get() const
returns the constant
QoreNamespaceConstantIterator::~QoreNamespaceConstantIterator
virtual DLLEXPORT ~QoreNamespaceConstantIterator()
destroys the object
QoreNamespaceConstantIterator::QoreNamespaceConstantIterator
DLLEXPORT QoreNamespaceConstantIterator(const QoreNamespace &ns)
creates the iterator
QoreNamespaceFunctionIterator
allows functions in a namespace to be iterated
Definition: QoreNamespace.h:537
QoreNamespaceFunctionIterator::next
DLLEXPORT bool next()
moves to the next position; returns true if on a valid position
QoreNamespaceFunctionIterator::get
DLLEXPORT const QoreExternalFunction & get() const
returns the function
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:618
QoreNamespaceGlobalVarIterator::get
DLLEXPORT const QoreExternalGlobalVar & get() const
returns the global variable
QoreNamespaceGlobalVarIterator::QoreNamespaceGlobalVarIterator
DLLEXPORT QoreNamespaceGlobalVarIterator(const QoreNamespace &ns)
creates the iterator
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::QoreNamespace
DLLEXPORT QoreNamespace(const QoreNamespace &old, int64 po)
copies the namespace and assigns new parse options to the new namespace
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::copy
DLLEXPORT QoreNamespace * copy(int64 po=PO_DEFAULT) const
returns a deep copy of the namespace
QoreNamespace::setKeyValue
DLLEXPORT QoreValue setKeyValue(const std::string &key, QoreValue val)
Sets a key value in the namespace's key-value store unconditionally.
QoreNamespace::addConstant
DLLEXPORT void addConstant(const char *name, QoreValue value, const QoreTypeInfo *typeInfo)
adds a constant definition to the namespace with type information
QoreNamespace::isBuiltin
DLLEXPORT bool isBuiltin() const
returns true if the namespace is builtin
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::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::setKeyValueIfNotSet
DLLEXPORT bool setKeyValueIfNotSet(const std::string &key, const char *str)
Sets a key value in the namespace's key-value store only if no value exists for the given key.
QoreNamespace::addConstant
DLLEXPORT void addConstant(const char *name, QoreValue value)
adds a constant definition to 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::getReferencedKeyValue
DLLEXPORT QoreValue getReferencedKeyValue(const std::string &key) const
Returns a referenced key value from the namespace's key-value store.
QoreNamespace::addBuiltinVariant
DLLEXPORT void addBuiltinVariant(void *ptr, const char *name, q_external_func_t f, int64 code_flags=QCF_NO_FLAGS, int64 functional_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=nullptr, 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::getInfo
DLLEXPORT QoreHashNode * getInfo() const
returns a hash giving information about the definitions in the 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::setKeyValueIfNotSet
DLLEXPORT QoreValue setKeyValueIfNotSet(const std::string &key, QoreValue val)
Sets a key value in the namespace's key-value store only if no value exists for the given key.
QoreNamespace::findLoadLocalClass
DLLEXPORT QoreClass * findLoadLocalClass(const char *cname)
finds a class in this namespace, does not search child namespaces
QoreNamespace::findLocalClass
DLLEXPORT QoreClass * findLocalClass(const char *cname) const
finds a class in this namespace, does not search child namespaces
QoreNamespace::findLocalGlobalVar
DLLEXPORT const QoreExternalGlobalVar * findLocalGlobalVar(const char *name) const
find a global variable in the current namespace; returns nullptr if not found
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::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
QoreNamespace::getReferencedKeyValue
DLLEXPORT QoreValue getReferencedKeyValue(const char *key) const
Returns a referenced key value from the namespace's key-value store.
QoreNamespace::getModuleName
DLLEXPORT const char * getModuleName() const
Returns the module name the namespace was loaded from or nullptr if it is a builtin namespace.
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::getParent
DLLEXPORT const QoreNamespace * getParent() const
returns a pointer to the parent namespace or nullptr if there is no parent
QoreNamespace::getName
DLLEXPORT const char * getName() const
returns the name of the namespace
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::findLocalTypedHash
DLLEXPORT const TypedHashDecl * findLocalTypedHash(const char *name) const
find a typed hash (hashdecl) in the current namespace; returns nullptr if not found
QoreNamespace::findLocalNamespace
DLLEXPORT QoreNamespace * findLocalNamespace(const char *nsname) const
finds a subnamespace in this namespace, does not search child namespaces
QoreNamespace::isModulePublic
DLLEXPORT bool isModulePublic() const
returns true if the namespace has its module public flag set
QoreNamespace::findLocalConstant
DLLEXPORT const QoreExternalConstant * findLocalConstant(const char *name) const
find a constant 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::isImported
DLLEXPORT bool isImported() const
returns true if the namespace was imported from another program object
QoreNamespace::findCreateNamespacePath
DLLEXPORT QoreNamespace * findCreateNamespacePath(const char *nspath)
finds a Namespace based on the argument; creates it (or the whole path) if necessary
QoreNamespaceIterator
allows all namespaces of a namespace to be iterated (including the namespace passed in the constructo...
Definition: QoreNamespace.h:436
QoreNamespaceIterator::operator->
DLLEXPORT const QoreNamespace * operator->() const
returns the namespace
QoreNamespaceIterator::operator*
DLLEXPORT const QoreNamespace * operator*() const
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::operator*
DLLEXPORT QoreNamespace * operator*()
returns the namespace
QoreNamespaceIterator::get
DLLEXPORT QoreNamespace & get()
returns the namespace
QoreNamespaceIterator::get
DLLEXPORT const QoreNamespace & get() const
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:510
QoreNamespaceNamespaceIterator::~QoreNamespaceNamespaceIterator
virtual DLLEXPORT ~QoreNamespaceNamespaceIterator()
destroys the object
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
QoreNamespaceNamespaceIterator::get
DLLEXPORT const QoreNamespace & get() const
returns the namespace
QoreNamespaceTypedHashIterator
allows typed hashes (hashdecls) in a namespace to be iterated
Definition: QoreNamespace.h:645
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:127
RootQoreNamespace
the root namespace of a QoreProgram object
Definition: QoreNamespace.h:397
RootQoreNamespace::getProgram
DLLEXPORT QoreProgram * getProgram() const
Returns the owning QoreProgram object (if not the static system namespace)
RootQoreNamespace::rootGetQoreNamespace
DLLEXPORT QoreNamespace * rootGetQoreNamespace() const
returns a pointer to the QoreNamespace for the "Qore" 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:276