file-explorer.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2020 CNRS INRIA
3 //
4 
5 #ifndef __pinocchio_utils_file_explorer_hpp__
6 #define __pinocchio_utils_file_explorer_hpp__
7 
8 #include <string>
9 #include <vector>
10 
11 #include "pinocchio/parsers/config.hpp"
12 
13 namespace pinocchio
14 {
15 
25  PINOCCHIO_PARSERS_DLLAPI std::vector<std::string> extractPathFromEnvVar(
26  const std::string & env_var_name,
27 #ifdef _WIN32
28  const std::string & delimiter = ";"
29 #else
30  const std::string & delimiter = ":"
31 #endif
32  );
33 
41  PINOCCHIO_PARSERS_DLLAPI void
42  appendSuffixToPaths(std::vector<std::string> & list_of_paths, const std::string & suffix);
43 
53  PINOCCHIO_PARSERS_DLLAPI void extractPathFromEnvVar(
54  const std::string & env_var_name,
55  std::vector<std::string> & list_of_paths,
56 #ifdef _WIN32
57  const std::string & delimiter = ";"
58 #else
59  const std::string & delimiter = ":"
60 #endif
61  );
62 
70  PINOCCHIO_PARSERS_DLLAPI std::vector<std::string> rosPaths();
71 
72 } // namespace pinocchio
73 
74 #endif // __pinocchio_utils_file_explorer_hpp__
pinocchio::appendSuffixToPaths
PINOCCHIO_PARSERS_DLLAPI void appendSuffixToPaths(std::vector< std::string > &list_of_paths, const std::string &suffix)
For a given vector of paths, add a suffix inplace to each path and return the vector inplace.
Definition: file-explorer.cpp:52
pinocchio::rosPaths
PINOCCHIO_PARSERS_DLLAPI std::vector< std::string > rosPaths()
Parse the environment variables ROS_PACKAGE_PATH / AMENT_PREFIX_PATH and extract paths.
Definition: file-explorer.cpp:60
pinocchio::extractPathFromEnvVar
PINOCCHIO_PARSERS_DLLAPI std::vector< std::string > extractPathFromEnvVar(const std::string &env_var_name, const std::string &delimiter=":")
Parse an environment variable if exists and extract paths according to the delimiter.
Definition: file-explorer.cpp:45
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Thu Dec 19 2024 03:41:29