Suppose I have a logger function, and I called it all over my code. My logs usually show the probability of the existence of a problem or a bug. More actions and investigations needed to confirm the problem or bug. For example, maintainer or tester should grab the input, open it in an editor, and if a specific string is inside the input, The problem or bug is confirmed.
I want to document the procedure of confirming the bug in a comment above of the log function in code. I also want to extract all of these kinds of comments and create, say an HTML table from them. So I can give that table to the tester or maintainer to find correct bugs for me.
I show it in a simple code. I know it's silly, but does the job:
std::ifstream t("file.txt");
std::string input;
// Read the whole file into input string
// DIAGNOSTICS COMMENT
// NOHELLO_BUG
// Diagnostics steps: 1.Open input file file.txt 2. Search hello inside the file, if hello exists inside the file, there should be a bug, send file.txt to the developer!
if (input.find("hello") == std::string::npos)
{
logger::log("hello not found inside input file!");
return false;
}
Is there any command in Doxygen for this purpose, although Any other solution is welcome too. The most obvious way is to write that table by myself, But maintaining that table will be a disaster too.