Page 1 of 1

Documenting my AI with Doxygen

Posted: 19 Apr 2015 10:03
by Yasser
Hi

I have been learning Doxygen for my job (embedded software development in C) and was wondering if I could use Doxygen to document my attempt at an AI (YasserAI).

Is there a Doxyfile that anyone has used to do this for their AI I can borrow ?

Regards

Yasser

Re: Documenting my AI with Doxygen

Posted: 19 Apr 2015 10:39
by Brumi
Quite some time ago I asked the same question: http://www.tt-forums.net/viewtopic.php?p=953289#p953289

Nevertheless if anyone has a solution since then I'm also interested :)

Re: Documenting my AI with Doxygen

Posted: 19 Apr 2015 11:56
by Alberth
I find that just having the doxygen text in the source file is enough, and I did some documenting in Busy Bee that way:

Code: Select all

// Find cargo sources.
// @param cargo_index Cargo index (index in this.cargoes).
// @return List of resources that produce the requested cargo, list of
//      'ind' or 'town' number, 'prod' produced amount, 'transp' transported amount, and 'loc' location.
function BusyBeeClass::FindSources(cargo_index)
It is not quite satisfactory though, as there is no good place to put the type of the data.
In CosrixTH (Lua code), they do

Code: Select all

--! Spawn a patient from a spawn point for the given hospital.
--!param hospital (Hospital) Hospital that the new patient should visit.
--!return (Patient entity) The spawned patient, or 'nil' if no patient spawned.
function World:spawnPatient(hospital)
An alternative that I use in Python is 'epydoc' (epydoc.sourceforge.net), which does

Code: Select all

def load_dom(fname):
    """
    Load the XML file as DOM into memory.

    @param fname: File to load.
    @type  fname: C{str}
    """
You the type explicitly at a line here.