Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qregexp3.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** $Id: qregexp3.h,v 1.2 2005/01/21 19:56:18 ar Exp $
00003 **
00004 ** Definition of QRegExp class
00005 **
00006 ** Created : 950126
00007 **
00008 ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
00009 **
00010 ** This file is part of the tools module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed under the terms of the Q Public License
00013 ** as defined by Trolltech AS of Norway and appearing in the file
00014 ** LICENSE.QPL included in the packaging of this file.
00015 **
00016 ** This file may be distributed and/or modified under the terms of the
00017 ** GNU General Public License version 2 as published by the Free Software
00018 ** Foundation and appearing in the file LICENSE.GPL included in the
00019 ** packaging of this file.
00020 **
00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00022 ** licenses may use this file in accordance with the Qt Commercial License
00023 ** Agreement provided with the Software.
00024 **
00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00027 **
00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00029 **   information about Qt Commercial License Agreements.
00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00032 **
00033 ** Contact info@trolltech.com if any conditions of this licensing are
00034 ** not clear to you.
00035 **
00036 **********************************************************************/
00037 
00038 #ifndef QREGEXP3_H
00039 #define QREGEXP3_H
00040 #ifndef QT_H
00041 #include "qstringlist.h"
00042 #endif // QT_H
00043 
00044 
00045 #if QT_VERSION >= 0x030000
00046 #include <qregexp.h>
00047 #else
00048 class QRegExpEngine;
00049 struct QRegExpPrivate;
00050 
00051 class Q_EXPORT QRegExp3
00052 {
00053 public:
00054     QRegExp3();
00055     QRegExp3( const QString& pattern, bool caseSensitive = TRUE,
00056              bool wildcard = FALSE );
00057     QRegExp3( const QRegExp3& rx );
00058     ~QRegExp3();
00059     QRegExp3& operator=( const QRegExp3& rx );
00060 
00061     bool operator==( const QRegExp3& rx ) const;
00062     bool operator!=( const QRegExp3& rx ) const { return !operator==( rx ); }
00063 
00064     bool isEmpty() const;
00065     bool isValid() const;
00066     QString pattern() const;
00067     void setPattern( const QString& pattern );
00068     bool caseSensitive() const;
00069     void setCaseSensitive( bool sensitive );
00070 #ifndef QT_NO_REGEXP_WILDCARD
00071     bool wildcard() const;
00072     void setWildcard( bool wildcard );
00073 #endif
00074     bool minimal() const;
00075     void setMinimal( bool minimal );
00076 
00077     bool exactMatch( const QString& str );
00078     bool exactMatch( const QString& str ) const;
00079 #ifndef QT_NO_COMPAT
00080     int match( const QString& str, int index, int *len = 0,
00081                bool indexIsStart = TRUE );
00082 #endif
00083     int search( const QString& str, int start = 0 );
00084     int search( const QString& str, int start = 0 ) const;
00085 // QChar versions
00086 #ifdef QCHAR_SUPPORT
00087     int search(const QChar *str,int start=0);
00088     int search(const QChar *str,int start=0) const;
00089     int searchRev(const QChar *str,int start=-1);
00090     int searchRev(const QChar *str,int start=-1) const ;
00091     bool exactMatch(const QChar *str);
00092     bool exactMatch(const QChar *str) const;
00093 // end QChar versions   
00094 #endif
00095     int searchRev( const QString& str, int start = -1 );
00096     int searchRev( const QString& str, int start = -1 ) const;
00097     int matchedLength();
00098 #ifndef QT_NO_REGEXP_CAPTURE
00099     QStringList capturedTexts();
00100     QString cap( int nth = 0 );
00101     int pos( int nth = 0 );
00102 #endif
00103 
00104 private:
00105     void compile( bool caseSensitive );
00106 
00107     QRegExpEngine *eng;
00108     QRegExpPrivate *priv;
00109 };
00110 #endif // QT_VERSION >= 0x030000
00111 #endif // QREGEXP_H

Generated on Sat Nov 5 16:17:13 2005 for OPIE by  doxygen 1.4.2