libkcal

assignmentvisitor.h
1 /*
2  Copyright (c) 2009 Kevin Krammer <kevin.krammer@gmx.at>
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_ASSIGNMENTVISITOR_H
21 #define KCAL_ASSIGNMENTVISITOR_H
22 
23 #include "incidencebase.h"
24 
25 namespace KCal {
26 
51 {
52  public:
57 
61  virtual ~AssignmentVisitor();
62 
78  bool assign( IncidenceBase *target, const IncidenceBase *source );
79 
86  virtual bool visit( Event *event );
87 
94  virtual bool visit( Todo *todo );
95 
102  virtual bool visit( Journal *journal );
103 
110  virtual bool visit( FreeBusy *freebusy );
111 
112  private:
113  //@cond PRIVATE
114  class Private;
115  Private *const d;
116  //@endcond
117 };
118 
119 }
120 
121 #endif
Helper for type correct assignment of incidences via pointers.
virtual ~AssignmentVisitor()
Destroys the instance.
bool assign(IncidenceBase *target, const IncidenceBase *source)
Assigns the incidence referenced by source to the incidence referenced by target, first ensuring that...
virtual bool visit(Event *event)
Tries to assign to the given event, using the source passed to assign().
AssignmentVisitor()
Creates a visitor instance.
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