Mathias Bauer wrote:
Rainman Lee wrote:
hello everyone,
I have a question about extending a published service.
supposing that there is a published service S, which derives from a
Multi-Inheritance Interface C, which inherits from A and B, like that:
interface A
{
...
};
interface B
{
...
};
interface C
{
interface A;
interface B;
};
service S : C;
and the service S is published.
now I want to make the service S suppot a new interface D, how can I
archieve this while guaranteeing that old programs using service S
still works?
I know that the easiest way maybe implementing a service S1, and let
this service supporting both the interface C and D.
then new programs using interface D query S1, and the existing
programs still query the service S.
is there any other method to accomplish this? I want to new programs
can access the interface D still through S instead of S1, S1 is not a
friendly name I think ;@)
thank you very much!
If the implementation of service S1 also implements service S, all
clients using the service S will be able to use the additional interface
D by using queryInterface on the reference to interface C they got by
creating service S. Though I don't understand why new programs shouldn't
be able to use "S1".
Querying an object that implements service S for interface D and using
it as though the object implements service S1, though common practice,
is not sound (in case the given object implements D with semantics
different from those specified by S1).
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]