views:

19

answers:

1

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);
}
A: 

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.

Space_C0wb0y
oh, actually I mean especially for implemented virtual functions.
elgcom
@elgcom: Edited my answer. Hope it helps.
Space_C0wb0y