Abstract builder classes

Hamish Rodda rodda at kde.org
Tue Jun 17 03:53:19 UTC 2008


(Please ignore the last email, it was sent prior to completion accidentally)

Hi,

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.:

current class layout

BaseContextBuilder

AbstractTypeBuilder : public BaseContextBuilder

AbstractDeclarationBuilder : public AbstractTypeBuilder

java::ContextBuilder : public BaseContextBuilder

java::TypeBuilder : public AbstractTypeBuilder

java::DeclarationBuilder : public AbstractDeclarationBuilder


I'd prefer to somehow have it like this:

BaseContextBuilder

java::ContextBuilder : public BaseContextBuilder

AbstractTypeBuilder : public java::ContextBuilder

java::TypeBuilder : public AbstractTypeBuilder

AbstractDeclarationBuilder : public java::TypeBuilder

java::DeclarationBuilder : public AbstractDeclarationBuilder

of course, in a language neutral way.  Is there some way to do this with 
templates?  or maybe with typedefs?

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


More information about the KDevelop-devel mailing list