"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.RelocationNodeService = void 0;
const relocation_node_config_1 = require("./relocation-node-config");
const relocation_node_1 = require("./relocation-node");
class RelocationNodeService {
  constructor() {
    this.programNodeConfig = new relocation_node_config_1.RelocationNodeConfig();
    this.funcMap = new Map();
  }
  loadFromXml(dataModel) {
    const node = new relocation_node_1.RelocationNode(this.programModel);
    node.setDataModel(dataModel);
    return node;
  }
  setProgramModel(programModel) {
    this.programModel = programModel;
  }
  getProgramNodeConfig() {
    return this.programNodeConfig;
  }
  getRpcMap() {
    return this.funcMap;
  }
  createNode() {
    return {
      nodeId: this.programNodeConfig.id,
      node: new relocation_node_1.RelocationNode(this.programModel),
      children: []
    };
  }
  cloneNode(node) {
    return new relocation_node_1.RelocationNode(this.programModel).cloneNode(node);
  }
}
exports.RelocationNodeService = RelocationNodeService;
//# sourceMappingURL=relocation-node-service.js.map