"use strict"; import {Common} from "http://localhost:18000/Public/ecma/Utils/Common.ecma.js"; import {Check} from "http://localhost:18000/Public/ecma/Utils/Checks.ecma.js"; /** * @class BinaryStructureModel * @constructor * @param {!string} type * @param {!string} name * @param {!number} from * @param {?number} size * @param {!Array.} [childs = []] * @returns {void} * @access public * @static */ export const BinaryStructureModel = (function(){ /** * @constructs BinaryStructureModel * @param {!string} type * @param {!string} name * @param {!number} from * @param {?number} size * @param {!Array.} [childs = []] * @returns {void} * @access private * @static */ const BinaryStructureModel = function(type, name, from, size, childs = []){ /** @type {BinaryStructureModel} */ const self = this; /** @type {string} */ this.name = name; /** @type {string} */ this.type = type; /** @type {number} */ this.from = from; /** @type {number|null} */ this.size = null; /** @type {Array.} */ this.childs = childs || []; /** @type {number|null} */ this.next = null; /** * @returns {void} * @access private */ const constructor = () => { if(Check.is_array(size)) self.next = size[0]; else if(Check.is_number(size)) self.size = size; }; constructor(); }; return BinaryStructureModel; })();