return sys_seek(const_cast<Handle &>(handle), 0, S_CUR);
}
+const Handle &File::get_handle(Mode m)
+{
+ check_access(m);
+ return handle;
+}
+
} // namespace IO
} // namespace Msp
virtual SeekOffset seek(SeekOffset, SeekType);
virtual SeekOffset tell() const;
+
+ virtual const Handle &get_handle(Mode);
};
inline File::CreateMode operator|(File::CreateMode m, File::CreateMode n)
return ret;
}
+const Handle &Pipe::get_handle(Mode m)
+{
+ if(m==M_READ)
+ return read_handle;
+ else if(m==M_WRITE)
+ return write_handle;
+ else
+ throw invalid_argument("Pipe::get_handle");
+}
+
} // namespace IO
} // namespace Msp
virtual unsigned do_read(char *, unsigned);
public:
+ virtual const Handle &get_handle(Mode);
virtual const Handle &get_event_handle() { return reader.get_event(); }
};