21 #ifndef __ctkAbstractFileBasedFactory_h 22 #define __ctkAbstractFileBasedFactory_h 26 #include <QStringList> 33 template<
typename BaseClassType>
48 template<
typename BaseClassType>
52 virtual bool isValidFile(
const QFileInfo& file)
const;
53 QString
itemKey(
const QFileInfo& file)
const;
60 virtual QString
path(
const QString& key);
73 #include "ctkAbstractFileBasedFactory.tpp" QString registerFileItem(const QFileInfo &file)
ctkAbstractFactory is the base class of all the factory where items need to be registered before bein...
virtual QString fileNameToKey(const QString &path) const
void setPath(const QString &path)
Get path associated with the object identified by key.
QString itemKey(const QFileInfo &file) const
virtual QString path(const QString &key)
Get path associated with the library identified by key.
void registerAllFileItems(const QStringList &directories)
virtual bool isValidFile(const QFileInfo &file) const
virtual void initItem(ctkAbstractFactoryItem< BaseClassType > *item)
ctkAbstractFactoryItem< BaseClassType > * item(const QString &itemKey) const
Get a Factory item given its itemKey. Return 0 if any.
virtual ctkAbstractFactoryItem< BaseClassType > * createFactoryFileBasedItem()