Jürgen Schmidt wrote:
Frank Schönheit wrote:

Hi Jürgen,
[...]
In IDL you can't get this situation because the idlc complains if you inherit more than once from XPropetySet (directly or indirectly). In your implementation you have to take care of this depending on your specific inheritance hierarchy or base classes, helper classes.


Well ... This is _not_ a C++ implementation problem, this is a real
UNO/IDL problem!

I modeled new interfaces after existing services, with the following
structure:
  XFormControlModel
  +- XUnoControlModel
  |  +- ...
  |  +- XPropertySet
  +- XFormComponent2
     +- ...
     +- XPropertySet

IDLC does *not* complain here, and honestly, it would seriously reduce
the usefulness of multiple inheritance. As said, this is a real-world
example of creating "new UNO" interfaces from "old UNO" services.

IDLC only complains with if the direct base iterfaces of XFoo produce a
name clash (e.g. if you include both XPropertySet and XMultiPropertySet,
since both declare a getPropertySetInfo). It does not complain if the
name clash is deeper down the inheritance hierachy.


idlc would complain if XFoo would inherit directly from XPropertySet. Seems to be a problem.

idlc complains if interface X inherits interface Y both directly and indirectly (the rationale for complaining being that the superfluous additional direct inheritance could well be avoided by the designer of X). idlc does not complain if interface X inherits interface Y indirectly through multiple paths (the rationale for not complaining being that the designer of X could not do anything about this; and multiple inheritance would not work at all otherwise, as every interface inherits XInterface).

Btw, this has nothing to do with name clashes in UNO (name clashes occur if two different interfaces have methods of the same name, and shall both be inherited by a third interface).

[...]
So, the question remains: Is it feasible to do what Jörg suggested:
Extend cppumaker so it disambiugates methods of interfaces which are
inherited indirectly multiple times? E.g., let cppumaker generate

  class XFormControlModel
    : public XUnoControlModel, public XFormComponent2
  {
    ...
    // disambiguate XPropertySet
    // inherited from both XUnoControlModel and XFormComponent2
    virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( )
      throw (RuntimeException) = 0;
    virtual void SAL_CALL setPropertyValue(...) throw(...) = 0;
    virtual Any SAL_CALL getPropertyValue(...) throw(...) = 0;
    ...
  };


needs to be evaluated ...

sounds good

-Stephan

Juergen


?

Ciao
Frank

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

Reply via email to