From: SF M. E. <el...@us...> - 2004-03-16 17:23:48
|
> > 3.2 There are several classes with the same methods "What" and > > "Translate". Why were they not moved into another base class like > > "Translatable" or "Typeof" that would be used for multiple inheritance > > together with the class "NonLeaf"? > > These methods are not the same. Each of them has different implementation. > How can you move them to a base class? > > Perhaps you mean moving the interface to separate base class, e.g.: > > class [whatever] > { > virtual int What() = 0; > }; > > is this what you mean? Yes. Also: virtual int Translate() = 0; Is this refacoring okay for you? Those classes can not be seen with "value semantics" after it. |