17 #ifndef _GAZEBO_MODELDATABSE_HH_
18 #define _GAZEBO_MODELDATABSE_HH_
24 #include <boost/function.hpp>
31 #define GZ_MODEL_MANIFEST_FILENAME "model.config"
34 #define GZ_MODEL_DB_MANIFEST_FILENAME "database.config"
41 class ModelDatabasePrivate;
60 public:
void Start(
bool _fetchImmediately =
false);
67 public: std::string GetURI();
74 public: std::map<std::string, std::string> GetModels();
84 void (
const std::map<std::string, std::string> &)> _func);
93 public: std::string GetModelName(
const std::string &_uri);
97 public: std::string GetModelConfig(
const std::string &_uri);
101 public: std::string GetDBConfig(
const std::string &_uri);
110 public: std::string GetModelPath(
const std::string &_uri,
111 bool _forceDownload =
false);
119 public: std::string GetModelFile(
const std::string &_uri);
127 public:
void DownloadDependencies(
const std::string &_path);
134 public:
bool HasModel(
const std::string &_modelName);
139 private: std::string GetManifestImpl(
const std::string &_uri);
144 private:
void UpdateModelCache(
bool _fetchImmediately);
148 private:
bool UpdateModelCacheImpl();
151 private: ModelDatabasePrivate *dataPtr;
Singleton template class.
Definition: SingletonT.hh:33
Connects to model database, and has utility functions to find models.
Definition: ModelDatabase.hh:49
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153