Query and set certain properties of the CppMicroServices library.
More...
#include <usModuleSettings.h>
|
| typedef std::vector< std::string > | PathList |
| | A list of file-system paths. More...
|
| |
Query and set certain properties of the CppMicroServices library.
The following environment variables influence the runtime behavior of the CppMicroServices library:
- US_DISABLE_AUTOLOADING If set, auto-loading of modules is disabled.
- US_AUTOLOAD_PATHS A ':' (Unix) or ';' (Windows) separated list of paths from which modules should be auto-loaded.
Definition at line 39 of file usModuleSettings.h.
◆ PathList
◆ AddAutoLoadPath()
| static void us::ModuleSettings::AddAutoLoadPath |
( |
const std::string & |
path | ) |
|
|
static |
Add a path in the file-system to the list of paths from which modules will be auto-loaded.
- Parameters
-
| [in] | path | The additional absolute auto-load path in the file-system. |
◆ CURRENT_MODULE_PATH()
| static std::string us::ModuleSettings::CURRENT_MODULE_PATH |
( |
| ) |
|
|
static |
Returns a special string which can be used as an argument for a AddAutoLoadPath() call.
When a module is loaded and this string has been added as a path to the list of auto-load paths the CppMicroServices library will auto-load all modules from the currently being loaded module's auto-load directory.
- Returns
- A string to be used in AddAutoLoadPath().
- See also
- MicroServices_AutoLoading
-
US_INITIALIZE_MODULE
◆ GetAutoLoadPaths()
| static PathList us::ModuleSettings::GetAutoLoadPaths |
( |
| ) |
|
|
static |
- Returns
- A list of paths in the file-system from which modules will be auto-loaded.
◆ GetStoragePath()
| static std::string us::ModuleSettings::GetStoragePath |
( |
| ) |
|
|
static |
Get the absolute path for persistent data. The returned path might be empty. If the path is non-empty, it is safe to assume that the path exists and is writable.
- Returns
- The absolute path to the persistent storage path.
◆ IsAutoLoadingEnabled()
| static bool us::ModuleSettings::IsAutoLoadingEnabled |
( |
| ) |
|
|
static |
- Returns
true if support for module auto-loading is enabled, false otherwise.
◆ IsThreadingSupportEnabled()
| static bool us::ModuleSettings::IsThreadingSupportEnabled |
( |
| ) |
|
|
static |
- Returns
true if threading support has been configured into the CppMicroServices library, false otherwise.
◆ SetAutoLoadingEnabled()
| static void us::ModuleSettings::SetAutoLoadingEnabled |
( |
bool |
enable | ) |
|
|
static |
Enable or disable auto-loading support.
- Parameters
-
| enable | If true, enable auto-loading support, disable it otherwise. |
◆ SetAutoLoadPaths()
| static void us::ModuleSettings::SetAutoLoadPaths |
( |
const PathList & |
paths | ) |
|
|
static |
Set a list of paths in the file-system from which modules should be auto-loaded.
- Parameters
-
| [in] | paths | A list of absolute file-system paths. |
◆ SetStoragePath()
| static void us::ModuleSettings::SetStoragePath |
( |
const std::string & |
path | ) |
|
|
static |
Set a local storage path for persistend module data.
This path is used as a base directory for providing modules with a storage path for writing persistent data. The callee must ensure that the provided path exists and is writable.
- See also
- ModuleContext::GetDataFile(const std::string&)
- Parameters
-
| [in] | path | An absolute path for writing persistent data. |
The documentation for this class was generated from the following file: