X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fbase.h;h=700dae7646180266d5393991e2b4d799ac7c1d2c;hp=8e4d4a547243ec86a867c6fce4c2ba8122c8f11b;hb=82d74297d5b469b0a506d7010a84ab5115cd88ee;hpb=c21ab7e49852585df01b4cc19599e25a918b581b diff --git a/source/io/base.h b/source/io/base.h index 8e4d4a5..700dae7 100644 --- a/source/io/base.h +++ b/source/io/base.h @@ -54,6 +54,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 +85,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; } };