All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
RootQoreNamespace Class Reference

the root namespace of a QoreProgram object More...

`#include <QoreNamespace.h>`

Inheritance diagram for RootQoreNamespace:
[legend]
Collaboration diagram for RootQoreNamespace:
[legend]

## Public Member Functions

DLLEXPORT QoreNamespace * | rootGetQoreNamespace () const
| returns a pointer to the QoreNamespace for the "Qore" namespace
DLLLOCAL | ~RootQoreNamespace ()
| destructor is not exported in the library's public API
Public Member Functions inherited from QoreNamespace
DLLEXPORT | QoreNamespace (const char *n)
| creates a namespace with the given name
DLLEXPORT | ~QoreNamespace ()
| destroys the object and frees all associated memory
DLLEXPORT void | addConstant (const char *name, AbstractQoreNode *value)
| adds a constant definition to the namespace
DLLEXPORT void | addConstant (const char *name, AbstractQoreNode *value, const QoreTypeInfo *typeInfo)
| adds a constant definition to the namespace with type information
DLLEXPORT void | addSystemClass (QoreClass *oc)
| adds a class to a namespace
DLLEXPORT QoreNamespace * | copy (int po) const
| returns a deep copy of the namespace; DEPRECATED: use copy(int64) instead
DLLEXPORT QoreNamespace * | copy (int64 po=PO_DEFAULT) const
| returns a deep copy of the namespace
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
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
DLLEXPORT QoreHashNode * | getInfo () const
| returns a hash giving information about the definitions in the namespace
DLLEXPORT const char * | getName () const
| returns the name of the namespace
DLLEXPORT void | addNamespace (QoreNamespace *ns)
| adds a namespace to the namespace tree
DLLEXPORT void | addInitialNamespace (QoreNamespace *ns)
| adds a subnamespace to the namespace
DLLEXPORT QoreNamespace * | findCreateNamespacePath (const char *nspath)
| finds a Namespace based on the argument; creates it (or the whole path) if necessary
DLLEXPORT QoreClass * | findLocalClass (const char *cname) const
| finds a class in this namespace, does not search child namespaces
DLLEXPORT QoreNamespace * | findLocalNamespace (const char *nsname) const
| finds a subnamespace in this namespace, does not search child namespaces
DLLEXPORT void | setClassHandler (q_ns_class_handler_t class_handler)
| sets the namespace class handler
DLLEXPORT const QoreNamespace * | getParent () const
| returns a pointer to the parent namespace or 0 if there is no parent
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

## Detailed Description

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

See Also
  QoreNamespace

## Member Function Documentation

DLLEXPORT QoreNamespace* RootQoreNamespace::rootGetQoreNamespace | ( |  | ) | const

returns a pointer to the QoreNamespace for the "Qore" namespace

Returns
  a pointer to the QoreNamespace for the "Qore" namespace; do not delete the object returned

The documentation for this class was generated from the following file:

- include/qore/QoreNamespace.h (5431)