#ifndef TDESTRINGMATCHER_H #define TDESTRINGMATCHER_H #include "tdelibs_export.h" #include #include #include #define TSMTRACE kdDebug() << " " #define TSMSIGNALS /** * * Generic string matcher class. */ class TDECORE_EXPORT TDEStringMatcher : public TQObject { Q_OBJECT public: TDEStringMatcher(); ~TDEStringMatcher(); /** Use @param newPatternString to generate @property patternList. Refer to file README.tdestringmatcher for more information on how the input string should be formatted. */ bool generatePatternList( TQString newPatternString ); /** Return pattern string from which @property patternList was created. String is stored in @property TDEStringMatcherPrivate::patternString. */ TQString getPatternString(); /** Methods that determine whether or not @param stringToMatch match any/all of the TQRegExp objects contained in @property patternList. */ bool matchAny( const TQString& stringToMatch ); bool matchAll( const TQString& stringToMatch ); signals: void patternsChanged(); protected: TQPtrList patternList; private: class TDEStringMatcherPrivate; TDEStringMatcherPrivate *p; }; #endif