[Commits] r917 - core/trunk/geoext/lib/GeoExt/data

commits at geoext.org commits at geoext.org
Fri May 29 23:14:01 CEST 2009


Author: tschaub
Date: 2009-05-29 23:14:01 +0200 (Fri, 29 May 2009)
New Revision: 917

Modified:
   core/trunk/geoext/lib/GeoExt/data/LayerReader.js
Log:
Docs for LayerReader.

Modified: core/trunk/geoext/lib/GeoExt/data/LayerReader.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/data/LayerReader.js	2009-05-29 20:16:15 UTC (rev 916)
+++ core/trunk/geoext/lib/GeoExt/data/LayerReader.js	2009-05-29 21:14:01 UTC (rev 917)
@@ -9,30 +9,31 @@
  * @include GeoExt/data/LayerRecord.js
  */
 
+/** api: (define)
+ *  module = GeoExt.data
+ *  class = LayerReader
+ *  base_link = `Ext.data.DataReader <http://extjs.com/deploy/dev/docs/?class=Ext.data.DataReader>`_
+ */
 Ext.namespace("GeoExt", "GeoExt.data");
 
-/**
- * Class: GeoExt.data.LayerReader
- *      LayerReader is a specific Ext.data.DataReader for converting
- *      layers into layer records, i.e. {OpenLayers.Layer} objects
- *      into {GeoExt.data.LayerRecor} objects.
- *
- * Usage example:
- * (start code)
- *         var reader = new GeoExt.data.LayerReader();
- *         var layerData = reader.readRecords(map.layers);
- *         var numRecords = layerData.totalRecords;
- *         var layerRecords = layerData.records;
- * (end)
- *
- * Inherits from:
- *  - {Ext.data.DataReader}
+/** api: example
+ *  Sample using a reader to create records from an array of layers:
+ * 
+ *  .. code-block:: javascript
+ *     
+ *      var reader = new GeoExt.data.LayerReader();
+ *      var layerData = reader.readRecords(map.layers);
+ *      var numRecords = layerData.totalRecords;
+ *      var layerRecords = layerData.records;
  */
 
-/**
- * Constructor: GeoExt.data.LayerReader
- *      Create a layer reader. The arguments passed are similar to those
- *      passed to {Ext.data.DataReader} constructor.
+/** api: constructor
+ *  .. class:: LayerReader(meta, recordType)
+ *  
+ *      Data reader class to create an array of
+ *      :class:`GeoExt.data.LayerRecord` objects from an array of 
+ *      ``OpenLayers.Layer`` objects for use in a
+ *      :class:`GeoExt.data.LayerStore` object.
  */
 GeoExt.data.LayerReader = function(meta, recordType) {
     meta = meta || {};
@@ -46,24 +47,19 @@
 
 Ext.extend(GeoExt.data.LayerReader, Ext.data.DataReader, {
 
-    /**
-     * APIProperty: totalRecords
-     * {Integer}
+    /** private: property[totalRecords]
+     *  ``Integer``
      */
     totalRecords: null,
 
-    /**
-     * APIMethod: readRecords
-     *      From an array of {OpenLayers.Layer} objects create a data block
-     *      containing {<GeoExt.data.LayerRecord>} objects.
-     *
-     * Parameters:
-     * layers - {Array({OpenLayers.Layer})} Array of layers.
-     *
-     * Returns:
-     * {Object} An object with two properties. The value of the property "records"
-     *      is the array of layer records. The value of the property "totalRecords"
-     *      is the number of records in the array.
+    /** api: method[readRecords]
+     *  :param layers: ``Array(OpenLayers.Layer)`` List of layers for creating
+     *      records.
+     *  :return: ``Object``  An object with ``records`` and ``totalRecords``
+     *      properties.
+     *  
+     *  From an array of {OpenLayers.Layer} objects create a data block
+     *  containing :class:`GeoExt.data.LayerRecord` objects.
      */
     readRecords : function(layers) {
         var records = [];



More information about the Commits mailing list