the problem here is the circle inheritance of the interfaces.when this
situation occurs, the derived class must reimplements all repeatedly
inherited interfaces even if you use the helper class.

On Fri, Aug 1, 2008 at 10:49 PM, Michael Stahl <[EMAIL PROTECTED]> wrote:
> Frank Schönheit - Sun Microsystems Germany wrote:
>>
>> Hello Rainman,
>>
>>> We are developing our products upon UNO component model.
>>> One of the big problem we have met is how to implement a service which
>>> declared by the NEW STYLE statement.
>>> ...
>>> Now the problem comes, this is a terrible multiple inheritance
>>> relationship in C++, and maks hardly reuse of ImplA. because of ImplA
>>> and XB both derived from XA,
>>> leading that we must implement all methods declared in XA within ImplB
>>> again.The same problem occurs in ImplC.
>>> If there are many methods in XA, the development and the maintenance
>>> complexity of the ImplB and ImplC would be unacceptable.
>>
>> This in fact is a big problem, IMO.
>>
>> Upon continued begging the skeletonmaker tool (which is part of the SDK)
>> is meanwhile able to generate code for you which does the forwarding
>> (the concrete syntax evades me at the moment), which somewhat relaxes
>> the problem.
>>
>> However, very high on my personal wishlist would be a define,
>> auto-generated into XFoo.hpp, which allows me to write something like
>>  FORWARD_XFOO( <base_class_name> )
>> , which effectively implements all methods of XFoo, just forwarding them
>> to "base_class_name". This would reduce the maintenance efforts to mere
>> re-compilation.
>>
>> (And while we are at it, an
>>  DECLARE_XFOO()
>> would be great, too, also coming from the .hpp file. Yes, I know that
>> skeletonmaker can also generate all the member declarations, but that's
>> again a maintenance problem if the interface changes, which happens
>> often enough during development of new API.)
>
> hmm... isn't that pretty much why ImplInheritanceHelper exists?
> http://api.openoffice.org/docs/cpp/ref/names/cppu/c-ImplInheritanceHelper1.html
> or am i missing something here?
> (well, i guess you still have to override XServiceInfo by hand...)
>
> michael
>
> --
> "The last good thing written in C was
>  Franz Schubert's Symphony number 9." -- Erwin Dieterich
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to