TDAStreamableComponent
Overview
TDAStreamableComponent is a virtually abstract class that introduces the capability of serializing and deserializing component data. Its main purpose is to provide a common root of serializable components.
Location
- Unit: uDAStreamableComponent.pas
- Ancestry: TComponent | TROComponent | TDAStreamableComponent
Instance Methods
constructor Create override (declared in TROComponent)
Standard component constructor
constructor Create(aOwner: TComponent)
Parameters:
- aOwner: Owner
Assign override (declared in TROComponent)
Copies the contents of another, similar object.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
Clear virtual
Clears all properties.
procedure Clear
LoadFromFile (string) overload
procedure LoadFromFile(const aFileName: string)
Parameters:
- aFileName:
LoadFromFile (string, TDAPersistFormat) overload
Restores the component data from file via LoadFromStream.
procedure LoadFromFile(const aFileName: string; aFormat: TDAPersistFormat)
Parameters:
- aFileName: Valid name of the readable file
- aFormat: See TDAPersistFormat
LoadFromJson
procedure LoadFromJson(aJson: ROUTF8String)
Parameters:
- aJson:
LoadFromStream (TStream) overload virtual
procedure LoadFromStream(aStream: TStream)
Parameters:
- aStream:
LoadFromStream (TStream, TDAPersistFormat) overload virtual
Restores the component data stored in the given stream.
procedure LoadFromStream(aStream: TStream; aFormat: TDAPersistFormat)
Parameters:
- aStream: Data storage
- aFormat: See TDAPersistFormat
LoadFromString
procedure LoadFromString(aValue: ROUTF8String)
Parameters:
- aValue:
LoadFromXml
Uses aXML
as storage to load from.
procedure LoadFromXml(aXML: ROUTF8String)
Parameters:
- aXML: Xml text
Notification protected override (declared in TROComponent)
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
RestoreNonStreamableProperties protected virtual
Restores specific information not accessible as usual properties.
procedure RestoreNonStreamableProperties(const TempStorage: TPointerArray)
Parameters:
- TempStorage: Array to point to additional values
ROFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure ROFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
RORemoveFreeNotification (declared in TROComponent)
Forwards notification messages to all owned components.
procedure RORemoveFreeNotification(aComponent: TComponent)
Parameters:
- aComponent: component
SaveNonStreamableProperties protected virtual
Stores specific information not accessible as usual properties.
procedure SaveNonStreamableProperties(var TempStorage: TPointerArray)
Parameters:
- TempStorage: Array to point to additional values
SaveToFile
Stores the component data into file via SaveToStream.
procedure SaveToFile(const aFileName: string; aFormat: TDAPersistFormat)
Parameters:
- aFileName: Valid name of the writable file
- aFormat: See TDAPersistFormat
SaveToStream virtual
Stores the component data into the given stream.
procedure SaveToStream(aStream: TStream; aFormat: TDAPersistFormat)
Parameters:
- aStream: Data storage
- aFormat: See TDAPersistFormat
SendRemoveNotification protected (declared in TROComponent)
Forwards notification messages to all owned components.
procedure SendRemoveNotification(aComponent: TComponent)
Parameters:
- aComponent: component