|
|
|
|||||
|
Semantics of pass by value for interface
Hi,
I'm a bit confused with the semantics of pass by value for an interface. For a class, the semantics of pass by value and pass by reference (proxy) is easily understandable. For an interface (remote) that is not implemented by a class, what is the meaning of transmitting this interface by value. All examples from the documentation use the pass by reference for an interface but it is not stated that the pass by value is forbidden. Furthermore, the slice compiler doesn't reject such definitions. Chauk-Mean. |
|
|||||
|
Thanks for the reply.
I was initially surprised by the interface that is able to implement something :-) ! But what makes me understand the whole thing is that "an interface can always be implemented by a class". I suggest that the ICE documentation contains some additional information regarding this feature, something in the SCLICE class description like : "As a SLICE interface can be implemented by a SCLICE class, it is legal to pass a SLICE interface by value. A runtime exception may be thrown if the type doesn't actually support the pass by value semantics." Furthermore, in order to ease the understanding for CORBA programmers like me, I suggest to add the following clarification in the section comparing SLICE and CORBA IDL : "In CORBA, an interface is always passed by reference and a valuetype is always passed by value. A valuetype may be passed by reference through one of its supported interface. Conversely, SLICE interface and class can be passed by value and by reference (through the use of the proxy operator *)." Chauk-Mean. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| name.Endpoints semantics | mwilson | Help Center | 1 | 07-18-2005 05:11 PM |
| nonmutating semantics precision needed | annekat | Help Center | 4 | 08-05-2004 05:20 AM |
| bug when pass a class by value | damingyipai | Bug Reports | 2 | 04-02-2004 03:51 AM |
| semantics of slice2java --depend | manfred | Bug Reports | 0 | 05-21-2003 03:49 AM |
| Documentation : At-most-once Semantics | dipakyadav | Bug Reports | 4 | 02-21-2003 06:16 AM |