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
{
/**
* Basic function
*/
template <typename T>
class Base
{
public:
T x; ///< x coordinate
T y; ///< y coordinate
};
typedef Base<float> Coordinate; ///< Point coordinate class
}
After using Doxygen to process the above codes, I can obtain a HTML page to show the definition of the class Base. However, for the typedef class Coordinate, it will not appear in the same page with Base. In fact all the typedef types are listed in the fundamental namespace page along with all the classes in this namespace. I was wondering whether it is possible to show Coordinate class in the Base HTML page. By doing so, the link between Base and Coordinate will become much closer. Thanks!
The typedef is part of a namespace, so you must document the namespace for it to appear, i.e.:
Alternatively you could use
@relatesbut it this will put the member under Related Functions of the Base class:You can change this title to for instance Related Members by creating a layout file using
doxygen -land then editing the two occurrences of therelatedelement in the generatedDoxygenLayout.xmlas follows: