typedef in template class with Doxygen (C++)

后端 未结 6 1739
無奈伤痛
無奈伤痛 2021-02-15 05:51

My question is related to how to comment typedef in template class with Doxygen. I will give an example to illustrate my question:

 namespace fundamental
  {
            


        
6条回答
  •  时光说笑
    2021-02-15 06:18

    The typedef is part of a namespace, so you must document the namespace for it to appear, i.e.:

    /// documentation for the namespace
    namespace fundamental
    {
       ...
       typedef Base Coordinate; ///< Point coordinate class
    }
    

    Alternatively you could use @relates but it this will put the member under Related Functions of the Base class:

    /// @relates Base
    /// Point coordinate class
    typedef Base Coordinate;
    

    You can change this title to for instance Related Members by creating a layout file using doxygen -l and then editing the two occurrences of the related element in the generated DoxygenLayout.xml as follows:

    
    

提交回复
热议问题