Re: Namespace not properly recognized

Jake Colman <[email protected]>
Newsgroups gmane.text.doxygen.devel
Organization Principia Partners LLC
Message-ID <[email protected]>
>>>>> "TN" == Tim Niemueller <[email protected]> writes:

   TN> Hi Doxygen developers.
   TN> I have files like the following:

   TN> file.h:
   TN> namespace mynamespace {
   TN>   class MyClass {
   TN>    public:
   TN>     MyClass();
   TN>   }
   TN> }

   TN> file.cpp:
   TN> using namespace mynamespace;

   TN> /** @class MyClass <file.h>
   TN>  * My fancy class.
   TN>  */

   TN> /** Constructor. */
   TN> MyClass::MyClass()
   TN> {
   TN> }

   TN> This seems to be valid C++ and compiles properly (tested with GCC 4.1
   TN> and 4.3 on Fedora 8 and 9). However, if I try to run doxygen
   TN> (doxygen-1.5.5-2.fc8) on this it will complain:
   TN> Warning: Compound mynamespace::MyClass is not documented.

   TN> What I would expect is that it collects the "using namespace" clauses
   TN> and prepends these namespaces to the class names to test for matching
   TN> documentation. Can someone point me to the relevant lines in the code to
   TN> have a closer look or knows a solution already?

   TN> Regards from Aachen,
   TN> 	Tim

The safest way to do this, in my opinion, is to have class documentation
immediately preceded the class declaration in the header file.  This
guarantees that Doxygen will find it correctly.  Otherwise, doing it the
way you did it with the class documentation in the .cc file, you must
fully qualify the name of the class in order for Doxygen to match the
documentation with the class.

-- 
Jake Colman
Director of Software Development
Principia Partners LLC
101 West Elm Street
Suite 620
Conshohocken, PA  19428
+1 (610) 755-9786
www.principiapartners.com


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.