ctkAbstractFactory is the base class of all the factory where items need to be registered before being instantiated.
More...
#include <Libs/Core/ctkAbstractFactory.h>
|
| ctkAbstractFactory () |
| Constructor/Desctructor. More...
|
|
virtual BaseClassType * | instance (const QString &itemKey) |
| Return the instance associated with itemKey if any, otherwise return 0. More...
|
|
virtual BaseClassType * | instantiate (const QString &itemKey) |
| Create an instance of the object. The item corresponding to the key should have been registered before. More...
|
|
QStringList | itemKeys () const |
| Get list of all registered item keys. More...
|
|
virtual QString | path (const QString &itemKey) |
| Get path associated with the item identified by itemKey Should be overloaded in subclasse. More...
|
|
virtual void | printAdditionalInfo () |
|
virtual void | registerItems () |
| Register items with the factory Method provided for convenience - Should be overloaded in subclasse. More...
|
|
void | setSharedItems (const QSharedPointer< HashType > &items) |
|
void | setVerbose (bool value) |
| Enabled verbose output Warning and error message will be printed to standard outputs. More...
|
|
QSharedPointer< HashType > | sharedItems () |
|
void | uninstantiate (const QString &itemKey) |
| Uninstanciate the object. Do nothing if the item given by the key has not be instantiated nor registered. More...
|
|
bool | verbose () const |
|
virtual | ~ctkAbstractFactory () |
|
template<typename BaseClassType>
class ctkAbstractFactory< BaseClassType >
ctkAbstractFactory is the base class of all the factory where items need to be registered before being instantiated.
ctkAbstractFactory contains a collection of ctkAbstractFactoryItems that are uniquely identifyed by a key. Subclasses of ctkAbstractFactory are responsible for populating the list of ctkAbstractFactoryItems. BaseClassType could be any type (most probably a QObject)
Definition at line 100 of file ctkAbstractFactory.h.
◆ ConstIterator
template<typename BaseClassType >
◆ HashType
template<typename BaseClassType >
◆ Iterator
template<typename BaseClassType >
◆ ctkAbstractFactory()
template<typename BaseClassType >
◆ ~ctkAbstractFactory()
template<typename BaseClassType >
◆ displayStatusMessage()
template<typename BaseClassType >
void ctkAbstractFactory< BaseClassType >::displayStatusMessage |
( |
const QtMsgType & |
type, |
|
|
const QString & |
description, |
|
|
const QString & |
status, |
|
|
bool |
display |
|
) |
| |
|
protected |
◆ instance()
template<typename BaseClassType >
virtual BaseClassType* ctkAbstractFactory< BaseClassType >::instance |
( |
const QString & |
itemKey | ) |
|
|
virtual |
Return the instance associated with itemKey if any, otherwise return 0.
◆ instantiate()
template<typename BaseClassType >
virtual BaseClassType* ctkAbstractFactory< BaseClassType >::instantiate |
( |
const QString & |
itemKey | ) |
|
|
virtual |
Create an instance of the object. The item corresponding to the key should have been registered before.
◆ item()
template<typename BaseClassType >
Get a Factory item given its itemKey. Return 0 if any.
◆ itemKeys()
template<typename BaseClassType >
Get list of all registered item keys.
◆ path()
template<typename BaseClassType >
◆ printAdditionalInfo()
template<typename BaseClassType >
◆ registerItem()
template<typename BaseClassType >
Call the load method associated with the item. If succesfully loaded, add it to the internal map.
◆ registerItems()
template<typename BaseClassType >
Register items with the factory Method provided for convenience - Should be overloaded in subclasse.
Definition at line 135 of file ctkAbstractFactory.h.
◆ setSharedItems()
template<typename BaseClassType >
◆ setVerbose()
template<typename BaseClassType >
Enabled verbose output Warning and error message will be printed to standard outputs.
◆ sharedItem()
template<typename BaseClassType >
◆ sharedItems()
template<typename BaseClassType >
◆ uninstantiate()
template<typename BaseClassType >
Uninstanciate the object. Do nothing if the item given by the key has not be instantiated nor registered.
◆ verbose()
template<typename BaseClassType >
The documentation for this class was generated from the following file: