[Overview][Classes][Procedures and functions][Index] | Reference for unit 'streamcoll' (#fcl)

# TStreamCollection

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Collection with stream support

## Declaration

Source position: streamcoll.pp line 41

`type TStreamCollection = class(TCollection)`
`protected`
`procedure WriteInteger();`
`procedure WriteBoolean();`
`procedure WriteString();`
`procedure WriteCurrency();`
`procedure WriteDateTime();`
`procedure WriteFloat();`
`function ReadInteger();`
`function ReadBoolean();`
`function ReadString();`
`function ReadCurrency();`
`function ReadDateTime();`
`function ReadFloat();`
`procedure DoSaveToStream(); virtual;`
`function CurrentStreamVersion; virtual;`
`procedure DoLoadFromStream(); virtual;`
`public`
`procedure LoadFromStream();` |  | Load the collection from a stream
`procedure SaveToStream();` |  | Load the collection from the stream.
`property Streaming: Boolean; [r]` |  | Indicates whether the collection is currently being written to stream
`end;`

## Inheritance

`TStreamCollection` |  | Collection with stream support
`TCollection`
`TPersistent`
`TObject`

## Description

TStreamCollection is a TCollection descendent which implements 2 calls LoadFromStream and SaveToStream which load and save the contents of the collection to a stream.

The collection items must be descendents of the TStreamCollectionItem class for the streaming to work correctly.

Note that the stream must be used to load collections of the same type.

## See also

TStreamCollectionItem |  | Collection item with streaming support

The latest version of this document can be found at lazarus-ccr.sourceforge.net .