KompareDiff2
7#ifndef KOMPAREDIFF2_DIFFERENCESTRINGPAIR_H
8#define KOMPAREDIFF2_DIFFERENCESTRINGPAIR_H
12#include "difference.h"
17class DifferenceString;
19class DifferenceStringPair {
21 DifferenceStringPair(DifferenceString* first, DifferenceString* second)
22 : m_first(first), m_second(second),
24 m_lengthFirst(m_strFirst.length()), m_lengthSecond(m_strSecond.length()),
25 m_arrayFirst(m_strFirst.unicode()), m_arraySecond(m_strSecond.unicode())
29 bool equal(
unsigned int firstIndex,
unsigned int secondIndex)
const
31 return m_arrayFirst[firstIndex] == m_arraySecond[secondIndex];
33 unsigned int lengthFirst()
const
37 unsigned int lengthSecond()
const
39 return m_lengthSecond;
41 MarkerList markerListFirst()
const
43 return m_first->markerList();
45 MarkerList markerListSecond()
const
47 return m_second->markerList();
49 void prependFirst(Marker* marker)
51 m_first->prepend(marker);
53 void prependSecond(Marker* marker)
55 m_second->prepend(marker);
57 bool needFineGrainedOutput(
unsigned int difference)
const
59 return difference <= qMax(m_lengthFirst, m_lengthSecond) / 2;
61 const static bool allowReplace =
true;
63 DifferenceString* m_first;
64 DifferenceString* m_second;
67 unsigned int m_lengthFirst;
68 unsigned int m_lengthSecond;
69 const QChar* m_arrayFirst;
70 const QChar* m_arraySecond;
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:10:24 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.