Note that there are some explanatory texts on larger screens.

plurals
  1. POuse file or class for documenting classes in doxygen?
    primarykey
    data
    text
    <p>This surely is a noob question, but I can't find an answer in Doxygen documentation. I'm not sure whether using:</p> <p>@file</p> <p>or </p> <p>@class</p> <p>when documenting my header files. </p> <p>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).</p> <p>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...</p> <p>What I'm doing wrong? Any suggestions? Ideas?</p> <p>Regards, Alex</p> <p>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:</p> <pre><code>#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&lt;boost::thread&gt; 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&lt;boost::thread&gt; m_thread; }; } #endif EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DEF #endif EU_SOFIA_KPI_COMMON_ABSTRACTTHREAD_DECL_END </code></pre> <p>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...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload