/src/aspell/common/istream.hpp
Line | Count | Source (jump to first uncovered line) |
1 | | // This file is part of The New Aspell |
2 | | // Copyright (C) 2001 by Kevin Atkinson under the GNU LGPL license |
3 | | // version 2.0 or 2.1. You should have received a copy of the LGPL |
4 | | // license along with this library if you did not you can find |
5 | | // it at http://www.gnu.org/. |
6 | | |
7 | | #ifndef ASPELL_ISTREAM__HPP |
8 | | #define ASPELL_ISTREAM__HPP |
9 | | |
10 | | namespace acommon { |
11 | | |
12 | | class String; |
13 | | |
14 | | class IStream { |
15 | | private: |
16 | | char delem; |
17 | | public: |
18 | 18.4k | IStream(char d = '\n') : delem(d) {} |
19 | | |
20 | 0 | char delim() const {return delem;} |
21 | | |
22 | | // getline will read until delem |
23 | | virtual bool append_line(String &, char c) = 0; |
24 | 1.17M | bool append_line(String & str) {return append_line(str, delem);} |
25 | | bool getline(String & str, char c); |
26 | | bool getline(String & str); |
27 | | |
28 | | virtual bool read(void *, unsigned int) = 0; |
29 | | |
30 | 18.4k | virtual ~IStream() {} |
31 | | }; |
32 | | |
33 | | } |
34 | | |
35 | | #endif |