Qore reflection Module 1.19.2
|
This namespace provides information about Qore namespaces. More...
#include <QC_Namespace.dox.h>
Public Member Methods | |
constructor (string path) | |
Creates the object from the name name or namespace-justified path as a string. More... | |
Class | getClass (string name) |
Returns the given direct child class declared in this namespace or throws an exception if the class is not defined. More... | |
list< Class > | getClasses () |
Returns a list of all declared classes in the namespace. More... | |
Constant | getConstant (string name) |
Returns the given constant or throws an exception if the constant is not defined. More... | |
list< Constant > | getConstants () |
Returns a list of all declared constants in the namespace. More... | |
Function | getFunction (string name) |
Returns the given direct child function declared in this namespace or throws an exception if the function is not defined. More... | |
list< Function > | getFunctions () |
Returns a list of all declared functions in the namespace. More... | |
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. More... | |
list< GlobalVar > | getGlobalVars () |
Returns a list of all declared global variables in the namespace. More... | |
list< string > | getModifierList () |
returns a list of strings of modifiers describing the namespace More... | |
int | getModifiers () |
returns a bitfield of modifiers describing the namespace More... | |
*string | getModuleName () |
Returns the module name providing the namespace or nothing if the namespace was not provided by a module. More... | |
string | getName () |
returns the namespace's name More... | |
Namespace | getNamespace (string name) |
Returns the given direct child namespace or throws an exception if the namespace is not defined. More... | |
list< Namespace > | getNamespaces () |
Returns a list of all declared namespaces in the namespace. More... | |
*Namespace | getParentNamespace () |
Returns the parent namespace, if any (the root namespace has no parent); if the Namespace has no parent, then nothing is returned. More... | |
string | getPathName () |
returns the namespace's full namespace-justified path name More... | |
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. More... | |
list< TypedHash > | getTypedHashes () |
Returns a list of all declared typed hashes (hashdecls) in the namespace. More... | |
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. More... | |
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. More... | |
list< FunctionVariant > | getVariants () |
Returns a list of all declared function variants in the namespace. More... | |
bool | isBuiltin () |
returns True if the namespace is a builtin namespace More... | |
bool | isEqual (Namespace ns) |
Returns True if the Namespace object passed as an argument is equal to the current object; False if not. More... | |
bool | isImported () |
returns True if the namespace has been imported from another Program object More... | |
bool | isModulePublic () |
returns True if the namespace has the module public flag set More... | |
bool | isRoot () |
returns True if the namespace is the root namespace More... | |
bool | isUser () |
returns True if the namespace is a user namespace More... | |
Static Public Member Methods | |
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. More... | |
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. More... | |
static Namespace | forName (string path) |
Returns a Namespace object from the namespace name or namespace-justified path as a string. More... | |
static Namespace | forName (Program pgm, string path) |
Returns a Namespace object from the namespace name or namespace-justified path as a string. More... | |
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 regex_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 regex_constants for possible values |
|
static |
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 |
|
static |
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 |
Class Qore::Reflection::Namespace::getClass | ( | string | name | ) |
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 |
list< Class > Qore::Reflection::Namespace::getClasses | ( | ) |
Returns a list of all declared classes in the namespace.
PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Constant Qore::Reflection::Namespace::getConstant | ( | string | name | ) |
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 |
list< Constant > Qore::Reflection::Namespace::getConstants | ( | ) |
Returns a list of all declared constants in the namespace.
PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
Function Qore::Reflection::Namespace::getFunction | ( | string | name | ) |
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 |
list< Function > Qore::Reflection::Namespace::getFunctions | ( | ) |
Returns a list of all declared functions in the namespace.
PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
GlobalVar Qore::Reflection::Namespace::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.
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 |
list< GlobalVar > Qore::Reflection::Namespace::getGlobalVars | ( | ) |
Returns a list of all declared global variables in the namespace.
PROGRAM-ERROR | thrown if the Program object holding the namespace has been destroyed |
list< string > Qore::Reflection::Namespace::getModifierList | ( | ) |
returns a list of strings of modifiers describing the namespace
"public"
: the namespace has the module public flag setPROGRAM-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 |
Namespace Qore::Reflection::Namespace::getNamespace | ( | string | name | ) |
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 |
list< Namespace > Qore::Reflection::Namespace::getNamespaces | ( | ) |
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 |
TypedHash Qore::Reflection::Namespace::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.
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 |
list< TypedHash > Qore::Reflection::Namespace::getTypedHashes | ( | ) |
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 |