| @@ -73,6 +73,8 @@ type | |||||
| destructor Destroy; override; | destructor Destroy; override; | ||||
| function GetEnumerator: TSectionEnumerator; | function GetEnumerator: TSectionEnumerator; | ||||
| procedure Clear; | |||||
| procedure Assign(Source: TutlMCFSection); | |||||
| property ValueCount: integer read GetValueCount; | property ValueCount: integer read GetValueCount; | ||||
| property ValueNameAt[Index: integer]: string read GetValueName; | property ValueNameAt[Index: integer]: string read GetValueName; | ||||
| @@ -294,6 +296,28 @@ begin | |||||
| result := TSectionEnumerator.Create(FSections); | result := TSectionEnumerator.Create(FSections); | ||||
| end; | end; | ||||
| procedure TutlMCFSection.Clear; | |||||
| begin | |||||
| ClearSections; | |||||
| ClearValues; | |||||
| end; | |||||
| procedure TutlMCFSection.Assign(Source: TutlMCFSection); | |||||
| var | |||||
| ms: TMemoryStream; | |||||
| begin | |||||
| Clear; | |||||
| ms:= TMemoryStream.Create; | |||||
| try | |||||
| Source.SaveData(ms, '', leNone); | |||||
| ms.Position:= 0; | |||||
| LoadData(ms, leNone, 0); | |||||
| finally | |||||
| FreeAndNil(ms); | |||||
| end; | |||||
| end; | |||||
| function TutlMCFSection.GetSectionCount: integer; | function TutlMCFSection.GetSectionCount: integer; | ||||
| begin | begin | ||||
| Result:= FSections.Count; | Result:= FSections.Count; | ||||