default ClassDeclaration for kdevplatform

David nolden david.nolden.kdevelop at art-master.de
Fri Feb 6 00:31:16 UTC 2009


Am Freitag 06 Februar 2009 01:08:10 schrieb Milian Wolff:
> While I added the final flag to ClassFunctionDeclaration today, apaku told
> me that I could also add support for abstract/final class declarations to
> the default ClassDeclaration.
>
> Problem: There is no default ClassDeclaration as far as I can see. So my
> question is:
>
> Shall I move the current PHP-specific ClassDeclaration to
> kdevplatform/language? It currently supports:
>
> - normal/final/abstract modifier (enum but not a flag)
> - class type: interface or class (enum but not a flag)

I don't know what ClassDeclaration php is using, but C++ also has one.
That one also already has the Class/Struct/Union/Interface enum, and lives in 
kdevelop/plugins/languages/cpp/cppduchain/classdeclaration.h/cpp.

So if you'd like to create a generic ClassDeclaration, it would be good if you 
merge them all together(Although the php ClassDeclaration was probably just 
copied at some point from C++, and thus should be nearly equivalent).

For the yes/true modifiers that are known, I think it's the nicest interface 
if there is setIsFinal(..), isFinal(), etc. members instead of directly having 
to deal with bit-operators on enums.

Notice: If you change something in a duchain data class that is within 
kdevplatform/kdevelop, like for example ClassDeclarationData, then open 
kdevplatform/language/duchain/repository/itemrepository.cpp, and increase the 
number returned by "staticRepositroyVersion()" by 1, to prevent crashes due to 
incompatible repositories.

Greetings, David





More information about the KDevelop-devel mailing list