akonadi
23 #ifndef AKONADI_AGENTFACTORY_H
24 #define AKONADI_AGENTFACTORY_H
26 #include "akonadi_export.h"
27 #include "agentbase.h"
29 #include <QtCore/QObject>
30 #include <QtCore/QtPlugin>
34 class AgentFactoryBasePrivate;
63 virtual QObject* createInstance(
const QString &identifier )
const = 0;
66 void createComponentData(
const QString &identifier )
const;
69 AgentFactoryBasePrivate*
const d;
84 explicit AgentFactory(
const char *catalogName, QObject *parent = 0 )
91 createComponentData( identifier );
92 T* instance =
new T( identifier );
97 if ( observer != 0 ) {
98 instance->registerObserver( observer );
107 #ifndef AKONADI_AGENT_FACTORY
115 #define AKONADI_AGENT_FACTORY( agentClass, catalogName ) \
116 class agentClass ## Factory : public Akonadi::AgentFactory< agentClass > \
119 explicit agentClass ## Factory( QObject * parent = 0 ) : Akonadi::AgentFactory< agentClass >( # catalogName, parent ) {\
120 setObjectName(# catalogName );\
123 Q_EXPORT_PLUGIN2( catalogName, agentClass ## Factory )
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:31 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.