Sign in Join
FPDoc Onlineexperiment

TPersistent class

In unit Classes

Base class for streaming system and persistent properties.

Declaration

pascal
TPersistent = class(TObject)

Inheritance

  1. TPersistent
  2. TObject

Descends from it: TAnchorSide TBaseMap TClipboard TCollection TCollectionItem TComponent TConnectionDef TControlBorderSpacing TControlChildSizing TControlScrollBar TCORSSupport TCSVHandler TCustomDefaults TDataLink TDockManager TFPCustomTemplate TFPVersion TGraphic TGraphicsObject TGridColumnTitle THelpBasePathObject THelpBaseURLObject THelpDBItem THelpNode THelpQuery TIconOptions TInterfacedPersistent TIODescriptor TItemProp TListItem TListItems TPicture TPropertyStorageLink TProxyData TSizeConstraints TSQLSequence TStrings TTaskDialogProgressBar TTreeNode TTreeNodes TWinBindings TWindowMagnetOptions

Description

TPersistent is the basic class for the streaming system. Since it is compiled in the {$M+} state, the compiler generates RTTI (Run-Time Type Information) for it and all classes that descend from it. This information can be used to stream all properties of classes.

It also introduces functionality to assign the contents of 2 classes to each other.

TPersistent implements the IFPObserved interface for the benefit of descendant classes, but does not call FPONotifyObservers. Descendants such as TStrings and TCollection and TCollectionItem do use it.

See also

Methods

AssignToprotectedGeneric assignment function.
DefinePropertiesprotectedDeclare non-published properties that need to be streamed.
GetOwnerprotectedReturns the owner of the component.
DestroypublicDestroys the TPersistent instance.
AssignpublicAssign the contents of one class to another.
FPOAttachObserverpublicAdd an observer to the list of observers.
FPODetachObserverpublicRemove an observer from the list of observers.
FPONotifyObserverspublicNotify observers of changes.
GetNamePathpublicReturns a string that can be used to identify the class instance.

Inherited

From TObject (41)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create 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.