On Tue, 2007-07-10 at 15:15 +0200, Tobias Schlitt wrote: > On 07/10/2007 03:22 PM Kore Nordmann wrote: > > > <koredn> I got an ezc option class, which already extends an existing > > option class. (svgDriverOptions extends driverOptions) Now I want to > > introduce another set of options there (classical example for multiple > > inheritance). What is the cleanest way to do so .. interfaces won't > > really help here. Just add the options in all "implementing" classes? > > <koredn> Cause: A new feature which requires new options but can't be > > used with all drivers > > <Derick> two options: > > <Derick> 1. implement it all the option classes that should support it > > <Derick> 2. implement it in the parent class, and exclude them in the > > child option classes by making an explicit check for them - and thworing > > an exception if it can not be used > > <Derick> I think I prefer 1, but you should ask the list. > > > In the design doc I go for option 1. > > Option 3: Implement it in a new option class and use delegation to this > class for all option classes that should support these.
Yes, I like this variant - even we currently would only need to implement in two places, but maybe we get even more interactive output formats (somebody mentions Silverlight?), so it will be even more useful, then. -- Mit freundlichen Grüßen / Med vennlig hilsen Kore Nordmann (GPG: 0xDDC70BBB) eZ Components Developer eZ systems Headquaters tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751 [EMAIL PROTECTED] | eZ systems | ez.no
signature.asc
Description: This is a digitally signed message part
-- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
