Preliminary documentation for Ice 3.7.1 Beta. Do not use in production applications. Refer to the space directory for other releases.

On this page:

Mapped Objective-C Class

A local Slice class is mapped to an Objective-C protocol and interface with the same name. For example:

Slice
module Ice
{
    local class ConnectionInfo
    {
        ...
    }
}

is mapped to the Objective-C protocol and interface ICEConnectionInfo:

Objective-C
@protocol ICEConnectionInfo <NSObject>
@end

@interface ICEConnectionInfo : ICELocalObject
...
@end

LocalObject in Objective-C

Like local interfaces, local Slice classes implicitly derive from LocalObject, which is mapped to ICELocalObject in Objective-C.

Mapping for Local Interface Inheritance in Objective-C

A local Slice class can extend another local Slice class, and can implement one or more local Slice interfaces. extends and implements are mapped to interface and protocol inheritance in Objective-C. For example:

Slice
module M
{
    local interface A {}
    local interface B {}
    
    local class C implements A, B {}
    local class D extends C {}
}

is mapped to:

Objective-C
@protocol MA <NSObject>
@end

@protocol MB <NSObject>
@end

@protocol MC <MA, MB>
@end

@interface MC : ICELocalObject
+(id) c;
@end

@protocol MD <MC>
@end

@interface MD : MC
+(id) d;
@end

  • No labels