class ObjectMapper {
private:
- std::map<std::string, std::unique_ptr<UiObject>> mObjectMap;
+ std::map<std::string, std::shared_ptr<UiObject>> mObjectMap;
+ std::map<std::shared_ptr<UiObject>, std::string> mObjectMapReverse;
unsigned long long mObjCounter;
private:
public:
static ObjectMapper *getInstance();
- std::string addElement(std::unique_ptr<UiObject> object);
- UiObject * getElement(const std::string &key);
+ std::string addElement(std::shared_ptr<UiObject> object);
+
+ std::shared_ptr<UiObject> getElement(const std::string key);
+ std::string getElement(std::shared_ptr<UiObject> object);
+
+ bool removeElement(const std::string key);
+ bool removeElement(std::shared_ptr<UiObject> object);
};
#endif
\ No newline at end of file