Go to the documentation of this file.
10#include <QtCore/QByteArray>
23template <
class Interface,
class Implementation>
36 virtual std::unique_ptr<Interface>
CreateInstance(
const QByteArray& keyId =
"")
const;
45template <
class Interface,
class Implementation>
55template <
class Interface,
class Implementation>
60 retVal.insert(m_keyId);
66template <
class Interface,
class Implementation>
69 if (keyId.isEmpty() || (keyId == m_keyId)){
70 return std::unique_ptr<Interface>{
new Implementation};
QSet< QByteArray > KeyList
Generic interface for a factory.
Template based object factory interface.
TSingleFactory(const QByteArray &keyId)
TIFactory< Interface > FactoryInterface
virtual IFactoryInfo::KeyList GetFactoryKeys() const
Returns all posible keys for this factory.
virtual std::unique_ptr< Interface > CreateInstance(const QByteArray &keyId="") const
Create an instance of the object, mapped to the keyId keyId.
Implementation ImplementationType
© Witold Gantzke and Kirill Lepskiy