Martin Vermeer wrote:

> On Tue, Nov 01, 2005 at 09:23:05PM +0100, Lars Gullik Bjønnes wrote:
>> I am not sure that I like this, especially at this stage in the
>> endgame of 1.4.0cvs.
>> 
>> Shouldn't all insets have dimensions? In that case Dimension should
>> be in the base. (and I'd like to see NVI used for the methods).

MathDimInset had a dim_ member in 1.3. I am sure that it was removed for a
reason. See also the comment in insetbase.h about data members.

> OK. Happy to oblige, once I understand it :-)
> 
> NVI = Nonvirtual Interface Idiom? Could you elaborate with an example?

Look at InsetBase::dispatch() and InsetBase::doDispatch(). dispatch is the
nonvirtual method that is visible to the outside world, and it calls the
virtual doDispatch method to do the work.

>> What is the _minimal_ solution that will work just ok, for 1.4.x?

IMHO the minimal solution is the original patch without the changes to
insetbase.h and a bugzilla entry requesting to make the dimension methods
of InsetBase abstract.


Georg

Reply via email to