|
libzypp 17.38.1
|
Parse the prioritized list of files and drop-ins to read and merge for a specific config file stem: [PROJECT/]EXAMPLE[.SUFFIX] e.g: zypp/zypp.conf. More...
#include <zypp-core/parser/econfdict.h>

Public Member Functions | |
| EconfDict () | |
| EconfDict (const std::string &stem_r, const Pathname &root_r=Pathname("/")) | |
| Public Member Functions inherited from zypp::parser::IniDict | |
| section_const_iterator | sectionsBegin () const |
| section_const_iterator | sectionsEnd () const |
| Iterable< section_const_iterator > | sections () const |
| entry_const_iterator | entriesBegin (const std::string §ion) const |
| entry_const_iterator | entriesEnd (const std::string §ion) const |
| Iterable< entry_const_iterator > | entries (const std::string §ion) const |
| IniDict (const InputStream &is, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc()) | |
| Creates a dictionary from a InputStream containing a ini structured file. | |
| IniDict () | |
| Creates an empty dictionary. | |
| IniDict (IniDict &&)=default | |
| Move CTor. | |
| IniDict & | operator= (IniDict &&)=default |
| ~IniDict () override | |
| Dtor. | |
| 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 | |
| void | deleteSection (const std::string §ion) |
| add an entry | |
| bool | hasSection (const std::string §ion) const |
| True if there is a section with that name. | |
| bool | hasEntry (const std::string §ion, const std::string &entry) const |
| True if an entry exists in the section. | |
| void | consume (const std::string §ion) override |
| Called when a section is found. | |
| void | consume (const std::string §ion, const std::string &key, const std::string &value) override |
| Called when a key value is found. | |
| std::ostream & | dumpAsIniOn (std::ostream &str) const |
| Dump the collected iniMap as ini-file. | |
| Public Member Functions inherited from zypp::parser::IniParser | |
| IniParser () | |
| Default ctor. | |
| IniParser (IniParser &&) | |
| Being NonCopyable is a legacy but allow at least moving. | |
| IniParser & | operator= (IniParser &&) |
| virtual | ~IniParser () |
| Dtor. | |
| void | parse (const InputStream &imput_r, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc()) |
| Parse the stream. | |
| virtual void | beginParse () |
| Called when start parsing. | |
| virtual void | endParse () |
| Called when the parse is done. | |
| virtual void | garbageLine (const std::string §ion, const std::string &line) |
| Called whenever a garbage line is found. | |
| const std::string & | inputname () const |
| Name of the current InputStream. | |
Additional Inherited Members | |
| Public Types inherited from zypp::parser::IniDict | |
| using | EntrySet = std::map<std::string, std::string> |
| using | SectionSet = std::map<std::string, EntrySet> |
| using | section_const_iterator = MapKVIteratorTraits<SectionSet>::Key_const_iterator |
| using | entry_const_iterator = EntrySet::const_iterator |
| Related Symbols inherited from zypp::parser::IniDict | |
| std::ostream & | operator<< (std::ostream &str, const IniDict &obj) |
| Stream output. | |
| std::ostream & | dumpOn (std::ostream &str, const IniDict &obj) |
| Dump as single ini-file. | |
Parse the prioritized list of files and drop-ins to read and merge for a specific config file stem: [PROJECT/]EXAMPLE[.SUFFIX] e.g: zypp/zypp.conf.
The rules are defined by the UAPI.6 Configuration Files Specification (version 1)[1], but may be changed to follow newer versions in the future.
ref EconfException if stem_r is malformed
ref ParseException thrown from the underlying IniDict
Definition at line 35 of file econfdict.h.
| zypp::parser::EconfDict::EconfDict | ( | ) |
Definition at line 151 of file econfdict.cc.
| zypp::parser::EconfDict::EconfDict | ( | const std::string & | stem_r, |
| const Pathname & | root_r = Pathname("/") ) |
Definition at line 154 of file econfdict.cc.