0
1
Fork 0
hedera-web-mindshore/js/vn/basic-set.js

59 lines
758 B
JavaScript
Raw Normal View History

2016-12-23 08:57:49 +00:00
var Object = require ('./object');
var Set = require ('./set');
module.exports = new Class
({
Extends: Object
,Implements: Set
,Tag: 'vn-basic-set'
2017-03-30 11:44:53 +00:00
,Properties:
{
params:
{
type: Object
,set: function (x)
{
this._params = x;
this.changed ();
}
,get: function ()
{
return this._params;
}
}
}
2016-12-23 08:57:49 +00:00
,initialize: function (props)
{
this._params = {};
this.parent (props);
}
,get: function (paramName)
{
return this._params[paramName];
}
,set: function (paramName, value)
{
this._params[paramName] = value;
this.changed ();
}
/**
* Resets all values.
*/
,reset: function ()
{
this._params = {};
this.changed ();
}
2017-03-30 11:44:53 +00:00
,keys: function ()
{
return Object.keys (this._params);
}
2016-12-23 08:57:49 +00:00
});