Elements  5.8
A C++ base framework for the Euclid Software.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Namespaces | Enumerations | Functions | Variables
Path.h File Reference

provide functions to retrieve resources pointed by environment variables More...

#include <string>
#include <vector>
#include <map>
#include <boost/filesystem.hpp>
#include "ElementsKernel/Export.h"
#include "ElementsKernel/_impl/Path.icpp"
Include dependency graph for Path.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Elements
 
 Elements::Path
 

Enumerations

enum  Elements::Path::Type {
  Elements::Path::Type::executable, Elements::Path::Type::library, Elements::Path::Type::python, Elements::Path::Type::configuration,
  Elements::Path::Type::auxiliary
}
 

Functions

ELEMENTS_API std::vector
< boost::filesystem::path > 
Elements::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 
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 More...
 
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 ELEMENTS_API
boost::filesystem::path 
Elements::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 > 
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 More...
 
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 ELEMENTS_API
std::vector
< boost::filesystem::path > 
Elements::Path::getAllPathFromLocations (const std::string &file_name, const std::vector< std::string > &locations)
 
template<typename T >
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 More...
 
template ELEMENTS_API
boost::filesystem::path 
Elements::Path::getPathFromEnvVariable< boost::filesystem::path > (const boost::filesystem::path &file_name, const std::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<typename T >
ELEMENTS_API std::string Elements::Path::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 > 
Elements::Path::multiPathAppend (const std::vector< T > &initial_locations, const std::vector< U > &suffixes)
 
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 ELEMENTS_API
std::vector
< boost::filesystem::path > 
Elements::Path::multiPathAppend (const std::vector< std::string > &initial_locations, const std::vector< std::string > &suffixes)
 

Variables

ELEMENTS_API const std::string Elements::Path::PATH_SEP {":"}
 Separator of path entries. Usually ":" on Unix. More...
 
ELEMENTS_API const std::map
< Type, const std::string
Elements::Path::VARIABLE
 map containing the name of the path variable for each type More...
 
ELEMENTS_API const std::map
< Type, const std::vector
< std::string > > 
Elements::Path::SUFFIXES
 map containing the default project installation suffixes for each variable More...
 
ELEMENTS_API const std::map
< Type, const std::vector
< std::string > > 
Elements::Path::DEFAULT_LOCATIONS
 map containing the default external locations for each variable More...
 
ELEMENTS_API const std::map
< Type, const bool > 
Elements::Path::HAS_SUBLEVELS
 map containing the sub-level property of the path components More...
 

Detailed Description

provide functions to retrieve resources pointed by environment variables

Date
May 13, 2016
Author
Hubert Degaudenzi

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the

Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file Path.h.