Elements  6.2
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 
Elements::Kernel::Path::Item
boost::filesystem::path Item
Definition: Path.h:56
Export.h
defines the macros to be used for explicit export of the symbols
std::string
STL class.
Elements::Kernel::getConfigurationPath
ELEMENTS_API Path::Item getConfigurationPath(const T &file_name, bool raise_exception=true)
Path.h
provide functions to retrieve resources pointed by environment variables
std::vector
STL class.
Elements::Kernel::Configuration::getPath
template ELEMENTS_API Path::Item getPath(const std::string &file_name, bool raise_exception)
Elements::Kernel::Configuration::getLocations
ELEMENTS_API std::vector< Path::Item > getLocations(bool exist_only=false)
alias for the getConfigurationLocations function
Definition: Configuration.cpp:76
Elements::Kernel::getConfigurationVariableName
ELEMENTS_API std::string getConfigurationVariableName()
retrieve the variable name used for the configuration file lookup
Definition: Configuration.cpp:41
ELEMENTS_API
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
Definition: Export.h:74
Elements::Kernel::getConfigurationLocations
ELEMENTS_API std::vector< Path::Item > getConfigurationLocations(bool exist_only=false)
Definition: Configuration.cpp:49
Elements::Kernel::Configuration::getVariableName
ELEMENTS_API std::string getVariableName()
alias for the getAuxiliaryVariableName function
Definition: Configuration.cpp:68
Configuration.tpp
Elements
Definition: callBackExample.h:35