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


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

Restores the component data from file via LoadFromStream. Autodetects format of file.

procedure LoadFromFile(const aFileName: string)

Parameters:

  • aFileName: Valid name of the readable file

LoadFromFile (string, TDAPersistFormat)  overload

Restores the component data from file via LoadFromStream.

procedure LoadFromFile(const aFileName: string; aFormat: TDAPersistFormat)

Parameters:


LoadFromJson

Uses aJson as storage to load from.

procedure LoadFromJson(aJson: ROUTF8String)

Parameters:

  • aJson: Json text

LoadFromStream (TStream)  overload virtual

Restores the component data stored in the given stream. Autodetects format of stream.

procedure LoadFromStream(aStream: TStream)

Parameters:

  • aStream: Data storage

LoadFromStream (TStream, TDAPersistFormat)  overload virtual

Restores the component data stored in the given stream.

procedure LoadFromStream(aStream: TStream; aFormat: TDAPersistFormat)

Parameters:


LoadFromString

Uses aValue as storage to load from. Autodetects format of input string.

procedure LoadFromString(aValue: ROUTF8String)

Parameters:

  • aValue: string

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 = pfXML)

Parameters:


SaveToStream  virtual

Stores the component data into the given stream.

procedure SaveToStream(aStream: TStream; aFormat: TDAPersistFormat = pfXML)

Parameters:


SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component