g4tools  5.4.0
file_reader
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_file_reader
5 #define tools_file_reader
6 
7 #include <string>
8 #include <cstdio>
9 
10 namespace tools {
11 namespace file {
12 
13 class reader {
14 public:
15  virtual ~reader() {}
16 public:
17  virtual bool open(const std::string&) = 0;
18  virtual void close() = 0;
19  virtual bool is_open() const = 0;
20  virtual bool read(char*,unsigned int,size_t&) = 0;
21  virtual bool get_line(char*,unsigned int) = 0;
22  virtual bool eof() const = 0;
23 };
24 
25 }}
26 
27 #endif
tools::file::reader::is_open
virtual bool is_open() const =0
tools::file::reader
Definition: file_reader:13
tools::file::reader::open
virtual bool open(const std::string &)=0
tools::file::reader::~reader
virtual ~reader()
Definition: file_reader:15
tools::file::reader::close
virtual void close()=0
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::file::reader::read
virtual bool read(char *, unsigned int, size_t &)=0
tools::file::reader::get_line
virtual bool get_line(char *, unsigned int)=0
tools::file::reader::eof
virtual bool eof() const =0