System.Classes.TWriter.WriteCollection
Delphi
procedure WriteCollection(const Value: TCollection);
C++
void __fastcall WriteCollection(TCollection* const Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TWriter |
Description
Writes the passed in Value
collection to the writer object's stream.
WriteCollection is used internally by the component streaming system to write collection-type properties to the writer object's stream.
WriteCollection first calls WriteValue(vaCollection)
to write a value-type indicator identifying that the next items belong to a collection. Then for each item of the Value
collection, WriteCollection first calls WriteListBegin to identify the beginning of a collection item, then calls WriteProperties to write this collection item, and then calls WriteListEnd to identify the end of the item being written. After all collection items are written, WriteCollection calls WriteListEnd to identify the end of the Value
collection data.
WriteCollection advances the current position after the last written byte.