/****************************************************************************
** $Id: qregexp.h,v 2.3.2.1 1998/08/19 16:02:37 agulbra Exp $
**
** Definition of QRegExp class
**
** Created : 950126
**
** Copyright (C) 1992-1998 Troll Tech AS. All rights reserved.
**
** This file is part of Troll Tech's internal development tree for Qt.
**
** This header text will be replaced by an appropriate text by the
** mkdist script which generates external distributions.
**
** If you are using the Qt Professional Edition or the Qt Free Edition,
** please notify Troll Tech at <info@troll.no> if you see this text.
**
** To Troll Tech developers: This header was generated by the script
** fixcopyright-int. It has the same number of text lines as the free
** and professional editions to avoid line number inconsistency.
**
*****************************************************************************/
#ifndef QREGEXP_H
#define QREGEXP_H
#ifndef QT_H
#include "qstring.h"
#endif // QT_H
class Q_EXPORT QRegExp
{
public:
QRegExp();
QRegExp( const char *, bool caseSensitive=TRUE, bool wildcard=FALSE );
QRegExp( const QRegExp & );
~QRegExp();
QRegExp &operator=( const QRegExp & );
QRegExp &operator=( const char *pattern );
bool operator==( const QRegExp & ) const;
bool operator!=( const QRegExp &r ) const
{ return !(this->operator==(r)); }
bool isEmpty() const { return rxdata == 0; }
bool isValid() const { return error == 0; }
bool caseSensitive() const { return cs; }
void setCaseSensitive( bool );
bool wildcard() const { return wc; }
void setWildcard( bool );
const char *pattern() const { return (const char *)rxstring; }
int match( const char *str, int index=0, int *len=0 ) const;
protected:
void compile();
char *matchstr( ushort *, char *, char * ) const;
private:
QString rxstring; // regular expression pattern
ushort *rxdata; // compiled regexp pattern
int error; // error status
bool cs; // case sensitive
bool wc; // wildcard
};
#endif // QREGEXP_H
| Copyright © 1998 Troll Tech | Trademarks | Qt version 1.41
|