[Overview][Constants][Classes][Index] Reference for unit 'inicol' (#fcl)

TIniCollectionItem

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection item with support for loading/saving from/to ini file

Declaration

Source position: inicol.pp line 13

type TIniCollectionItem = class(TCollectionItem)

protected

  function GetSectionName; virtual; abstract;

  procedure SetSectionName(); virtual; abstract;

public

  procedure SaveToIni(); virtual; abstract;

  

Method called when the item must be saved

  procedure LoadFromIni(); virtual; abstract;

  

Method called when the item must be loaded

  procedure SaveToFile();

  

Save item to a file

  procedure LoadFromFile();

  

Load item from a file

  property SectionName: String; [rw]

  

Default section name

end;

Inheritance

TIniCollectionItem

  

Collection item with support for loading/saving from/to ini file

|

TCollectionItem

|

TPersistent

|

TObject

Description

TIniCollectionItem is a #rtl.classes.tcollectionitem descendent which has some extra methods for saving/loading the item to or from an .ini file.

To use this class, a descendent should be made, and the SaveToIni and LoadFromIni methods should be overridden. They should implement the actual loading and saving. The loading and saving is always initiated by the methods in TIniCollection, TIniCollection.LoadFromIni and TIniCollection.SaveToIni respectively.

See also

TIniCollection

  

Collection which can write itself to an .ini file

TIniCollectionItem.SaveToIni

  

Method called when the item must be saved

TIniCollectionItem.LoadFromIni

  

Method called when the item must be loaded

TIniCollection.LoadFromIni

  

Load collection from a file in .ini file format.

TIniCollection.SaveToIni

  

Save the collection to a TCustomIniFile descendent

The latest version of this document can be found at lazarus-ccr.sourceforge.net.