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
|
2015-01-23 13:09:30 +00:00
|
|
|
({
|
2017-04-05 14:06:07 +00:00
|
|
|
Extends: VnObject
|
2017-04-19 06:16:37 +00:00
|
|
|
,Implements: ParamIface
|
2015-01-23 13:09:30 +00:00
|
|
|
,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:
|
2015-01-23 13:09:30 +00:00
|
|
|
{
|
2017-04-19 06:16:37 +00:00
|
|
|
type: Type
|
2015-01-23 13:09:30 +00:00
|
|
|
,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);
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
,get: function ()
|
|
|
|
{
|
2017-04-19 06:16:37 +00:00
|
|
|
return this._param;
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
},
|
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:
|
2015-01-23 13:09:30 +00:00
|
|
|
{
|
2017-04-19 06:16:37 +00:00
|
|
|
type: String
|
2015-01-23 13:09:30 +00:00
|
|
|
,set: function (x)
|
|
|
|
{
|
2017-04-21 10:53:15 +00:00
|
|
|
this._setName (x);
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
,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;
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-04-05 14:06:07 +00:00
|
|
|
});
|