OTest2
A C++ testing framework
difflogbuilder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Ondrej Starek
3  *
4  * This file is part of OTest2.
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 #ifndef OTest2__LIB_DIFFLOGBUILDER_H_
20 #define OTest2__LIB_DIFFLOGBUILDER_H_
21 
22 namespace OTest2 {
23 
31  public:
36 
40  virtual ~DiffLogBuilder();
41 
42  /* -- avoid copying */
44  const DiffLogBuilder&) = delete;
46  const DiffLogBuilder&) = delete;
47 
54  virtual void addMatch(
55  int left_index_,
56  int right_index_) = 0;
57 
64  virtual void addChange(
65  int left_index_,
66  int right_index_) = 0;
67 
73  virtual void addDelete(
74  int right_index_) = 0;
75 
81  virtual void addInsert(
82  int left_index_) = 0;
83 };
84 
85 } /* -- namespace OTest2 */
86 
87 #endif /* OTest2__LIB_DIFFLOGBUILDER_H_ */
OTest2::DiffLogBuilder::~DiffLogBuilder
virtual ~DiffLogBuilder()
Dtor.
Definition: difflogbuilder.cpp:27
OTest2::DiffLogBuilder::addMatch
virtual void addMatch(int left_index_, int right_index_)=0
Add match of characters in both sequences.
OTest2::DiffLogBuilder
Generic interface of the log builder.
Definition: difflogbuilder.h:30
OTest2
Definition: assertbean.h:25
OTest2::DiffLogBuilder::addChange
virtual void addChange(int left_index_, int right_index_)=0
Add change of both sequences.
OTest2::DiffLogBuilder::operator=
DiffLogBuilder & operator=(const DiffLogBuilder &)=delete
OTest2::DiffLogBuilder::addInsert
virtual void addInsert(int left_index_)=0
Add inserted item to the left sequence.
OTest2::DiffLogBuilder::DiffLogBuilder
DiffLogBuilder()
Ctor.
Definition: difflogbuilder.cpp:23
OTest2::DiffLogBuilder::addDelete
virtual void addDelete(int right_index_)=0
Add deleted item from the right sequence.