The Ice run time defines APIs using Slice. These APIs are provided as part of the Ice run time library and cannot be invoked remotely. (Doing so would not make any sense.) Therefore, the Slice interfaces for the Ice run time are defined as local interfaces. The Objective-C mapping for local interfaces differs from the default mapping in two ways:
<interface-name>Prx
protocol. (Doing so would be misleading because proxies imply that the target object can be remote.) Instead, the protocol for local interfaces has the same name as the interface. For example, the Ice::Communicator
interfaces is defined as:
{zcode:slice} ["objc:prefix:ICE"] module Ice { local interface Communicator { // ... } }; {zcode} |
Communicator
is a local interface, objects of type ICECommunicator
are passed as id<ICECommunicator>
(not ICECommunicator*
or id<ICEComunicatorPrx>
).getName
operation on the ObjectAdapter
interface is defined as:
{zcode:slice} ["objc:prefix:ICE"] module Ice { local interface ObjectAdapter { string getName(); }; }; {zcode} |
ObjectAdapter
is a local interface, the getName
operation maps to:
{zcode:objc} -(NSString *) getName; {zcode} |
NSString
instead of NSMutableString
(as would be the case for an operation on a non-local interface).