The stream classes provide all of the low-level methods necessary for encoding and decoding Ice types. However, it would be tedious and error-prone to manually encode complex Ice types such as classes, structs, and dictionaries using these low-level functions. For this reason, the Slice compiler optionally generates helper methods for streaming complex Ice types.
We will use the following Slice definitions to demonstrate the language mapping:
The Slice compiler generates the corresponding helper methods shown below:
IPrxHelper class provides
write methods for extracting and inserting proxies, respectively. Note that the
read method returns a proxy of type
IPrx but does not perform the equivalent of a
checkedCast to verify that the remote object supports interface
No additional code is generated for marshaling instances of class types, such as type
C that we defined above. Applications should use
InputStream.readValue to insert and extract class instances, respectively.