Elements
5.8
A C++ base framework for the Euclid Software.
|
Enumerations | |
enum | Type { Type::executable, Type::library, Type::python, Type::configuration, Type::auxiliary } |
Functions | |
template<typename T , typename U > | |
boost::filesystem::path | getPathFromLocations (const T &file_name, const std::vector< U > &locations) |
retrieve path from a file name and a set of location to look into More... | |
template<typename T , typename U > | |
std::vector < boost::filesystem::path > | 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 More... | |
template<typename T > | |
boost::filesystem::path | getPathFromEnvVariable (const T &file_name, const std::string &path_variable) |
retrieve path from a file name and an environment variable to look into More... | |
template<typename T > | |
std::string | joinPath (const std::vector< T > path_list) |
collate a vector of path into a string using PATH_SEP More... | |
template<typename T , typename U > | |
std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< T > &initial_locations, const std::vector< U > &suffixes) |
ELEMENTS_API std::vector < boost::filesystem::path > | getLocationsFromEnv (const std::string &path_variable, bool exist_only=false) |
function to get the locations from an environment variable More... | |
template<typename T , typename U > | |
ELEMENTS_API boost::filesystem::path | getPathFromLocations (const T &file_name, const std::vector< U > &locations) |
retrieve path from a file name and a set of location to look into More... | |
template ELEMENTS_API boost::filesystem::path | getPathFromLocations (const boost::filesystem::path &file_name, const std::vector< boost::filesystem::path > &locations) |
template ELEMENTS_API boost::filesystem::path | getPathFromLocations (const boost::filesystem::path &file_name, const std::vector< std::string > &locations) |
template ELEMENTS_API boost::filesystem::path | getPathFromLocations (const std::string &file_name, const std::vector< boost::filesystem::path > &locations) |
template ELEMENTS_API boost::filesystem::path | getPathFromLocations (const std::string &file_name, const std::vector< std::string > &locations) |
template<typename T , typename U > | |
ELEMENTS_API std::vector < boost::filesystem::path > | 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 More... | |
template ELEMENTS_API std::vector < boost::filesystem::path > | getAllPathFromLocations (const boost::filesystem::path &file_name, const std::vector< boost::filesystem::path > &locations) |
template ELEMENTS_API std::vector < boost::filesystem::path > | getAllPathFromLocations (const boost::filesystem::path &file_name, const std::vector< std::string > &locations) |
template ELEMENTS_API std::vector < boost::filesystem::path > | getAllPathFromLocations (const std::string &file_name, const std::vector< boost::filesystem::path > &locations) |
template ELEMENTS_API std::vector < boost::filesystem::path > | getAllPathFromLocations (const std::string &file_name, const std::vector< std::string > &locations) |
template<typename T > | |
ELEMENTS_API boost::filesystem::path | getPathFromEnvVariable (const T &file_name, const std::string &path_variable) |
retrieve path from a file name and an environment variable to look into More... | |
template ELEMENTS_API boost::filesystem::path | getPathFromEnvVariable< boost::filesystem::path > (const boost::filesystem::path &file_name, const std::string &path_variable) |
template ELEMENTS_API boost::filesystem::path | getPathFromEnvVariable< std::string > (const std::string &file_name, const std::string &path_variable) |
template<typename T > | |
ELEMENTS_API std::string | joinPath (const std::vector< T > path_list) |
collate a vector of path into a string using PATH_SEP More... | |
template<typename T , typename U > | |
ELEMENTS_API std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< T > &initial_locations, const std::vector< U > &suffixes) |
template ELEMENTS_API std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< boost::filesystem::path > &initial_locations, const std::vector< boost::filesystem::path > &suffixes) |
template ELEMENTS_API std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< boost::filesystem::path > &initial_locations, const std::vector< std::string > &suffixes) |
template ELEMENTS_API std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< std::string > &initial_locations, const std::vector< boost::filesystem::path > &suffixes) |
template ELEMENTS_API std::vector < boost::filesystem::path > | multiPathAppend (const std::vector< std::string > &initial_locations, const std::vector< std::string > &suffixes) |
template path | getPathFromLocations (const path &file_name, const vector< path > &locations) |
template path | getPathFromLocations (const path &file_name, const vector< string > &locations) |
template path | getPathFromLocations (const string &file_name, const vector< path > &locations) |
template vector< path > | getAllPathFromLocations (const path &file_name, const vector< path > &locations) |
template vector< path > | getAllPathFromLocations (const path &file_name, const vector< string > &locations) |
template vector< path > | getAllPathFromLocations (const string &file_name, const vector< path > &locations) |
template path | getPathFromEnvVariable< path > (const path &file_name, const string &path_variable) |
template path | getPathFromEnvVariable< string > (const string &file_name, const string &path_variable) |
template vector< path > | multiPathAppend (const vector< path > &initial_locations, const vector< path > &suffixes) |
template vector< path > | multiPathAppend (const vector< path > &initial_locations, const vector< string > &suffixes) |
template vector< path > | multiPathAppend (const vector< string > &initial_locations, const vector< path > &suffixes) |
Variables | |
ELEMENTS_API const std::string | PATH_SEP {":"} |
Separator of path entries. Usually ":" on Unix. More... | |
ELEMENTS_API const std::map < Type, const std::string > | VARIABLE |
map containing the name of the path variable for each type More... | |
ELEMENTS_API const std::map < Type, const std::vector < std::string > > | SUFFIXES |
map containing the default project installation suffixes for each variable More... | |
ELEMENTS_API const std::map < Type, const std::vector < std::string > > | DEFAULT_LOCATIONS |
map containing the default external locations for each variable More... | |
ELEMENTS_API const std::map < Type, const bool > | HAS_SUBLEVELS |
map containing the sub-level property of the path components More... | |
|
strong |
std::vector<boost::filesystem::path> Elements::Path::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
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
locations | vector of locations to look into |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
U | type of the location. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 58 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), std::remove_if(), std::vector< T >::size(), and std::transform().
template vector<path> Elements::Path::getAllPathFromLocations | ( | const path & | file_name, |
const vector< path > & | locations | ||
) |
template vector<path> Elements::Path::getAllPathFromLocations | ( | const path & | file_name, |
const vector< string > & | locations | ||
) |
template vector<path> Elements::Path::getAllPathFromLocations | ( | const string & | file_name, |
const vector< path > & | locations | ||
) |
ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::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
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
locations | vector of locations to look into |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
U | type of the location. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 58 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), std::remove_if(), std::vector< T >::size(), and std::transform().
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::getAllPathFromLocations | ( | const boost::filesystem::path & | file_name, |
const std::vector< boost::filesystem::path > & | locations | ||
) |
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::getAllPathFromLocations | ( | const boost::filesystem::path & | file_name, |
const std::vector< std::string > & | locations | ||
) |
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::getAllPathFromLocations | ( | const std::string & | file_name, |
const std::vector< boost::filesystem::path > & | locations | ||
) |
template vector< path > Elements::Path::getAllPathFromLocations | ( | const std::string & | file_name, |
const std::vector< std::string > & | locations | ||
) |
vector< path > Elements::Path::getLocationsFromEnv | ( | const std::string & | path_variable, |
bool | exist_only = false |
||
) |
function to get the locations from an environment variable
This function return the raw locations pointed by the environment variable. It doesn't add the internal locations which are not in the variable (like /usr/lib for the LD_LIBRARY_PATH environment variable)
path_variable | name of the environment variable |
exist_only | if true returns only existing locations. by default it is set to false. |
Definition at line 79 of file Path.cpp.
References std::string::begin(), std::vector< T >::cbegin(), std::vector< T >::cend(), Elements::System::getEnv(), PATH_SEP, std::remove_if(), Elements::Units::s, std::vector< T >::size(), and std::transform().
Referenced by Elements::getAuxiliaryLocations(), Elements::getConfigurationLocations(), and getPathFromEnvVariable().
boost::filesystem::path Elements::Path::getPathFromEnvVariable | ( | const T & | file_name, |
const std::string & | path_variable | ||
) |
retrieve path from a file name and an environment variable to look into
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
path_variable | name of the environment variable |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 85 of file Path.icpp.
References getLocationsFromEnv(), and getPathFromLocations().
ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromEnvVariable | ( | const T & | file_name, |
const std::string & | path_variable | ||
) |
retrieve path from a file name and an environment variable to look into
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
path_variable | name of the environment variable |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 85 of file Path.icpp.
References getLocationsFromEnv(), and getPathFromLocations().
template ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromEnvVariable< boost::filesystem::path > | ( | const boost::filesystem::path & | file_name, |
const std::string & | path_variable | ||
) |
template path Elements::Path::getPathFromEnvVariable< path > | ( | const path & | file_name, |
const string & | path_variable | ||
) |
template ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromEnvVariable< std::string > | ( | const std::string & | file_name, |
const std::string & | path_variable | ||
) |
template path Elements::Path::getPathFromEnvVariable< string > | ( | const string & | file_name, |
const string & | path_variable | ||
) |
boost::filesystem::path Elements::Path::getPathFromLocations | ( | const T & | file_name, |
const std::vector< U > & | locations | ||
) |
retrieve path from a file name and a set of location to look into
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
locations | vector of locations to look into |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
U | type of the location. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 37 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), and std::find_if().
Referenced by Elements::getAuxiliaryPath(), Elements::getConfigurationPath(), and getPathFromEnvVariable().
template path Elements::Path::getPathFromLocations | ( | const path & | file_name, |
const vector< path > & | locations | ||
) |
template path Elements::Path::getPathFromLocations | ( | const path & | file_name, |
const vector< string > & | locations | ||
) |
template path Elements::Path::getPathFromLocations | ( | const string & | file_name, |
const vector< path > & | locations | ||
) |
ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromLocations | ( | const T & | file_name, |
const std::vector< U > & | locations | ||
) |
retrieve path from a file name and a set of location to look into
file_name | file name to look for. Can be of the form "Some.txt" or "Place/Some.txt" |
locations | vector of locations to look into |
T | type of the file name. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
U | type of the location. Can be anything that can be converted to a boost filesystem path. In principle either std::string or path. |
Definition at line 37 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), and std::find_if().
Referenced by Elements::getAuxiliaryPath(), Elements::getConfigurationPath(), and getPathFromEnvVariable().
template ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromLocations | ( | const boost::filesystem::path & | file_name, |
const std::vector< boost::filesystem::path > & | locations | ||
) |
template ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromLocations | ( | const boost::filesystem::path & | file_name, |
const std::vector< std::string > & | locations | ||
) |
template ELEMENTS_API boost::filesystem::path Elements::Path::getPathFromLocations | ( | const std::string & | file_name, |
const std::vector< boost::filesystem::path > & | locations | ||
) |
template path Elements::Path::getPathFromLocations | ( | const std::string & | file_name, |
const std::vector< std::string > & | locations | ||
) |
std::string Elements::Path::joinPath | ( | const std::vector< T > | path_list | ) |
collate a vector of path into a string using PATH_SEP
path_list | list of path to be joined. |
Definition at line 97 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), PATH_SEP, Elements::Units::s, std::vector< T >::size(), and std::transform().
Referenced by Elements::ProgramManager::bootstrapEnvironment().
ELEMENTS_API std::string Elements::Path::joinPath | ( | const std::vector< T > | path_list | ) |
collate a vector of path into a string using PATH_SEP
path_list | list of path to be joined. |
Definition at line 97 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), PATH_SEP, Elements::Units::s, std::vector< T >::size(), and std::transform().
Referenced by Elements::ProgramManager::bootstrapEnvironment().
std::vector<boost::filesystem::path> Elements::Path::multiPathAppend | ( | const std::vector< T > & | initial_locations, |
const std::vector< U > & | suffixes | ||
) |
Definition at line 116 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), std::for_each(), Elements::Units::s, std::vector< T >::size(), and std::transform().
Referenced by Elements::ProgramManager::bootstrapEnvironment().
template vector<path> Elements::Path::multiPathAppend | ( | const vector< path > & | initial_locations, |
const vector< path > & | suffixes | ||
) |
template vector<path> Elements::Path::multiPathAppend | ( | const vector< path > & | initial_locations, |
const vector< string > & | suffixes | ||
) |
template vector<path> Elements::Path::multiPathAppend | ( | const vector< string > & | initial_locations, |
const vector< path > & | suffixes | ||
) |
ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::multiPathAppend | ( | const std::vector< T > & | initial_locations, |
const std::vector< U > & | suffixes | ||
) |
Definition at line 116 of file Path.icpp.
References std::vector< T >::cbegin(), std::vector< T >::cend(), std::for_each(), Elements::Units::s, std::vector< T >::size(), and std::transform().
Referenced by Elements::ProgramManager::bootstrapEnvironment().
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::multiPathAppend | ( | const std::vector< boost::filesystem::path > & | initial_locations, |
const std::vector< boost::filesystem::path > & | suffixes | ||
) |
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::multiPathAppend | ( | const std::vector< boost::filesystem::path > & | initial_locations, |
const std::vector< std::string > & | suffixes | ||
) |
template ELEMENTS_API std::vector<boost::filesystem::path> Elements::Path::multiPathAppend | ( | const std::vector< std::string > & | initial_locations, |
const std::vector< boost::filesystem::path > & | suffixes | ||
) |
template vector< path > Elements::Path::multiPathAppend | ( | const std::vector< std::string > & | initial_locations, |
const std::vector< std::string > & | suffixes | ||
) |
const string Elements::Path::PATH_SEP {":"} |
Separator of path entries. Usually ":" on Unix.
Definition at line 44 of file Path.cpp.
Referenced by Elements::ProgramManager::bootstrapEnvironment(), getLocationsFromEnv(), and joinPath().
map containing the default project installation suffixes for each variable
Definition at line 54 of file Path.cpp.
Referenced by Elements::ProgramManager::bootstrapEnvironment().
map containing the name of the path variable for each type
Definition at line 46 of file Path.cpp.
Referenced by Elements::ProgramManager::bootstrapEnvironment(), Elements::getAuxiliaryLocations(), Elements::getAuxiliaryVariableName(), Elements::getConfigurationLocations(), Elements::getConfigurationVariableName(), and Elements::ProgramManager::logTheEnvironment().