I always try to write my comments in Doxygen style. You know, documenting every argument and return value for every method in every class. For example, the following could be part of a Vector class definition (and similar things for each file and datatype and variable):
However, I kind of get tired of the repetitive nature of this. Documenting functions whose meaning is completely clear without documentation and writing pretty much the same text for several fields or similar functions. It's just brain-numbing, writing such comments.Code:/** * Gets the length of the vector. * @return The length of the vector. */ T computeLength();
So, how do you document those header files? Do you document every single function, or do you skip the obvious? Can you give a few examples of how you would actually comment functions?
Thanks in advance