| |
| Name |
How to describe your library |
| |
You have to describe your library in a package.htm file that has to be put into the package of your library. If the the name of the lib differs from the name of the package you can insert the @libname tag followed by the name of the lib.
To work with proDOC you have to supply a certain file structure. This is important so that proDOC can find all needed ressources. Here is an example sheme. |
| filestructure |
c:\path\to\your\lib c:\path\to\your\lib\libpackage c:\path\to\your\lib\libpackage\source1.java c:\path\to\your\lib\libpackage\source2.java
... c:\path\to\your\lib\libpackage\sourcen.java c:\path\to\your\lib\examples c:\path\to\your\lib\examples\example1
c:\path\to\your\lib\examples\example1\example1.pde c:\path\to\your\lib\examples\example2
c:\path\to\your\lib\examples\example2\example2.pde ... c:\path\to\your\lib\examples\examplen
c:\path\to\your\lib\examples\examplen\examplen.pde c:\path\to\your\lib\templates\ c:\path\to\your\lib\templates\class.htm c:\path\to\your\lib\templates\classmember.htm c:\path\to\your\lib\templates\classmembers.htm c:\path\to\your\lib\templates\index.htm c:\path\to\your\lib\templates\member.htm c:\path\to\your\lib\templates\memberparameter.htm c:\path\to\your\lib\templates\memberparameters.htm c:\path\to\your\lib\templates\memberreturn.htm c:\path\to\your\lib\templates\stylesheet.css c:\path\to\your\lib\templates\images c:\path\to\your\lib\templates\images\image1.gif c:\path\to\your\lib\templates\images\image2.gif ... c:\path\to\your\lib\templates\images\imagen.gif
|
| |
The documentation is put into a folder documentation placed in your lib folder. All images in your template folder and the stylesheet.css file are copied to this location. |
| package.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>packagehtml</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> The proXML library allows Processing to read and write XML files. You can build a XML document by putting together different elements, or you can open an XML element form a certain url. When you have the XML-element filled with content you can save it as XML document.<br> <br> The parser of proXML mainly bases on the html parser of proHTML. It takes a XML Document and parses it into a tree structure. <br> @libname proXML </body> </html> |
 |
As youcan see there is line @libname proXML. This is a first example of using tags with proDOC. There exist required tags and a few optional tags. Note that a tag can be optional in the sourcecode comments but required in the html template and vice versa. There are tags that are used for templates, tags that are used for comments and tags that are used for both.
For the library comments in package.html there only exists the tag @libname. It is optional in both comment and template. Here is the source code of the standard template for the index page of a libdoc: |
| index.html |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>@title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="stylesheet.css" rel="stylesheet" type="text/css"> </head> <body> <center> <table width="600" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="400" height="100" valign="top" class="indexheader">@libname</td> <td class="linkList"> </td> </tr> <tr> <td class="indextext"> indexdescription</td> <td class="descList">indexlinks</td> </tr> </table> </center> </body> </html> |
 |
When you provide you own template files, the index template requires three tags. The first is @title to insert a title into your later docfile. Second comes @description, working as placeholder for the description of your library, that has to be included in the package.html file, the third one is @links which is a placeholder for the links to the different classes, methods and fields.
For the linklist proDOC generates a headline for every class of your lib and than puts the links to the description of their methods and fields after it. @libname is an optional tag you can use it to have a headline for you documentation, but you could also use an image instead. |
 |
|