KMSearchRuleString Class Reference
This class represents a search to be performed against a string. This class represents a search pattern rule operating on a string. More...
#include <kmsearchpattern.h>
Inheritance diagram for KMSearchRuleString:

Public Methods | |
KMSearchRuleString (const QCString &field=0, Function function=FuncContains, const QString &contents=QString::null) | |
KMSearchRuleString (const KMSearchRuleString &other) | |
const KMSearchRuleString & | operator= (const KMSearchRuleString &other) |
virtual | ~KMSearchRuleString () |
virtual bool | isEmpty () const |
virtual bool | requiresBody () const |
virtual bool | matches (const KMMessage *msg) const |
virtual bool | matches (const DwString &str, KMMessage &msg, const DwBoyerMoore *headerField=0, int headerLen=-1) const |
bool | matchesInternal (const QString &msgContents) const |
Detailed Description
This class represents a search to be performed against a string. This class represents a search pattern rule operating on a string.The string can be either a message header, or a pseudo header, such as
Definition at line 153 of file kmsearchpattern.h.
Member Function Documentation
|
Determine whether the rule is worth considering. It isn't if either the field is not set or the contents is empty. KFilter should make sure that it's rule list contains only non-empty rules, as matches doesn't check this. Implements KMSearchRule. Definition at line 195 of file kmsearchpattern.cpp. References KMSearchRule::contents(), KMSearchRule::field(), QString::isEmpty(), and QCString::stripWhiteSpace(). Referenced by matches(). |
|
Returns true if the rule depends on a complete message, otherwise returns false.
Reimplemented from KMSearchRule. Definition at line 200 of file kmsearchpattern.cpp. References KMSearchRule::field(). |
|
Tries to match the rule against the given KMMessage.
Implements KMSearchRule. Definition at line 255 of file kmsearchpattern.cpp. References KMSearchRule::field(), KMSearchRule::function(), isEmpty(), and matchesInternal(). Referenced by matches(). |
|
Optimized version tries to match the rule against the given DwString.
Reimplemented from KMSearchRule. Definition at line 207 of file kmsearchpattern.cpp. References KMSearchRule::field(), isEmpty(), QCString::length(), KMSearchRule::matches(), matches(), and matchesInternal(). |
|
Helper for the main matches() method. Does the actual comparing. Definition at line 290 of file kmsearchpattern.cpp. References QString::compare(), KMSearchRule::contents(), QString::find(), KMSearchRule::function(), QString::lower(), and QRegExp::search(). Referenced by matches(). |
The documentation for this class was generated from the following files: