TCustomPropertyStorage class
Defines a container used to Save and Restore property values.
Declaration
TCustomPropertyStorage = class(TComponent)Inheritance
- TCustomPropertyStorage
- TComponent
- TPersistent
- TObject
Descends from it: TControlPropertyStorage
Description
TCustomPropertyStorage is a
TComponent descendant which
defines a storage container used to save and restore property values. It has
a
StoredValues property that is a collection with items containing
the Names and Values read and written using the storage container.
TCustomPropertyStorage is a base class; it includes abstract virtual methods
which must be implemented in a descendant to use a particular storage medium
or format. For example: TControlPropertyStorage,
TFormPropertyStorage, TIniPropStorage,
TJSONPropStorage, and TXMLPropStorage.
Properties
StoredValue | public | Provides indexed access to the value for a collection item by its name. |
Root | public | Path where values in the storage container are rooted. |
Active | public | Indicates whether the container is Active and allows access to its storage. |
StoredValues | public | Collection with the names and values for properties handled for the container. |
Methods
GetRoot | protected | Gets the value for the Root property. |
RootSection | protected | Gets the path needed to represent the section for the Root (Owner) component. |
SaveProperties | protected | Saves property values to the storage mechanism for the container. |
RestoreProperties | protected | Restores property values from the storage mechanism for the container. |
GetPropertyList | protected | Builds a list with the object(s) and properties stored in the container. |
FinishPropertyList | protected | Updates the specified list to include a reference to the object instance for each of the properties in the storage container. |
DoReadInteger | protected | Reads an integer value stored as a string. |
DoReadString | protected | Default OnReadString handler; must be overridden. |
DoWriteString | protected | Default OnWriteString handler; must be overridden. |
DoWriteInteger | protected | Writes an Integer value as a String. |
DoEraseSections | protected | Remove identifiers and values stored below in the specified root section. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Save | public | Saves all linked property collections. |
Restore | public | Restores all linked property collections. |
StorageNeeded | public | Ensures that the storage mechanism for the container is available. |
FreeStorage | public | Frees resources allocated for the underlying storage mechanism. |
ReadBoolean | public | Reads a Boolean value stored as a string. |
ReadString | public | Reads a String value from the RootSection. |
ReadInteger | public | Reads an integer value, stored as a string, from the RootSection. |
ReadRect | public | Reads a TRect instance stored as a String value. |
ReadStrings | public | Reads a list of strings stored with a Count value. |
WriteString | public | Writes a String to the RootSection. |
WriteInteger | public | Writes an integer into the RootSection. |
WriteBoolean | public | Writes a Boolean value to the RootSection. |
WriteRect | public | Writes an TRect instance to the RootSection. |
WriteStrings | public | Writes a list of strings into the RootSection. |
EraseSections | public | Removes all sections that are descendants of the specified root section. |
Events
OnSavingProperties | public | Event handler signalled when the Save method is started. |
OnSaveProperties | public | Event handler signalled when the Save method is completed. |
OnRestoringProperties | public | Event handler signalled when the Restore method is started. |
OnRestoreProperties | public | Event handler signalled when the Restore method is completed. |
OnSaveException | public |
Inherited
From TComponent (74)
_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction 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 StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
