LCOV - code coverage report
Current view: top level - src/libs/tools/include/merging - newkeystrategy.hpp (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 2 2 100.0 %
Date: 2019-09-12 12:28:41 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /**
       2             :  * @file
       3             :  *
       4             :  * @brief A strategy which always takes the value from one side
       5             :  *
       6             :  * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
       7             :  *
       8             :  */
       9             : 
      10             : #ifndef NEWKEYSTRATEGY_HPP_
      11             : #define NEWKEYSTRATEGY_HPP_
      12             : 
      13             : #include <merging/mergeconflictstrategy.hpp>
      14             : 
      15             : namespace kdb
      16             : {
      17             : 
      18             : namespace tools
      19             : {
      20             : 
      21             : namespace merging
      22             : {
      23             : // This strategy is basically a subset of the AutoMergeStrategy. It resolves
      24             : // only conflicts where one side added key, while the other side did nothing.
      25           8 : class NewKeyStrategy : public MergeConflictStrategy
      26             : {
      27             : public:
      28             :         NewKeyStrategy ()
      29           8 :         {
      30             :         }
      31             : 
      32             :         virtual void resolveConflict (const MergeTask & task, Key & conflictKey, MergeResult & result) override;
      33             : };
      34             : } // namespace merging
      35             : } // namespace tools
      36             : } // namespace kdb
      37             : 
      38             : #endif /* NEWKEYSTRATEGY_HPP_ */

Generated by: LCOV version 1.13