libkcal

comparisonvisitor.h
1/*
2 Copyright 2009 Ingo Klöcker <kloecker@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef KCAL_COMPARISONVISITOR_H
21#define KCAL_COMPARISONVISITOR_H
22
23#include "incidencebase.h"
24
25namespace KCal {
26
51{
52 public:
57
61 virtual ~ComparisonVisitor();
62
79 bool compare( IncidenceBase *incidence, const IncidenceBase *reference );
80
87 virtual bool visit( Event *event );
88
95 virtual bool visit( Todo *todo );
96
103 virtual bool visit( Journal *journal );
104
111 virtual bool visit( FreeBusy *freebusy );
112
113 private:
114 //@cond PRIVATE
115 class Private;
116 Private *const d;
117 //@endcond
118};
119
120}
121
122#endif // KCAL_COMPARISONVISITOR_H
Helper for type correct comparison of incidences via pointers.
ComparisonVisitor()
Creates a visitor instance.
virtual ~ComparisonVisitor()
Destroys the instance.
virtual bool visit(Event *event)
Compares the event referenced by event to the incidence passed to compare().
bool compare(IncidenceBase *incidence, const IncidenceBase *reference)
Compares the incidence referenced by incidence to the incidence referenced by reference.
This class provides an Event in the sense of RFC2445.
Definition: event.h:33
This class provides information about free/busy time of a calendar user.
Definition: freebusy.h:41
This class provides the interface for a visitor of calendar components.
Definition: incidencebase.h:55
This class provides the base class common to all calendar components.
Definition: incidencebase.h:46
This class provides a Journal in the sense of RFC2445.
Definition: journal.h:34
This class provides a Todo in the sense of RFC2445.
Definition: todo.h:32
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38