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

commits at geoext.org commits at geoext.org
Thu Apr 30 05:22:56 CEST 2009


Author: tschaub
Date: 2009-04-30 05:22:56 +0200 (Thu, 30 Apr 2009)
New Revision: 539

Modified:
   core/trunk/geoext/lib/GeoExt/data/FeatureReader.js
Log:
Adding rst doc comments for FeatureReader (see #53).

Modified: core/trunk/geoext/lib/GeoExt/data/FeatureReader.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/data/FeatureReader.js	2009-04-30 03:21:41 UTC (rev 538)
+++ core/trunk/geoext/lib/GeoExt/data/FeatureReader.js	2009-04-30 03:22:56 UTC (rev 539)
@@ -21,32 +21,34 @@
  * @include GeoExt/data/FeatureRecord.js
  */
 
+/** jst: (define)
+ *  module = GeoExt.data
+ *  class = FeatureReader
+ *  base_link = `Ext.data.DataReader <http://localhost/projects/gx/trunk/ext/docs/?class=Ext.data.DataReader>`_
+ */
 Ext.namespace('GeoExt', 'GeoExt.data');
 
-/**
- * Class: GeoExt.data.FeatureReader
- *      FeatureReader is a specific Ext.data.DataReader. When records are
- *      added to the store using this reader, specific fields like
- *      feature, state and fid are available.
- *
- * Typical usage in a store:
- * (start code)
- *         var store = new Ext.data.Store({
- *             reader: new GeoExt.data.FeatureReader({}, [
- *                 {name: 'name', type: 'string'},
- *                 {name: 'elevation', type: 'float'}
- *             ])
- *         });
- * (end)
- *
- * Inherits from:
- *  - {Ext.data.DataReader}
+/** jst: example
+ *  Typical usage in a store:
+ * 
+ *  .. code-block:: javascript
+ *     
+ *      var store = new Ext.data.Store({
+ *          reader: new GeoExt.data.FeatureReader({}, [
+ *              {name: 'name', type: 'string'},
+ *              {name: 'elevation', type: 'float'}
+ *          ])
+ *      });
+ *      
  */
 
-/**
- * Constructor: GeoExt.data.FeatureReader
- *      Create a feature reader. The arguments passed are similar to those
- *      passed to {Ext.data.DataReader} constructor.
+/** jst: constructor
+ *  .. class:: FeatureReader(meta, recordType)
+ *   
+ *      Data reader class to create an array of
+ *      :class:`GeoExt.data.FeatureRecord` objects from an
+ *      ``OpenLayers.Protocol.Response`` object for use in a
+ *      :class:`GeoExt.data.FeatureStore` object.
  */
 GeoExt.data.FeatureReader = function(meta, recordType) {
     meta = meta || {};
@@ -66,34 +68,32 @@
      */
     totalRecords: null,
 
-    /**
-     * APIMethod: read
-     * This method is only used by a DataProxy which has retrieved data.
+    /** private: method[read]
+     *  .. method:: FeatureReader.read(response)
+     *      :param response: ``OpenLayers.Protocol.Response``
+     *      :return: ``Object`` An object with two properties. The value of the
+     *          ``records`` property is the array of records corresponding to
+     *          the features. The value of the ``totalRecords" property is the
+     *          number of records in the array.
+     *      
+     *      This method is only used by a DataProxy which has retrieved data.
      *
-     * Parameters:
-     * response - {<OpenLayers.Protocol.Response>}
-     *
-     * Returns:
-     * {Object} An object with two properties. The value of the property "records"
-     *      is the array of records corresponding to the features. The value of the
-     *      property "totalRecords" is the number of records in the array.
      */
     read: function(response) {
         return this.readRecords(response.features);
     },
 
-    /**
-     * APIMethod: readRecords
-     *      Create a data block containing Ext.data.Records from
-     *      an array of features.
-     *
-     * Parameters:
-     * features - {Array{<OpenLayers.Feature.Vector>}}
-     *
-     * Returns:
-     * {Object} An object with two properties. The value of the property "records"
-     *      is the array of records corresponding to the features. The value of the
-     *      property "totalRecords" is the number of records in the array.
+    /** jst: method[readReacords]
+     *  .. method:: FeatureReader.readRecords(features)
+     *   
+     *      :param features: ``Array(OpenLayers.Feature.Vector)`` List of
+     *          features for creating records
+     *   
+     *      :return: ``Object``  An object with ``records`` and ``totalRecords``
+     *          properties.
+     *       
+     *      Create a data block containing :class:`GeoExt.data.FeatureRecord`
+     *      objects from an array of features.
      */
     readRecords : function(features) {
         var records = [];



More information about the Commits mailing list