Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to document overridden/implemented functions without Doxygens @copydoc?

How can I document an overridden method or an implemented virtual method of a sub class? Should I use @copydoc?

class A {
   /**
    * A detailed description........
    */
   virtual int foo(int i);
}

class B : public A {
   /** {I won't write the same description again.} */
   int foo(int i);
}
like image 689
rnd_nr_gen Avatar asked Oct 22 '10 09:10

rnd_nr_gen


1 Answers

If the method is overridden it probably has different behavior than the subclass implementation. In that case you should just rewrite the documentation for that method.

If you want the same documentation regardless, you can use the INHERIT_DOCS option.

like image 87
Björn Pollex Avatar answered Nov 01 '22 11:11

Björn Pollex