doxygen - How to avoid API documentation duplication? -


assume rather typical c api:

/**  * ...  * @param ctxt library context, blablabla  * ...  */ void mylibrary_foo(mylibrary_ctxt* ctxt, int x, const char* y);   /**  * ...  * @param ctxt library context, blablabla  * ...  */ void mylibrary_bar(mylibrary_ctxt* ctxt, double f);  

usually, library manage resources in context object. context object has allocated , freed (and maybe used in special way) client code. typical user enter documentation through search , (hopefully) directly begin either foo or bar method. hence, want document usage of context object @ each function. not want copy , paste information, since might outdated or contain copy/paste errors. also, common parameter might not have single datatype.

what idiom keep such duplicated documentation in 1 place have available needed? how deal users/developers read source code , not generated documentation?

i interested in solution using doxygen, feel free point other documentation systems if there solution.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -