diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-08-19 14:10:55 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-08-19 14:10:55 (GMT) |
commit | 0b4b3698b29436b299d4e4a315d610bc1ab98acb (patch) | |
tree | 1babc69fbeab1211926ed7462a9db6ec50809d89 /qtools/qcstringlist.h | |
parent | 9ba8bd85999fa7423eb5b44c680e72ad2e9c31bf (diff) | |
download | Doxygen-0b4b3698b29436b299d4e4a315d610bc1ab98acb.zip Doxygen-0b4b3698b29436b299d4e4a315d610bc1ab98acb.tar.gz Doxygen-0b4b3698b29436b299d4e4a315d610bc1ab98acb.tar.bz2 |
Bug 691689 - Line numbers for examples
Diffstat (limited to 'qtools/qcstringlist.h')
-rw-r--r-- | qtools/qcstringlist.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/qtools/qcstringlist.h b/qtools/qcstringlist.h new file mode 100644 index 0000000..604a196 --- /dev/null +++ b/qtools/qcstringlist.h @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** Copyright (C) 1997-2018 by Dimitri van Heesch. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation under the terms of the GNU General Public License is hereby +** granted. No representations are made about the suitability of this software +** for any purpose. It is provided "as is" without express or implied warranty. +** See the GNU General Public License for more details. +** +** Note: this is a variant of the qstringlist.h but for QCString's +** +**********************************************************************/ +#ifndef QCSTRINGLIST_H +#define QCSTRINGLIST_H + +#include "qvaluelist.h" +#include "qcstring.h" +#include "qregexp.h" + +class QStrList; +class QDataStream; + +class QCStringList : public QValueList<QCString> +{ +public: + QCStringList() { } + QCStringList( const QCStringList& l ) : QValueList<QCString>(l) { } + QCStringList( const QValueList<QCString>& l ) : QValueList<QCString>(l) { } + QCStringList( const QCString& i ) { append(i); } + QCStringList( const char* i ) { append(i); } + + static QCStringList fromStrList(const QStrList&); + + static QCStringList split( const QCString &sep, const QCString &str, bool allowEmptyEntries = FALSE ); + static QCStringList split( char sep, const QCString &str, bool allowEmptyEntries = FALSE ); + static QCStringList split( const QRegExp &sep, const QCString &str, bool allowEmptyEntries = FALSE ); + QCString join( const QCString &sep ) const; + + QCStringList grep( const QCString &str, bool cs = TRUE ) const; + QCStringList grep( const QRegExp &expr ) const; +}; + +extern Q_EXPORT QDataStream &operator>>( QDataStream &, QCStringList& ); +extern Q_EXPORT QDataStream &operator<<( QDataStream &, const QCStringList& ); + +#endif // QCSTRINGLIST_H |