17 #ifndef _GAZEBO_MODELDATABSE_HH_
18 #define _GAZEBO_MODELDATABSE_HH_
23 #include <boost/thread.hpp>
24 #include <boost/thread/mutex.hpp>
47 public: std::string
GetURI();
54 public: std::map<std::string, std::string>
GetModels();
62 void (
const std::map<std::string, std::string> &)> _func);
71 public: std::string
GetModelName(
const std::string &_uri);
75 public: std::string
GetManifest(
const std::string &_uri);
83 public: std::string
GetModelPath(
const std::string &_uri);
91 public: std::string
GetModelFile(
const std::string &_uri);
106 public:
bool HasModel(
const std::string &_modelName);
109 private:
void UpdateModelCache();
113 private:
bool UpdateModelCacheImpl();
116 private: std::map<std::string, std::string> modelCache;
122 private: boost::mutex updateMutex;
125 private: boost::thread *updateCacheThread;
128 private: boost::condition_variable updateCacheCondition;
132 private:
typedef boost::function<
133 void (
const std::map<std::string, std::string> &)> CallbackFunc;
137 private: std::list<CallbackFunc> callbacks;