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
00058 template <typename T> inline static void registerAttribute()
00059 {
00060 AttributeFactory::self()->registerAttribute( new T );
00061 }
00062
00068 static Attribute* createAttribute( const QByteArray &type );
00069
00070 protected:
00071
00072 AttributeFactory();
00073
00074 private:
00075 static AttributeFactory* self();
00076 void registerAttribute( Attribute *attribute );
00077
00078 class Private;
00079 Private* const d;
00080
00081 };
00082
00083 }
00084
00085 #endif