Doxygen@retval
提供了一种清晰的方法来记录多个返回值:
/**
* Do the thing to the other thing.
*
* @param[in] other_thing The thing to do it to.
*
* @retval STATUS_OK on success.
* @retval STATUS_BAD_ARGS if the other thing wasn't right.
* @retval STATUS_TIMED_OUT if the thing timed out.
*/
status_t do_the_thing(thing_t other_thing);
Run Code Online (Sandbox Code Playgroud)
但是如果通过输出参数返回该状态怎么办?是否有记录这些值的约定?
/**
* Do a couple things to the other thing.
*
* @param[in] other_thing The thing to do it to.
* @param[out] out_status_1 The status of the first thing done. …
Run Code Online (Sandbox Code Playgroud)