 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
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"
virtual ctkAbstractFactoryItem< BaseClassType > * createFactoryFileBasedItem()
ctkAbstractFactory is the base class of all the factory where items need to be registered before bein...
void registerAllFileItems(const QStringList &directories)
virtual QString path(const QString &key)
Get path associated with the library identified by key.
void setPath(const QString &path)
Get path associated with the object identified by key.
virtual bool isValidFile(const QFileInfo &file) const
virtual void initItem(ctkAbstractFactoryItem< BaseClassType > *item)
QString registerFileItem(const QFileInfo &file)
virtual QString fileNameToKey(const QString &path) const
ctkAbstractFactoryItem< BaseClassType > * item(const QString &itemKey) const
Get a Factory item given its itemKey. Return 0 if any.
QString itemKey(const QFileInfo &file) const