Akonadi::AttributeFactory
Akonadi::AttributeFactory Class Reference
#include <attributefactory.h>
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
...
// use it anywhere else in the application
SecrecyAttribute *attr = Akonadi::AttributeFactory::createAttribute( "secrecy" );
static Attribute * createAttribute(const QByteArray &type)
Creates an entity attribute object of the given type.
Definition attributefactory.cpp:139
static void registerAttribute()
Registers a custom attribute of type T.
Definition attributefactory.h:51
Definition at line 39 of file attributefactory.h.
Member Function Documentation
◆ createAttribute()
|
static |
Creates an entity attribute object of the given type.
If the type has not been registered, creates a DefaultAttribute.
- Parameters
-
type The attribute type.
Definition at line 139 of file attributefactory.cpp.
◆ registerAttribute()
template<typename T >
|
inlinestatic |
Registers a custom attribute of type T.
The same attribute cannot be registered more than once.
Definition at line 51 of file attributefactory.h.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.