suggestion to add using directive and declaration in ClassParser

Achim Spangler spangler at
Mon Apr 10 09:16:52 UTC 2000

after inserting classes in nested namespaces, it's better to use using
directives or using declarations in the implementation of that class. 
But the ClassParser doesn't find the implementations any more.

Looking at the source code for ClassParser I notice, that there is no
parsing of "using" defined, is it?
As I undersand the namespace parsing method of ClassParser, the searched
namespaces are managed in CParsedContainer "scope". 
What about the following method for parsing "using":
* get name of referenced identifier or namespace 
  (parse source text in implementation file)
* find identifier in actual scope
* add a link from the root of the actual implementation file scope 
  to the named element/subtree 

==> if a method implementation references now a class method with short
name (without namespace) the appropriate declaration should be found at
the root of the actual implementation file scope

Comparable to 'extern "C"' tokenizer should be extended to detect
"using". And ClassParser should learn adding the needed scope link.

It would be very nice, if this would be added to kdoc2 also, so that my
"@see" tags find the wanted elements on using the short name (using

I think these extensions could help all namespace using people.

Thanks for the good work.

Dipl.-Inform. Achim Spangler                TUM Freising-Weihenstephan
Tel.:  +49-8161-71 3565                     Institut fuer Landtechnik
Fax.:  +49-8161-71 3895                     Am Staudengarten 2
Email: spangler at    85350 Freising
=-=-=-=-=-=-=-=-=-=-=-Agricultural BUS System (LBS)-=-=-=-=-=-=-=-=-=-=-

More information about the KDevelop mailing list