Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief A configuration for a simple automerge and guaranteed conflict resolution by one side
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : *
8 : */
9 :
10 : #ifndef ONESIDEMERGECONFIGURATION_HPP_
11 : #define ONESIDEMERGECONFIGURATION_HPP_
12 :
13 : #include <merging/automergeconfiguration.hpp>
14 :
15 : using namespace std;
16 :
17 : namespace kdb
18 : {
19 :
20 : namespace tools
21 : {
22 :
23 : namespace merging
24 : {
25 :
26 : // This configuration is like the auto merge configuration except
27 : // that it resolves any unresolved conflicts by using one side only
28 320 : class OneSideMergeConfiguration : public AutoMergeConfiguration
29 : {
30 :
31 : private:
32 : ConflictResolutionSide winningSide;
33 :
34 : public:
35 320 : explicit OneSideMergeConfiguration (ConflictResolutionSide _winningSide) : winningSide (_winningSide)
36 : {
37 : }
38 : virtual void configureMerger (ThreeWayMerge & merger) override;
39 : };
40 : } // namespace merging
41 : } // namespace tools
42 : } // namespace kdb
43 :
44 : #endif /* ONESIDEMERGECONFIGURATION_HPP_ */
|