Abstract builder classes

Hamish Rodda rodda at kde.org
Tue Jun 17 06:30:27 UTC 2008


Hi,

On Tuesday 17 June 2008 15:42:29 Niko Sams wrote:
> > I'm now done with making generic the context, type and declaration
> > builder
> >
> > classes. However, there is an implementation issue which is a bit
> > annoying...
> >
> > previously, the context builder was inherited by the type builder /
> >
> > declaration builder, and also by the use builder. Now, this ordering has
> > to
> >
> > be enforced, because the context builder in the language support now has
> > to
> >
> > inherit from the abstract declaration builder..., ie.:
>
> wouldn't help multiple inheritance in that case?

Actually, I solved it with typedefs, so eg. to have a type builder inheriting 
from a context builder, do:

#include "yourcontextbuilder.h"

typedef java::ContextBuilder LangugageSpecificTypeBuilderBase;

#include <language/duchain/abstracttypebuilder.h>

typedef KDevelop::AbstractTypeBuilder<AstNode> TypeBuilderBase;

class YourTypeBuilder: public TypeBuilderBase

> PS: I can't await using those new classes :D

They're ready now :)

Cheers,
Hamish.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20080617/2632cb0e/attachment.html>


More information about the KDevelop-devel mailing list