diff options
Diffstat (limited to 'include/Output.h')
-rw-r--r-- | include/Output.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/Output.h b/include/Output.h index 32d4e66..eb7b8a6 100644 --- a/include/Output.h +++ b/include/Output.h @@ -2,38 +2,44 @@ #define __OUTPUT_H__ #ifdef __cplusplus +#include <sys/types.h> +#include <time.h> #include <String.h> #include <Handle.h> class Output : public Handle { public: - Output(String = "", int trunc = 1) throw (GeneralException); + Output(String = "", int create = 1, int trunc = 1) throw (GeneralException); Output(const Output &); virtual ~Output() {} - virtual bool CanWrite(); - virtual bool CanRead(); - virtual String GetName(); + virtual bool CanWrite() const; + virtual bool CanRead() const; + virtual bool CanSeek() const; + virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException); + virtual String GetName() const; protected: String n; + off_t size; + time_t date_modif; }; -class Stdout_t : public Handle { +class Stdout_t : public Output { public: Stdout_t(); virtual ~Stdout_t() {} - virtual bool CanWrite(); - virtual bool CanRead(); - virtual String GetName(); + virtual bool CanSeek() const; + virtual String GetName() const; }; class Stderr_t : public Handle { public: Stderr_t(); virtual ~Stderr_t() {} - virtual bool CanWrite(); - virtual bool CanRead(); - virtual String GetName(); + virtual bool CanWrite() const; + virtual bool CanRead() const; + virtual bool CanSeek() const; + virtual String GetName() const; }; extern Stdout_t Stdout; |