Duplicate KDevelop::TypeFactory classes

Richard Dale richard.j.dale at gmail.com
Mon Aug 4 16:56:50 UTC 2008


There are two classes with the same name - KDevelop::TypeFactory - in the
publically installed headers.

One is in kdevplatform/language/duchain/duchainregister.h :

///Never use this directly, use the REGISTER_DUCHAIN_ITEM macro instead.
template<class T, class Data>
class KDEVPLATFORMLANGUAGE_EXPORT TypeFactory : public DUChainBaseFactory {
  public:
  DUChainBase* create(DUChainBaseData* data) const {
    return new T(*static_cast<Data*>(data));
  }
...

And the other is in kdevplatform/language/duchain/types/typeregister.h :

/**
 * Template class to implement factories for each AbstractType subclass you
want
 * to instantiate.
 */
template<class T, class Data>
class KDEVPLATFORMLANGUAGE_EXPORT TypeFactory : public AbstractTypeFactory {
  public:
  AbstractType* create(AbstractTypeData* data) const {
    return new T(*static_cast<typename T::Data*>(data));
  }
...

-- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080804/c757c78f/attachment.html>


More information about the KDevelop-devel mailing list