Generating documentation
by Nathan Bowhay - ESAL · in Torque 3D Professional · 06/22/2010 (11:45 am) · 8 replies
I started using Doxygen and installed it and made my own doxygen config but then noticed in Engine > bin > doxygen there is all the Doxygen files including some stuff for script (scriptReferenceDump.cs) as well as doxygen configs (ScriptReference.cfg & engineReference.cfg).
How would I go about generating docs for all my script and engine? Any steps on how to use these files?
How would I go about generating docs for all my script and engine? Any steps on how to use these files?
#2
The main part of my questions is how to generate the text file it uses (scriptReferenceDump.cs). Looks like it is just torquescript so my guess is to just execute it by typing exec("scriptReferenceDump.cs"); in the console or something, but is there an easy way without having to lunch your entire game up?
Also does it grab things I made in script (Script classes, methods, functions) as well as those I opened to script in C++?
06/23/2010 (12:50 am)
Ok so they are separate sets of docs. Just what I figured.The main part of my questions is how to generate the text file it uses (scriptReferenceDump.cs). Looks like it is just torquescript so my guess is to just execute it by typing exec("scriptReferenceDump.cs"); in the console or something, but is there an easy way without having to lunch your entire game up?
Also does it grab things I made in script (Script classes, methods, functions) as well as those I opened to script in C++?
#3
just look somewhere here in the forum, there is a function generating the whole tree of objects and functions you can aquire from script/aka console. I would need to spend some time now, but it´s quite easy.
It produces a c++ equal output which can be used by doxygen. And to answer the last question: yes it grabs everything!
06/23/2010 (2:09 am)
Hey Nathan,just look somewhere here in the forum, there is a function generating the whole tree of objects and functions you can aquire from script/aka console. I would need to spend some time now, but it´s quite easy.
It produces a c++ equal output which can be used by doxygen. And to answer the last question: yes it grabs everything!
#4
06/23/2010 (8:54 am)
Yeah that is what the scriptRefrenceDump.cs does, just wondering the easiest way to run it.
#5
Edit: Here are the functions just in case you don't have them.
function writeOutFunctions()
{
new ConsoleLogger(logger, "scriptFunctions.txt", false);
dumpConsoleFunctions();
logger.delete();
}
function writeOutClasses()
{
new ConsoleLogger(logger, "scriptClasses.txt", false);
dumpConsoleClasses();
logger.delete();
}
06/23/2010 (9:58 am)
There are actually two functions in script that already do this such as WriteOutFunctions() and WriteOutClasses(). They would be located in your Core/scripts/client/scriptDoc.cs file. Just run these functions from inside your game and run doxygen on the 2 files that it generates.Edit: Here are the functions just in case you don't have them.
function writeOutFunctions()
{
new ConsoleLogger(logger, "scriptFunctions.txt", false);
dumpConsoleFunctions();
logger.delete();
}
function writeOutClasses()
{
new ConsoleLogger(logger, "scriptClasses.txt", false);
dumpConsoleClasses();
logger.delete();
}
#6
Thanks Joseph for giving the final advice!
06/23/2010 (1:59 pm)
Year, that´s what I had in mind and also used!Thanks Joseph for giving the final advice!
#7
06/23/2010 (2:12 pm)
Thanks that is perfect!
#8
06/30/2010 (2:23 pm)
I found an issue with dump functions and the formatting of your comments that causes problems with generating documentation. I posted about it here: http://www.torquepowered.com/community/forums/viewthread/117287
Torque Owner Tobias B.
mercatronics
- Load config
- select output format
- execute doxygen
- drink coffee
- look at reference documentation
Script and engine reference are two separate things.