add jsdoc to mindplot module
--HG-- branch : mindplot_jsdoc
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
mindplot.model.FeatureModel = new Class({
|
||||
mindplot.model.FeatureModel = new Class(/** @lends FeatureModel */{
|
||||
Static:{
|
||||
_nextUUID:function () {
|
||||
if (!$defined(mindplot.model.FeatureModel._uuid)) {
|
||||
@@ -28,6 +28,12 @@ mindplot.model.FeatureModel = new Class({
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @constructs
|
||||
* @param type
|
||||
* @throws will throw an exception if type is null or undefined
|
||||
* assigns a unique id and the given type to the new model
|
||||
*/
|
||||
initialize:function (type) {
|
||||
$assert(type, 'type can not be null');
|
||||
this._id = mindplot.model.FeatureModel._nextUUID();
|
||||
@@ -41,35 +47,42 @@ mindplot.model.FeatureModel = new Class({
|
||||
};
|
||||
},
|
||||
|
||||
/** */
|
||||
getAttributes:function () {
|
||||
return Object.clone(this._attributes);
|
||||
},
|
||||
|
||||
/** */
|
||||
setAttributes:function (attributes) {
|
||||
for (key in attributes) {
|
||||
this["set" + key.capitalize()](attributes[key]);
|
||||
}
|
||||
},
|
||||
|
||||
/** */
|
||||
setAttribute:function (key, value) {
|
||||
$assert(key, 'key id can not be null');
|
||||
this._attributes[key] = value;
|
||||
},
|
||||
|
||||
/** */
|
||||
getAttribute:function (key) {
|
||||
$assert(key, 'key id can not be null');
|
||||
|
||||
return this._attributes[key];
|
||||
},
|
||||
|
||||
/** */
|
||||
getId:function () {
|
||||
return this._id;
|
||||
},
|
||||
|
||||
/** */
|
||||
setId:function (id) {
|
||||
this._id = id;
|
||||
},
|
||||
|
||||
/** */
|
||||
getType:function () {
|
||||
return this._type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user