Qore Programming Language
0.9.16
|
the root namespace of a QoreProgram object More...
#include <QoreNamespace.h>
Public Member Methods | |
virtual DLLLOCAL | ~RootQoreNamespace () |
destructor is not exported in the library's public API | |
DLLEXPORT QoreProgram * | getProgram () const |
Returns the owning QoreProgram object (if not the static system namespace) More... | |
DLLEXPORT QoreNamespace * | rootGetQoreNamespace () const |
returns a pointer to the QoreNamespace for the "Qore" namespace More... | |
Public Member Methods inherited from QoreNamespace | |
DLLEXPORT | QoreNamespace (const char *n) |
creates a namespace with the given name More... | |
virtual DLLEXPORT | ~QoreNamespace () |
destroys the object and frees memory | |
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 | |
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 More... | |
DLLEXPORT void | addConstant (const char *name, QoreValue value) |
adds a constant definition to the namespace More... | |
DLLEXPORT void | addConstant (const char *name, QoreValue value, const QoreTypeInfo *typeInfo) |
adds a constant definition to the namespace with type information More... | |
DLLEXPORT void | addInitialNamespace (QoreNamespace *ns) |
adds a subnamespace to the namespace More... | |
DLLEXPORT void | addNamespace (QoreNamespace *ns) |
adds a namespace to the namespace tree More... | |
DLLEXPORT void | addSystemClass (QoreClass *oc) |
adds a class to a namespace More... | |
DLLEXPORT void | addSystemHashDecl (TypedHashDecl *hashdecl) |
adds a hashdecl to a namespace More... | |
DLLEXPORT void | clear (ExceptionSink *xsink) |
clears the contents of the namespace before deleting More... | |
DLLEXPORT QoreNamespace * | copy (int po) const |
returns a deep copy of the namespace; DEPRECATED: use copy(int64) instead More... | |
DLLEXPORT QoreNamespace * | copy (int64 po=PO_DEFAULT) const |
returns a deep copy of the namespace More... | |
DLLEXPORT void | deleteData (ExceptionSink *xsink) |
this function must be called before the QoreNamespace object is deleted or a crash could result due if constants and/or class static vars contain objects | |
DLLEXPORT QoreNamespace * | findCreateNamespacePath (const char *nspath) |
finds a Namespace based on the argument; creates it (or the whole path) if necessary More... | |
DLLEXPORT QoreNamespace * | findCreateNamespacePathAll (const char *nspath) |
finds a Namespace based on the argument; creates it (or the whole path) if necessary More... | |
DLLEXPORT QoreClass * | findLoadLocalClass (const char *cname) |
finds a class in this namespace, does not search child namespaces More... | |
DLLEXPORT QoreClass * | findLocalClass (const char *cname) const |
finds a class in this namespace, does not search child namespaces More... | |
const DLLEXPORT QoreExternalConstant * | findLocalConstant (const char *name) const |
find a constant in the current namespace; returns nullptr if not found More... | |
const DLLEXPORT QoreExternalFunction * | findLocalFunction (const char *name) const |
find a function in the current namespace; returns nullptr if not found More... | |
const DLLEXPORT QoreExternalGlobalVar * | findLocalGlobalVar (const char *name) const |
find a global variable in the current namespace; returns nullptr if not found More... | |
DLLEXPORT QoreNamespace * | findLocalNamespace (const char *nsname) const |
finds a subnamespace in this namespace, does not search child namespaces More... | |
const DLLEXPORT TypedHashDecl * | findLocalTypedHash (const char *name) const |
find a typed hash (hashdecl) in the current namespace; returns nullptr if not found More... | |
DLLEXPORT QoreHashNode * | getClassInfo () const |
gets a hash of all classes in the namespace, the hash keys are the class names and the values are lists of strings giving the method names More... | |
DLLEXPORT QoreHashNode * | getConstantInfo () const |
a hash of all constants in the namespace, the hash keys are the constant names and the values are the values of the constants More... | |
DLLEXPORT QoreHashNode * | getInfo () const |
returns a hash giving information about the definitions in the namespace More... | |
const DLLEXPORT char * | getModuleName () const |
Returns the module name the class was loaded from or nullptr if it is a builtin namespace. More... | |
const DLLEXPORT char * | getName () const |
returns the name of the namespace More... | |
const DLLEXPORT QoreNamespace * | getParent () const |
returns a pointer to the parent namespace or nullptr if there is no parent More... | |
DLLEXPORT std::string | getPath (bool anchored=false) const |
returns the path for the namespace More... | |
DLLEXPORT QoreProgram * | getProgram () const |
Returns the owning QoreProgram object (if not the static system namespace) More... | |
DLLEXPORT bool | isBuiltin () const |
returns true if the namespace is builtin More... | |
DLLEXPORT bool | isImported () const |
returns true if the namespace was imported from another program object More... | |
DLLEXPORT bool | isModulePublic () const |
returns true if the namespace has its module public flag set More... | |
DLLEXPORT bool | isRoot () const |
returns true if the namespace is the root namespace More... | |
DLLEXPORT void | setClassHandler (q_ns_class_handler_t class_handler) |
sets the namespace class handler More... | |
the root namespace of a QoreProgram object
is a specialization of QoreNamespace that provides functionality specific to the root namespace this class' constructor and destructors are private, so the class may change without affecting the library's ABI
DLLEXPORT QoreProgram* RootQoreNamespace::getProgram | ( | ) | const |
Returns the owning QoreProgram object (if not the static system namespace)
DLLEXPORT QoreNamespace* RootQoreNamespace::rootGetQoreNamespace | ( | ) | const |
returns a pointer to the QoreNamespace for the "Qore" namespace