40 #ifndef _QORE_QORENAMESPACE_H
42 #define _QORE_QORENAMESPACE_H
59 friend class QoreNamespaceList;
61 friend class qore_ns_private;
62 friend class qore_root_ns_private;
63 friend struct NSOInfoBase;
70 DLLLOCAL QoreNamespace& operator=(
const QoreNamespace&);
73 class qore_ns_private *priv;
76 DLLLOCAL QoreNamespace(qore_ns_private* p);
83 DLLEXPORT QoreNamespace(
const char *n);
116 DLLEXPORT QoreNamespace *
copy(
int po)
const;
153 DLLEXPORT
const char *
getName()
const;
200 DLLEXPORT
const QoreNamespace *
getParent()
const;
205 DLLEXPORT
void addBuiltinVariant(
const char* name,
q_func_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain =
QDOM_DEFAULT,
const QoreTypeInfo *returnTypeInfo = 0,
unsigned num_params = 0, ...);
207 DLLEXPORT
void addBuiltinVariant(
const char* name,
q_func_int64_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain =
QDOM_DEFAULT,
const QoreTypeInfo *returnTypeInfo = 0,
unsigned num_params = 0, ...);
209 DLLEXPORT
void addBuiltinVariant(
const char* name,
q_func_double_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain =
QDOM_DEFAULT,
const QoreTypeInfo *returnTypeInfo = 0,
unsigned num_params = 0, ...);
211 DLLEXPORT
void addBuiltinVariant(
const char* name,
q_func_bool_t f, int64 code_flags = QC_NO_FLAGS, int64 functional_domain =
QDOM_DEFAULT,
const QoreTypeInfo *returnTypeInfo = 0,
unsigned num_params = 0, ...);
220 friend class qore_ns_private;
221 friend class qore_root_ns_private;
222 friend class StaticSystemNamespace;
229 class qore_root_ns_private* rpriv;
242 #endif // QORE_NAMESPACE_H
DLLEXPORT const QoreNamespace * getParent() const
returns a pointer to the parent namespace or 0 if there is no parent
#define PO_DEFAULT
no parse options set by default
Definition: Restrictions.h:77
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:49
DLLEXPORT void setClassHandler(q_ns_class_handler_t class_handler)
sets the namespace class handler
DLLEXPORT ~QoreNamespace()
destroys the object and frees all associated memory
DLLEXPORT QoreNamespace * findLocalNamespace(const char *nsname) const
finds a subnamespace in this namespace, does not search child namespaces
DLLEXPORT void addNamespace(QoreNamespace *ns)
adds a namespace to the namespace tree
int64(* q_func_int64_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning an integer value
Definition: common.h:226
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:55
contains constants, classes, and subnamespaces in QoreProgram objects
Definition: QoreNamespace.h:58
DLLEXPORT QoreHashNode * getConstantInfo() const
a hash of all constants in the namespace, the hash keys are the constant names and the values are the...
DLLEXPORT const char * getName() const
returns the name of the namespace
DLLEXPORT QoreNamespace * copy(int po) const
returns a deep copy of the namespace; DEPRECATED: use copy(int64) instead
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...
DLLEXPORT QoreNamespace * rootGetQoreNamespace() const
returns a pointer to the QoreNamespace for the "Qore" namespace
the root namespace of a QoreProgram object
Definition: QoreNamespace.h:219
defines a Qore-language class
Definition: QoreClass.h:194
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 ...
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:54
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:43
DLLEXPORT QoreClass * findLocalClass(const char *cname) const
finds a class in this namespace, does not search child namespaces
DLLEXPORT QoreHashNode * getInfo() const
returns a hash giving information about the definitions in the namespace
AbstractQoreNode *(* q_func_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures
Definition: common.h:223
DLLEXPORT void deleteData(ExceptionSink *xsink)
this function must be called before the QoreNamespace object is deleted or a crash could result due i...
double(* q_func_double_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning an double value
Definition: common.h:232
DLLEXPORT void addSystemClass(QoreClass *oc)
adds a class to a namespace
DLLEXPORT void addConstant(const char *name, AbstractQoreNode *value)
adds a constant definition to the namespace
DLLLOCAL ~RootQoreNamespace()
destructor is not exported in the library's public API
bool(* q_func_bool_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning a boolean value
Definition: common.h:229
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:110