I have written a couple of single header file libraries and all are fully documented using doxygen style in the header part.
As soon as i start using the functions in a project, no documentation will show up in intellisense - regardless of the documentation style (XML style does not work either).
However the implementation does not have any documentations whatsoever and i dont want to duplicate the same documentation block over and over again.
Example:
#ifndef MYLIB_H
#define MYLIB_H
/**
* \brief Returns a length squared by the given two parameters
* \param x X-position
* \param x Y-position
* \return Distance by X and Y
*/
int mylibGetLengthSq(float x, float y);
#endif // MYLIB_H
#if defined(MYLIB_IMPLEMENTATION) && !defined(MYLIB_IMPLEMENTED)
#define MYLIB_IMPLEMENTED
float mylibGetLengthSq(float x, float y) {
float result = x * x + y * y;
return(result);
}
#endif // MYLIB_IMPLEMENTATION
How do i change that, so that documentation are used from the header file only or ignoring the not defined implementation documentation. Is that possible?
Of course if i include the implementation in a separated C/C++ file, it works correctly - but i want to prevent that.
Is there any way to mark a function implementation as (Never ever try to parse documentation from here)...??