sbuild
1.7.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
lib
sbuild
keyfile-reader.h
1
/* Copyright © 2005-2013 Roger Leigh <rleigh@debian.org>
2
*
3
* schroot is free software: you can redistribute it and/or modify it
4
* under the terms of the GNU General Public License as published by
5
* the Free Software Foundation, either version 3 of the License, or
6
* (at your option) any later version.
7
*
8
* schroot is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see
15
* <http://www.gnu.org/licenses/>.
16
*
17
*********************************************************************/
18
19
#ifndef SBUILD_KEYFILE_READER_H
20
#define SBUILD_KEYFILE_READER_H
21
22
#include <istream>
23
24
#include <sbuild/keyfile.h>
25
26
namespace
sbuild
27
{
28
32
class
keyfile_reader
33
{
34
public
:
36
typedef
keyfile::error
error
;
37
43
keyfile_reader
(
keyfile
&
store
);
44
51
keyfile_reader
(
keyfile
&
store
,
52
const
std::string& file);
53
60
keyfile_reader
(
keyfile
&
store
,
61
std::istream& stream);
62
64
virtual
~keyfile_reader
();
65
72
virtual
void
73
read_stream
(std::istream& stream);
74
75
protected
:
80
virtual
void
81
begin
();
82
93
virtual
void
94
parse_line
(
const
std::string& line);
95
100
virtual
void
101
end
();
102
104
keyfile
&
store
;
105
107
keyfile::group_name_type
group
;
108
110
bool
group_set
;
111
113
keyfile::key_type
key
;
114
116
bool
key_set
;
117
119
keyfile::value_type
value
;
120
122
bool
value_set
;
123
125
keyfile::comment_type
comment
;
126
128
bool
comment_set
;
129
131
keyfile::size_type
line_number
;
132
140
friend
141
std::istream&
142
operator >>
(std::istream& stream,
143
keyfile_reader
& kp)
144
{
145
kp.
read_stream
(stream);
146
return
stream;
147
}
148
};
149
150
151
}
152
153
#endif
/* SBUILD_KEYFILE_READER_H */
154
155
/*
156
* Local Variables:
157
* mode:C++
158
* End:
159
*/
Generated on Wed Oct 2 2013 10:21:07 for sbuild by
1.8.4