Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes

ctkAbstractFactory< BaseClassType > Class Template Reference

#include <Libs/Core/ctkAbstractFactory.h>

Inheritance diagram for ctkAbstractFactory< BaseClassType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ctkAbstractFactory ()
virtual BaseClassType * instantiate (const QString &itemKey)
QStringList names () const
virtual void printAdditionalInfo ()
virtual void registerItems ()
void setVerbose (bool value)
void uninstantiate (const QString &itemKey)
bool verbose ()
virtual ~ctkAbstractFactory ()

Protected Types

typedef QHash< QString,
QSharedPointer
< ctkAbstractFactoryItem
< BaseClassType >
> >::const_iterator 
ConstIterator
typedef QHash< QString,
QSharedPointer
< ctkAbstractFactoryItem
< BaseClassType >
> >::iterator 
Iterator

Protected Member Functions

ctkAbstractFactoryItem
< BaseClassType > * 
item (const QString &itemKey) const
bool registerItem (const QSharedPointer< ctkAbstractFactoryItem< BaseClassType > > &item)

Private Member Functions

 ctkAbstractFactory (const ctkAbstractFactory &)
void operator= (const ctkAbstractFactory &)
 Not implemented.

Private Attributes

QHash< QString, QSharedPointer
< ctkAbstractFactoryItem
< BaseClassType > > > 
RegisteredItemMap
 Not implemented.
bool Verbose

Detailed Description

template<typename BaseClassType>
class ctkAbstractFactory< BaseClassType >

Definition at line 61 of file ctkAbstractFactory.h.


Member Typedef Documentation

template<typename BaseClassType >
typedef QHash<QString, QSharedPointer<ctkAbstractFactoryItem<BaseClassType> > >::const_iterator ctkAbstractFactory< BaseClassType >::ConstIterator [protected]

Definition at line 64 of file ctkAbstractFactory.h.

template<typename BaseClassType >
typedef QHash<QString, QSharedPointer<ctkAbstractFactoryItem<BaseClassType> > >::iterator ctkAbstractFactory< BaseClassType >::Iterator [protected]

Definition at line 65 of file ctkAbstractFactory.h.


Constructor & Destructor Documentation

template<typename BaseClassType >
ctkAbstractFactory< BaseClassType >::ctkAbstractFactory (  )  [explicit]

Constructor/Desctructor

template<typename BaseClassType >
virtual ctkAbstractFactory< BaseClassType >::~ctkAbstractFactory (  )  [virtual]
template<typename BaseClassType >
ctkAbstractFactory< BaseClassType >::ctkAbstractFactory ( const ctkAbstractFactory< BaseClassType > &   )  [private]

Member Function Documentation

template<typename BaseClassType >
virtual BaseClassType* ctkAbstractFactory< BaseClassType >::instantiate ( const QString &  itemKey  )  [virtual]

Create an instance of the object

Reimplemented in ctkAbstractQObjectFactory< BaseClassType >.

template<typename BaseClassType >
ctkAbstractFactoryItem<BaseClassType>* ctkAbstractFactory< BaseClassType >::item ( const QString &  itemKey  )  const [protected]

Get a Factory item given its itemKey. Return 0 if any.

template<typename BaseClassType >
QStringList ctkAbstractFactory< BaseClassType >::names (  )  const

Get list of all registered item names

template<typename BaseClassType >
void ctkAbstractFactory< BaseClassType >::operator= ( const ctkAbstractFactory< BaseClassType > &   )  [private]

Not implemented.

template<typename BaseClassType >
virtual void ctkAbstractFactory< BaseClassType >::printAdditionalInfo (  )  [virtual]
template<typename BaseClassType >
bool ctkAbstractFactory< BaseClassType >::registerItem ( const QSharedPointer< ctkAbstractFactoryItem< BaseClassType > > &  item  )  [protected]

Call the load method associated with the item. If succesfully loaded, add it to the internal map.

template<typename BaseClassType >
virtual void ctkAbstractFactory< BaseClassType >::registerItems (  )  [inline, virtual]

Register items with the factory Method provided for convenience - Should be overloaded in subclasse

Definition at line 89 of file ctkAbstractFactory.h.

template<typename BaseClassType >
void ctkAbstractFactory< BaseClassType >::setVerbose ( bool  value  ) 

Enabled verbose output Warning and error message will be printed to standard outputs

template<typename BaseClassType >
void ctkAbstractFactory< BaseClassType >::uninstantiate ( const QString &  itemKey  ) 

Uninstanciate the object

Reimplemented in ctkAbstractQObjectFactory< BaseClassType >.

template<typename BaseClassType >
bool ctkAbstractFactory< BaseClassType >::verbose (  ) 

Member Data Documentation

template<typename BaseClassType >
QHash<QString, QSharedPointer<ctkAbstractFactoryItem<BaseClassType> > > ctkAbstractFactory< BaseClassType >::RegisteredItemMap [private]

Not implemented.

Definition at line 111 of file ctkAbstractFactory.h.

template<typename BaseClassType >
bool ctkAbstractFactory< BaseClassType >::Verbose [private]

Definition at line 113 of file ctkAbstractFactory.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines