Using Doxygen with BlitzMax
BlitzMax Forums/BlitzMax Programming/Using Doxygen with BlitzMax
| ||
If you're interested in using Doxygen with BlitzMax and you don't want to have to work with two different files for documentation and code, this is how you do it:'/* Rem */ /// @brief Prints "I" /// @return Pi (3.1415962 and so on) double Blah(); /// @brief Foo object class class Foo { public: /// @brief Some variable int bar; /// @brief Creates a Foo object /// @param i The Foo's bar information /// @return A new Foo object static Foo Create(int i); }; /// @brief Bar object class class Bar : public Foo { public: /// @brief Craptasticalnessnessness int _foo; /// @brief Creates a Bar object /// @param f The Bar's _foo information /// @return A new Bar object static Bar Create(Object f); }; '/* End Rem ' Doxygen test Function Blah!() Print "I" Return Pi End Function Type Foo Field bar:Int Function Create:Foo(i:Int) Local this:Foo = New Foo this.bar = i Return this End Function End Type Type Bar.. Extends Foo Field _foo:Object Function Create:Bar(f:Object) Local this:Bar = New Bar this._foo = f Return this End Function End Type '*/ Ugly, messy, but if you like Doxygen then you probably don't mind that already. Until my documentation generator is released, this is probably the only way to document non-module code besides writing everything by hand. Well, just thought I'd post that- weird experiment, but eh. |
| ||
For those without a clue, Whats Doxygen? |
| ||
http://www.stack.nl/~dimitri/doxygen/ Google would've taken less time -_- |
| ||
Hey thanks Noel! This WILL have to hold us over till your Doc generator is done. Any ETA on its release? |
| ||
I think it'll be soon (e.g., week or two), I'm just working on bits and pieces of the output now. I've been thinking about trying to use Dot with it, but I don't know yet. That can wait 'til I'm done with the rest of it. Basically, this is what I've got it outputting at the moment when I run it over my GUI module (test output, in other words this wasn't made by DocGen itself but rather by looping through all of DocGen's acquired data and putting it in a single file so I can look for errors). Basically, the way it works at the moment is a three-pass system. First pass gathers all the objects in the files, be it comments, types, methods, functions, variables, etc., then the second pass gathers all associations between the data, comments, etc. and links them accordingly. The third pass is generating the HTML based on template files that look something like this (you don't have to write you own as I'm including 'defaults' in it as well, but you'll likely want to write your own because the defaults are gonna be ugly [I don't want to spend a lot of time on them]): Edit: And for a basic example of how you document code in it: Random blurb over. |
| ||
Damn Noel, thats the [poop]! Cant wait! |