About once a week or so I run my entire GL Engine project through the Doxygen documentation generator to check that I haven’t missed any documentation and get an idea of how my project is shaping up. There’s an option to use a package called Graphviz for the inheritance/file graph documentation, although up until today I’d never paid much attention to it. On today’s doc run I decided to install it and see what it could do. It turns out it can do a lot.
Graphviz generates all of the inheritance diagrams in the same way as Doxygen’s internal tools, but with a bit more style. Example from GLVertexBuffer:
One of the cool features exclusively supported by Graphviz is the “Collaboration Diagram”, which essentially shows all of the classes that are involved with a particular class. This includes the inheritance tree, and any members that are also instances of classes included in the project. A simple case is the VertexPNT class:
Another feature of Graphviz that I can see myself using very often during development is the file linkage tree, which shows which shows how files are related to each other through #includes. Here’s one for my Vector3F class:
There are also a few other useful features, such as call/caller graphs for each method. I’m definitely going to be checking “Yes” on all of these options on my subsequent doc generations. I can already think of a few cases where they’ll helpful for development. Ensuring that all code only references the platform agnostic classes, e.g. VertexBuffers instead of GLVertexBuffers, is a big one for me. And of course, at the very least they’re pretty cool to look at.