System.Classes.TStream.ReadComponent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ReadComponent(const Instance: TComponent): TComponent;

C++

TComponent* __fastcall ReadComponent(TComponent* const Instance);

Properties

Type Visibility Source Unit Parent
function public
System.Classes.pas
System.Classes.hpp
System.Classes TStream

Description

Initiates streaming of components and their properties. ReadComponent is called indirectly by the global routine ReadComponentRes, by the ReadComponentRes method, or it can be called directly to initiate component streaming.

ReadComponent reads data values from the stream and assigns them to Instance's properties. It then constructs a reader object and calls the reader's ReadRootComponent method to read the Instance's property values and construct child objects defined in the stream as children of Instance. ReadComponent returns the component.

If Instance is nil (Delphi) or NULL (C++), ReadComponent constructs a component based on the type information in the stream and returns the newly-constructed component.

See Also


Code Examples