20 #include "comparisonvisitor.h"
28 class ComparisonVisitor::Private
31 Private() : mReference( 0 ) {}
48 d->mReference = reference;
50 const bool result = incidence ? incidence->
accept( *
this ) : reference == 0;
59 Q_ASSERT( event != 0 );
61 const Event *refEvent =
dynamic_cast<const Event*
>( d->mReference );
63 return *
event == *refEvent;
72 Q_ASSERT( todo != 0 );
74 const Todo *refTodo =
dynamic_cast<const Todo*
>( d->mReference );
76 return *todo == *refTodo;
85 Q_ASSERT( journal != 0 );
87 const Journal *refJournal =
dynamic_cast<const Journal*
>( d->mReference );
89 return *journal == *refJournal;
98 Q_ASSERT( freebusy != 0 );
100 const FreeBusy *refFreeBusy =
dynamic_cast<const FreeBusy*
>( d->mReference );
102 return *freebusy == *refFreeBusy;
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.
This class provides information about free/busy time of a calendar user.
This class provides the base class common to all calendar components.
virtual bool accept(Visitor &)
Accept IncidenceVisitor.
This class provides a Journal in the sense of RFC2445.
This class provides a Todo in the sense of RFC2445.
Namespace KCal is for global classes, objects and/or functions in libkcal.