Author: smaisonneuve Date: 2015-06-09 15:36:42 +0000 (Tue, 09 Jun 2015) New Revision: 1664 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1664 Log: [Refactor] Turning Tuner into es6 class Modified: oipf/lib/js/impl/model/Tuner.js Modified: oipf/lib/js/impl/model/Tuner.js =================================================================== --- oipf/lib/js/impl/model/Tuner.js 2015-06-09 15:35:28 UTC (rev 1663) +++ oipf/lib/js/impl/model/Tuner.js 2015-06-09 15:36:42 UTC (rev 1664) @@ -13,7 +13,9 @@ */ class Tuner { - constructor() { + constructor(name, idTypes, defaultProperties) { + oipf.utils.initProperties.call(this, defaultProperties); + /* * Description: A unique identifier of the tuner. * @@ -26,7 +28,7 @@ * * Visibility Type: readonly String */ - this.name = null; + this.name = name; /* * Description: Returns a collection of the types supported by the tuner. The types are according to the ID types in section @@ -34,7 +36,7 @@ * * Visibility Type: readonly IntegerCollection */ - this.idTypes = null; + this.idTypes = idTypes; /* * Description: @@ -93,10 +95,4 @@ */ this.powerOnExternal = null; } - - init(name, idTypes, defaultProperties) { - oipf.utils.initProperties.call(this, defaultProperties); - this.idTypes = idTypes; - this.name = name; - } }
participants (1)
-
smaisonneuveďź users.nuiton.org