using of namespace in KDevPlatform?

Andreas Pakulat apaku at gmx.de
Thu Jun 21 20:02:18 UTC 2007


On 21.06.07 21:15:23, Jens Herden wrote:
> I just did a grep for "namespace" in KDevPlatform and I want to ask some 
> questions:
> 
> 1) Inside of Teamwork I can find many definitions of namespaces: Teamwork, 
> Utils, Tree, Meta, SumTree, FuzzySearch and Diff2. Where do all these 
> namespaces come from? Do we need/want them all?

Thats up to the maintainer, IMHO. Diff2 comes from libdiff2 which was
imported from kompare. Some of the others might come from CommonC++ or
boost, which are the two libraries that teamwork uses. 

Anyway, this is not public API as this is a plugin, so this is not
subject to the libs-coding-style and such things.

> 2) What is the rule for the usage of namespaces at all? Most plugins are not 
> using the KDevelop namespace, but projectmanagerview is?

KDevPlatform libraries use the KDevelop namespace. The
projectmanagerview plugin should be changed and the namespaec removed.

> 3) In duchainmodel.cpp I found these lines:
> 	using namespace KTextEditor;
> 	using namespace KDevelop;
> Isn't there a small risk that in the future new added names might clash? 

Can't comment about that for sure, AFAIK using ns; in an implementation
is accepted.

Also note: We can change the plugins any time we want, those are not
subject to BC-rules.

Andreas

-- 
You will become rich and famous unless you don't.




More information about the KDevelop-devel mailing list