7#ifndef KOMPAREDIFF2_DIFFERENCESTRINGPAIR_H
8#define KOMPAREDIFF2_DIFFERENCESTRINGPAIR_H
11#include "differencestring.h"
19class DifferenceString;
21class DifferenceStringPair
24 DifferenceStringPair(DifferenceString *first, DifferenceString *second)
29 , m_lengthFirst(m_strFirst.length())
30 , m_lengthSecond(m_strSecond.length())
31 , m_arrayFirst(m_strFirst.unicode())
32 , m_arraySecond(m_strSecond.unicode())
36 bool equal(
unsigned int firstIndex,
unsigned int secondIndex)
const
38 return m_arrayFirst[firstIndex] == m_arraySecond[secondIndex];
40 unsigned int lengthFirst()
const
44 unsigned int lengthSecond()
const
46 return m_lengthSecond;
48 MarkerList markerListFirst()
const
50 return m_first->markerList();
52 MarkerList markerListSecond()
const
54 return m_second->markerList();
56 void prependFirst(Marker *marker)
58 m_first->prepend(marker);
60 void prependSecond(Marker *marker)
62 m_second->prepend(marker);
64 bool needFineGrainedOutput(
unsigned int difference)
const
66 return difference <= qMax(m_lengthFirst, m_lengthSecond) / 2;
68 const static bool allowReplace =
true;
71 DifferenceString *m_first;
72 DifferenceString *m_second;
75 unsigned int m_lengthFirst;
76 unsigned int m_lengthSecond;
77 const QChar *m_arrayFirst;
78 const QChar *m_arraySecond;
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:54:52 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.