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

TIniCollection

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

Collection which can write itself to an .ini file

Declaration

Source position: inicol.pp line 25

type TIniCollection = class(TCollection)

protected

  FPrefix: String;

  FSectionPrefix: String;

public

  procedure Load;

  

Loads the collection from the default filename.

  procedure Save;

  

Save the collection to the default filename.

  procedure SaveToIni(); virtual;

  

Save the collection to a TCustomIniFile descendent

  procedure SaveToFile();

  

Save collection to a file in .ini file format

  procedure LoadFromIni(); virtual;

  

Load collection from a file in .ini file format.

  procedure LoadFromFile();

  

Load collection from file.

  property Prefix: String; [r]

  

Prefix used in global section

  property SectionPrefix: String; [r]

  

Prefix string for section names

  property FileName: String; [rw]

  

Filename of the collection

  property GlobalSection: String; [rw]

  

Name of the global section

end;

Inheritance

TIniCollection

  

Collection which can write itself to an .ini file

|

TCollection

|

TPersistent

|

TObject

Description

TIniCollection is a collection descendent which has the capability to write itself to an .ini file. It introduces some load and save mechanisms, which can be used to write all items in the collection to disk. The items should be descendents of the type TIniCollectionItem.

All methods work using a TCustomInifile class, making it possible to save to alternate file formats, or even databases.

An instance of TIniCollection should never be used directly. Instead, a descendent should be used, which sets the FPrefix and FSectionPrefix protected variables.

See also

TIniCollection.LoadFromFile

  

Load collection from file.

TIniCollection.LoadFromIni

  

Load collection from a file in .ini file format.

TIniCollection.SaveToIni

  

Save the collection to a TCustomIniFile descendent

TIniCollection.SaveToFile

  

Save collection to a file in .ini file format

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