Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3944686
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:55:48+00:00 2026-05-20T00:55:48+00:00

This surely is a noob question, but I can’t find an answer in Doxygen

  • 0

This surely is a noob question, but I can’t find an answer in Doxygen documentation. I’m not sure whether using:

@file

or

@class

when documenting my header files.

The reason is that if I put file, then all the comments appear in the Files tab only, but not in the Classes tab (per each).

For cpp it’s ok, I just use file and it’s good, but if I use both file and class in the header (file at the beginning and class right before the start of the class declaration) then I get duplicated entries for the class in the generated documentation…

What I’m doing wrong? Any suggestions? Ideas?

Regards,
Alex

Edit: I run into a new problem now. In order to avoid circular dependecies I declare my class twice in a header file (probably this is not the best way to avoid circular dependencies but it normally works for me), for instance:

#ifndef EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL
#define EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL

namespace eu_sofia_kpi_common
{
    class KPI_CPP_API AbstractThread;
}

#define EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL_END
#endif EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL

#ifdef EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL_END
#ifndef EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DEF
#define EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DEF

namespace eu_sofia_kpi_common
{

    class KPI_CPP_API AbstractThread
    {

    public:
        AbstractThread();
        virtual ~AbstractThread();
        ///start method, derived classes must implement this method to initialize their boost::shared_ptr<boost::thread> pointer member object
        virtual int start() = 0;
        //stop method
        virtual void stop() = 0;

    protected:
        ///Pointer to a boost thread to be inherited and that children classes must use in the implementation of the start and stop methods
        boost::shared_ptr<boost::thread> m_thread;
    };

}

#endif EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DEF
#endif EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL_END

As you can see, I have a forward declaration prior my “real” declaration. Now if I use @class, Doxygen complains about inconsystency issues related with this class, although it generates the documentation for the class. My guess is that anything that is surrounded by #ifdef or #ifndef Doxygen does not seem to like it very much…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:55:49+00:00Added an answer on May 20, 2026 at 12:55 am

    I usually use neither, unless I want to specify an alternate include path or something like that. Normally it looks like this:

    /// Tunables loader.
    /** This class contains a set of functions for loading tunables from
     * file. Usually you only need one QuaTunablesLoader object in your
     * program. Once its work is done, you can safely destroy it.
     * 
     * ... blah, blah, blah ...
     * */
    class QuaTunablesLoader {
    

    This is actually equivalent to using @class, so the answer to your question is yes, you should use @class when documenting classes. If your header file doesn’t contain anything else, you probably shouldn’t document it at all, as the documentation would only say something like “this file contains the declaration of the class SomeClass” anyway. If the file contains something more, like friend functions, you should document the file too (obviously, using @file), possibly providing a reference to the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies for this seemingly minor question, but I can't seem to find the answer
surely this question has beed debated thousand of time, but I do not find
This is surely a total noob question... I'm switching to a new VPS host,
Surely this is possible? I have been hunting through PyQt tutorials and documentation but
this is surely a basic question for most of you but it still giving
This is surely a basic question, but I'm new enough to MVC (and ASP.NET)
Surely this is a newb question as I am just learning RoR and can't
This surely has been asked before, but Googling doesn't find it . Is there,
This is surely a stupid question, but I'm stumped. I've now read Odersky's book,
I see people using Html.ActionLink() and Url.RouteUrl() etc. etc. But surely this will lead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.