Differing implementations for a function in two interfaces

BCS BCS_member at pathlink.com
Mon Apr 17 18:56:02 PDT 2006


In article <e219lb$1193$1 at digitaldaemon.com>, Ryan Steen says...
>
>In article <e212nr$o5p$1 at digitaldaemon.com>, BCS says...
>
>>interface DatabaseItemInterface
>>interface PerchaseRequest
>>// now, implement a finance database
>
>I do not understand this exercise. There are two closed source libs for which I
>have to provide the implementation?

Make a database item class using the database provided interface that can be
used by the finance lib (e.i. implements the finance interface).

The need for the interfaces comes from the need for library functions to handle
the objects. Inside of the libs the "get" functions will be called using the
interfaces.

>
>If there are no more constraints, then it is possible to write classes which
>implement the two interfacec by wrapping the appropriate functions from the 
> main application, the finance database.

I'm not sure what you are saying?? Something like this (extra classes and
objects) has bean suggested but it looks really messy to me. 

>
>But I already said it elsewhere, D would be better off with some features for
>renaming or aliasing interface content as well as interfaces themselves. 
>

Yes, this is exactly what I am suggesting. I have already outlined my suggested
syntax elsewhere.





More information about the Digitalmars-d-learn mailing list