Sign in Join
FPDoc Onlineexperiment

TCustomPropertyStorage class

In unit PropertyStorage

Defines a container used to Save and Restore property values.

Declaration

pascal
TCustomPropertyStorage = class(TComponent)

Inheritance

  1. TCustomPropertyStorage
  2. TComponent
  3. TPersistent
  4. 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

StoredValuepublicProvides indexed access to the value for a collection item by its name.
RootpublicPath where values in the storage container are rooted.
ActivepublicIndicates whether the container is Active and allows access to its storage.
StoredValuespublicCollection with the names and values for properties handled for the container.

Methods

GetRootprotectedGets the value for the Root property.
RootSectionprotectedGets the path needed to represent the section for the Root (Owner) component.
SavePropertiesprotectedSaves property values to the storage mechanism for the container.
RestorePropertiesprotectedRestores property values from the storage mechanism for the container.
GetPropertyListprotectedBuilds a list with the object(s) and properties stored in the container.
FinishPropertyListprotectedUpdates the specified list to include a reference to the object instance for each of the properties in the storage container.
DoReadIntegerprotectedReads an integer value stored as a string.
DoReadStringprotectedDefault OnReadString handler; must be overridden.
DoWriteStringprotectedDefault OnWriteString handler; must be overridden.
DoWriteIntegerprotectedWrites an Integer value as a String.
DoEraseSectionsprotectedRemove identifiers and values stored below in the specified root section.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
SavepublicSaves all linked property collections.
RestorepublicRestores all linked property collections.
StorageNeededpublicEnsures that the storage mechanism for the container is available.
FreeStoragepublicFrees resources allocated for the underlying storage mechanism.
ReadBooleanpublicReads a Boolean value stored as a string.
ReadStringpublicReads a String value from the RootSection.
ReadIntegerpublicReads an integer value, stored as a string, from the RootSection.
ReadRectpublicReads a TRect instance stored as a String value.
ReadStringspublicReads a list of strings stored with a Count value.
WriteStringpublicWrites a String to the RootSection.
WriteIntegerpublicWrites an integer into the RootSection.
WriteBooleanpublicWrites a Boolean value to the RootSection.
WriteRectpublicWrites an TRect instance to the RootSection.
WriteStringspublicWrites a list of strings into the RootSection.
EraseSectionspublicRemoves all sections that are descendants of the specified root section.

Events

OnSavingPropertiespublicEvent handler signalled when the Save method is started.
OnSavePropertiespublicEvent handler signalled when the Save method is completed.
OnRestoringPropertiespublicEvent handler signalled when the Restore method is started.
OnRestorePropertiespublicEvent handler signalled when the Restore method is completed.
OnSaveExceptionpublic

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.