libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
IniDict.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_PARSER_INIDICT_H
13
#define ZYPP_PARSER_INIDICT_H
14
15
#include <iosfwd>
16
#include <map>
17
#include <string>
18
19
#include "
zypp/base/PtrTypes.h
"
20
#include "
zypp/base/InputStream.h
"
21
#include "
zypp/base/Iterator.h
"
22
#include "
zypp/parser/IniParser.h
"
23
25
namespace
zypp
26
{
27
28
namespace
parser
29
{
30
32
//
33
// CLASS NAME : IniDict
34
//
40
class
IniDict
:
public
IniParser
41
{
42
friend
std::ostream &
operator<<
( std::ostream & str,
const
IniDict
& obj );
43
public
:
44
typedef
std::map<std::string, std::string>
EntrySet
;
45
typedef
std::map<std::string, EntrySet>
SectionSet
;
46
typedef
MapKVIteratorTraits<SectionSet>::Key_const_iterator
section_const_iterator
;
47
typedef
EntrySet::const_iterator
entry_const_iterator
;
48
62
section_const_iterator
sectionsBegin
()
const
;
63
section_const_iterator
sectionsEnd
()
const
;
65
80
entry_const_iterator
entriesBegin
(
const
std::string §ion)
const
;
81
entry_const_iterator
entriesEnd
(
const
std::string §ion)
const
;
83
88
IniDict
(
const
InputStream
&is,
89
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
90
94
IniDict
();
95
97
~IniDict
();
98
103
void
read
(
const
InputStream
&is,
104
const
ProgressData::ReceiverFnc
& progress =
ProgressData::ReceiverFnc
() );
105
112
void
insertEntry
(
const
std::string §ion,
113
const
std::string &key,
114
const
std::string &value );
115
122
void
deleteSection
(
const
std::string §ion );
123
128
bool
hasSection
(
const
std::string §ion )
const
;
129
138
bool
hasEntry
(
const
std::string §ion,
139
const
std::string &entry )
const
;
140
public
:
141
143
virtual
void
consume
(
const
std::string §ion );
145
virtual
void
consume
(
const
std::string §ion,
146
const
std::string &key,
147
const
std::string &value );
148
149
private
:
150
SectionSet
_dict
;
156
EntrySet
_empty_map
;
157
};
159
161
std::ostream &
operator<<
( std::ostream & str,
const
IniDict
& obj );
162
164
}
// namespace parser
167
}
// namespace zypp
169
#endif // ZYPP_PARSER_INIDICT_H
zypp
parser
IniDict.h
Generated by
1.8.1