akonadi
attributefactory.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ATTRIBUTEFACTORY_H
00021 #define AKONADI_ATTRIBUTEFACTORY_H
00022
00023 #include <akonadi/attribute.h>
00024
00025 namespace Akonadi {
00026
00048 class AKONADI_EXPORT AttributeFactory
00049 {
00050 public:
00051
00052 ~AttributeFactory();
00053
00054
00059 template <typename T> inline static void registerAttribute()
00060 {
00061 AttributeFactory::self()->registerAttribute( new T );
00062 }
00063
00070 static Attribute* createAttribute( const QByteArray &type );
00071
00072 protected:
00073
00074 AttributeFactory();
00075
00076 private:
00077 static AttributeFactory* self();
00078 void registerAttribute( Attribute *attribute );
00079
00080 class Private;
00081 Private* const d;
00082
00083 };
00084
00085 }
00086
00087 #endif