1 #ifndef HB_DATA_REPOSITORY_H
2 #define HB_DATA_REPOSITORY_H
4 #include <unordered_map>
18 void setInt(
const std::string& name,
int value);
19 int getInt(
const std::string& name,
int default_value = -1);
20 void setUInt(
const std::string& name,
unsigned int value);
21 int getUInt(
const std::string& name,
unsigned int default_value = 0);
22 void setDouble(
const std::string& name,
double value);
23 double getDouble(
const std::string& name,
double default_value = -1.);
24 void setFloat(
const std::string& name,
float value);
25 float getFloat(
const std::string& name,
float default_value = -1.f);
26 void setChar(
const std::string& name,
char value);
27 char getChar(
const std::string& name,
char default_value = 0x00);
28 void setBool(
const std::string& name,
bool value);
29 bool getBool(
const std::string& name,
bool default_value =
false);
30 void setPointer(
const std::string& name,
void* value);
32 T* getPointer(
const std::string& name, T* default_value =
nullptr)
34 auto it = m_data.find(name);
35 if (it != m_data.end())
36 return static_cast<T*>(m_data[name].p);
51 std::unordered_map<std::string, Data> m_data;
Definition: DataRepository.h:12
Definition: Box2DPlugin.h:6