#ifndef SRC_SURF_PROPERTYHOLDER_HPP_
#define SRC_SURF_PROPERTYHOLDER_HPP_
+
+#include <memory>
#include <string>
#include <unordered_map>
PropertyHolder() = default;
PropertyHolder(const PropertyHolder&) = delete;
PropertyHolder& operator=(const PropertyHolder&) = delete;
- ~PropertyHolder();
const char* get_property(const std::string& key) const;
void set_property(const std::string& id, const std::string& value);
std::unordered_map<std::string, std::string>* get_properties();
private:
- std::unordered_map<std::string, std::string>* properties_ = nullptr;
+ std::unique_ptr<std::unordered_map<std::string, std::string>> properties_ = nullptr;
};
} /* namespace surf */