Doxygen — Single Comment Block for Multiple FunctionsDocumenting collection of similar C structsHow do you set, clear, and toggle a single bit?Can comments be used in JSON?What's a quick way to comment/uncomment lines in Vim?How do you do block comments in YAML?How do I comment out a block of tags in XML?Multi-Line Comments in Ruby?Comments in MarkdownWay to create multiline comments in Python?How to “comment-out” (add comment) in a batch/cmd?Why is executing Java code in comments with certain Unicode characters allowed?

What prevents a US state from colonizing a smaller state?

English idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

How to count the number of bytes in a file, grouping the same bytes?

How does the 'five minute adventuring day' affect class balance?

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

Do electrons really perform instantaneous quantum leaps?

Should Catholics in a state of grace call themselves sinners?

What was the point of separating stdout and stderr?

Customs and immigration on a USA-UK-Sweden flight itinerary

Why are symbols not written in words?

Why are examinees often not allowed to leave during the start and end of an exam?

Active wildlife outside the window- Good or Bad for Cat psychology?

How does mmorpg store data?

How can an inexperienced GM keep a game fun for experienced players?

Does a lens with a bigger max. aperture focus faster than a lens with a smaller max. aperture?

Why was Pan Am Flight 103 flying over Lockerbie?

What overwrites /etc/resolv.conf roughly every hour?

Is leaving out prefixes like "rauf", "rüber", "rein" when describing movement considered a big mistake in spoken German?

Is it theoretically possible to hack printer using scanner tray?

Why is my 401k manager recommending me to save more?

Fast method to cut/shred glue stick into small pieces

How do I keep a running total of data in a column in Excel?

Rear derailleur got caught in the spokes, what could be a root cause

Can I take Amul cottage cheese from India to Netherlands?



Doxygen — Single Comment Block for Multiple Functions


Documenting collection of similar C structsHow do you set, clear, and toggle a single bit?Can comments be used in JSON?What's a quick way to comment/uncomment lines in Vim?How do you do block comments in YAML?How do I comment out a block of tags in XML?Multi-Line Comments in Ruby?Comments in MarkdownWay to create multiline comments in Python?How to “comment-out” (add comment) in a batch/cmd?Why is executing Java code in comments with certain Unicode characters allowed?













8















Are you able to use a single commenting block to comment multiple functions in doxygen? Below is a simple example that does not work. Can I do something similar to get what I want?



file.cpp



#include file.h

/// @name FunsGroupedInDoxygen
///@
/**
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
*/
int fun1(int aParam) return 0;
int fun2(int aParam) return 0;
///@


file.h



int fun1(int aParam);
int fun2(int aParam);


Doxygen output:



warning: Member fun2(int aParam) (function) of file file.h is not documented.










share|improve this question






















  • I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

    – Tuffwer
    May 17 '16 at 19:14











  • @Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

    – Napthali
    May 17 '16 at 20:47











  • Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

    – Tuffwer
    May 17 '16 at 20:53











  • @Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

    – Napthali
    May 17 '16 at 20:57















8















Are you able to use a single commenting block to comment multiple functions in doxygen? Below is a simple example that does not work. Can I do something similar to get what I want?



file.cpp



#include file.h

/// @name FunsGroupedInDoxygen
///@
/**
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
*/
int fun1(int aParam) return 0;
int fun2(int aParam) return 0;
///@


file.h



int fun1(int aParam);
int fun2(int aParam);


Doxygen output:



warning: Member fun2(int aParam) (function) of file file.h is not documented.










share|improve this question






















  • I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

    – Tuffwer
    May 17 '16 at 19:14











  • @Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

    – Napthali
    May 17 '16 at 20:47











  • Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

    – Tuffwer
    May 17 '16 at 20:53











  • @Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

    – Napthali
    May 17 '16 at 20:57













8












8








8








Are you able to use a single commenting block to comment multiple functions in doxygen? Below is a simple example that does not work. Can I do something similar to get what I want?



file.cpp



#include file.h

/// @name FunsGroupedInDoxygen
///@
/**
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
*/
int fun1(int aParam) return 0;
int fun2(int aParam) return 0;
///@


file.h



int fun1(int aParam);
int fun2(int aParam);


Doxygen output:



warning: Member fun2(int aParam) (function) of file file.h is not documented.










share|improve this question














Are you able to use a single commenting block to comment multiple functions in doxygen? Below is a simple example that does not work. Can I do something similar to get what I want?



file.cpp



#include file.h

/// @name FunsGroupedInDoxygen
///@
/**
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
*/
int fun1(int aParam) return 0;
int fun2(int aParam) return 0;
///@


file.h



int fun1(int aParam);
int fun2(int aParam);


Doxygen output:



warning: Member fun2(int aParam) (function) of file file.h is not documented.







c++ comments doxygen






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 17 '16 at 19:08









NapthaliNapthali

501 silver badge6 bronze badges




501 silver badge6 bronze badges












  • I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

    – Tuffwer
    May 17 '16 at 19:14











  • @Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

    – Napthali
    May 17 '16 at 20:47











  • Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

    – Tuffwer
    May 17 '16 at 20:53











  • @Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

    – Napthali
    May 17 '16 at 20:57

















  • I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

    – Tuffwer
    May 17 '16 at 19:14











  • @Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

    – Napthali
    May 17 '16 at 20:47











  • Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

    – Tuffwer
    May 17 '16 at 20:53











  • @Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

    – Napthali
    May 17 '16 at 20:57
















I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

– Tuffwer
May 17 '16 at 19:14





I'm struggling to come up with a reason for why you wouldn't just do them separately. Why would you use the same documentation for two functions? If they aren't different enough to warrant different descriptions then why are they two separate functions?

– Tuffwer
May 17 '16 at 19:14













@Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

– Napthali
May 17 '16 at 20:47





@Tuffwer Fair enough. Let me give you a specific example. In some of the libraries that I use, there are functions that control specific hardware pins. These functions can differ only on the target output. In mocking these functions, I would want to group them together and their documentation would be virtually identical. Perhaps you would want one documentation line to be different for each one.

– Napthali
May 17 '16 at 20:47













Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

– Tuffwer
May 17 '16 at 20:53





Ah that makes sense, if the output needs to be different because it's working with hardware instead of entirely in software. In that case I'd shoot for more of a hybrid and try to describe the family of functions with one block, but as an end user I still think I'd want at least one line explaining what the specific output target of the specific function was. Thanks for explaining your situation I've never dealt with code that interacts at the hardware level (a good use case to keep in mind for similar questions), perhaps it's time to pick up a raspberry pi.

– Tuffwer
May 17 '16 at 20:53













@Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

– Napthali
May 17 '16 at 20:57





@Tuffwer I do like the sound of your approach. When I have tried to do it thusfar, I have been largely unsuccessful.

– Napthali
May 17 '16 at 20:57










2 Answers
2






active

oldest

votes


















8














Looking at grouping in the Doxygen manual here there are several methods you can use. The one that I think best fits the situation is called Member Groups.



You can define a member group using one of two styles:



///@ 
...
///@


or



/**@*/ 
...
/**@*/


An example of this would be:



/** @name FunctionGroup
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
*/
///@
//* fun1 specific description */
int fun1(int aParam) return 0;
//* fun2 specific description */
int fun2(int aParam) return 0;
///@


This allows you to define a group that you can provide a generic description for and still lets you drop a comment specific to each function in the created doxygen files.



I don't have doxygen installed on the computer I'm on and can't test this code directly, however if follows the example from group2 of the member groups section on the documentation, the compiled output from that example is shown here, which hopefully is the output you desire.



Edit:



After testing the previous did work for me but only when I set the desired extraction mode to All Entities (EXTRACT_ALL = YES in the doxyfile). It would be better to only use actually documented entities so I spent some time trying a different approach from the above mentioned documentation.



file.h:



/**
* defgroup FunctionGroup A Group of Functions
* @brief Documentation for 2 functions
* @param aParam A Parameter
* @retval 0 will always be returned
* @
*/
int fun1(int aParam);
int fun2(int aParam);
/** @ */


file.cpp:



#include file.h

/** @ingroup FunctionGroup
* @brief fun1 specific description
*/
int fun1(int aParam)
return 0;

/** @ingroup FunctionGroup
* @brief fun2 specific description
*/
int fun2(int aParam)
return 0;



Here is an image of the output I get when I run Doxygen on those two files:
output of doxygen files



I used the doxywizard on a windows machine my doxyfile generated by this is on pastebin.






share|improve this answer

























  • Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

    – Napthali
    May 17 '16 at 21:46












  • I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

    – Tuffwer
    May 17 '16 at 22:09











  • @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

    – Tuffwer
    May 18 '16 at 17:11











  • I also had set set DISTRIBUTE_GROUP_DOC to YES.

    – Job
    Jan 31 '18 at 12:01


















5














I'm not sure about a single comment block, but a concise and easy way to do this is to use @copydoc (reference here), e.g:



/**
* @brief Brief description
* @param aParam A parameter
*/
void foo(int aParam)

/**
* @copydoc foo(int)
*/
void bar(int aParam)





share|improve this answer



























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37284399%2fdoxygen-single-comment-block-for-multiple-functions%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    8














    Looking at grouping in the Doxygen manual here there are several methods you can use. The one that I think best fits the situation is called Member Groups.



    You can define a member group using one of two styles:



    ///@ 
    ...
    ///@


    or



    /**@*/ 
    ...
    /**@*/


    An example of this would be:



    /** @name FunctionGroup
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    */
    ///@
    //* fun1 specific description */
    int fun1(int aParam) return 0;
    //* fun2 specific description */
    int fun2(int aParam) return 0;
    ///@


    This allows you to define a group that you can provide a generic description for and still lets you drop a comment specific to each function in the created doxygen files.



    I don't have doxygen installed on the computer I'm on and can't test this code directly, however if follows the example from group2 of the member groups section on the documentation, the compiled output from that example is shown here, which hopefully is the output you desire.



    Edit:



    After testing the previous did work for me but only when I set the desired extraction mode to All Entities (EXTRACT_ALL = YES in the doxyfile). It would be better to only use actually documented entities so I spent some time trying a different approach from the above mentioned documentation.



    file.h:



    /**
    * defgroup FunctionGroup A Group of Functions
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    * @
    */
    int fun1(int aParam);
    int fun2(int aParam);
    /** @ */


    file.cpp:



    #include file.h

    /** @ingroup FunctionGroup
    * @brief fun1 specific description
    */
    int fun1(int aParam)
    return 0;

    /** @ingroup FunctionGroup
    * @brief fun2 specific description
    */
    int fun2(int aParam)
    return 0;



    Here is an image of the output I get when I run Doxygen on those two files:
    output of doxygen files



    I used the doxywizard on a windows machine my doxyfile generated by this is on pastebin.






    share|improve this answer

























    • Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

      – Napthali
      May 17 '16 at 21:46












    • I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

      – Tuffwer
      May 17 '16 at 22:09











    • @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

      – Tuffwer
      May 18 '16 at 17:11











    • I also had set set DISTRIBUTE_GROUP_DOC to YES.

      – Job
      Jan 31 '18 at 12:01















    8














    Looking at grouping in the Doxygen manual here there are several methods you can use. The one that I think best fits the situation is called Member Groups.



    You can define a member group using one of two styles:



    ///@ 
    ...
    ///@


    or



    /**@*/ 
    ...
    /**@*/


    An example of this would be:



    /** @name FunctionGroup
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    */
    ///@
    //* fun1 specific description */
    int fun1(int aParam) return 0;
    //* fun2 specific description */
    int fun2(int aParam) return 0;
    ///@


    This allows you to define a group that you can provide a generic description for and still lets you drop a comment specific to each function in the created doxygen files.



    I don't have doxygen installed on the computer I'm on and can't test this code directly, however if follows the example from group2 of the member groups section on the documentation, the compiled output from that example is shown here, which hopefully is the output you desire.



    Edit:



    After testing the previous did work for me but only when I set the desired extraction mode to All Entities (EXTRACT_ALL = YES in the doxyfile). It would be better to only use actually documented entities so I spent some time trying a different approach from the above mentioned documentation.



    file.h:



    /**
    * defgroup FunctionGroup A Group of Functions
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    * @
    */
    int fun1(int aParam);
    int fun2(int aParam);
    /** @ */


    file.cpp:



    #include file.h

    /** @ingroup FunctionGroup
    * @brief fun1 specific description
    */
    int fun1(int aParam)
    return 0;

    /** @ingroup FunctionGroup
    * @brief fun2 specific description
    */
    int fun2(int aParam)
    return 0;



    Here is an image of the output I get when I run Doxygen on those two files:
    output of doxygen files



    I used the doxywizard on a windows machine my doxyfile generated by this is on pastebin.






    share|improve this answer

























    • Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

      – Napthali
      May 17 '16 at 21:46












    • I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

      – Tuffwer
      May 17 '16 at 22:09











    • @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

      – Tuffwer
      May 18 '16 at 17:11











    • I also had set set DISTRIBUTE_GROUP_DOC to YES.

      – Job
      Jan 31 '18 at 12:01













    8












    8








    8







    Looking at grouping in the Doxygen manual here there are several methods you can use. The one that I think best fits the situation is called Member Groups.



    You can define a member group using one of two styles:



    ///@ 
    ...
    ///@


    or



    /**@*/ 
    ...
    /**@*/


    An example of this would be:



    /** @name FunctionGroup
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    */
    ///@
    //* fun1 specific description */
    int fun1(int aParam) return 0;
    //* fun2 specific description */
    int fun2(int aParam) return 0;
    ///@


    This allows you to define a group that you can provide a generic description for and still lets you drop a comment specific to each function in the created doxygen files.



    I don't have doxygen installed on the computer I'm on and can't test this code directly, however if follows the example from group2 of the member groups section on the documentation, the compiled output from that example is shown here, which hopefully is the output you desire.



    Edit:



    After testing the previous did work for me but only when I set the desired extraction mode to All Entities (EXTRACT_ALL = YES in the doxyfile). It would be better to only use actually documented entities so I spent some time trying a different approach from the above mentioned documentation.



    file.h:



    /**
    * defgroup FunctionGroup A Group of Functions
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    * @
    */
    int fun1(int aParam);
    int fun2(int aParam);
    /** @ */


    file.cpp:



    #include file.h

    /** @ingroup FunctionGroup
    * @brief fun1 specific description
    */
    int fun1(int aParam)
    return 0;

    /** @ingroup FunctionGroup
    * @brief fun2 specific description
    */
    int fun2(int aParam)
    return 0;



    Here is an image of the output I get when I run Doxygen on those two files:
    output of doxygen files



    I used the doxywizard on a windows machine my doxyfile generated by this is on pastebin.






    share|improve this answer















    Looking at grouping in the Doxygen manual here there are several methods you can use. The one that I think best fits the situation is called Member Groups.



    You can define a member group using one of two styles:



    ///@ 
    ...
    ///@


    or



    /**@*/ 
    ...
    /**@*/


    An example of this would be:



    /** @name FunctionGroup
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    */
    ///@
    //* fun1 specific description */
    int fun1(int aParam) return 0;
    //* fun2 specific description */
    int fun2(int aParam) return 0;
    ///@


    This allows you to define a group that you can provide a generic description for and still lets you drop a comment specific to each function in the created doxygen files.



    I don't have doxygen installed on the computer I'm on and can't test this code directly, however if follows the example from group2 of the member groups section on the documentation, the compiled output from that example is shown here, which hopefully is the output you desire.



    Edit:



    After testing the previous did work for me but only when I set the desired extraction mode to All Entities (EXTRACT_ALL = YES in the doxyfile). It would be better to only use actually documented entities so I spent some time trying a different approach from the above mentioned documentation.



    file.h:



    /**
    * defgroup FunctionGroup A Group of Functions
    * @brief Documentation for 2 functions
    * @param aParam A Parameter
    * @retval 0 will always be returned
    * @
    */
    int fun1(int aParam);
    int fun2(int aParam);
    /** @ */


    file.cpp:



    #include file.h

    /** @ingroup FunctionGroup
    * @brief fun1 specific description
    */
    int fun1(int aParam)
    return 0;

    /** @ingroup FunctionGroup
    * @brief fun2 specific description
    */
    int fun2(int aParam)
    return 0;



    Here is an image of the output I get when I run Doxygen on those two files:
    output of doxygen files



    I used the doxywizard on a windows machine my doxyfile generated by this is on pastebin.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 25 at 15:45









    albert

    3,3173 gold badges11 silver badges25 bronze badges




    3,3173 gold badges11 silver badges25 bronze badges










    answered May 17 '16 at 21:13









    TuffwerTuffwer

    7125 silver badges20 bronze badges




    7125 silver badges20 bronze badges












    • Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

      – Napthali
      May 17 '16 at 21:46












    • I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

      – Tuffwer
      May 17 '16 at 22:09











    • @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

      – Tuffwer
      May 18 '16 at 17:11











    • I also had set set DISTRIBUTE_GROUP_DOC to YES.

      – Job
      Jan 31 '18 at 12:01

















    • Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

      – Napthali
      May 17 '16 at 21:46












    • I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

      – Tuffwer
      May 17 '16 at 22:09











    • @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

      – Tuffwer
      May 18 '16 at 17:11











    • I also had set set DISTRIBUTE_GROUP_DOC to YES.

      – Job
      Jan 31 '18 at 12:01
















    Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

    – Napthali
    May 17 '16 at 21:46






    Doxygen is telling me: temp/file.h:18: warning: Member fun1(int aParam) (function) of file file.h is not documented. temp/file.h:19: warning: Member fun2(int aParam) (function) of file file.h is not documented. As far as I can tell, all of the examples deal with member functions inside of a class, not stand alone functions.

    – Napthali
    May 17 '16 at 21:46














    I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

    – Tuffwer
    May 17 '16 at 22:09





    I'll go through it later at home when I can get to my machine with Doxygen installed and see if I can hammer something out.

    – Tuffwer
    May 17 '16 at 22:09













    @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

    – Tuffwer
    May 18 '16 at 17:11





    @Napthali Okay I added another way that seems to work using what should be essentially default Doxygen configuration. Let me know if this works for you

    – Tuffwer
    May 18 '16 at 17:11













    I also had set set DISTRIBUTE_GROUP_DOC to YES.

    – Job
    Jan 31 '18 at 12:01





    I also had set set DISTRIBUTE_GROUP_DOC to YES.

    – Job
    Jan 31 '18 at 12:01











    5














    I'm not sure about a single comment block, but a concise and easy way to do this is to use @copydoc (reference here), e.g:



    /**
    * @brief Brief description
    * @param aParam A parameter
    */
    void foo(int aParam)

    /**
    * @copydoc foo(int)
    */
    void bar(int aParam)





    share|improve this answer





























      5














      I'm not sure about a single comment block, but a concise and easy way to do this is to use @copydoc (reference here), e.g:



      /**
      * @brief Brief description
      * @param aParam A parameter
      */
      void foo(int aParam)

      /**
      * @copydoc foo(int)
      */
      void bar(int aParam)





      share|improve this answer



























        5












        5








        5







        I'm not sure about a single comment block, but a concise and easy way to do this is to use @copydoc (reference here), e.g:



        /**
        * @brief Brief description
        * @param aParam A parameter
        */
        void foo(int aParam)

        /**
        * @copydoc foo(int)
        */
        void bar(int aParam)





        share|improve this answer















        I'm not sure about a single comment block, but a concise and easy way to do this is to use @copydoc (reference here), e.g:



        /**
        * @brief Brief description
        * @param aParam A parameter
        */
        void foo(int aParam)

        /**
        * @copydoc foo(int)
        */
        void bar(int aParam)






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 26 at 10:10









        albert

        3,3173 gold badges11 silver badges25 bronze badges




        3,3173 gold badges11 silver badges25 bronze badges










        answered May 17 '16 at 19:19









        sjrowlinsonsjrowlinson

        2,4491 gold badge11 silver badges27 bronze badges




        2,4491 gold badge11 silver badges27 bronze badges



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37284399%2fdoxygen-single-comment-block-for-multiple-functions%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript