Elements 6.1.2
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Configuration.h
Go to the documentation of this file.
1
34#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_CONFIGURATION_H_
35#define ELEMENTSKERNEL_ELEMENTSKERNEL_CONFIGURATION_H_
36
37#include <string> // for string
38#include <vector> // for vector
39
40#include "ElementsKernel/Export.h" // ELEMENTS_API
41#include "ElementsKernel/Path.h" // for Path::Item
42
43namespace Elements {
44inline namespace Kernel {
45
53
54template <typename T>
55ELEMENTS_API Path::Item getConfigurationPath(const T& file_name, bool raise_exception = true);
56
57// Instantiation of the most expected types
58extern template ELEMENTS_API Path::Item getConfigurationPath(const Path::Item& file_name, bool raise_exception);
59extern template ELEMENTS_API Path::Item getConfigurationPath(const std::string& file_name, bool raise_exception);
60
62
63namespace Configuration {
64
70ELEMENTS_API std::string getVariableName();
71
81template <typename T>
82ELEMENTS_API Path::Item getPath(const T& file_name, bool raise_exception = true);
83
84// instantiation of the most expected types
85extern template ELEMENTS_API Path::Item getPath(const Path::Item& file_name, bool raise_exception);
86extern template ELEMENTS_API Path::Item getPath(const std::string& file_name, bool raise_exception);
87
93ELEMENTS_API std::vector<Path::Item> getLocations(bool exist_only = false);
94
95} // namespace Configuration
96
97} // namespace Kernel
98} // namespace Elements
99
100#define ELEMENTSKERNEL_ELEMENTSKERNEL_CONFIGURATION_IMPL_
102#undef ELEMENTSKERNEL_ELEMENTSKERNEL_CONFIGURATION_IMPL_
103
104#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_CONFIGURATION_H_
105
defines the macros to be used for explicit export of the symbols
provide functions to retrieve resources pointed by environment variables
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
ELEMENTS_API std::string getConfigurationVariableName()
retrieve the variable name used for the configuration file lookup
boost::filesystem::path Item
Definition: Path.h:56
ELEMENTS_API Path::Item getConfigurationPath(const T &file_name, bool raise_exception=true)
ELEMENTS_API std::vector< Path::Item > getConfigurationLocations(bool exist_only=false)