Elements
6.2
A C++ base framework for the Euclid Software.
|
Go to the documentation of this file.
35 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_PATH_H_
36 #define ELEMENTSKERNEL_ELEMENTSKERNEL_PATH_H_
38 #include <boost/filesystem.hpp>
47 inline namespace Kernel {
139 template <
typename T,
typename U>
166 template <
typename T,
typename U>
191 template <
typename T>
205 template <
typename T>
219 template <
typename... Args>
238 template <
typename... Args>
250 template <
typename T,
typename U>
268 template <
typename T>
279 #define ELEMENTSKERNEL_ELEMENTSKERNEL_PATH_IMPL_
281 #undef ELEMENTSKERNEL_ELEMENTSKERNEL_PATH_IMPL_
283 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_PATH_H_
boost::filesystem::path Item
defines the macros to be used for explicit export of the symbols
const ELEMENTS_API std::map< Type, const std::vector< std::string > > SUFFIXES
map containing the default project installation suffixes for each variable
ELEMENTS_API std::vector< Item > getLocationsFromEnv(const std::string &path_variable, bool exist_only=false)
function to get the locations from an environment variable
ELEMENTS_API auto split(Args &&... args) -> decltype(splitPath(std::forward< Args >(args)...))
alias for the splitPath function
ELEMENTS_API Item getPathFromLocations(const T &file_name, const std::vector< U > &locations)
retrieve path from a file name and a set of location to look into
ELEMENTS_API std::vector< Item > getLocations(const Type &path_type, bool exist_only=false)
function to get the locations for the specific type
const ELEMENTS_API std::map< Type, const bool > HAS_SUBLEVELS
map containing the sub-level property of the path components
template ELEMENTS_API Item getPathFromEnvVariable< Item >(const Item &file_name, const std::string &path_variable)
ELEMENTS_API Item getPathFromEnvVariable(const T &file_name, const std::string &path_variable)
retrieve path from a file name and an environment variable to look into
const ELEMENTS_API std::map< Type, const std::string > VARIABLE
map containing the name of the path variable for each type
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
ELEMENTS_API std::vector< Item > multiPathAppend(const std::vector< T > &initial_locations, const std::vector< U > &suffixes)
path join each suffix to each initial locations
ELEMENTS_API auto join(Args &&... args) -> decltype(joinPath(std::forward< Args >(args)...))
alias for the joinPath function
ELEMENTS_API std::vector< Item > getAllPathFromLocations(const T &file_name, const std::vector< U > &locations)
retrieve all the paths from a file name and a set of location to look into
const ELEMENTS_API std::map< Type, const std::vector< std::string > > DEFAULT_LOCATIONS
map containing the default external locations for each variable
const ELEMENTS_API std::string PATH_SEP
Separator of path entries. Usually ":" on Unix.
ELEMENTS_API std::vector< Item > splitPath(const std::string &path_string)
split a string into a vector of path using PATH_SEP
ELEMENTS_API std::vector< Item > removeDuplicates(const std::vector< T > &path_list)
remove duplicated paths keeping the order
ELEMENTS_API std::string joinPath(const std::vector< T > &path_list)
collate a vector of path into a string using PATH_SEP
Path::Item path
importing the path item from ElementsKernel