Elements  6.0.1
A C++ base framework for the Euclid Software.
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 
43 namespace Elements {
44 inline namespace Kernel {
45 
53 
54 template <typename T>
55 ELEMENTS_API Path::Item getConfigurationPath(const T& file_name, bool raise_exception = true);
56 
57 // Instantiation of the most expected types
58 extern template ELEMENTS_API Path::Item getConfigurationPath(const Path::Item& file_name, bool raise_exception);
59 extern template ELEMENTS_API Path::Item getConfigurationPath(const std::string& file_name, bool raise_exception);
60 
62 
63 namespace Configuration {
64 
71 
81 template <typename T>
82 ELEMENTS_API Path::Item getPath(const T& file_name, bool raise_exception = true);
83 
84 // instantiation of the most expected types
85 extern template ELEMENTS_API Path::Item getPath(const Path::Item& file_name, bool raise_exception);
86 extern template ELEMENTS_API Path::Item getPath(const std::string& file_name, bool raise_exception);
87 
93 ELEMENTS_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
ELEMENTS_API std::string getVariableName()
alias for the getAuxiliaryVariableName function
ELEMENTS_API std::vector< Path::Item > getLocations(bool exist_only=false)
alias for the getConfigurationLocations function
#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
template ELEMENTS_API Path::Item getPath(const std::string &file_name, bool raise_exception)
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)