ome-common
5.2.0
|
A run-time path for a given module. More...
#include <ome/common/module.h>
Public Member Functions | |
Module (const std::string &name, const std::string &envvar, const std::string &module_envvar, const std::string &root_envvar, const boost::filesystem::path &abspath, const boost::filesystem::path &relpath, const boost::filesystem::path &install_prefix, const boost::filesystem::path &shlibpath, boost::filesystem::path(*module_path)()) | |
Constructor. More... | |
Public Attributes | |
std::string | name |
Name of the path, e.g. "bin" or "ome-xml-schema". | |
std::string | envvar |
Name of the environment variable used to override the autodetected path. More... | |
std::string | module_envvar |
Name of the environment variable used to specify the module installation root. More... | |
std::string | root_envvar |
Name of the environment variable used to specify the installation root. More... | |
boost::filesystem::path | abspath |
Absolute path (used when configured to use an absolute install path). More... | |
boost::filesystem::path | relpath |
Relative path (used for relocatable installs). | |
boost::filesystem::path | install_prefix |
Absolute installation path (used for non-relocatable installs). | |
boost::filesystem::path | shlibpath |
Shared library path (used for relocatable installs). | |
boost::filesystem::path | realpath |
The detected path (used to cache search result). | |
boost::filesystem::path(* | module_path )() |
Function to obtain the absolute path of the module providing the path (from the shared library or DLL); this won't work when static libraries are in use. More... | |
A run-time path for a given module.
This is used to find the location of in installation path at runtime, handling relocatable installs by introspecting the installation prefix and also by allowing overriding of the path by an environment variable.
ome::common::Module::Module | ( | const std::string & | name, |
const std::string & | envvar, | ||
const std::string & | module_envvar, | ||
const std::string & | root_envvar, | ||
const boost::filesystem::path & | abspath, | ||
const boost::filesystem::path & | relpath, | ||
const boost::filesystem::path & | install_prefix, | ||
const boost::filesystem::path & | shlibpath, | ||
boost::filesystem::path(*)() | module_path | ||
) |
Constructor.
name | the name of the module path. |
envvar | the environment variable to override the path. |
module_envvar | the environment variable to override the module installation path. |
root_envvar | the environment variable to override the root installation path. |
abspath | the absolute path. |
relpath | the relative path. |
install_prefix | the absolute installation path. |
shlibpath | the absolute path to the shared library. |
module_path | a function pointer to provide the module installation path, or null to skip introspection. |
boost::filesystem::path ome::common::Module::abspath |
Absolute path (used when configured to use an absolute install path).
std::string ome::common::Module::envvar |
Name of the environment variable used to override the autodetected path.
std::string ome::common::Module::module_envvar |
Name of the environment variable used to specify the module installation root.
boost::filesystem::path(* ome::common::Module::module_path) () |
Function to obtain the absolute path of the module providing the path (from the shared library or DLL); this won't work when static libraries are in use.
Used to introspect the installation path.
std::string ome::common::Module::root_envvar |
Name of the environment variable used to specify the installation root.