#include <ModuleManager.h>
Public Member Functions | |
DLLLOCAL | ModuleManager () |
creates the ModuleManager object (private) | |
Static Public Member Functions | |
static DLLEXPORT void | addModuleDir (const char *dir) |
to add a single directory to the QORE_MODULE_DIR list, can only be called before the library initialization function qore_init() | |
static DLLEXPORT void | addAutoModuleDir (const char *dir) |
to add a single directory to the QORE_AUTO_MODULE_DIR list, can only be called before the library initialization function qore_init() | |
static DLLEXPORT void | addModuleDirList (const char *strlist) |
to add a list of directories separated by ':' characters to the QORE_MODULE_DIR list, can only be called before the library initialization function qore_init() | |
static DLLEXPORT void | addAutoModuleDirList (const char *strlist) |
to add a list of directories separated by ':' characters to the QORE_AUTO_MODULE_DIR list, can only be called before the library initialization function qore_init() | |
static DLLEXPORT QoreListNode * | getModuleList () |
retuns a list of module information hashes, caller owns the list reference returned | |
static DLLEXPORT int | runTimeLoadModule (const char *name, ExceptionSink *xsink) |
loads the named module at run time, returns -1 if an exception was raised, 0 for OK | |
static DLLLOCAL QoreStringNode * | parseLoadModule (const char *name, QoreProgram *pgm=0) |
loads the named module at parse time, returns a non-0 QoreStringNode pointer if an error occured, caller owns the QoreStringNode pointer's reference count returned if non-0 | |
static DLLLOCAL void | init (bool se) |
explicit initialization and autoloading (private) | |
static DLLLOCAL void | cleanup () |
explicit cleanup (private) |
in the case that a QoreProgram object is created before a module is loaded externally (either through another QoreProgram object or through a direct call to the appropriate ModuleManager function), if the QoreProgram object then requests the feature, the ModuleManager will load in all namespace (class, constant, etc) changes into the QoreProgram object. All members and methods are static; there will always only be one of these...
DLLLOCAL ModuleManager::ModuleManager | ( | ) |
creates the ModuleManager object (private)
private interface; not exported in the library's public API
static DLLEXPORT void ModuleManager::addModuleDir | ( | const char * | dir | ) | [static] |
to add a single directory to the QORE_MODULE_DIR list, can only be called before the library initialization function qore_init()
dir | the directory path to add to the list |
static DLLEXPORT void ModuleManager::addAutoModuleDir | ( | const char * | dir | ) | [static] |
to add a single directory to the QORE_AUTO_MODULE_DIR list, can only be called before the library initialization function qore_init()
dir | the directory path to add to the list |
static DLLEXPORT void ModuleManager::addModuleDirList | ( | const char * | strlist | ) | [static] |
to add a list of directories separated by ':' characters to the QORE_MODULE_DIR list, can only be called before the library initialization function qore_init()
strlist | a list of directories separated by ':' characters to add to the QORE_MODULE_DIR list |
static DLLEXPORT void ModuleManager::addAutoModuleDirList | ( | const char * | strlist | ) | [static] |
to add a list of directories separated by ':' characters to the QORE_AUTO_MODULE_DIR list, can only be called before the library initialization function qore_init()
strlist | a list of directories separated by ':' characters to add to the QORE_AUTO_MODULE_DIR list |
static DLLEXPORT int ModuleManager::runTimeLoadModule | ( | const char * | name, | |
ExceptionSink * | xsink | |||
) | [static] |
loads the named module at run time, returns -1 if an exception was raised, 0 for OK
If the feature is already loaded, then the function returns immediately without raising an error. The feature's namespace changes are added to the QoreProgram object if the feature is loaded.
name | can be either a feature name or the full path to the module file | |
xsink | if any errors are encountered loading the module, then a Qore-language "LOAD-MODULE-ERROR" exception is raised here |
static DLLLOCAL QoreStringNode* ModuleManager::parseLoadModule | ( | const char * | name, | |
QoreProgram * | pgm = 0 | |||
) | [static] |
loads the named module at parse time, returns a non-0 QoreStringNode pointer if an error occured, caller owns the QoreStringNode pointer's reference count returned if non-0
if the feature is already loaded, then the function returns immediately without raising an error The feature's namespace changes are added to the QoreProgram object if the feature is loaded and the pgm argument is non-zero.
name | can be either a feature name or the full path to the module file | |
pgm | the QoreProgram object in which to include all module additions (namespaces, classes, constants, etc) immediately |
static DLLLOCAL void ModuleManager::init | ( | bool | se | ) | [static] |
explicit initialization and autoloading (private)
private interface; not exported in the library's public API
static DLLLOCAL void ModuleManager::cleanup | ( | ) | [static] |
explicit cleanup (private)
private interface; not exported in the library's public API