Skip to main content
Skip table of contents

Classes with Compact Type IDs

You can optionally associate a numeric identifier with a class. The Ice runtime substitutes this value, known as a compact ID, in place of its equivalent string type ID during marshaling to conserve space. The compact ID follows immediately after the class name, enclosed in parentheses:

SLICE
module M
{
    class CompactExample(4)
    {
        // ...
    }
}

In this example, the Ice runtime marshals the value 4 instead of its string equivalent "::M::CompactExample". The specified value must be a non-negative integer that is unique within your application.

Using values less than 255 produces the most efficient encoding.

See Also

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.