kmail Library API Documentation

KMSearchRuleNumerical Class Reference

This class represents a search to be performed against a numerical value, such as the age of the message in days or its size. This class represents a search pattern rule operating on numerical values. More...

#include <kmsearchpattern.h>

Inheritance diagram for KMSearchRuleNumerical:

Inheritance graph
[legend]
Collaboration diagram for KMSearchRuleNumerical:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KMSearchRuleNumerical (const QCString &field=0, Function function=FuncContains, const QString &contents=QString::null)
virtual bool isEmpty () const
virtual bool matches (const KMMessage *msg) const
bool matchesInternal (long numericalValue, long numericalMsgContents, const QString &msgContents) const

Detailed Description

This class represents a search to be performed against a numerical value, such as the age of the message in days or its size. This class represents a search pattern rule operating on numerical values.

Definition at line 194 of file kmsearchpattern.h.


Member Function Documentation

bool KMSearchRuleNumerical::isEmpty  )  const [virtual]
 

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 476 of file kmsearchpattern.cpp.

References KMSearchRule::contents().

bool KMSearchRuleNumerical::matches const KMMessage *  msg  )  const [virtual]
 

Tries to match the rule against the given KMMessage.

Returns:
TRUE if the rule matched, FALSE otherwise. Must be implemented by subclasses.

Implements KMSearchRule.

Definition at line 485 of file kmsearchpattern.cpp.

References KMSearchRule::asString(), KMSearchRule::contents(), KMSearchRule::field(), and matchesInternal().

bool KMSearchRuleNumerical::matchesInternal long  numericalValue,
long  numericalMsgContents,
const QString msgContents
const
 

Helper for the main matches() method.

Does the actual comparing.

Definition at line 514 of file kmsearchpattern.cpp.

References KMSearchRule::contents(), and KMSearchRule::function().

Referenced by matches().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:48:52 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003