X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbase.h;h=61819cfe8144c782dae9e8749d971c3f336aa641;hp=8e4d4a547243ec86a867c6fce4c2ba8122c8f11b;hb=70929f1a2265b112405eb2d4b03e1a374008b57d;hpb=c21ab7e49852585df01b4cc19599e25a918b581b diff --git a/source/io/base.h b/source/io/base.h index 8e4d4a5..61819cf 100644 --- a/source/io/base.h +++ b/source/io/base.h @@ -24,9 +24,6 @@ public: seeked) and any data buffered by upper layers needs to be flushed. */ sigc::signal signal_flush_required; - /** Emitted when the I/O object has closed. */ - sigc::signal signal_closed; - /** Emitted when the object is deleted. Mainly for use by EventDispatcher. */ sigc::signal signal_deleted; @@ -54,6 +51,8 @@ public: Mode get_mode() const { return mode; } protected: + void check_access(Mode) const; + virtual unsigned do_write(const char *, unsigned) = 0; virtual unsigned do_read(char *, unsigned) = 0; @@ -83,6 +82,10 @@ public: to end-of-file or non-blocking operation. */ virtual int get(); +protected: + void set_eof(); + +public: /** Returns the end-of-file flag. */ bool eof() const { return eof_flag; } };