Objects managing instances of factories can implement this interface if they want to expose these factories to the object manager. More...
#include <IFactoryProvider.h>
Public Member Functions | |
virtual QtilitiesCategory | categoryForTag (const QString &factory_name, const QString &factory_tag, bool *ok=0) const =0 |
Provides the category of the specified tag. | |
virtual QObject * | createInstance (const InstanceFactoryInfo &ifactory_data)=0 |
Constructs an instance in a specified factory and return it. | |
virtual QStringList | providedFactories () const =0 |
Provides the names of all the factories exposed through this interface. | |
virtual QStringList | providedFactoryTags (const QString &factory_name, const QtilitiesCategory &category_filter=QtilitiesCategory(), bool *ok=0) const =0 |
Provides the tags in a specific factory. | |
virtual QMap< QString, QtilitiesCategory > | tagCategoryMap (const QString &factory_name, bool *ok=0) const =0 |
Provides the full tag and category map for the given factory. | |
Public Member Functions inherited from Qtilities::Core::Interfaces::IObjectBase | |
virtual QObject * | objectBase ()=0 |
Returns the QObject* base of the interface. | |
virtual const QObject * | objectBase () const =0 |
Returns a const QObject* base of the interface. | |
QString | objectOriginID () const |
Allows interfaces to provide some sort of source identification. | |
void | setObjectOriginID (const QString &object_origin_id) |
Allows setting of the object source ID of this interface implementation. |
Objects managing instances of factories can implement this interface if they want to expose these factories to the object manager.
Objects managing instances of factories can implement this interface if they want to expose these factories to the object manager using the Qtilities::Core::Interfaces::IObjectManager::registerIFactoryProvider() function. The interface can be used to represent multiple factories, each represented by a QString values. To get a list of all factories provided through the interface, see the providedFactoryTags() function.
The following example shows how to construct a object through the IFactoryProvider interface:
For more information see the Factories article.
|
pure virtual |
Provides the category of the specified tag.
factory_name | The factory in which the tag is located. |
factory_tag | The tag for which the category must is requested. |
ok | Set to true if the parameters matches a factory in this provider, false otherwise. |
This function was added in Qtilities v1.2.
Implemented in Qtilities::Core::ObjectManager.
|
pure virtual |
Provides the tags in a specific factory.
factory_name | The factory in which the tag is located. |
category_filter | Allows you to get tag for a specific category. When empty, all categories are returned. |
ok | Set to true if the parameters matches a factory in this provider, false otherwise. |
Implemented in Qtilities::Core::ObjectManager.
|
pure virtual |
Provides the full tag and category map for the given factory.
factory_name | The factory for which the map is requested. |
ok | Set to true if the parameters matches a factory in this provider, false otherwise. |
This function was added in Qtilities v1.2.
Implemented in Qtilities::Core::ObjectManager.
Qtilities : Reference Documentation | Back to top |
Copyright © 2009-2013, Jaco Naudé
|