0
1
Fork 0
hedera-web-mindshore/js/vn/param.js

91 lines
1.2 KiB
JavaScript
Raw Normal View History

2016-09-26 09:28:47 +00:00
2017-04-05 14:06:07 +00:00
var VnObject = require ('./object');
var Type = require ('./type');
2017-04-19 06:16:37 +00:00
var ParamIface = require ('./param-iface');
var LotIface = require ('./lot-iface');
2016-09-26 09:28:47 +00:00
2017-04-19 06:16:37 +00:00
/**
* A simple implementation of @ParamIface.
*/
2016-09-26 09:28:47 +00:00
module.exports = new Class
({
2017-04-05 14:06:07 +00:00
Extends: VnObject
2017-04-19 06:16:37 +00:00
,Implements: ParamIface
,Tag: 'vn-param'
,Properties:
{
2017-04-19 06:16:37 +00:00
value:
2017-04-05 14:06:07 +00:00
{
2017-04-19 06:16:37 +00:00
type: null
2017-04-05 14:06:07 +00:00
,set: function (x)
{
2017-04-19 06:16:37 +00:00
this._setValue (x);
2017-04-05 14:06:07 +00:00
}
,get: function ()
{
2017-04-19 06:16:37 +00:00
return this._value;
2017-04-05 14:06:07 +00:00
}
},
2017-04-19 06:16:37 +00:00
type:
{
2017-04-19 06:16:37 +00:00
type: Type
,set: function (x)
{
2017-04-19 06:16:37 +00:00
this._setType (x);
2017-04-05 14:06:07 +00:00
}
,get: function ()
{
2017-04-19 06:16:37 +00:00
return this._type;
2017-04-05 14:06:07 +00:00
}
},
2017-04-19 06:16:37 +00:00
param:
2017-04-05 14:06:07 +00:00
{
2017-04-19 06:16:37 +00:00
type: ParamIface
2017-04-05 14:06:07 +00:00
,set: function (x)
{
2017-04-19 06:16:37 +00:00
this._setParam (x);
}
,get: function ()
{
2017-04-19 06:16:37 +00:00
return this._param;
}
},
2017-04-19 06:16:37 +00:00
lot:
2017-04-05 14:06:07 +00:00
{
2017-04-19 06:16:37 +00:00
type: LotIface
2017-04-05 14:06:07 +00:00
,set: function (x)
{
2017-04-19 06:16:37 +00:00
this._setLot (x);
2017-04-05 14:06:07 +00:00
}
,get: function ()
{
2017-04-19 06:16:37 +00:00
return this._lot;
2017-04-05 14:06:07 +00:00
}
},
2017-04-19 06:16:37 +00:00
name:
{
2017-04-19 06:16:37 +00:00
type: String
,set: function (x)
{
2017-04-21 10:53:15 +00:00
this._setName (x);
}
,get: function ()
{
2017-04-19 06:16:37 +00:00
return this._name;
2017-04-05 14:06:07 +00:00
}
},
oneWay:
{
type: Boolean
,set: function (x)
{
this._oneWay = x;
}
,get: function ()
{
return this._oneWay;
}
}
}
2017-04-05 14:06:07 +00:00
});