#include <comparisonvisitor.h>
Public Member Functions | |
| ComparisonVisitor () | |
| virtual | ~ComparisonVisitor () |
| bool | compare (IncidenceBase *incidence, const IncidenceBase *reference) |
| virtual bool | visit (Event *event) |
| virtual bool | visit (Todo *todo) |
| virtual bool | visit (Journal *journal) |
| virtual bool | visit (FreeBusy *freebusy) |
Public Member Functions inherited from KCal::IncidenceBase::Visitor | |
| virtual | ~Visitor () |
| virtual bool | visit (Event *) |
| virtual bool | visit (Todo *) |
| virtual bool | visit (Journal *) |
| virtual bool | visit (FreeBusy *) |
Additional Inherited Members | |
Protected Member Functions inherited from KCal::IncidenceBase::Visitor | |
| Visitor () | |
Detailed Description
Helper for type correct comparison of incidences via pointers.
This class provides a way of correctly comparing one incidence to another, given two IncidenceBase derived pointers. It effectively provides a virtual comparison method which first type checks the two pointers to ensure they reference the same incidence type, before performing the comparison.
Usage example:
Definition at line 50 of file comparisonvisitor.h.
Constructor & Destructor Documentation
◆ ComparisonVisitor()
| ComparisonVisitor::ComparisonVisitor | ( | ) |
Creates a visitor instance.
Definition at line 37 of file comparisonvisitor.cpp.
◆ ~ComparisonVisitor()
|
virtual |
Destroys the instance.
Definition at line 41 of file comparisonvisitor.cpp.
Member Function Documentation
◆ compare()
| bool ComparisonVisitor::compare | ( | IncidenceBase * | incidence, |
| const IncidenceBase * | reference | ||
| ) |
Compares the incidence referenced by incidence to the incidence referenced by reference.
Returns true, if the incidence referenced by incidence is identical to the incidence referenced by reference. Also returns true, if incidence and reference are both 0.
Basically it is a virtual equivalent of
- Parameters
-
incidence pointer to the incidence to compare with the reference incidence reference pointer to the reference incidence
- Returns
trueif the two incidences are identical or both0
Definition at line 46 of file comparisonvisitor.cpp.
◆ visit() [1/4]
|
virtual |
Compares the event referenced by event to the incidence passed to compare().
- Returns
trueif the event is identical to the reference incidence
Reimplemented from KCal::IncidenceBase::Visitor.
Definition at line 57 of file comparisonvisitor.cpp.
◆ visit() [2/4]
|
virtual |
Compares the freebusy object referenced by freebusy to the incidence passed to compare().
- Returns
trueif the freebusy object is identical to the reference incidence
Reimplemented from KCal::IncidenceBase::Visitor.
Definition at line 96 of file comparisonvisitor.cpp.
◆ visit() [3/4]
|
virtual |
Compares the journal referenced by journal to the incidence passed to compare().
- Returns
trueif the journal is identical to the reference incidence
Reimplemented from KCal::IncidenceBase::Visitor.
Definition at line 83 of file comparisonvisitor.cpp.
◆ visit() [4/4]
|
virtual |
Compares the todo referenced by todo to the incidence passed to compare().
- Returns
trueif the todo is identical to the reference incidence
Reimplemented from KCal::IncidenceBase::Visitor.
Definition at line 70 of file comparisonvisitor.cpp.
The documentation for this class was generated from the following files:

Public Member Functions inherited from