Sign in Join
FPDoc Onlineexperiment

TCustomJSONPropStorage class

In unit JSONPropStorage

Implements the base class used to store session properties to a file in JSON format.

Declaration

pascal
TCustomJSONPropStorage = class(TFormPropertyStorage)

Inheritance

  1. TCustomJSONPropStorage
  2. TFormPropertyStorage
  3. TControlPropertyStorage
  4. TCustomPropertyStorage
  5. TComponent
  6. TPersistent
  7. TObject

Descends from it: TJSONPropStorage

Description

TCustomJSONPropStorage is a TFormPropertyStorage descendant which defines a class used to store session properties for a form or frame to a file using JSON (JavaScript Object Notation) format. It extends the ancestor class with properties and methods needed to access the JSON storage mechanism (TJSONConfig) for the class instance.

Use the SessionProperties property in the TForm (or TFrame) instance which owns the class to define the component and property names written to the JSON storage mechanism.

Use JSONFileName to specify the path and file name to the file where the JSON content for the session properties is stored.

Use RootObjectPath to specify the path to the JSON object where the session properties is stored in the JSON file.

Use Formatted to control whether formatting options for the JSONConfig file are enabled for the storage mechanism.

TCustomJSONPropStorage includes overridden methods used to read, write, and maintain entries in the JSON storage mechanism.

Do not create instances of TCustomJSONPropStorage; use the TJSONPropStorage descendant instead.

See also

Properties

JSONConfprotectedTJSONConfig instance used to store path/value pairs.
JSONFileNamepublicName of the file where the session property names and values are saved in JSON format.
RootObjectPathpublicName of the root JSON object in the JSON file where session properties are stored.
FormattedpublicControls whether formatted JSON is emitted in the JSONConf storage mechanism.

Methods

GetJSONFileNameprotectedGets the value for the JSONFileName property.
RootSectionprotectedReturns the name of the RootSection for the storage mechanism.
GetFormattedprotectedGets the value for the Formatted property.
SetFormattedprotectedSets the value for the Formatted property.
FixPathprotectedConverts component/property names using '.' delimiters to the '/' delimiter used for the JSON notation in the JSONConfig storage mechanism.
StorageNeededpublicEnsures that the TJSONConfig storage mechanism for the class instance is allocated and configured when needed.
FreeStoragepublicFrees the TJSONConfig storage mechanism when no longer needed.
DoReadStringpublicPerforms actions needed to read the value for the specified section and identifier as a String type.
DoWriteStringpublicPerforms actions needed to write the specified Section and Ident to the JSON storage mechanism as a String type.
DoEraseSectionspublicPerforms actions needed to remove the entry (and all of its child entries) at the specified path in the JSON storage.

Inherited

From TFormPropertyStorage (2)

Create Destroy

From TControlPropertyStorage (1)

GetPropertyList

From TCustomPropertyStorage (28)

Active DoReadInteger DoWriteInteger EraseSections FinishPropertyList GetRoot OnRestoreProperties OnRestoringProperties OnSaveException OnSaveProperties OnSavingProperties ReadBoolean ReadInteger ReadRect ReadString ReadStrings Restore RestoreProperties Root Save SaveProperties StoredValue StoredValues WriteBoolean WriteInteger WriteRect WriteString WriteStrings

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.