17#ifndef _GAZEBO_SYSTEMPATHS_HH_
18#define _GAZEBO_SYSTEMPATHS_HH_
25 #define GetCurrentDir _getcwd
28 #define GetCurrentDir getcwd
31#include <boost/filesystem.hpp>
91 public:
const std::string &
TmpPath()
const;
116 public: std::string
FindFile(
const std::string &_filename,
117 bool _searchLocalPath =
true);
127 std::function<std::string (
const std::string &)> _cb);
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 FuelModelDatabase.hh:37
gazebo
Definition SystemPaths.hh:41
common
Definition SystemPaths.hh:41
Singleton template class.
Definition SingletonT.hh:34
Functions to handle getting system paths, keeps track of:
Definition SystemPaths.hh:60
void ClearOgrePaths()
clear out SystemPaths::ogrePaths
void AddSearchPathSuffix(const std::string &_suffix)
add _suffix to the list of path search suffixes
void AddGazeboPaths(const std::string &_path)
Add colon delimited paths to Gazebo install.
void AddFindFileCallback(std::function< std::string(const std::string &)> _cb)
Add a callback to use when Gazebo can't find a file.
void ClearGazeboPaths()
clear out SystemPaths::gazeboPaths
const std::string & TmpInstancePath() const
Returns a unique temporary file for this instance of SystemPath.
std::string GetLogPath() const
Get the log path.
bool ogrePathsFromEnv
if true, call UpdateOgrePaths() within GetOgrePaths()
Definition SystemPaths.hh:213
void AddModelPaths(const std::string &_path)
Add colon delimited paths to modelPaths.
void AddPluginPaths(const std::string &_path)
Add colon delimited paths to plugins.
bool gazeboPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition SystemPaths.hh:207
std::string GetWorldPathExtension()
Returns the world path extension.
void ClearPluginPaths()
clear out SystemPaths::pluginPaths
const std::string & TmpPath() const
Returns the default path suitable for temporary files.
event::EventT< void(std::string)> updateModelRequest
Event to notify InsertModelWidget that the model paths were changed.
Definition SystemPaths.hh:201
void ClearModelPaths()
clear out SystemPaths::modelPaths
void AddModelPathsUpdate(const std::string &_path)
Add colon delimited paths to modelPaths and signal the update to InsertModelWidget.
const std::list< std::string > & GetModelPaths()
Get the model paths.
bool pluginPathsFromEnv
if true, call UpdatePluginPaths() within GetPluginPaths()
Definition SystemPaths.hh:210
std::string DefaultTestPath() const
Returns the default temporary test path.
void AddOgrePaths(const std::string &_path)
Add colon delimited paths to ogre install.
std::string FindFile(const std::string &_filename, bool _searchLocalPath=true)
Find a file in the gazebo paths.
const std::list< std::string > & GetOgrePaths()
Get the ogre install paths.
const std::list< std::string > & GetGazeboPaths()
Get the gazebo install paths.
std::string FindFileURI(const std::string &_uri)
Find a file or path using a URI.
bool modelPathsFromEnv
if true, call UpdateGazeboPaths() within GetGazeboPaths()
Definition SystemPaths.hh:204
const std::list< std::string > & GetPluginPaths()
Get the plugin paths.
A class for event processing.
Definition Event.hh:98
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition SingletonT.hh:58
Forward declarations for the common classes.
Definition Animation.hh:27