Sign in Join
FPDoc Onlineexperiment

TIniCollection class

In unit IniCol

Collection which can write itself to an .ini file.

Declaration

pascal
TIniCollection = class(TCollection)

Inheritance

  1. TIniCollection
  2. TCollection
  3. TPersistent
  4. TObject

Descends from it: TNamedIniCollection

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

Properties

PrefixpublicPrefix used in global section.
SectionPrefixpublicPrefix string for section names.
FileNamepublicFilename of the collection.
GlobalSectionpublicName of the global section.

Methods

LoadpublicLoads the collection from the default filename.
SavepublicSave the collection to the default filename.
SaveToInipublicSave the collection to a TCustomIniFile descendent.
SaveToFilepublicSave collection to a file in .ini file format.
LoadFromInipublicLoad collection from a file in .ini file format.
LoadFromFilepublicLoad collection from file.

Fields

FPrefixprotected
FSectionPrefixprotected

Inherited

From TCollection (31)

Add Assign BeginUpdate Changed Clear Count Create Delete Destroy EndUpdate Exchange FindItemID GetAttr GetAttrCount GetEnumerator GetItem GetItemAttr GetNamePath Insert ItemClass Items Move Notify Owner PropName SetItem SetItemName SetPropName Sort Update UpdateCount

From TPersistent (6)

AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers GetOwner

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.