Boost logo

Boost :

Subject: Re: [boost] [gil::io] Feedback for scanline_read_iterator
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2013-02-18 19:50:45


On Mon, Feb 18, 2013 at 4:23 PM, Christian Henning <chhenning_at_[hidden]>wrote:

> >> I think Phil means rather than do the read in operator++, just set a
> flag
> >> in operator++ that the read should be done, and actually do it in
> >> operator* (which then clears the flag). Then if someone calls operator++
> >> again without calling operator* (which you can detect by the flag being
> >> set in operator++), you can do a skip in operator++, and thus avoid
> >> decoding the line you didn't need.
> >
> > Interesting idea. I'll update the code.
>
> Actually that doesn't work. How would the user signal to just skip a
> scanline? I cannot add a parameter to operator++.
>
> scanline_read_iterator< Reader >& operator++( bool read_scanline =
> true ) { //to something }
>

The "do something" is in operator*, no?

- Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk