Parser base class

GeoJSON is now a parser.  The idea is that we'll want to pass parsers to sources or protocols and want a known type.
This commit is contained in:
Tim Schaub
2013-03-03 11:50:51 +01:00
parent 93ab45432b
commit 69b6fae744
4 changed files with 75 additions and 33 deletions

21
src/ol/parser/parser.js Normal file
View File

@@ -0,0 +1,21 @@
goog.provide('ol.parser.Parser');
/**
* @constructor
*/
ol.parser.Parser = function() {};
/**
* @param {*} data Data to deserialize.
* @return {*} Parsed data.
*/
ol.parser.Parser.prototype.read = goog.abstractMethod;
/**
* @param {*} obj Object to serialize.
* @return {*} Serialized object.
*/
ol.parser.Parser.prototype.write = goog.abstractMethod;