]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/slice.h
Use size_t for sizes in I/O classes
[libs/core.git] / source / io / slice.h
index f6115851c4c4c0637dcc262191c15e51cdcec81c..8ca4327415ff29f16d19decee872a7f0234185d9 100644 (file)
@@ -16,7 +16,7 @@ its range.  If the offset of the underlying object is changed, the Slice will
 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;
@@ -28,18 +28,23 @@ private:
 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; }
 };