12 #ifndef ZYPP_PARSER_INIDICT_H
13 #define ZYPP_PARSER_INIDICT_H
44 typedef std::map<std::string, std::string>
EntrySet;
113 const std::string &key,
114 const std::string &value );
128 bool hasSection(
const std::string §ion )
const;
138 bool hasEntry(
const std::string §ion,
139 const std::string &entry )
const;
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 );
169 #endif // ZYPP_PARSER_INIDICT_H
std::map< std::string, std::string > EntrySet
MapKVIteratorTraits< SectionSet >::Key_const_iterator section_const_iterator
EntrySet _empty_map
empty map used to simulate iteration in non existant sections
void deleteSection(const std::string §ion)
add an entry
virtual void consume(const std::string §ion)
Called when a section is found.
IniDict()
Creates a mepty dictionary.
transform_iterator< GetPairFirst< typename MapType::value_type >, typename MapType::const_iterator > Key_const_iterator
The key iterator type.
std::ostream & operator<<(std::ostream &str, const IniDict &obj)
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
void read(const InputStream &is, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Fill a dictionary from a InputStream containing a ini structured file.
void insertEntry(const std::string §ion, const std::string &key, const std::string &value)
add an entry
section_const_iterator sectionsBegin() const
entry_const_iterator entriesEnd(const std::string §ion) const
std::map< std::string, EntrySet > SectionSet
Parses a INI file and offers its structure as a dictionary.
entry_const_iterator entriesBegin(const std::string §ion) const
friend std::ostream & operator<<(std::ostream &str, const IniDict &obj)
EntrySet::const_iterator entry_const_iterator
bool hasEntry(const std::string §ion, const std::string &entry) const
True if an entry exists in the section.
bool hasSection(const std::string §ion) const
True if there is a section with that name.
section_const_iterator sectionsEnd() const