Namespace not properly recognized

View: New views
2 Messages — Rating Filter:   Alert me  

Namespace not properly recognized

by Tim Niemueller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Doxygen developers.

I have files like the following:

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

file.cpp:
using namespace mynamespace;

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

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


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

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

Regards from Aachen,
        Tim

--
Tim Niemueller                      KBSG - Knowledge-Based Systems Group
========================================================================
AllemaniACs RoboCup Team                          RWTH Aachen University
http://robocup.rwth-aachen.de                            Ahornstrasse 55
http://www.kbsg.rwth-aachen.de                            D-52056 Aachen

-------------------------------------------------------------------------
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
_______________________________________________
Doxygen-develop mailing list
Doxygen-develop@...
https://lists.sourceforge.net/lists/listinfo/doxygen-develop

Re: Namespace not properly recognized

by Jake Colman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>> "TN" == Tim Niemueller <niemueller@...> 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
_______________________________________________
Doxygen-develop mailing list
Doxygen-develop@...
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
LightInTheBox - Buy quality products at wholesale price!