import { XMLElem } from "@/util/XmlElem"; import type { NamespaceTable } from "./NameSpaceTable"; import { UABaseNode, type UABaseNodeOptions } from "./UABaseNode"; import type { IAddressSpace } from "./IAddressSpace"; export class UAVariableType extends UABaseNode{ public isAbstract: boolean=false; constructor(options: UAVariableTypeOptions) { super(options) Object.assign(this, options); this.nodeClass="VariableType"; } static fromXML(xmlObjType: any, addressSpace: IAddressSpace): UAVariableType{ const bn=super.fromXML(xmlObjType, addressSpace) const uavt= new UAVariableType(bn as UABaseNodeOptions); uavt.isAbstract= xmlObjType['@_IsAbstract']==='true'; return uavt; } toXML(lnst:NamespaceTable, gnst:NamespaceTable): XMLElem { const elem =super.toXML(lnst, gnst); elem.attr('IsAbstract', this.isAbstract); return elem; } } export interface UAVariableTypeOptions extends UABaseNodeOptions{ isAbstract?: boolean }