MPD: fs/io/TextFile.hxx Source File

MPD 0.20.18

TextFile.hxx
Go to the documentation of this file.
1 /*
2 * Copyright 2003-2017 The Music Player Daemon Project
3 * http://www.musicpd.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef MPD_TEXT_FILE_HXX
21 #define MPD_TEXT_FILE_HXX
22
23 #include "check.h"
24 #include "Compiler.h"
25
26 class Path;
27 class FileReader;
28 class AutoGunzipReader;
29 class BufferedReader;
30
31 class TextFile {
32 FileReader *const file_reader;
33
34 #ifdef ENABLE_ZLIB
35 AutoGunzipReader *const gunzip_reader;
36 #endif
37
38 BufferedReader *const buffered_reader;
39
40 public:
41 explicit TextFile(Path path_fs);
42
43 TextFile(const TextFile &other) = delete;
44
45 ~TextFile();
46
54 char *ReadLine();
55 };
56
57 #endif
check.h
AutoGunzipReader
A filter that detects gzip compression and optionally inserts a GunzipReader.
Definition: AutoGunzipReader.hxx:33
Path
A path name in the native file system character set.
Definition: Path.hxx:39
Compiler.h
FileReader
Definition: FileReader.hxx:39
TextFile::TextFile
TextFile(Path path_fs)
TextFile::ReadLine
char * ReadLine()
Reads a line from the input file, and strips trailing space.
TextFile
Definition: TextFile.hxx:31
BufferedReader
Definition: BufferedReader.hxx:31
TextFile::~TextFile
~TextFile()