Re: Iterating over insets: a question

2002-08-02 Thread Angus Leeming
On Friday 02 August 2002 2:42 pm, Dekel Tsur wrote: > On Fri, Aug 02, 2002 at 12:37:11PM +0100, Angus Leeming wrote: > > However... > > > > I think I've come to the opposite conclusion. If we overload addPreview > > then things like tables could generate a preview of the entire table if > > they s

Re: Iterating over insets: a question

2002-08-02 Thread Dekel Tsur
On Fri, Aug 02, 2002 at 12:37:11PM +0100, Angus Leeming wrote: > However... > > I think I've come to the opposite conclusion. If we overload addPreview then > things like tables could generate a preview of the entire table if they so > desired. If you want to preview a table, you can always ov

Re: Iterating over insets: a question

2002-08-02 Thread Angus Leeming
On Friday 02 August 2002 12:50 pm, Dekel Tsur wrote: > On Thu, Aug 01, 2002 at 02:13:50PM +0100, Angus Leeming wrote: > > How should I loop over all insets? Do I: > > > > 1. Loop from outside > > for (; it != end; ++it) { > > (*it)->addPreview(ploader); > > // add some

Re: Iterating over insets: a question

2002-08-02 Thread Dekel Tsur
On Thu, Aug 01, 2002 at 02:13:50PM +0100, Angus Leeming wrote: > How should I loop over all insets? Do I: > > 1. Loop from outside > for (; it != end; ++it) { > (*it)->addPreview(ploader); > // add some sub-loop > } > > 2. Overload addPreview in container

Re: Iterating over insets: a question

2002-08-01 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | On Thursday 01 August 2002 2:58 pm, Lars Gullik Bjønnes wrote: >> | Incidentally, what's the preferred STL algorithm for >> |for (; it != end; ++it) { >> |(*it)->addPreview(ploader); >> |} >> >> some variant of >> >> for_each(be

Re: Iterating over insets: a question

2002-08-01 Thread Angus Leeming
On Thursday 01 August 2002 2:58 pm, Lars Gullik Bjønnes wrote: > | Incidentally, what's the preferred STL algorithm for > | for (; it != end; ++it) { > | (*it)->addPreview(ploader); > | } > > some variant of > > for_each(begin, end, bind(&Type::addPreview, ref(ploader)));

Re: Iterating over insets: a question

2002-08-01 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Before I dive into this caching stuff I'd like to finish the preview clean-up | that started it off. > | The code below iterates over only "top level" insets that are owned directly | by the Buffer. > | void Previews::generateBufferPreviews(Buffer con

Iterating over insets: a question

2002-08-01 Thread Angus Leeming
Before I dive into this caching stuff I'd like to finish the preview clean-up that started it off. The code below iterates over only "top level" insets that are owned directly by the Buffer. void Previews::generateBufferPreviews(Buffer const & buffer) const { PreviewLoader & ploader =