UAObjectType.ts 903 B

1234567891011121314151617181920212223242526272829
  1. import { XMLElem } from "@/util/XmlElem";
  2. import type { NamespaceTable } from "./NameSpaceTable";
  3. import { type UABaseNodeOptions } from "./UABaseNode";
  4. import type { IAddressSpace } from "./IAddressSpace";
  5. import { UAType, type UATypeOptions } from "./UAType";
  6. export class UAObjectType extends UAType{
  7. constructor(options: UAObjectTypeOptions) {
  8. super(options);
  9. Object.assign(this, options);
  10. this.nodeClass="UAObjectType";
  11. }
  12. static fromXML(xmlObjType: any, addressSpace: IAddressSpace): UAObjectType{
  13. const bn=super.fromXML(xmlObjType, addressSpace)
  14. return new UAObjectType(bn as UABaseNodeOptions);
  15. }
  16. toXML(lnst:NamespaceTable, gnst:NamespaceTable): XMLElem {
  17. const elem =super.toXML(lnst, gnst);
  18. elem.name=this.nodeClass;
  19. return elem;
  20. }
  21. }
  22. export interface UAObjectTypeOptions extends UATypeOptions{
  23. }