sbuild
1.7.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
lib
sbuild
keyfile-writer.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_WRITER_H
20
#define SBUILD_KEYFILE_WRITER_H
21
22
#include <ostream>
23
24
#include <sbuild/keyfile.h>
25
26
namespace
sbuild
27
{
28
32
class
keyfile_writer
33
{
34
public
:
36
typedef
keyfile::error
error
;
37
43
keyfile_writer
(
const
keyfile
&
store
);
44
51
keyfile_writer
(
const
keyfile
&
store
,
52
const
std::string& file);
53
60
keyfile_writer
(
const
keyfile
&
store
,
61
std::ostream& stream);
62
64
virtual
~keyfile_writer
();
65
72
virtual
void
73
write_stream
(std::ostream& stream)
const
;
74
75
protected
:
77
const
keyfile
&
store
;
78
90
static
void
91
print_comment
(
const
keyfile::comment_type
& comment,
92
std::ostream& stream);
93
101
friend
102
std::ostream&
103
operator <<
(std::ostream& stream,
104
const
keyfile_writer
& kp)
105
{
106
kp.
write_stream
(stream);
107
return
stream;
108
}
109
};
110
111
}
112
113
#endif
/* SBUILD_KEYFILE_WRITER_H */
114
115
/*
116
* Local Variables:
117
* mode:C++
118
* End:
119
*/
Generated on Wed Oct 2 2013 10:21:07 for sbuild by
1.8.4