Re: Source code documentation

No problem, that is why I asked about documentation before I started writing it.  I still would like to document it though and maybe we can come to some system which you would find acceptable.  One possible way is that I just run Doxygen on my own code and just use the auto-generated docs without adding any descriptions, etc.  This would have no impact on the project and myself or anyone else could do this whenever but it limits the usefulness of the documentation.

A second, and perhaps more appealing method would be to utilize the fact that Doxygen does not require the added documentation to be in the same file as the source code it is documenting.  We could add a single file that contains the documentation blocks with links pointing to the function names.  Doxygen then combines this with the auto-generated info it collects from the source to produce the docs.

Finally, whether we use Doxygen or not, I would like to write a “man page” for the program documenting the command-line options it takes.  Where is the command line processed in the code?  I looked at main.cpp and didn’t see it (in fact I couldn’t even find the “main” function).


It’s in init.cpp.

It’s a wxWidgets app, so it doesn’t have a main() function.  It may in a little while, since I’m pretty close to making bitcoind build w/o wxBase.  (it’ll be in init.cpp)

Sorry about my choice of the filename “main.cpp”, another possible name would have been “core.cpp”.  It’s much too late to change.  I still prefer main.cpp.

We’re still in great need of sample code showing the recommended way to use the JSON-RPC functions, like for a basic account system on a typical storefront website.  Using getreceivedbylabel using the username as the label, changing to a new bitcoin address once the stored one for that account gets used.  I posted a sample code fragment on the forum somewhere.  (search on getreceivedbylabel or getnewaddress)  The sample code could be a plain vanilla bank site where you can deposit and send payments.

155,829 total views, 19 views today