This document describes Ice version 3.4.2.

Skip to end of metadata
Go to start of metadata

In addition to interfaces, Slice permits the definition of classes. Classes are like interfaces in that they can have operations and are like structures in that they can have data members. This leads to hybrid objects that can be treated as interfaces and passed by reference, or can be treated as values and passed by value.

Classes support inheritance and are therefore polymorphic: at run time, you can pass a class instance to an operation as long as the actual class type is derived from the formal parameter type in the operation's signature. This also permits classes to be used as type-safe unions, similarly to Pascal's discriminated variant records.

Topics

Return to the Ice Manual.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.