VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/html/libs/absol-full/dist/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol__src__AppPattern__circuit__CCLine.js
/*** module: node_modules/absol/src/AppPattern/circuit/CCLine.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _stringGenerate = require("../../String/stringGenerate");

/***
 *
 * @param {CCBlock} u
 * @param {string} uPinName
 * @param {CCBlock} v
 * @param {string} vPinName
 * @param {boolean=} twoWay
 * @param {{id?:string}=} opt
 * @constructor
 */
function CCLine(u, uPinName, v, vPinName, twoWay, opt) {
  opt = opt || {};
  twoWay = !!twoWay;
  Object.defineProperty(this, 'id', {
    enumerable: true,
    writable: false,
    value: opt.id || (0, _stringGenerate.randomIdent)(32)
  });
  Object.defineProperty(this, 'u', {
    enumerable: true,
    writable: false,
    value: u
  });
  Object.defineProperty(this, 'v', {
    enumerable: true,
    writable: false,
    value: v
  });
  Object.defineProperty(this, 'uPinName', {
    enumerable: true,
    writable: false,
    value: uPinName
  });
  Object.defineProperty(this, 'vPinName', {
    enumerable: true,
    writable: false,
    value: vPinName
  });
  Object.defineProperty(this, 'twoWay', {
    enumerable: true,
    writable: false,
    value: twoWay
  });
  this.vToU = this.vToU.bind(this);
  this.uToV = this.uToV.bind(this);
  this.u.pinOn(this.uPinName, this.uToV);
  if (this.twoWay) this.v.pinOn(this.vPinName, this.vToU);
  this.u.__cc_line_list_by_id__[this.id] = this;
  this.v.__cc_line_list_by_id__[this.id] = this;
}

CCLine.prototype.remove = function () {
  this.u.pinOff(this.uPinName, this.uToV);
  if (this.twoWay) this.v.pinOff(this.vPinName, this.vToU);
  delete this.u.__cc_line_list_by_id__[this.id];
  delete this.v.__cc_line_list_by_id__[this.id];
};

CCLine.prototype.uToV = function () {
  var args = [this.vPinName].concat(Array.prototype.slice.call(arguments));
  this.v.pinReceives.apply(this.v, args);
};

CCLine.prototype.vToU = function () {
  var args = [this.uPinName].concat(Array.prototype.slice.call(arguments));
  this.u.pinReceives.apply(this.u, args);
};

var _default = CCLine;
exports.default = _default;

VaKeR 2022