Go to the documentation of this file.
17 #ifndef _GAZEBO_SYSTEMPATHS_HH_
18 #define _GAZEBO_SYSTEMPATHS_HH_
25 #define GetCurrentDir _getcwd
28 #define GetCurrentDir getcwd
31 #include <boost/filesystem.hpp>
63 public: std::string GetLogPath()
const;
67 public:
const std::list<std::string> &GetGazeboPaths();
71 public:
const std::list<std::string> &GetOgrePaths();
75 public:
const std::list<std::string> &GetPluginPaths();
79 public:
const std::list<std::string> &GetModelPaths();
83 public: std::string GetWorldPathExtension();
88 public:
const std::string &TmpPath()
const;
93 public:
const std::string &TmpInstancePath()
const;
98 public: std::string DefaultTestPath()
const;
104 public: std::string FindFileURI(
const std::string &_uri);
113 public: std::string FindFile(
const std::string &_filename,
114 bool _searchLocalPath =
true);
123 public:
void AddFindFileCallback(
124 std::function<std::string (
const std::string &)> _cb);
128 public:
void AddGazeboPaths(
const std::string &_path);
132 public:
void AddModelPaths(
const std::string &_path);
137 public:
void AddModelPathsUpdate(
const std::string &_path);
141 public:
void AddOgrePaths(
const std::string &_path);
145 public:
void AddPluginPaths(
const std::string &_path);
148 public:
void ClearGazeboPaths();
151 public:
void ClearModelPaths();
154 public:
void ClearOgrePaths();
157 public:
void ClearPluginPaths();
161 public:
void AddSearchPathSuffix(
const std::string &_suffix);
164 private:
void UpdateModelPaths();
167 private:
void UpdateGazeboPaths();
170 private:
void UpdatePluginPaths();
173 private:
void UpdateOgrePaths();
178 private:
void InsertUnique(
const std::string &_path,
179 std::list<std::string> &_list);
182 private: std::list<std::string> gazeboPaths;
185 private: std::list<std::string> ogrePaths;
188 private: std::list<std::string> pluginPaths;
190 private: std::list<std::string> suffixPaths;
192 private: std::list<std::string> modelPaths;
194 private: std::string logPath;
215 private: boost::filesystem::path tmpPath;
218 private: boost::filesystem::path tmpInstancePath;
std::string DefaultTestPath() const
Returns the default temporary test path.
void AddSearchPathSuffix(const std::string &_suffix)
add _suffix to the list of path search suffixes
void AddOgrePaths(const std::string &_path)
Add colon delimited paths to ogre install.
void ClearModelPaths()
clear out SystemPaths::modelPaths
Forward declarations for the common classes.
Definition: Animation.hh:26
const std::list< std::string > & GetOgrePaths()
Get the ogre install paths.
void ClearPluginPaths()
clear out SystemPaths::pluginPaths
Singleton template class.
Definition: SingletonT.hh:33
bool modelPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition: SystemPaths.hh:201
void ClearOgrePaths()
clear out SystemPaths::ogrePaths
event::EventT< void(std::string)> updateModelRequest
Event to notify InsertModelWidget that the model paths were changed.
Definition: SystemPaths.hh:198
const std::list< std::string > & GetGazeboPaths()
Get the gazebo install paths.
void AddModelPaths(const std::string &_path)
Add colon delimited paths to modelPaths.
A class for event processing.
Definition: Event.hh:97
const std::list< std::string > & GetModelPaths()
Get the model paths.
bool gazeboPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition: SystemPaths.hh:204
std::string GetWorldPathExtension()
Returns the world path extension.
void AddModelPathsUpdate(const std::string &_path)
Add colon delimited paths to modelPaths and signal the update to InsertModelWidget.
void AddGazeboPaths(const std::string &_path)
Add colon delimited paths to Gazebo install.
std::string GetLogPath() const
Get the log path.
std::string FindFile(const std::string &_filename, bool _searchLocalPath=true)
Find a file in the gazebo paths.
const std::list< std::string > & GetPluginPaths()
Get the plugin paths.
void AddPluginPaths(const std::string &_path)
Add colon delimited paths to plugins.
void ClearGazeboPaths()
clear out SystemPaths::gazeboPaths
void AddFindFileCallback(std::function< std::string(const std::string &)> _cb)
Add a callback to use when Gazebo can't find a file.
bool ogrePathsFromEnv
if true, call UpdateOgrePaths() within GetOgrePaths()
Definition: SystemPaths.hh:210
std::string FindFileURI(const std::string &_uri)
Find a file or path using a URI.
bool pluginPathsFromEnv
if true, call UpdatePluginPaths() within GetPluginPaths()
Definition: SystemPaths.hh:207
const std::string & TmpInstancePath() const
Returns a unique temporary file for this instance of SystemPath.
Functions to handle getting system paths, keeps track of:
Definition: SystemPaths.hh:56
const std::string & TmpPath() const
Returns the default path suitable for temporary files.