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/config.hpp"
12 
13 namespace pinocchio
14 {
15 
24  PINOCCHIO_DLLAPI std::vector<std::string>
25  extractPathFromEnvVar(const std::string & env_var_name,
26 #ifdef _WIN32
27  const std::string & delimiter = ";"
28 #else
29  const std::string & delimiter = ":"
30 #endif
31  );
32 
39  PINOCCHIO_DLLAPI void
40  appendSuffixToPaths(std::vector<std::string> & list_of_paths,
41  const std::string & suffix);
42 
50  PINOCCHIO_DLLAPI void
51  extractPathFromEnvVar(const std::string & env_var_name,
52  std::vector<std::string> & list_of_paths,
53 #ifdef _WIN32
54  const std::string & delimiter = ";"
55 #else
56  const std::string & delimiter = ":"
57 #endif
58  );
59 
60 
66  PINOCCHIO_DLLAPI std::vector<std::string> rosPaths();
67 
68 }
69 
70 #endif // __pinocchio_utils_file_explorer_hpp__
void extractPathFromEnvVar(const std::string &env_var_name, std::vector< std::string > &list_of_paths, const std::string &delimiter)
Parse an environment variable if exists and extract paths according to the delimiter.
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...
std::vector< std::string > rosPaths()
Parse the environment variables ROS_PACKAGE_PATH / AMENT_PREFIX_PATH and extract paths.
Main pinocchio namespace.
Definition: timings.cpp:28


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:30