NaturalDocs
From MapbenderWiki
Contents |
Introduction
Mapbender uses NaturalDocs to document the JavaScript files. Download
./NaturalDocs --exclude-input /data/build27/2.7/http/extensions/ --exclude-input /data/build27/2.7/test --exclude-input /data/build27/2.7/resources --exclude-input /data/build27/2.7/tools -i /data/build27/2.7/ -o html /data/build27/2.7/documents/api_js -p /data/build27/2.7/documents/api_js
The NaturalDocs creation will be moved to the build script later on. Here's a draft.
Templates
temporary solution for HTML files
Just replace the license header with the new one
<!-- License: Copyright (c) 2009, Open Source Geospatial Foundation This program is dual licensed under the GNU General Public License and Simplified BSD license. http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt -->
temporary solution for PHP classes
Just replace the license header with the new one
# License: # Copyright (c) 2009, Open Source Geospatial Foundation # This program is dual licensed under the GNU General Public License # and Simplified BSD license. # http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
Application elements
Add this at the beginning of the script
/** * Package: <Application element name> * * Description: * <A description> * * Files: * - <path and filename, like http/javascripts/mod_zoomIn1.php> * * SQL: * > <SQL for element> * > * > <SQL for element var> * * Help: * http://www.mapbender.org/<wiki site name> * * Maintainer: * http://www.mapbender.org/User:<user> * * Parameters: * <normal element var name> - <type and description> * <optional element var name> - *[optional]* <type and description> * <deprecated element var name> - *[deprecated]* <type and description> * * License: * Copyright (c) 2009, Open Source Geospatial Foundation * This program is dual licensed under the GNU General Public License * and Simplified BSD license. * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt */
Methods that will be part of this module's API in Mapbender.modules.<element_name>
see Template for methods in base classes, below
Properties that will be part of this module's API in Mapbender.modules.<element_name>
see Template for properties in base classes, below
Base classes
Add this at the beginning of the script
/** * Package: <Class name> * * Description: * <A description> * * Files: * - <path and filename, like http/javascripts/mod_zoomIn1.php> * * License: * Copyright (c) 2009, Open Source Geospatial Foundation * This program is dual licensed under the GNU General Public License * and Simplified BSD license. * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt */
Template for the constructor:
/** * Constructor: <Class name> * * Parameters: * <normal variable name> - <type and description> * <optional variable name> - *[optional]* <type and description> * <deprecated variable name> - *[deprecated]* <type and description> */
Template for methods:
/** * Method: <method name> * * Description: * <description> * * Parameters: * <normal variable name> - <type and description> * <optional variable name> - *[optional]* <type and description> * <deprecated variable name> - *[deprecated]* <type and description> */
Template for properties:
/** * Property: <variable name> * * Description: * <type and description, use deprecated or optional like in methods> */
