/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/cpp/cpp-506-101-009/main.cpp
22 строки
682 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
class StorageInterface { public: virtual ~StorageInterface() = default; virtual void store(const std::string& key, const std::string& value) = 0; virtual std::string load(const std::string& key) = 0; virtual bool exists(const std::string& key) = 0; virtual void remove(const std::string& key) = 0; }; class InMemoryStorage : public StorageInterface { public: void store(const std::string& key, const std::string& value) override; std::string load(const std::string& key) override; bool exists(const std::string& key) override; void remove(const std::string& key) override; private: std::unordered_map<std::string, std::string> data_; };