17 #ifndef _GAZEBO_SYSTEMPATHS_HH_ 18 #define _GAZEBO_SYSTEMPATHS_HH_ 25 #define GetCurrentDir _getcwd 28 #define GetCurrentDir getcwd 31 #include <boost/filesystem.hpp> 66 public: std::string GetLogPath()
const;
70 public:
const std::list<std::string> &GetGazeboPaths();
74 public:
const std::list<std::string> &GetOgrePaths();
78 public:
const std::list<std::string> &GetPluginPaths();
82 public:
const std::list<std::string> &GetModelPaths();
86 public: std::string GetWorldPathExtension();
91 public:
const std::string &TmpPath()
const;
96 public:
const std::string &TmpInstancePath()
const;
101 public: std::string DefaultTestPath()
const;
107 public: std::string FindFileURI(
const std::string &_uri);
116 public: std::string FindFile(
const std::string &_filename,
117 bool _searchLocalPath =
true);
126 public:
void AddFindFileCallback(
127 std::function<std::string (
const std::string &)> _cb);
131 public:
void AddGazeboPaths(
const std::string &_path);
135 public:
void AddModelPaths(
const std::string &_path);
140 public:
void AddModelPathsUpdate(
const std::string &_path);
144 public:
void AddOgrePaths(
const std::string &_path);
148 public:
void AddPluginPaths(
const std::string &_path);
151 public:
void ClearGazeboPaths();
154 public:
void ClearModelPaths();
157 public:
void ClearOgrePaths();
160 public:
void ClearPluginPaths();
164 public:
void AddSearchPathSuffix(
const std::string &_suffix);
167 private:
void UpdateModelPaths();
170 private:
void UpdateGazeboPaths();
173 private:
void UpdatePluginPaths();
176 private:
void UpdateOgrePaths();
181 private:
void InsertUnique(
const std::string &_path,
182 std::list<std::string> &_list);
185 private: std::list<std::string> gazeboPaths;
188 private: std::list<std::string> ogrePaths;
191 private: std::list<std::string> pluginPaths;
193 private: std::list<std::string> suffixPaths;
195 private: std::list<std::string> modelPaths;
197 private: std::string logPath;
218 private: boost::filesystem::path tmpPath;
221 private: boost::filesystem::path tmpInstancePath;
common
Definition: SystemPaths.hh:41
Forward declarations for the common classes.
Definition: Animation.hh:26
Singleton template class.
Definition: SingletonT.hh:33
bool gazeboPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition: SystemPaths.hh:207
bool pluginPathsFromEnv
if true, call UpdatePluginPaths() within GetPluginPaths()
Definition: SystemPaths.hh:210
event::EventT< void(std::string)> updateModelRequest
Event to notify InsertModelWidget that the model paths were changed.
Definition: SystemPaths.hh:201
bool modelPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition: SystemPaths.hh:204
Functions to handle getting system paths, keeps track of:
Definition: SystemPaths.hh:59
bool ogrePathsFromEnv
if true, call UpdateOgrePaths() within GetOgrePaths()
Definition: SystemPaths.hh:213
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition: SingletonT.hh:61