type Val = class(OpenXmlElement) public function Create();overload; function Create(_node: XmlNode);overload; function Create(_parent: tslobj; _prefix: string; _local_name: string);overload; function Init();override; function Copy(_obj: Val);override; public // normal property property NumRef read ReadXmlChildNumRef; function ReadXmlChildNumRef(); public // Children XmlChildNumRef: NumRef; end; function Val.Create();overload; begin {self.}Create(nil, "c", "val"); end; function Val.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Val.Create(_parent: tslobj; _prefix: string; _local_name: string);overload; begin setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200); class(OpenXmlElement).Create(_parent, _prefix, _local_name); end; function Val.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "numRef": array(0, makeweakref(thisFunction(ReadXmlChildNumRef))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Val.Copy(_obj: Val);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.XmlChildNumRef) then {self.}NumRef.Copy(_obj.XmlChildNumRef); tslassigning := tslassigning_backup; end; function Val.ReadXmlChildNumRef(); begin if tslassigning and ifnil({self.}XmlChildNumRef) then begin {self.}XmlChildNumRef := new NumRef(self, {self.}Prefix, "numRef"); container_.Set({self.}XmlChildNumRef); end return {self.}XmlChildNumRef; end;