00001 #ifndef IO_HH
00002 #define IO_HH
00003
00004 #include <string>
00005 #include <stdio.h>
00006
00008 namespace io {
00009
00011 struct Stream {
00012
00014 Stream();
00015
00017 Stream(std::string file_name, std::string mode, bool allow_close = true);
00018
00021 ~Stream();
00022
00037 void open(std::string file_name, std::string mode,
00038 bool allow_close = true);
00039
00041 void close();
00042
00043 FILE *file;
00044 bool is_pipe;
00045 bool close_allowed;
00046
00047 private:
00048
00049
00050 Stream(const Stream &stream) { abort(); }
00051 const Stream &operator=(const Stream &stream) { abort(); }
00052
00053 };
00054 };
00055
00056 #endif