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