Objective-C Mapping for Operations on Local Types

An operation on a local interface or a local class is mapped to an Objective-C method with the same name. The mapping of operation parameters to Objective-C is identical to the Client-Side Mapping for these parameters. However, unlike the Client-Side mapping, there is no overloaded method with a trailing context parameter.

The type of a parameter can be a local interface or class. Such a parameter is passed as an id<mapped Objective-C protocol> for regular parameters; a "delegate" interface parameter, mapped to a block in Objective-C, is passed as this block.

LocalObject parameter is mapped to a parameter of type id. You can also create constructed types (such as local sequences and local dictionaries) with local types.

For example:

Slice
module M
{
    local interface L; // forward declared
    local sequence<L> LSeq;
    local interface L
    {
        string op(int n, string s, LocalObject any, out int m, out string t, out LSeq newLSeq);
    }
}

is mapped to:

Objective-C
typedef NSArray MLSeq;
typedef NSMutableArray MMutableLSeq;

@protocol ML <NSObject>
-(NSMutableString*) op:(ICEInt)n s:(NSString*)s any:(id)any m:(ICEInt*)m t:(NSMutableString**)t newLSeq:(MMutableLSeq**)newLSeq;
@end