From: SF M. E. <el...@us...> - 2004-03-13 18:15:40
|
> I am under impression that each 'Ptree...::What()' returns something else > (discriminator), similarily each 'Ptree...::Translate()' calls different > method from Walker iface. Can you point out what classes have the same Will abstract base classes be available for them like it was discussed for "AbstractWalker"? > Again, this very much depends on the class semantics. Sometimes compiler > generated implementations are OK. Please note, that due to GC even when > class has value semantics and it contains (garbage collected) pointers, > default copy ctor and assignment operator are ok. On the other hand, > I suspect that in several places those functions should be blocked > (by privation), but are not. Please derive such classes from an interface class like "http://boost.org/libs/utility/utility.htm#Class_noncopyable". I have not got detailed knowledge about your class library so far to decide where objects should not be copied. I hope that other developers are in a better position to do that. > Some classes are designed to be derived from, some > are "final". In particular classes that have value semantics (= define > operator() and copy ctor and generally behaves as values) IMO almost > always should be "final". But there may also be omissions. Please bring > the names of these classes and I will comment on each of them > particularily. Value objects should not have any virtual methods. I suggest to look for missing virtual destructors in all classes that contain virtual methods. > The way that I would strongly recommend is to redesign components one by one > and go from the old design to the new design in evolutionary steps. The > smaller the components you replace, the easier it is to manage. Sometimes it > pays off to refactor the old code to insulate some part of it before > rewritting them. That way you have the running thing all the time. Would you like to use the methodology "http://en.wikipedia.org/wiki/Extreme_Programming" that is supported by the tool "http://www.xplanner.org/"? I suggest to use multiple inheritance in more cases. |