Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2001-10-01 09:55:49


Correction:

> A DataStream supports:
> typedef ... element_type;
> bool eoi(); // End Of Input
> element_type next(); // may only be called if !eoi()
>
> Whereas a buffered DataStream supports:
> typedef ... element_type;
> bool eoi();
> const element_type & get(); // "current" data item; may only be
> called if !eoi()
> void next(); // discards the "current" data item; can only be
> called after get(), putback(), or eoi() which returned false
> element_type consume(); // equivalent to get(), then next()
> void putback(const element_type & x); // places x back into input
> stream

Sorry, the information above was from a short-lived old design. For the
BufferedDataStream, rename "next()" to "discard()", then rename "consume()"
to "next()". This allows every BufferedDataStream to also be a DataStream.

        -Steve


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