22 #ifndef DIFF_MATCH_PATCH_H
23 #define DIFF_MATCH_PATCH_H
89 Diff(Operation _operation,
const QString &_text);
91 inline bool isNull()
const;
94 bool operator!=(
const Diff &d)
const;
96 static QString strOperation(Operation op);
137 float Match_Threshold;
146 float Patch_DeleteThreshold;
155 static QRegExp BLANKLINEEND;
156 static QRegExp BLANKLINESTART;
175 QList<Diff>
diff_main(
const QString &text1,
const QString &text2);
186 QList<Diff>
diff_main(
const QString &text1,
const QString &text2,
bool checklines);
201 QList<Diff>
diff_main(
const QString &text1,
const QString &text2,
bool checklines, clock_t deadline);
215 QList<Diff> diff_compute(QString text1, QString text2,
bool checklines, clock_t deadline);
227 QList<Diff> diff_lineMode(QString text1, QString text2, clock_t deadline);
238 QList<Diff>
diff_bisect(
const QString &text1,
const QString &text2, clock_t deadline);
251 QList<Diff> diff_bisectSplit(
const QString &text1,
const QString &text2,
int x,
int y, clock_t deadline);
274 QString diff_linesToCharsMunge(
const QString &text, QStringList &lineArray,
275 QMap<QString, int> &lineHash);
284 void diff_charsToLines(QList<Diff> &diffs,
const QStringList &lineArray);
325 QStringList
diff_halfMatch(
const QString &text1,
const QString &text2);
338 QStringList diff_halfMatchI(
const QString &longtext,
const QString &shorttext,
int i);
365 int diff_cleanupSemanticScore(
const QString &one,
const QString &two);
391 int diff_xIndex(
const QList<Diff> &diffs,
int loc);
446 QList<Diff>
diff_fromDelta(
const QString &text1,
const QString &delta);
461 int match_main(
const QString &text,
const QString &pattern,
int loc);
472 int match_bitap(
const QString &text,
const QString &pattern,
int loc);
483 double match_bitapScore(
int e,
int x,
int loc,
const QString &pattern);
514 QList<Patch>
patch_make(
const QString &text1,
const QString &text2);
523 QList<Patch>
patch_make(
const QList<Diff> &diffs);
535 QList<Patch>
patch_make(
const QString &text1,
const QString &text2,
const QList<Diff> &diffs);
545 QList<Patch>
patch_make(
const QString &text1,
const QList<Diff> &diffs);
564 QPair<QString,QVector<bool> >
patch_apply(QList<Patch> &patches,
const QString &text);
610 static inline QString safeMid(
const QString &str,
int pos) {
611 return (pos == str.length()) ? QString(
"") : str.mid(pos);
623 static inline QString safeMid(
const QString &str,
int pos,
int len) {
624 return (pos == str.length()) ? QString(
"") : str.mid(pos, len);
628 #endif // DIFF_MATCH_PATCH_H