Re: subclassing fp_Run (was) Re: Backend changes ready for commit -please test it!


Subject: Re: subclassing fp_Run (was) Re: Backend changes ready for commit -please test it!
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Wed Feb 21 2001 - 20:41:19 CST


Thanks Mike.

On Thu, 22 Feb 2001, Mike Nordell wrote:

> Martin Sevior wrote:
> > OK I've thought about this a bit more and unless I misunderstand something
> > about C++ subclassing I think your solution is a much bigger maintenance
> > issue.
>
> Perhaps the design is flawed? Perhaps some work is done in the wrong class?
> What about not giving runs even more members, but letting the HdrFtrLayout
> not forward the draw() calls to the runs it is responsible for? Am I
> understanding the issue here, a run should often not be drawn when layed out
> by a HdrFtrLayout?
> This would void the need for new run and line types.
>

I'll answer this later...

> But this also raises a more serious issue: Should a run really know anything
> about the world which it lives in?
>
> > so instead of
> >
> > fp_TextRun *pRun = new fp_TextRun* pNewRun = new fp_TextRun(this, pG,
> > m_pFirstRun->getBlockOffset(), 0);
>
> What's this? Parts of it resemble C++, but the complete expression is just
> jibberish. If you remove "fp_TextRun *pRun = new " it makes sense, but I
> fail to see the purpose of this. Copy'n'paste error?

Sorry cut and paste eror. should be

fp_TextRun *pRun = new fp_TextRun(this, pG, m_pFirstRun->getBlockOffset(), 0);

<snip>

More replies later..

Martin



This archive was generated by hypermail 2b25 : Wed Feb 21 2001 - 20:41:30 CST