Documentation of code is very important for any project. It builds an overview of the written code, explains its usage, and helps developers understand the code. Code::Blocks allows generation of code documentation from the IDE itself.
Doxygen is a standard tool to create documentation from annotated C++ files. Code::Blocks comes with a plugin called DoxyBlocks that creates an interface with the externally installed doxygen tool.
We need to download and install doxygen tool first. Subsequently we can use DoxyBlocks plugin to generate documentation. Perform the following steps:
doxygen-x.x.x-setup.exe
file. Double-click on that file to install it.C:Program Filesdoxygenindoxygen.exe
.main.cpp
file:class A { public: A() {}; ~A() {}; virtual int CallMe(int a) = 0; }; class B : public A { public: B() {}; ~B() {}; int CallMe(int a) { return a; } }; int main() { return 0; }
doxygen
folder.We can also add additional detailed description of function, class, etc to create a detailed documentation.
B::CallMe()
function and click on the DoxyBlocks | /** Block comment menu option or press Ctrl + Alt + B key combination. Code::Blocks will analyze the function parameters and will insert a default comment block suitable for doxygen tool. Adjust the comment block and our code will look similar to the following snippet:~B() {}; /** rief Virtual function CallMe() is defined here * * param a int * eturn int * */ int CallMe(int a) {
B::CallMe()
will look similar to the following screenshot:We can also customize DoxyBlocks plugin option to use advanced features of doxygen.
3.14.145.82