diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-16 08:16:30 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-16 08:16:30 -0800 |
commit | b6c30682c3bba2e9c9fae9614e420d9c60e1ed25 (patch) | |
tree | be6db43359d30ba2e68a4ebe719a4aa9b1d65770 | |
parent | 06f6cac6bb79d5d9a0ba99ed530a5a0a208bb48b (diff) |
Of course, to be viable, the ReadOnly and WriteOnly classes need to derive from Handle...
-rw-r--r-- | includes/Handle.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Handle.h b/includes/Handle.h index b1398d1..99aa3a5 100644 --- a/includes/Handle.h +++ b/includes/Handle.h @@ -108,7 +108,7 @@ class SeekableHandle : public Handle { off_t m_wOffset, m_rOffset; }; -class ReadOnly { +class ReadOnly : public Handle { public: ReadOnly(IO<Handle> & io) : m_io(io) { Assert(m_io->canRead()); } virtual void close() throw (GeneralException) { m_io->close(); } @@ -130,7 +130,7 @@ class ReadOnly { IO<Handle> m_io; }; -class WriteOnly { +class WriteOnly : public Handle { public: WriteOnly(IO<Handle> & io) : m_io(io) { Assert(m_io->canWrite()); } virtual void close() throw (GeneralException) { m_io->close(); } |