00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SPECTMORPH_STDIO_IN_HH
00019 #define SPECTMORPH_STDIO_IN_HH
00020
00021 #include <string>
00022 #include "smgenericin.hh"
00023
00024 namespace SpectMorph
00025 {
00026
00027 class StdioIn : public GenericIn
00028 {
00029 FILE *file;
00030 std::string filename;
00031
00032 StdioIn (FILE *file, const std::string& filename);
00033 public:
00034 static GenericIn* open (const std::string& filename);
00035
00036 int get_byte();
00037 int read (void *ptr, size_t size);
00038 bool skip (size_t size);
00039 unsigned char *mmap_mem (size_t& remaining);
00040 size_t get_pos();
00041 GenericIn *open_subfile (size_t pos, size_t len);
00042 };
00043
00044 }
00045
00046 #endif