ome-common  5.5.0
Public Member Functions | Public Attributes | List of all members
ome::common::Module Struct Reference

A run-time path for a given module. More...

#include <ome/common/module.h>

+ Collaboration diagram for ome::common::Module:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Module()

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.

Parameters
namethe name of the module path.
envvarthe environment variable to override the path.
module_envvarthe environment variable to override the module installation path.
root_envvarthe environment variable to override the root installation path.
abspaththe absolute path.
relpaththe relative path.
install_prefixthe absolute installation path.
shlibpaththe absolute path to the shared library.
module_patha function pointer to provide the module installation path, or null to skip introspection.

Member Data Documentation

◆ abspath

boost::filesystem::path ome::common::Module::abspath

Absolute path (used when configured to use an absolute install path).

◆ envvar

std::string ome::common::Module::envvar

Name of the environment variable used to override the autodetected path.

◆ module_envvar

std::string ome::common::Module::module_envvar

Name of the environment variable used to specify the module installation root.

◆ module_path

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.

◆ root_envvar

std::string ome::common::Module::root_envvar

Name of the environment variable used to specify the installation root.


The documentation for this struct was generated from the following files: