![]() |
Qore reflection Module 1.14.0
|
This namespace provides information about Qore namespaces. More...
#include <QC_Namespace.dox.h>
Public Member Functions | |
| constructor (string path) | |
| Creates the object from the name name or namespace-justified path as a string. | |
| Class | getClass (string name) |
| Returns the given direct child class declared in this namespace or throws an exception if the class is not defined. | |
| list< Class > | getClasses () |
| Returns a list of all declared classes in the namespace. | |
| Constant | getConstant (string name) |
| Returns the given constant or throws an exception if the constant is not defined. | |
| list< Constant > | getConstants () |
| Returns a list of all declared constants in the namespace. | |
| Function | getFunction (string name) |
| Returns the given direct child function declared in this namespace or throws an exception if the function is not defined. | |
| list< Function > | getFunctions () |
| Returns a list of all declared functions in the namespace. | |
| GlobalVar | getGlobalVar (string name) |
| Returns the given direct child global variable declared in this namespace or throws an exception if the global variable is not defined. | |
| list< GlobalVar > | getGlobalVars () |
| Returns a list of all declared global variables in the namespace. | |
| list< string > | getModifierList () |
| returns a list of strings of modifiers describing the namespace | |
| int | getModifiers () |
| returns a bitfield of modifiers describing the namespace | |
| *string | getModuleName () |
| Returns the module name providing the namespace or NOTHING if the namespace was not provided by a module. | |
| string | getName () |
| returns the namespace's name | |
| Namespace | getNamespace (string name) |
| Returns the given direct child namespace or throws an exception if the namespace is not defined. | |
| list< Namespace > | getNamespaces () |
| Returns a list of all declared namespaces in the namespace. | |
| *Namespace | getParentNamespace () |
| Returns the parent namespace, if any (the root namespace has no parent); if the Namespace has no parent, then NOTHING is returned. | |
| string | getPathName () |
| returns the namespace's full namespace-justified path name | |
| TypedHash | getTypedHash (string name) |
| Returns the given direct child typed hash (hashdecl) declared in this namespace or throws an exception if the global variable is not defined. | |
| list< TypedHash > | getTypedHashes () |
| Returns a list of all declared typed hashes (hashdecls) in the namespace. | |
| FunctionVariant | getVariant (string name,...) |
| Returns the given direct child function variant declared in this namespace or throws an exception if the function variant is not defined. | |
| FunctionVariant | getVariantArgs (string name, softlist< Type > argv) |
| Returns the given direct child function variant declared in this namespace or throws an exception if the function variant is not defined. | |
| list< FunctionVariant > | getVariants () |
| Returns a list of all declared function variants in the namespace. | |
| bool | isBuiltin () |
| returns True if the namespace is a builtin namespace | |
| bool | isEqual (Namespace ns) |
| Returns True if the Namespace object passed as an argument is equal to the current object; False if not. | |
| bool | isImported () |
| returns True if the namespace has been imported from another Program object | |
| bool | isModulePublic () |
| returns True if the namespace has the module public flag set | |
| bool | isRoot () |
| returns True if the namespace is the root namespace | |
| bool | isUser () |
| returns True if the namespace is a user namespace | |
Static Public Member Functions | |
| static list< Namespace > | findAllRegex (string pattern, *int re_opts) |
| Returns a list of namespaces matching the regular expression pattern argument or an empty list if no namespaces match. | |
| static list< Namespace > | findAllRegex (Program pgm, string pattern, *int re_opts) |
| Returns a list of namespaces matching the regular expression pattern argument or an empty list if no namespaces match. | |
| static Namespace | forName (string path) |
| Returns a Namespace object from the namespace name or namespace-justified path as a string. | |
| static Namespace | forName (Program pgm, string path) |
| Returns a Namespace object from the namespace name or namespace-justified path as a string. | |
This namespace provides information about Qore namespaces.
| Qore::Reflection::Namespace::constructor | ( | string | path | ) |
Creates the object from the name name or namespace-justified path as a string.
| path | the namespace name or namespace-justified path as a string; the root namespace is returned with an empty string or "::" argument |
| UNKNOWN-NAMESPACE | cannot find a namespace with the given name or path |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
|
static |
Returns a list of namespaces matching the regular expression pattern argument or an empty list if no namespaces match.
| pgm | the Program object to search |
| pattern | the regular expression pattern to match |
| re_opts | see Regular Expression Constants for possible values |
|
static |
Returns a list of namespaces matching the regular expression pattern argument or an empty list if no namespaces match.
| pattern | the regular expression pattern to match |
| re_opts | see Regular Expression Constants for possible values |
Returns a Namespace object from the namespace name or namespace-justified path as a string.
| pgm | the Program object to search |
| path | the namespace name or namespace-justified path as a string; the root namespace is returned with an empty string or "::" argument |
| UNKNOWN-NAMESPACE | cannot find a namespace with the given name or path |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a Namespace object from the namespace name or namespace-justified path as a string.
| path | the namespace name or namespace-justified path as a string; the root namespace is returned with an empty string or "::" argument |
| UNKNOWN-NAMESPACE | cannot find a namespace with the given name or path |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns the given direct child class declared in this namespace or throws an exception if the class is not defined.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-CLASS | thrown if the class cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared classes in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Returns the given constant or throws an exception if the constant is not defined.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-CONSTANT | thrown if the constant cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared constants in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Returns the given direct child function declared in this namespace or throws an exception if the function is not defined.
| name | the name of the function to find |
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-FUNCTION | thrown if the function cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared functions in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Returns the given direct child global variable declared in this namespace or throws an exception if the global variable is not defined.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-GLOBAL-VAR | thrown if the global variable cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared global variables in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
returns a list of strings of modifiers describing the namespace
"public": the namespace has the module public flag set| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| int Qore::Reflection::Namespace::getModifiers | ( | ) |
returns a bitfield of modifiers describing the namespace
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| *string Qore::Reflection::Namespace::getModuleName | ( | ) |
Returns the module name providing the namespace or NOTHING if the namespace was not provided by a module.
| string Qore::Reflection::Namespace::getName | ( | ) |
returns the namespace's name
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Returns the given direct child namespace or throws an exception if the namespace is not defined.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-NAMESPACE | thrown if the namespace cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared namespaces in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| *Namespace Qore::Reflection::Namespace::getParentNamespace | ( | ) |
Returns the parent namespace, if any (the root namespace has no parent); if the Namespace has no parent, then NOTHING is returned.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| string Qore::Reflection::Namespace::getPathName | ( | ) |
returns the namespace's full namespace-justified path name
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Returns the given direct child typed hash (hashdecl) declared in this namespace or throws an exception if the global variable is not defined.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-TYPED-HASH | thrown if the typed hash (hashdecl) cannot be found |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
Returns a list of all declared typed hashes (hashdecls) in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| FunctionVariant Qore::Reflection::Namespace::getVariant | ( | string | name, |
| ... ) |
Returns the given direct child function variant declared in this namespace or throws an exception if the function variant is not defined.
| name | the name of the function variant to find |
| ... | type arguments for the variant; types must be compatible for the search to be successful |
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-FUNCTION | thrown if the function cannot be found |
| VARIANT-MATCH-ERROR | thrown if the function variant cannot be matched to the given arguments |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
| FunctionVariant Qore::Reflection::Namespace::getVariantArgs | ( | string | name, |
| softlist< Type > | argv ) |
Returns the given direct child function variant declared in this namespace or throws an exception if the function variant is not defined.
| name | the name of the function variant to find |
| argv | type arguments for the variant; types must be compatible for the search to be successful |
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| UNKNOWN-FUNCTION | thrown if the function cannot be found |
| VARIANT-MATCH-ERROR | thrown if the function variant cannot be matched to the given arguments |
| ENCODING-CONVERSION-ERROR | this exception could be thrown if the string argument is not in the default character encoding and an error occurs during encoding conversion |
| list< FunctionVariant > Qore::Reflection::Namespace::getVariants | ( | ) |
Returns a list of all declared function variants in the namespace.
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isBuiltin | ( | ) |
returns True if the namespace is a builtin namespace
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isEqual | ( | Namespace | ns | ) |
Returns True if the Namespace object passed as an argument is equal to the current object; False if not.
| ns | the namespace to check with the current object for equality |
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isImported | ( | ) |
returns True if the namespace has been imported from another Program object
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isModulePublic | ( | ) |
returns True if the namespace has the module public flag set
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isRoot | ( | ) |
returns True if the namespace is the root namespace
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
| bool Qore::Reflection::Namespace::isUser | ( | ) |
returns True if the namespace is a user namespace
| PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |