File indexing completed on 2024-04-28 17:01:43

0001 /*
0002 SPDX-FileCopyrightText: 2011 Dmitry Risenberg <dmitry.risenberg@gmail.com>
0003 
0004 SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KOMPAREDIFF2_STRINGLISTPAIR_H
0008 #define KOMPAREDIFF2_STRINGLISTPAIR_H
0009 
0010 #include <QStringList>
0011 #include "marker.h"
0012 
0013 namespace Diff2 {
0014 
0015 class StringListPair {
0016 public:
0017     StringListPair(const QStringList& first, const QStringList& second);
0018     ~StringListPair();
0019     bool equal(unsigned int firstIndex, unsigned int secondIndex) const;
0020     unsigned int lengthFirst() const;
0021     unsigned int lengthSecond() const;
0022     MarkerList markerListFirst() const;
0023     MarkerList markerListSecond() const;
0024     void prependFirst(Marker* marker);
0025     void prependSecond(Marker* marker);
0026     bool needFineGrainedOutput(unsigned int difference) const;
0027 
0028     const static bool allowReplace = false;
0029 private:
0030     const QStringList m_first;
0031     const QStringList m_second;
0032     unsigned int m_lengthFirst;
0033     unsigned int m_lengthSecond;
0034     unsigned int* m_hashesFirst;
0035     unsigned int* m_hashesSecond;
0036     MarkerList m_markersFirst;
0037     MarkerList m_markersSecond;
0038 };
0039 
0040 }
0041 
0042 #endif // KOMPAREDIFF2_STRINGLISTPAIR_H