blob: 01932380f6a260b58917a2267d167cdceaa9a91a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <string>
#include <boost/property_tree/ptree.hpp>
class Diff
{
public:
Diff();
Diff(const std::string& old_version, const std::string& new_version);
std::string apply(const std::string& old_version) const;
void create(const std::string& old_version, const std::string& new_version);
boost::property_tree::ptree get_structure() const;
std::string get_xml() const;
private:
// diff replaces space from m_pos0 (inclusive) to m_pos1 (exclusive) with m_data
size_t m_pos0{};
size_t m_pos1{};
std::string m_data;
};
|