Elements 6.3.1
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Elements::Kernel::Path Namespace Reference

Typedefs

using Item = boost::filesystem::path
 

Enumerations

enum class  Type {
  executable , library , python , configuration ,
  auxiliary
}
 

Functions

ELEMENTS_API std::vector< ItemgetLocationsFromEnv (const std::string &path_variable, bool exist_only=false)
 function to get the locations from an environment variable
 
ELEMENTS_API std::vector< ItemgetLocations (const Type &path_type, bool exist_only=false)
 function to get the locations for the specific type
 
template<typename T , typename U >
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
 
template ELEMENTS_API Item getPathFromLocations (const Item &file_name, const std::vector< Item > &locations)
 
template ELEMENTS_API Item getPathFromLocations (const Item &file_name, const std::vector< std::string > &locations)
 
template ELEMENTS_API Item getPathFromLocations (const std::string &file_name, const std::vector< Item > &locations)
 
template ELEMENTS_API Item getPathFromLocations (const std::string &file_name, const std::vector< std::string > &locations)
 
template<typename T , typename U >
ELEMENTS_API std::vector< ItemgetAllPathFromLocations (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
 
template ELEMENTS_API std::vector< ItemgetAllPathFromLocations (const Item &file_name, const std::vector< Item > &locations)
 
template ELEMENTS_API std::vector< ItemgetAllPathFromLocations (const Item &file_name, const std::vector< std::string > &locations)
 
template ELEMENTS_API std::vector< ItemgetAllPathFromLocations (const std::string &file_name, const std::vector< Item > &locations)
 
template ELEMENTS_API std::vector< ItemgetAllPathFromLocations (const std::string &file_name, const std::vector< std::string > &locations)
 
template<typename T >
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
 
template ELEMENTS_API Item getPathFromEnvVariable< Item > (const Item &file_name, const std::string &path_variable)
 
template ELEMENTS_API Item 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
 
template ELEMENTS_API std::string joinPath (const std::vector< Item > &path_list)
 
template ELEMENTS_API std::string joinPath (const std::vector< std::string > &path_list)
 
template<typename... Args>
ELEMENTS_API auto join (Args &&... args) -> decltype(joinPath(std::forward< Args >(args)...))
 alias for the joinPath function
 
ELEMENTS_API std::vector< ItemsplitPath (const std::string &path_string)
 split a string into a vector of path using PATH_SEP
 
template<typename... Args>
ELEMENTS_API auto split (Args &&... args) -> decltype(splitPath(std::forward< Args >(args)...))
 alias for the splitPath function
 
template<typename T , typename U >
ELEMENTS_API std::vector< ItemmultiPathAppend (const std::vector< T > &initial_locations, const std::vector< U > &suffixes)
 path join each suffix to each initial locations
 
template ELEMENTS_API std::vector< ItemmultiPathAppend (const std::vector< Item > &initial_locations, const std::vector< Item > &suffixes)
 
template ELEMENTS_API std::vector< ItemmultiPathAppend (const std::vector< Item > &initial_locations, const std::vector< std::string > &suffixes)
 
template ELEMENTS_API std::vector< ItemmultiPathAppend (const std::vector< std::string > &initial_locations, const std::vector< Item > &suffixes)
 
template ELEMENTS_API std::vector< ItemmultiPathAppend (const std::vector< std::string > &initial_locations, const std::vector< std::string > &suffixes)
 
template<typename T >
ELEMENTS_API std::vector< ItemremoveDuplicates (const std::vector< T > &path_list)
 remove duplicated paths keeping the order
 
template ELEMENTS_API std::vector< ItemremoveDuplicates (const std::vector< Item > &path_list)
 
template ELEMENTS_API std::vector< ItemremoveDuplicates (const std::vector< std::string > &path_list)
 
template Item getPathFromEnvVariable< string > (const string &file_name, const string &path_variable)
 

Variables

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

Typedef Documentation

◆ Item

using Elements::Kernel::Path::Item = boost::filesystem::path

Definition at line 57 of file Path.h.

Enumeration Type Documentation

◆ Type

enum class Elements::Kernel::Path::Type
strong
Enumerator
executable 
library 
python 
configuration 
auxiliary 

Definition at line 51 of file Path.h.

Function Documentation

◆ getAllPathFromLocations() [1/4]

template vector< Item > Elements::Kernel::Path::getAllPathFromLocations ( const Item & file_name,
const std::vector< Item > & locations )
extern

◆ getAllPathFromLocations() [2/4]

template vector< Item > Elements::Kernel::Path::getAllPathFromLocations ( const Item & file_name,
const std::vector< std::string > & locations )
extern

◆ getAllPathFromLocations() [3/4]

template vector< Item > Elements::Kernel::Path::getAllPathFromLocations ( const std::string & file_name,
const std::vector< Item > & locations )
extern

◆ getAllPathFromLocations() [4/4]

template vector< Item > Elements::Kernel::Path::getAllPathFromLocations ( const std::string & file_name,
const std::vector< std::string > & locations )
extern

◆ getPathFromEnvVariable< Item >()

template Item Elements::Kernel::Path::getPathFromEnvVariable< Item > ( const Item & file_name,
const std::string & path_variable )
extern

◆ getPathFromEnvVariable< std::string >()

template ELEMENTS_API Item Elements::Kernel::Path::getPathFromEnvVariable< std::string > ( const std::string & file_name,
const std::string & path_variable )
extern

◆ getPathFromEnvVariable< string >()

template Item Elements::Kernel::Path::getPathFromEnvVariable< string > ( const string & file_name,
const string & path_variable )

References joinPath(), multiPathAppend(), and removeDuplicates().

Here is the call graph for this function:

◆ getPathFromLocations() [1/4]

template Item Elements::Kernel::Path::getPathFromLocations ( const Item & file_name,
const std::vector< Item > & locations )
extern

◆ getPathFromLocations() [2/4]

template Item Elements::Kernel::Path::getPathFromLocations ( const Item & file_name,
const std::vector< std::string > & locations )
extern

◆ getPathFromLocations() [3/4]

template Item Elements::Kernel::Path::getPathFromLocations ( const std::string & file_name,
const std::vector< Item > & locations )
extern

◆ getPathFromLocations() [4/4]

template Item Elements::Kernel::Path::getPathFromLocations ( const std::string & file_name,
const std::vector< std::string > & locations )
extern

◆ joinPath() [1/2]

template string Elements::Kernel::Path::joinPath ( const std::vector< Item > & path_list)
extern

◆ joinPath() [2/2]

template string Elements::Kernel::Path::joinPath ( const std::vector< std::string > & path_list)
extern

◆ multiPathAppend() [1/4]

template vector< Item > Elements::Kernel::Path::multiPathAppend ( const std::vector< Item > & initial_locations,
const std::vector< Item > & suffixes )
extern

◆ multiPathAppend() [2/4]

template vector< Item > Elements::Kernel::Path::multiPathAppend ( const std::vector< Item > & initial_locations,
const std::vector< std::string > & suffixes )
extern

◆ multiPathAppend() [3/4]

template vector< Item > Elements::Kernel::Path::multiPathAppend ( const std::vector< std::string > & initial_locations,
const std::vector< Item > & suffixes )
extern

◆ multiPathAppend() [4/4]

template vector< Item > Elements::Kernel::Path::multiPathAppend ( const std::vector< std::string > & initial_locations,
const std::vector< std::string > & suffixes )
extern

◆ removeDuplicates() [1/2]

template vector< Item > Elements::Kernel::Path::removeDuplicates ( const std::vector< Item > & path_list)
extern

◆ removeDuplicates() [2/2]

template vector< Item > Elements::Kernel::Path::removeDuplicates ( const std::vector< std::string > & path_list)
extern