#pragma once #include #include #include namespace libdb { extern "C" { #include } } namespace crepe { class DB { public: DB(const std::string & path); virtual ~DB() = default; public: std::string get(const std::string & key); void set(const std::string & key, const std::string & value); bool has(const std::string & key); private: std::unique_ptr> db; std::unique_ptr> cursor; private: libdb::DBT to_thing(const std::string & thing); }; }