26 #ifndef CARGO_SQLITE_CARGO_SQLITE_HPP
27 #define CARGO_SQLITE_CARGO_SQLITE_HPP
44 template <
class Cargo>
45 void loadFromKVStore(
const std::string& filename, Cargo& visitable,
const std::string& visitableName)
52 visitable.accept(visitor);
63 template <
class Cargo>
64 void saveToKVStore(
const std::string& filename,
const Cargo& visitable,
const std::string& visitableName)
71 visitable.accept(visitor);
79 #endif // CARGO_SQLITE_CARGO_SQLITE_HPP
void saveToKVStore(const std::string &filename, const Cargo &visitable, const std::string &visitableName)
Saves the visitable to a KVStore.
Definition: cargo-sqlite.hpp:64
A guard struct for thread synchronization and transaction management.
Definition: kvstore.hpp:49
Definition: to-kvstore-visitor.hpp:39
Definition: kvstore.hpp:43
Visitor for saving to KVStore.
Visitor for loading from KVStore that doesn't fail on missing values.
Default KVStore visitor.
Definition: from-kvstore-visitor.hpp:36
void loadFromKVStore(const std::string &filename, Cargo &visitable, const std::string &visitableName)
Loads a visitable structure from KVStore.
Definition: cargo-sqlite.hpp:45
Default visitor for loading from KVStore.
Helper for compile-time checking against existance of template method 'accept'.
Definition: is-visitable.hpp:49
void commit()
Definition: kvstore.cpp:126