Discussion of article "Auto-Generated Documentation for MQL5 Code"

 

New article Auto-Generated Documentation for MQL5 Code is published:

The article describes the use of Doxygen to create HTML help file from structured comments in MQL5 code. Then it can be compiled into a .CHM help file by Microsoft's HTML Help Workshop.

Author: Paul

 

Well done! Although it is only suitable if you sell MQL5 libraries :(

 

Great article!

 
Can I use it with MQL4? It is very much like C after all, and doxygen is supposed to support that too.
 
gordon   :
Can I use it with MQL4? It is very much like C after all, and doxygen is supposed to support that too.

Yes, it works gordon.  There's an option in the second Wizard Mode screen to "optimize for C or PHP output".  Obviously all MQL4 functions are global, so there are no advantages of the MQL5 class grouping.

 

I've attached a screenshot below of some output for LibOrderReliable using the C option.  LibOrderReliable is a very well documented wrapper for the MQL4 trade functions to make them more fail-safe.  To have the documentation appear in the Doxygen output, the in-code comments would need similar adjustments to the ones I did on the MQL5 code.

 

Paul

http://paulsfxrandomwalk.blogspot.com/ 

 

 

 

Oh, I see what you mean about the classes. So maybe not really worth using it for MQL4.

 
Thanks for the article! Just what I need. And maybe there are generators with msdn style?
 

It is important to specify the correct encoding when creating documentation for programmes containing comments in Russian.

Otherwise you may get squares instead of Russian-language comments:

By default in Doxygen in the project options (Expert->Project) the DOXYFILE_ENCODING option is set to UTF-8,

so when preparing documentation it is better to create a separate folder with files saved in UTF-8 encoding:

The result is:

Another important option OUTPUT_LANGUAGE, with the specified language (Russian) allows you to create menus and descriptions in Russian:

Documentation makes it easier to study the structure and properties of programmes, so try to attach documentation to source codes.

Автоматическое создание документации к программам на MQL5
Автоматическое создание документации к программам на MQL5
  • 2009.11.23
  • Paul
  • www.mql5.com
Большинство Java программистов знакомы с автоматическим созданием документации, которая может быть создана при помощи программы JavaDocs. В мире C++ также есть несколько автоматических генераторов документации, одними из лидеров являются программы Microsoft's SandCastle и Doxygen. В статье описано, как можно использовать программу Doxygen для создания структурированных файлов справки HTML для программ, написанных на MQL5. Результаты данной работы убедили меня использовать Doxygen (или похожие программы) в будущем для создания документации к любому моему коду на MQL5, это значительно облегчает его понимание и использование.
 
Automated-Trading писал(а) # :

Therefore, when preparing documentation, it is better to create a separate folder with files saved in UTF-8 encoding:

It is easier to set INPUT_ENCODING as windows-1251 on the Input tab. And no problems with encodings
 
GarF1eld писал(а) # :
It is easier to set INPUT_ENCODING as windows-1251 on the Input tab. And no problems with encodings

Of course that would be easier.

but for some reason doxygen (I have 1.6.2) inserts in all files

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>

although in the settings

i.e. the files are in the required encoding, and the display can be corrected if in all html-files replace with:

<meta http-equiv="Content-Type" content="text/xhtml;charset=windows1251"/>

But the question is how to defeat it so that it does it on its own.
 
Honestly I didn't notice, as I am quite happy with UTF-8, and when I had a problem with crocoblasts, I just changed INPUT_ENCODING.