Using libclang it could parse C++ header files, extract the documentation comments, and generate documentation. To my surprise (the “me” that is currently writing this blog post and looked it up), I published the first prototype in May 2016. I had absolutely no idea what I was getting into. I had a couple of months before I start university, so I just write something, right? Writing a documentation generator that generated a documentation style similar to the C++ standard, so with Effects: and Requires: and so on - standardese. It should understand all that … stuff … we have to do, and document it accordingly So during my final weeks in high school, I planned on writing a documentation generator that just “gets” C++. This meant a couple of #ifdef DOXYGEN to include the interface description of concepts, #ifndef DOXYGEN to hide some stuff, and macros like FOONATHAN_EBO(foo) that expand to base classes unless Doxygen is active. No surprise then, Doxygen – at least the 2015 Doxygen – can’t handle it properly.įor foonathan/memory, I’ve used the common workaround of defining a DOXYGEN macro when Doxygen parses the code and using conditional compilation to give it a different source code than the one the C++ compiler actually sees. Not to mention the obvious: parsing C++ is hard, really hard, really, really hard. Then there are SFINAE template parameters that need to become proper requirements, typedefs that should conceptually create new types, hidden base classes that inject member functions to save code duplication, base classes for EBO that should disappear, function objects that should be documented as functions, concepts (not the C++20 feature) that need to be documented and linked, overload sets that need to be grouped together, etc. ![]() It starts with small stuff: detail namespaces, unspecified return types you want to hide and private virtual functions you want to include. However, C++ is tricky: what you write in your header file is not necessarily the interface you want to show in the documentation. Now, I can officially announce that I have abandoned the project and transferred ownership.įor my first big project, foonathan/memory, I’ve used Doxygen to generate the documentation. ![]() However, in the past two years I haven’t really worked on it. Back in 2016, I started standardese, a C++ documentation generator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |