JSDoc
From MapbenderWiki
DEPRECATED! USE NaturalDocs FROM NOW ON!
Contents |
documentation
templates
- what follows is a template list for a very basic documentation
class constructor
/** * @class <a description of the class> * * @constructor * [@extends <a name of the class this class extends>] * [@requires <a name of the class this class requires>] * [@param <parameter name> <parameter description>] */
member functions
- is there an option to distinguish between public and privileged methods?
/**
* <a description of the function>
*
* [@private]
* [@param {<parameter data type>} <parameter name> <parameter description>]
* [@return <description of the return value]
* [@type <the return value's data type]
*/
member variables
/** * <a description of the variable> * * [@private] * [@final] */
tips
- use the @link option to link to relevant other classes within a description. Example:
/**
* updates all {@link Point} objects of this {@link GeometryArray}
* that equal oldP to newP.
* It will call the funtion {@link MultiGeometry#updateAllPointsLike} of
* the class {@link MultiGeometry}
*
* @param {Point} oldP
* @param {Point} newP
*/
GeometryArray.prototype.updateAllPointsLike = function(oldP, newP){
for (var i = 0; i < this.count(); i++){
this.get(i).updateAllPointsLike(oldP, newP);
}
};
HTML export
via Perl:
perl jsdoc.pl <filename1.js filename2.js filename3.js etc>
alternatively
perl jsdoc.pl <folder>
SVN upload
the HTML files are checked into the SVN at the following location (add the property svn:mime-type with the value text/html recursively to the folder jsdoc previously!):
trunk/documents/jsdoc/
The API can be accessed via
https://svn.osgeo.org/mapbender/trunk/documents/jsdoc/index.html
