60 void IniDict::consume(
const std::string §ion )
65 void IniDict::consume(
const std::string §ion,
const std::string &key,
const std::string &value )
67 _dict[section][key] = value;
73 SectionSet::const_iterator secit = _dict.find(section);
74 if ( secit == _dict.end() )
76 return _empty_map.begin();
79 return (secit->second).begin();
84 SectionSet::const_iterator secit = _dict.find(section);
85 if ( secit == _dict.end() )
87 return _empty_map.end();
90 return (secit->second).end();
104 void IniDict::insertEntry(
const std::string §ion,
105 const std::string &key,
106 const std::string &value )
108 consume( section, key, value );
111 void IniDict::deleteSection(
const std::string §ion )
113 _dict.erase(section);
116 bool IniDict::hasSection(
const std::string §ion )
const
118 SectionSet::const_iterator secit = _dict.find(section);
119 if ( secit == _dict.end() )
124 bool IniDict::hasEntry(
const std::string §ion,
125 const std::string &entry )
const
127 SectionSet::const_iterator secit = _dict.find(section);
128 if ( secit == _dict.end() )
131 EntrySet::const_iterator entryit = (secit->second).find(entry);
132 if ( entryit == (secit->second).end() )
149 str <<
"[" << *si <<
"]" << endl;
154 str << ei->first <<
" = " << ei->second << endl;