On Tuesday 26 February 2002 18:33, Aaron J. Seigo wrote: > hi.. > > > All code uses the abstract CalendarSystem interface. There is only > > one place, where the specifig GreogrianSystem or ChineseSystem is > > used, when the object is instantiated (based on user selection). > > if you provided a factory method that returns an object of the > correct CalendarSystem subclass based on a QString identifier, then > you would alleviate the need for Frans to haveany knowledge of the > specific subclasses in his code. > > provide a seperate factory method to return a QStringList (or > whatever) of all available CalendarSystem types so that the user can > be presented with their choices, and this would allow one to write a > calendar interface without ever worrying about what the various > systems are. > > something like: > > class CalendarSystem > { > public: > static CalendarSystem* calendarFactory(QString system); > static const QStringList& availableSystems(); > } > > this would also allow for the future addition of calendarSystem > plugins that are loaded are run time. > > just a thought from my early morning brain ... =) This is a good one :-) -- Cornelius Schumacher _______________________________________________ kde-pim mailing list kde-pim@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/