"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/c2b/approximatePattern.h" between
cb2bib-2.0.0.tar.gz and cb2bib-2.0.1.tar.gz

About: cb2Bib is a multiplatform application for rapidly extracting unformatted, or unstandardized bibliographic references from email alerts, journal Web pages, and PDF files.

approximatePattern.h  (cb2bib-2.0.0):approximatePattern.h  (cb2bib-2.0.1)
/*************************************************************************** /***************************************************************************
* Copyright (C) 2004-2019 by Pere Constans * Copyright (C) 2004-2021 by Pere Constans
* constans@molspaces.com * constans@molspaces.com
* cb2Bib version 2.0.0. Licensed under the GNU GPL version 3. * cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
* See the LICENSE file that comes with this distribution. * See the LICENSE file that comes with this distribution.
* *
* Class implementation of the approximate search algorithm * Class implementation of the approximate search algorithm
* P. Constans. Approximate textual retrieval. arXiv:0705.0751, 2007. * P. Constans. Approximate textual retrieval. arXiv:0705.0751, 2007.
***************************************************************************/ ***************************************************************************/
#ifndef APPROXIMATEPATTERN_H #ifndef APPROXIMATEPATTERN_H
#define APPROXIMATEPATTERN_H #define APPROXIMATEPATTERN_H
#include "compositePattern.h" #include "compositePattern.h"
skipping to change at line 71 skipping to change at line 71
_regexp_match = _regexp.match(str, from); _regexp_match = _regexp.match(str, from);
_matched_length = _regexp_match.capturedLength(); _matched_length = _regexp_match.capturedLength();
index = _regexp_match.capturedStart(); index = _regexp_match.capturedStart();
} }
return index; return index;
} }
inline const QVector<substringMatcher>& submatchers() const inline const QVector<substringMatcher>& submatchers() const
{ {
return _submatchers; return _submatchers;
} }
inline const QStringList& subpatternStrings() const
{
return _subpatterns;
}
private: private:
const QStringList splitWord(const QString& word) const; const QStringList splitWord(const QString& word) const;
int stretch(int piece_i, int piece_j) const; int stretch(int piece_i, int piece_j) const;
static QString wordPattern(const QString& word, Qt::CaseSensitivity cs); static QString wordPattern(const QString& word, Qt::CaseSensitivity cs);
static int wordCount(const QString& str); static int wordCount(const QString& str);
static void splitPattern(const QString& p, QStringList* w, QList<int>* ws, Q List<int>* we); static void splitPattern(const QString& p, QStringList* w, QList<int>* ws, Q List<int>* we);
void mergeIndices(int* index_in, const QString& str) const; void mergeIndices(int* index_in, const QString& str) const;
void splitPattern(); void splitPattern();
QList<int> _piece_ends; QList<int> _piece_ends;
QList<int> _piece_starts; QList<int> _piece_starts;
QStringList _prefixes; QStringList _prefixes;
QStringList _string_pieces; QStringList _string_pieces;
QStringList _subpatterns;
QStringList _suffixes; QStringList _suffixes;
QVector<substringMatcher> _submatchers; QVector<substringMatcher> _submatchers;
mutable QRegularExpressionMatch _regexp_match; mutable QRegularExpressionMatch _regexp_match;
}; };
#endif #endif
 End of changes. 4 change blocks. 
2 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)