wesnoth/src/persist_manager.hpp
Martin Hrubý (hrubymar10) 674fda85b7 Migrate links to https if available - Fwd c18537edc0678f40a209797d72dfaba3e5e88545
(cherry-picked from commit bc4d22dc72e79c3d6a3364ac896e473afd298246)
2018-10-07 03:23:36 +00:00

38 lines
935 B
C++

/*
Copyright (C) 2010 - 2018 by Jody Northup
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
#pragma once
#include <map>
#include <string>
class persist_context;
class persist_manager {
protected:
typedef std::map<std::string,persist_context *> context_map;
bool in_transaction_;
context_map contexts_;
public:
bool start_transaction();
bool end_transaction();
bool cancel_transaction();
persist_manager();
virtual ~persist_manager();
persist_context &get_context(const std::string &ns);
};