mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 22:40:30 +02:00
Docs: LCL/inipropstorage. Update topics content.
(cherry picked from commit 28368d3029
)
This commit is contained in:
parent
98e21f6561
commit
8026c66ea2
@ -1,363 +1,503 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<fpdoc-descriptions>
|
||||
<package name="lcl">
|
||||
|
||||
<!--
|
||||
====================================================================
|
||||
IniPropStorage
|
||||
====================================================================
|
||||
-->
|
||||
|
||||
<module name="IniPropStorage">
|
||||
<short>
|
||||
Contains a component that stores Form Session Properties in INI format.
|
||||
</short>
|
||||
<descr>
|
||||
<p>In this unit you can find an implementation of a name/value pair storage
|
||||
container in INI format.</p>
|
||||
<p>This container will get the Form's Session Properties that you setup in
|
||||
<link id="#LCL.Forms.TForm">TForm.SessionProperties</link> and read/write
|
||||
them on the file you specify on <link
|
||||
id="#LCL.IniPropStorage.TINIPropStorage.INIFileName">TINIPropStorage.INIFileName</link>.</p>
|
||||
<p>
|
||||
In this unit you can find an implementation of a name/value pair storage
|
||||
container in INI format. This container will get the Form's Session Properties
|
||||
that you setup in <link id="#LCL.Forms.TForm">TForm.SessionProperties</link>
|
||||
and read/write them on the file you specify in
|
||||
<link id="#lcl.inipropstorage.TIniPropStorage.IniFileName">
|
||||
TIniPropStorage.IniFileName</link>.
|
||||
</p>
|
||||
<p>
|
||||
<file>inipropstorage.pas</file> is part of the Lazarus Component Library
|
||||
(<b>LCL</b>).
|
||||
</p>
|
||||
</descr>
|
||||
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="Classes">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- Classes -->
|
||||
<!-- unresolved type references -->
|
||||
<element name="Classes"/>
|
||||
<element name="SysUtils"/>
|
||||
<element name="IniFiles"/>
|
||||
<element name="LazUTF8"/>
|
||||
<element name="Forms"/>
|
||||
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="SysUtils">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- SysUtils -->
|
||||
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="IniFiles">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- IniFiles -->
|
||||
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="LazUTF8">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- LazUTF8 -->
|
||||
|
||||
<!-- unresolved type reference Visibility: default -->
|
||||
<element name="Forms">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- Forms -->
|
||||
|
||||
<!-- "class of" type Visibility: default -->
|
||||
<element name="TIniFileClass">
|
||||
<short>
|
||||
Class of <link id="#fcl.IniFiles.TCustomIniFile">TCustomIniFile</link>.
|
||||
</short>
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- "class of" TIniFileClass -->
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TCustomIniPropStorage">
|
||||
<short>
|
||||
Implements the base class for the INI Form's Session Properties.
|
||||
Implements the base class for storage of form session properties in an INI file.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- object TCustomIniPropStorage -->
|
||||
<descr>
|
||||
<p>
|
||||
<var>TCustomIniPropStorage</var> is a TFormPropertyStorage descendant
|
||||
which defines a class used to store form session properties to a file
|
||||
using the INI format. It introduces properties and methods needed to access the
|
||||
INI file used as the storage mechanism for the class.
|
||||
</p>
|
||||
<p>
|
||||
Use the SessionPropperties property in the TForm or a TFrame instance which
|
||||
owns the class to define the components and property names stored using the
|
||||
storage mechanism.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFileName to specify the path and file name where session properties are
|
||||
stored in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
Use IniSection to specify the name for a section where session properties are
|
||||
stored. When omitted, session properties stored at the root level in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
Use Active to enable or disable read/write access to the INI file storage for
|
||||
the class instance.
|
||||
</p>
|
||||
<p>
|
||||
Use the event handlers in the class to perform actions needed before or during
|
||||
save and restore operations using the session properties.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TIniPropStorage"/>
|
||||
<link id="#lcl.forms.TForm">TForm.SessionProperties</link>
|
||||
<link id="#lcl.forms.TFormPropertyStorage">TFormPropertyStorage</link>
|
||||
<link id="#lcl.jsonpropstorage.TJSONPropStorage">TJSONPropStorage</link>
|
||||
<link id="#lcl.xmlpropstorage.TXMLPropStorage">TXMLPropStorage</link>
|
||||
</seealso>
|
||||
</element>
|
||||
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomIniPropStorage.FCount">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- variable TCustomIniPropStorage.FCount -->
|
||||
<!-- private -->
|
||||
<element name="TCustomIniPropStorage.FCount"/>
|
||||
<element name="TCustomIniPropStorage.FReadOnly"/>
|
||||
<element name="TCustomIniPropStorage.FIniFile"/>
|
||||
<element name="TCustomIniPropStorage.FIniFileName"/>
|
||||
<element name="TCustomIniPropStorage.FIniSection"/>
|
||||
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomIniPropStorage.FReadOnly">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- variable TCustomIniPropStorage.FReadOnly -->
|
||||
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomIniPropStorage.FIniFile">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- variable TCustomIniPropStorage.FIniFile -->
|
||||
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomIniPropStorage.FIniFileName">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- variable TCustomIniPropStorage.FIniFileName -->
|
||||
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomIniPropStorage.FIniSection">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- variable TCustomIniPropStorage.FIniSection -->
|
||||
|
||||
<!-- function Visibility: protected -->
|
||||
<!-- protected -->
|
||||
<element name="TCustomIniPropStorage.IniFileClass">
|
||||
<short>
|
||||
Returns the class <link id="#fcl.IniFiles.TIniFile">TIniFile</link>.
|
||||
Returns the <link id="#fcl.IniFiles.TIniFile">TIniFile</link> class type.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- function TCustomIniPropStorage.IniFileClass -->
|
||||
|
||||
<!-- function result Visibility: default -->
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.IniFileClass.Result">
|
||||
<short>The class <link id="#fcl.IniFiles.TIniFile">TIniFile</link>.</short>
|
||||
</element> <!-- function result TCustomIniPropStorage.IniFileClass.Result -->
|
||||
</element>
|
||||
|
||||
<!-- function Visibility: protected -->
|
||||
<element name="TCustomIniPropStorage.GetIniFileName">
|
||||
<short>
|
||||
Getter for the property <link
|
||||
id="#LCL.IniPropStorage.TCustomIniPropStorage.IniFileName">TCustomIniPropStorage.IniFileName</link>.
|
||||
Gets the value for the IniFileName property.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- function TCustomIniPropStorage.GetIniFileName -->
|
||||
|
||||
<!-- function result Visibility: default -->
|
||||
<descr/>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.IniFileName"/>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.GetIniFileName.Result">
|
||||
<short>
|
||||
The current value of the property <link
|
||||
id="#LCL.IniPropStorage.TCustomIniPropStorage.IniFileName">TCustomIniPropStorage.IniFileName</link>.
|
||||
Value for the IniFileName property.
|
||||
</short>
|
||||
</element> <!-- function result TCustomIniPropStorage.GetIniFileName.Result
|
||||
-->
|
||||
</element>
|
||||
|
||||
<!-- function Visibility: protected -->
|
||||
<element name="TCustomIniPropStorage.RootSection">
|
||||
<short>Returns the name of the RootSection.</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- function TCustomIniPropStorage.RootSection -->
|
||||
|
||||
<!-- function result Visibility: default -->
|
||||
<short>
|
||||
Returns the name of the INI section where values are stored.
|
||||
</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>RootSection</var> is an overridden <var>String</var> function in
|
||||
TCustomIniPropStorage. It ensures that the value in IniSection property is used
|
||||
as the root section (when assigned). If IniSection has not been assigned, the
|
||||
inherited method is called to build the section name using the Name or Class
|
||||
name for the Root component in the class instance.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.IniSection"/>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.RootSection">TCustomPropertyStorage.RootSection</link>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.Root">TCustomPropertyStorage.Root</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.RootSection.Result">
|
||||
<short>The current value of RootSection.</short>
|
||||
</element> <!-- function result TCustomIniPropStorage.RootSection.Result -->
|
||||
<short>
|
||||
The value for the RootSection identifier.
|
||||
</short>
|
||||
</element>
|
||||
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomIniPropStorage.IniFile">
|
||||
<short>
|
||||
Property to access the <link
|
||||
id="#fcl.IniFiles.TCustomIniFile">TCustomIniFile</link> instance.
|
||||
Provides access to the TCustomIniFile instance for the class.
|
||||
</short>
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TCustomIniPropStorage.IniFile -->
|
||||
<descr>
|
||||
<p>
|
||||
<var>IniFile</var> is a read-only <var>TCustomIniFile</var> property which
|
||||
provides access to properties and methods in the underlying INI file used to
|
||||
store values for session properties. The property is used in the implementation
|
||||
of methods which read or write values using the section, identifier, and value
|
||||
for the session properties.
|
||||
</p>
|
||||
<p>
|
||||
IniFile is (re)allocated (as needed) at run-time in the StorageNeeded method.
|
||||
It is not (re)created at design-time. IniFile is freed (when needed) in the
|
||||
FreeStorage method.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFileName to specify the qualified path including file name for the INI
|
||||
file.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.DoReadString"/>
|
||||
<link id="TCustomIniPropStorage.DoWriteString"/>
|
||||
<link id="TIniFileClass"/>
|
||||
<link id="#fcl.inifiles.TCustomIniFile">TCustomIniFile</link>
|
||||
</seealso>
|
||||
</element>
|
||||
|
||||
<!-- procedure Visibility: public -->
|
||||
<!-- public -->
|
||||
<element name="TCustomIniPropStorage.StorageNeeded">
|
||||
<short>Ask the underlying storage object for an entry.</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- procedure TCustomIniPropStorage.StorageNeeded -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>
|
||||
Creates or recreates the underlying INI file storage for the class instance.
|
||||
</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>StorageNeeded</var> is an overridden <var>Boolean</var> function in
|
||||
<var>TCustomIniPropStorage</var>. It ensures that the IniFile property is
|
||||
created or recreated when the method is called. The value in the ReadOnly
|
||||
argument is assigned to an internal member in the class instance; IniFile is
|
||||
recreated if the value in the member has been changed since the class was
|
||||
created.
|
||||
</p>
|
||||
<remark>
|
||||
IniFile is not created or stored in the class instance at design-time.
|
||||
</remark>
|
||||
<p>
|
||||
StorageNeeded is called from methods in ancestor classes when the Active
|
||||
property is enabled, including: Save, Restore, SaveProperties,
|
||||
RestoreProperties, ReadString, WriteString, ReadInteger, WriteInteger, and
|
||||
EraseSection.
|
||||
</p>
|
||||
<p>
|
||||
See FreeStorage for the actions performed when the storage for the class
|
||||
instance is no longer needed.
|
||||
</p>
|
||||
<p>
|
||||
Use Active to control whether access using the INI file storage is enabled.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFileName to specify the qualified path including file name for the INI
|
||||
file storage.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
<link id="TCustomIniPropStorage.IniFileName"/>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.Active">TCustomPropertyStorage.Active</link>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.StorageNeeded.ReadOnly">
|
||||
<short>If the item is read-only.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.StorageNeeded.ReadOnly -->
|
||||
<short>
|
||||
<b>True</b> if the INI file allows read-only access.
|
||||
</short>
|
||||
</element>
|
||||
|
||||
<!-- procedure Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.FreeStorage">
|
||||
<short>Frees an entry from the underlying storage object.</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- procedure TCustomIniPropStorage.FreeStorage -->
|
||||
<short>
|
||||
Frees the underlying INI file storage object for the class instance.
|
||||
</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>FreeStorage</var> is an overridden method in
|
||||
<var>TCustomIniPropStorage</var>. It reimplements the virtual method from the
|
||||
TCustomPropertyStorage ancestor. FreeStorage ensures that resources allocated
|
||||
to the IniFile property (in StorageNeeded) are freed when the storage object is
|
||||
no longer needed.
|
||||
</p>
|
||||
<p>
|
||||
FreeStorage is called from methods that include: Save, Restore, SaveProperties,
|
||||
RestoreProperties, ReadString, WriteString, ReadInteger, WriteInteger, and
|
||||
EraseSection.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFile to access properties and methods in the INI storage mechanism.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFileName to specify the qualified path including file name for the INI
|
||||
file storage.
|
||||
</p>
|
||||
<p>
|
||||
Use Active to control whether access using the IniFile storage object is
|
||||
enabled.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.StorageNeeded"/>
|
||||
<link id="TCustomIniPropStorage.IniFile"/>
|
||||
<link id="TCustomIniPropStorage.IniFileName"/>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.Active">TCustomPropertyStorage.Active</link>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.FreeStorage">TCustomPropertyStorage.FreeStorage</link>
|
||||
</seealso>
|
||||
</element>
|
||||
|
||||
<!-- function Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.DoReadString">
|
||||
<short>
|
||||
Implements the actual reading of a value from the underlying storage
|
||||
container.
|
||||
Performs actions needed to reading the specified value from the INI storage as
|
||||
a string type.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- function TCustomIniPropStorage.DoReadString -->
|
||||
|
||||
<!-- function result Visibility: default -->
|
||||
<descr>
|
||||
<p>
|
||||
<var>DoReadString</var> is an overridden <var>String</var> function in
|
||||
<var>TCustomIniPropStorage</var>. It implements the abstract virtual method
|
||||
defined in the TCustomPropertyStorage ancestor.
|
||||
</p>
|
||||
<p>
|
||||
<var>Section</var> contains the name for the section where the requested value
|
||||
is stored in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
<var>Ident</var> contains the name for the identifier read from the specified
|
||||
Section.
|
||||
</p>
|
||||
<p>
|
||||
<var>Default</var> contains the default value returned in the method if the
|
||||
section or identifier is not found in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
DoReadString calls the ReadString method in IniFile to get the return value for
|
||||
the method.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.DoReadString">TCustomPropertyStorage.DoReadString</link>
|
||||
<link id="#fcl.inifiles.TIniFile.ReadString">TIniFile.ReadString</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoReadString.Result">
|
||||
<short>The value of the section/ident requested.</short>
|
||||
</element> <!-- function result TCustomIniPropStorage.DoReadString.Result -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>The value for the requested section and identifier.</short>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoReadString.Section">
|
||||
<short>The section to be read.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoReadString.Section -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>The section name with the value read in the method.</short>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoReadString.Ident">
|
||||
<short>The ident to be read.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoReadString.Ident -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>The name for the identifier with the value read in the method.</short>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoReadString.Default">
|
||||
<short>If has no value then return this as default.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoReadString.Default -->
|
||||
<short>
|
||||
Default value returned if the section or identifier is not found in the INI
|
||||
storage.
|
||||
</short>
|
||||
</element>
|
||||
|
||||
<!-- procedure Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.DoWriteString">
|
||||
<short>
|
||||
Implements the actual writing of a value from the underlying storage
|
||||
container.
|
||||
Performs actions needed to write the specified value to the INI storage using a
|
||||
string type.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- procedure TCustomIniPropStorage.DoWriteString -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<descr>
|
||||
<p>
|
||||
<var>DoWriteString</var> is an overridden method in
|
||||
<var>TCustomIniPropStorage</var>. It implements the abstract virtual method
|
||||
defined in the TCustomPropertyStorage ancestor.
|
||||
</p>
|
||||
<p>
|
||||
<var>Section</var> contains the name for the section where the specified value
|
||||
is stored in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
<var>Ident</var> contains the name for the identifier written to the specified
|
||||
Section.
|
||||
</p>
|
||||
<p>
|
||||
<var>Value</var> contains the string value stored in IniFile in the method.
|
||||
</p>
|
||||
<p>
|
||||
DoWriteString calls the WriteString method in IniFile using the arguments
|
||||
passed to the method.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.DoWriteString">TCustomPropertyStorage.DoWriteString</link>
|
||||
<link id="#fcl.inifiles.TIniFile.WriteString">TIniFile.WriteString</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoWriteString.Section">
|
||||
<short>The section to be written.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoWriteString.Section -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>
|
||||
The section name where the specified value is stored in the method.
|
||||
</short>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoWriteString.Ident">
|
||||
<short>The ident to be written.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoWriteString.Ident -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>
|
||||
The name for the identifier where the specified value is stored in the method.
|
||||
</short>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoWriteString.Value">
|
||||
<short>The value to be written.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoWriteString.Value -->
|
||||
<short>
|
||||
Contains the value for the identifier stored in the specified section.
|
||||
</short>
|
||||
</element>
|
||||
|
||||
<!-- procedure Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.DoEraseSections">
|
||||
<short>Erases a section from the underlying storage container.</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- procedure TCustomIniPropStorage.DoEraseSections -->
|
||||
|
||||
<!-- argument Visibility: default -->
|
||||
<short>
|
||||
Performs actions needed to remove the section section and its subsections from
|
||||
the underlying INI storage.
|
||||
</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>DoEraseSections</var> is an overridden <var>String</var> function in
|
||||
<var>TCustomIniPropStorage</var>. It implements the abstract virtual method
|
||||
defined in the TCustomPropertyStorage ancestor.
|
||||
</p>
|
||||
<p>
|
||||
<var>ARootSection</var> contains the name of the section in IniFile removed in
|
||||
the method.
|
||||
</p>
|
||||
<p>
|
||||
DoEraseSections gets a list of section names found in the INI file, and calls
|
||||
IniFile.EraseSection to remove the section along with its identifiers and
|
||||
values. Other child sections which have ARootSection as a prefix are removed as
|
||||
well.
|
||||
</p>
|
||||
<p>
|
||||
DoEraseSections is used in the SaveProperties method, and is assigned as the
|
||||
OnEraseSetion event handler for the RTTI TPropsStorage instance used in the
|
||||
method.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.DoEraseSections">TCustomPropertyStorage.DoEraseSections</link>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.OnSaveProperties">TCustomPropertyStorage.OnSaveProperties</link>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.SaveProperties">TCustomPropertyStorage.SaveProperties</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<element name="TCustomIniPropStorage.DoEraseSections.ARootSection">
|
||||
<short>The path to the section that will be erased.</short>
|
||||
</element> <!-- argument TCustomIniPropStorage.DoEraseSections.ARootSection
|
||||
-->
|
||||
</element>
|
||||
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.IniFileName">
|
||||
<short>
|
||||
Name of the file where the property data is saved in INI format.
|
||||
Name of the INI file where the session properties are saved in INI format.
|
||||
</short>
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TCustomIniPropStorage.IniFileName -->
|
||||
<descr>
|
||||
<p>
|
||||
<var>IniFileName</var> is a <var>String</var> property with the qualified path
|
||||
and file name for the IniFile where session properties are stored in the class
|
||||
instance. Its value is used in the StorageNeeded method to determine the file
|
||||
name used when the TIniFile class instance is created and assigned to the
|
||||
IniFile property.
|
||||
</p>
|
||||
<p>
|
||||
When omitted, a default value is assigned to the property which uses the path
|
||||
and base name for the application executable. For the Windows platform, the
|
||||
generated value in IniFileName has a '.INI' file extension. For UNIX-like
|
||||
platforms, the file is created as a config file in the home directory for the
|
||||
current user with a '.' prefix and no file extension.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.IniFile"/>
|
||||
<link id="TCustomIniPropStorage.StorageNeeded"/>
|
||||
</seealso>
|
||||
</element>
|
||||
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TCustomIniPropStorage.IniSection">
|
||||
<short>The section on the INI file where values are to be kept.</short>
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TCustomIniPropStorage.IniSection -->
|
||||
<short>
|
||||
Name of the section in the INI file where values for session properties are
|
||||
stored.
|
||||
</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>IniSection</var> is a <var>String</var> property which contains the name
|
||||
of the section in IniFile where the form session properties are stored. The
|
||||
property value is used in the overridden RootSection function to set section
|
||||
name used when an IniSection property value has not been assigned. When
|
||||
omitted, the value from the inherited method is used; this is normally the full
|
||||
path to the Root component name or class name and any preceding owner
|
||||
components.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="TCustomIniPropStorage.RootSection"/>
|
||||
<link id="#lcl.propertystorage.TCustomPropertyStorage.Root">TCustomPropertyStorage.Root</link>
|
||||
</seealso>
|
||||
</element>
|
||||
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TIniPropStorage">
|
||||
<short>
|
||||
Implements the final class for the INI Form Session Properties storage.
|
||||
Implements a class used to store session properties in an INI file.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<descr>
|
||||
<p>
|
||||
<var>TIniPropStorage</var> is a <var>TCustomIniPropStorage</var> descendant
|
||||
which implements the class used to store form session properties to a file
|
||||
using the INI format. It sets the visibility for properties and methods
|
||||
introduced in ancestor classes.
|
||||
</p>
|
||||
<p>
|
||||
Use the SessionPropperties property in the TForm or a TFrame instance which
|
||||
owns the class to define the components and property names stored using the
|
||||
storage mechanism.
|
||||
</p>
|
||||
<p>
|
||||
Use IniFileName to specify the path and file name where session properties are
|
||||
stored in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
Use IniSection to specify the name for a section where session properties are
|
||||
stored. When omitted, session properties are stored at the root section level
|
||||
in IniFile.
|
||||
</p>
|
||||
<p>
|
||||
Use Active to enable or disable read/write access to the INI file storage for
|
||||
the class instance.
|
||||
</p>
|
||||
<p>
|
||||
Use the event handlers in the class to perform actions needed before or during
|
||||
save and restore operations using the session properties.
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="#LCL.Forms.TForm">TForm.SessionProperties</link>
|
||||
<link id="#LCL.JSONPropStorage.TJSONPropStorage">TJSONPropStorage</link>
|
||||
<link id="#LCL.XMLPropStorage.TXMLPropStorage">TXMLPropStorage</link>
|
||||
<link id="#lcl.forms.TForm">TForm.SessionProperties</link>
|
||||
<link id="#lcl.jsonpropstorage.TJSONPropStorage">TJSONPropStorage</link>
|
||||
<link id="#lcl.xmlpropstorage.TXMLPropStorage">TXMLPropStorage</link>
|
||||
</seealso>
|
||||
</element> <!-- object TIniPropStorage -->
|
||||
</element>
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.StoredValues" link="#LCL.PropertyStorage.TCustomPropertyStorage.StoredValues">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.StoredValues -->
|
||||
<element name="TIniPropStorage.StoredValues" link="#lcl.propertystorage.TCustomPropertyStorage.StoredValues"/>
|
||||
<element name="TIniPropStorage.IniFileName" link="#lcl.inipropstorage.TCustomIniPropStorage.IniFileName"/>
|
||||
<element name="TIniPropStorage.IniSection" link="#lcl.inipropstorage.TCustomIniPropStorage.IniSection"/>
|
||||
<element name="TIniPropStorage.Active" link="#lcl.propertystorage.TCustomPropertyStorage.Active"/>
|
||||
<element name="TIniPropStorage.OnSavingProperties" link="#lcl.propertystorage.TCustomPropertyStorage.OnSavingProperties"/>
|
||||
<element name="TIniPropStorage.OnSaveProperties" link="#lcl.propertystorage.TCustomPropertyStorage.OnSaveProperties"/>
|
||||
<element name="TIniPropStorage.OnRestoringProperties" link="#lcl.propertystorage.TCustomPropertyStorage.OnRestoringProperties"/>
|
||||
<element name="TIniPropStorage.OnRestoreProperties" link="#lcl.propertystorage.TCustomPropertyStorage.OnRestoreProperties"/>
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.IniFileName" link="#LCL.IniPropStorage.TCustomIniPropStorage.IniFileName">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.IniFileName -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.IniSection" link="#LCL.IniPropStorage.TCustomIniPropStorage.IniSection">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.IniSection -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.Active" link="#LCL.PropertyStorage.TCustomPropertyStorage.Active">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.Active -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.OnSavingProperties" link="#LCL.PropertyStorage.TCustomPropertyStorage.OnSavingProperties">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.OnSavingProperties -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.OnSaveProperties" link="#LCL.PropertyStorage.TCustomPropertyStorage.OnSaveProperties">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.OnSaveProperties -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.OnRestoringProperties" link="#LCL.PropertyStorage.TCustomPropertyStorage.OnRestoringProperties">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.OnRestoringProperties -->
|
||||
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TIniPropStorage.OnRestoreProperties" link="#LCL.PropertyStorage.TCustomPropertyStorage.OnRestoreProperties">
|
||||
<short />
|
||||
<descr />
|
||||
<seealso />
|
||||
</element> <!-- property TIniPropStorage.OnRestoreProperties -->
|
||||
|
||||
<!-- procedure Visibility: default -->
|
||||
<element name="Register">
|
||||
<short>
|
||||
Registers <link
|
||||
id="#LCL.IniPropStorage.TIniPropStorage">TIniPropStorage</link> on the 'Misc'
|
||||
tab of the component palette.
|
||||
Registers the
|
||||
<link id="#LCL.IniPropStorage.TIniPropStorage">TIniPropStorage</link> component
|
||||
on the 'Misc' tab for the component palette.
|
||||
</short>
|
||||
<descr />
|
||||
<errors />
|
||||
<seealso />
|
||||
</element> <!-- procedure Register -->
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
</module> <!-- module IniPropStorage -->
|
||||
</package> <!-- package lcl -->
|
||||
</module>
|
||||
<!-- IniPropStorage -->
|
||||
</package>
|
||||
</fpdoc-descriptions>
|
||||
|
Loading…
Reference in New Issue
Block a user