type Num = 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: Num);override; public // attributes property property NumId read ReadXmlAttrNumId write WriteXmlAttrNumId; function ReadXmlAttrNumId(); function WriteXmlAttrNumId(_value); // normal property property AbstractNumId read ReadXmlChildAbstractNumId; function ReadXmlChildAbstractNumId(); public // Attributes XmlAttrNumId: OpenXmlAttribute; // Children XmlChildAbstractNumId: PureWVal; end; function Num.Create();overload; begin {self.}Create(nil, "w", "num"); end; function Num.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Num.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 Num.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( pre + "numId": makeweakref(thisFunction(WriteXmlAttrNumId)), ); sorted_child_ := array( pre + "abstractNumId": array(0, makeweakref(thisFunction(ReadXmlChildAbstractNumId))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Num.Copy(_obj: Num);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.NumId) then {self.}NumId := _obj.NumId; if not ifnil(_obj.XmlChildAbstractNumId) then {self.}AbstractNumId.Copy(_obj.XmlChildAbstractNumId); tslassigning := tslassigning_backup; end; function Num.ReadXmlAttrNumId(); begin return {self.}XmlAttrNumId.Value; end; function Num.WriteXmlAttrNumId(_value); begin if ifnil({self.}XmlAttrNumId) then begin {self.}XmlAttrNumId := new OpenXmlAttribute({self.}Prefix, "numId", nil); attributes_[length(attributes_)] := {self.}XmlAttrNumId; end {self.}XmlAttrNumId.Value := _value; end; function Num.ReadXmlChildAbstractNumId(); begin if tslassigning and ifnil({self.}XmlChildAbstractNumId) then begin {self.}XmlChildAbstractNumId := new PureWVal(self, {self.}Prefix, "abstractNumId"); container_.Set({self.}XmlChildAbstractNumId); end return {self.}XmlChildAbstractNumId; end;