ome-common 5.2.0-m2

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:
[legend]

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

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

  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.

## Member Data Documentation

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

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

Referenced by ome::common::module_runtime_path().

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

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

Referenced by ome::common::module_runtime_path().

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

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

Referenced by ome::common::module_runtime_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.

Referenced by ome::common::module_runtime_path().

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

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

Referenced by ome::common::module_runtime_path().

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

- ome/common/module.h
- ome/common/module.cpp