The stream classes and stream classes extensions provide all the methods necessary for encoding and decoding Ice types. The Slice to Swift compiler generates additional stream helper classes required to encode and decode sequences and dictionaries, more concretely it generates a sequence helper for each sequence of a complex type, and it generates a dictionary helper for each dictionary type, sequences of built-in types are directly encoded and decoded using the
InputStream methods. We will use the following Slice definitions to demonstrate the language mapping:
The Slice compiler generates the corresponding helper methods shown below:
SeqHelper provides read and write methods for extracting and inserting
Seq sequence values, likewise, the
DictHelper provides read and write methods for extracting and inserting
Dict dictionary values.