<div dir="ltr">There are two classes with the same name - KDevelop::TypeFactory - in the publically installed headers.<br><br>One is in kdevplatform/language/duchain/duchainregister.h :<br><br>///Never use this directly, use the REGISTER_DUCHAIN_ITEM macro instead.<br>
template<class T, class Data><br>class KDEVPLATFORMLANGUAGE_EXPORT TypeFactory : public DUChainBaseFactory {<br> public:<br> DUChainBase* create(DUChainBaseData* data) const {<br> return new T(*static_cast<Data*>(data));<br>
}<br>...<br><br>And the other is in kdevplatform/language/duchain/types/typeregister.h :<br><br>/**<br> * Template class to implement factories for each AbstractType subclass you want<br> * to instantiate.<br> */<br>template<class T, class Data><br>
class KDEVPLATFORMLANGUAGE_EXPORT TypeFactory : public AbstractTypeFactory {<br> public:<br> AbstractType* create(AbstractTypeData* data) const {<br> return new T(*static_cast<typename T::Data*>(data));<br> }<br>
...<br><br>-- Richard<br><br><br></div>