restore it before the next access. This enables multiple Slices to be created
on top of the same object.
*/
-class Slice: public Seekable
+class Slice: public Seekable, public sigc::trackable
{
private:
Seekable &below;
public:
Slice(Seekable &, SeekOffset, SeekOffset);
+ virtual void set_block(bool);
+ virtual void set_inherit(bool);
+
private:
void flush();
unsigned prepare_op(unsigned, Mode);
protected:
- virtual unsigned do_write(const char *, unsigned);
- virtual unsigned do_read(char *, unsigned);
+ virtual std::size_t do_write(const char *, std::size_t);
+ virtual std::size_t do_read(char *, std::size_t);
public:
- virtual unsigned put(char);
+ virtual std::size_t put(char);
virtual int get();
+ virtual const Handle &get_handle(Mode);
+
virtual SeekOffset seek(SeekOffset, SeekType);
virtual SeekOffset tell() const { return position; }
};