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"
44 class ModelDatabasePrivate;
63 public:
void Start(
bool _fetchImmediately =
false);
77 public: std::map<std::string, std::string>
GetModels();
87 void (
const std::map<std::string, std::string> &)> _func);
114 bool _forceDownload =
false);
137 public:
bool HasModel(
const std::string &_modelName);
142 private: std::string GetManifestImpl(
const std::string &_uri);
147 private:
void UpdateModelCache(
bool _fetchImmediately);
151 private:
bool UpdateModelCacheImpl();
154 private: ModelDatabasePrivate *dataPtr;
common
Definition FuelModelDatabase.hh:37
gazebo
Definition ModelDatabase.hh:37
common
Definition ModelDatabase.hh:37
Singleton template class.
Definition SingletonT.hh:34
Connects to model database, and has utility functions to find models.
Definition ModelDatabase.hh:53
void Fini()
Finalize the model database.
std::string GetModelConfig(const std::string &_uri)
Return the model.config file as a string.
void DownloadDependencies(const std::string &_path)
Download all dependencies for a give model path.
std::string GetModelFile(const std::string &_uri)
Get a model's SDF file based on a URI.
event::ConnectionPtr GetModels(boost::function< void(const std::map< std::string, std::string > &)> _func)
Get the dictionary of all model names via a callback.
#define GZ_SINGLETON_DECLARE(visibility, n1, n2, singletonType)
Helper to declare typed SingletonT.
Definition SingletonT.hh:58
std::string GetModelName(const std::string &_uri)
Get the name of a model based on a URI.
std::string GetModelPath(const std::string &_uri, bool _forceDownload=false)
Get the local path to a model.
std::string GetDBConfig(const std::string &_uri)
Return the database.config file as a string.
std::string GetURI()
Returns the the global model database URI.
void Start(bool _fetchImmediately=false)
Start the model database.
std::map< std::string, std::string > GetModels()
Returns the dictionary of all the model names.
bool HasModel(const std::string &_modelName)
Returns true if the model exists on the database.
boost::shared_ptr< Connection > ConnectionPtr
Definition CommonTypes.hh:134
Forward declarations for the common classes.
Definition Animation.hh:27