akonadi
Akonadi::AttributeFactory Class Reference
Provides the functionality of registering and creating arbitrary entity attributes. More...
#include <attributefactory.h>
Inherited by StaticAttributeFactory.
Static Public Member Functions | |
static Attribute * | createAttribute (const QByteArray &type) |
template<typename T > | |
static void | registerAttribute () |
Detailed Description
Provides the functionality of registering and creating arbitrary entity attributes.This class provides the functionality of registering and creating arbitrary Attributes for Entity and its subclasses (e.g. Item and Collection).
// register the type first Akonadi::AttributeFactory::registerAttribute<SecrecyAttribute>(); ... // use it anywhere else in the application SecrecyAttribute *attr = Akonadi::AttributeFactory::createAttribute( "secrecy" );
Definition at line 48 of file attributefactory.h.
Member Function Documentation
Attribute * AttributeFactory::createAttribute | ( | const QByteArray & | type | ) | [static] |
Creates an entity attribute object of the given type.
- Parameters:
-
type The attribute type.
Definition at line 107 of file attributefactory.cpp.
template<typename T >
static void Akonadi::AttributeFactory::registerAttribute | ( | ) | [inline, static] |
The documentation for this class was generated from the following files: