I am working on documenting an interface, which is described in an IDL. In this interface I am attempting to use doxygen to generate documentation.
I am looking for a way to "repeat" doxygen documentation in multiple places.
For example
struct StructA
{
long identifierA; ///< Some description about this identifierA
long identifierB; ///< Some other description about this identifierB
SomeTypeA dataA;
SomeTypeB dataB;
}
struct StructB
{
long identifierA; // This member should be documented the same as StructA::identifierA
long identifierB; // This member should be documented the same as StructA::identifierB
SomeTypeC dataC;
}
In this example, imagine that identifierA
and identifierB
in both data structures represent the same thing, for example, some way of indexing/identifying data (e.g. a key).
Q: If I describe the identifiers in StructA
, how can I repeat the documentation for the identifiers in StructB
? Obviously I could copy and paste, but that is going to create headaches if I need to change the documentation. It seems like there should be a way to reference the documentation for it in one place which may be some other place than StructA
or StructB
.
Or perhaps I am thinking about this documentation in the wrong way?
struct StructB
{
long identifierA; ///< @copydoc StructA::identifierA
long identifierB; ///< @copydoc StructA::identifierB
SomeTypeC dataC;
}