Solved

Doxygen error with constructor generated

Posted on 2014-01-14
2
427 Views
Last Modified: 2014-01-15
Experts,

I'm using Doxygen to generate doc files for Java classes that are organized in an Eclipse project.  Doxygen appears to run without any problems, but the doc page for classes in the project includes an error in the section that lists the constructor.

Here's an example of what the problem looks like.  Say the project is part of the following package:

  org.foo.bar

The name of a class in the project is this:

  MyClass

So the full name of the class would be this:

  org.foo.bar.MyClass

In the result file Doxygen produces for 'MyClass', the very first section has this:

---------
  Public Member Functions

   MyClass ()
---------

So far, so good -- this looks fine.  But the next section has the problem:

---------
  Constructor & Destructor Documentation

   org.foo.bar.MyClass.MyClass ()
---------

Here the class name is included *twice* in the full name listing, almost as if it's there once as part of the package name and then again, filling the role of class name.  This, of course, would not compile.  It's a real shame, since otherwise, the results Doxygen produced look pretty good.  And, it was fast, easy, and free to do this, so I don't want to complain too loudly about this.

Has anybody else had this problem with Doxygen?  For there to be any errors in the results, I would not have guessed it would be with the constructor!

Any thoughts?

Thanks.

Andy
0
Comment
Question by:aedolbey
2 Comments
 
LVL 6

Accepted Solution

by:
Mahesh Bhutkar earned 500 total points
ID: 39781940
That's the way Doxygen generates documentation for Constructors. It treated as member function of the class it self.

You can checkout for some workaround using DoxygenLayout.xml (like visible=yes/no).

Otherwise you have dig into it's source code & modify the way you want.
you can get the source code from here,
http://www.stack.nl/~dimitri/doxygen/download.html
0
 

Author Closing Comment

by:aedolbey
ID: 39782474
Fair enough that the constructor would be presented in a fuller form, but make sure the result would actually work!  This guy would compile:

  MyClass myClassTok = new org.foo.bar.MyClass ();

The form given would not work:

  MyClass myClassTok = new org.foo.bar.MyClass.MyClass ();  // won't compile!

Rather than futzing around with DoxygenLayout or Doxygen source code, an even faster solution would be just to manually correct in the result the one item with the mistake.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sumDigits  challenge 7 75
groupSumClump challenge 9 103
wordlen challenge 3 61
autoit - check if option is checked in another program 2 111
A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now