| 1 | #cxx . . $ `<file>/io/inifile.h`/ifndef IOUTILITIES_INIFILE_H |
| 2 | #define IOUTILITIES_INIFILE_Hcxx . . $ `io/inifile.h:2:9`! |
| 3 | |
| 4 | #include "../global.h"cxx . . $ `<file>/global.h`/ |
| 5 | #include "../misc/flagenumclass.h"cxx . . $ `<file>/misc/flagenumclass.h`/ |
| 6 | |
| 7 | #include <algorithm> |
| 8 | #include <iosfwd> |
| 9 | #include <map> |
| 10 | #include <optional> |
| 11 | #include <string> |
| 12 | #include <vector> |
| 13 | |
| 14 | namespace CppUtilitiescxx . . $ CppUtilities/ { |
| 15 | |
| 16 | class CPP_UTILITIES_EXPORTcxx . . $ `global.h:11:9`! IniFilecxx . . $ CppUtilities/IniFile# { |
| 17 | public: |
| 18 | using ScopeNamecxx . . $ CppUtilities/IniFile#ScopeName# = stdcxx . . $ std/::stringcxx . . $ std/string#; |
| 19 | using ScopeDatacxx . . $ CppUtilities/IniFile#ScopeData# = stdcxx . . $ std/::multimapcxx . . $ std/multimap#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#>; |
| 20 | using Scopecxx . . $ CppUtilities/IniFile#Scope# = stdcxx . . $ std/::paircxx . . $ std/pair#<ScopeNamecxx . . $ CppUtilities/IniFile#ScopeName#, ScopeDatacxx . . $ CppUtilities/IniFile#ScopeData#>; |
| 21 | using ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# = stdcxx . . $ std/::vectorcxx . . $ std/vector#<Scopecxx . . $ CppUtilities/IniFile#Scope#>; |
| 22 | |
| 23 | IniFilecxx . . $ CppUtilities/IniFile#IniFile(49f6e7a06ebc5aa8).(); |
| 24 | ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# &datacxx . . $ CppUtilities/IniFile#data(5d1a34a8a2f26b20).(); |
| 25 | const ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# &datacxx . . $ CppUtilities/IniFile#data(805782128512b729).() const; |
| 26 | void parsecxx . . $ CppUtilities/IniFile#parse(21eaf1e8e1bd68f5).(stdcxx . . $ std/::istreamcxx . . $ std/istream# &inputStream); |
| 27 | void makecxx . . $ CppUtilities/IniFile#make(f7f45734e6842120).(stdcxx . . $ std/::ostreamcxx . . $ std/ostream# &outputStream); |
| 28 | |
| 29 | private: |
| 30 | ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# m_datacxx . . $ CppUtilities/IniFile#m_data.; |
| 31 | }; |
| 32 | |
| 33 | /*! |
| 34 | * \brief Constructs an empty ini file. |
| 35 | */ |
| 36 | inline IniFilecxx . . $ CppUtilities/IniFile#::IniFilecxx . . $ CppUtilities/IniFile#IniFile(49f6e7a06ebc5aa8).() |
| 37 | { |
| 38 | } |
| 39 | |
| 40 | /*! |
| 41 | * \brief Returns the data of the file. |
| 42 | * \remarks |
| 43 | * - The returned pairs represent the [scope names] and the contained "key = value"-pairs. |
| 44 | * - The data might be modified and then saved using the make() method. |
| 45 | */ |
| 46 | inline IniFilecxx . . $ CppUtilities/IniFile#::ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# &IniFilecxx . . $ CppUtilities/IniFile#::datacxx . . $ CppUtilities/IniFile#data(5d1a34a8a2f26b20).() |
| 47 | { |
| 48 | return m_datacxx . . $ CppUtilities/IniFile#m_data.; |
| 49 | } |
| 50 | |
| 51 | /*! |
| 52 | * \brief Returns the data of the file. |
| 53 | * \remarks The returned pairs represent the [scope names] and the contained "key = value"-pairs. |
| 54 | */ |
| 55 | inline const IniFilecxx . . $ CppUtilities/IniFile#::ScopeListcxx . . $ CppUtilities/IniFile#ScopeList# &IniFilecxx . . $ CppUtilities/IniFile#::datacxx . . $ CppUtilities/IniFile#data(805782128512b729).() const |
| 56 | { |
| 57 | return m_datacxx . . $ CppUtilities/IniFile#m_data.; |
| 58 | } |
| 59 | |
| 60 | enum class IniFileParseOptionscxx . . $ CppUtilities/IniFileParseOptions# { |
| 61 | Nonecxx . . $ CppUtilities/IniFileParseOptions#None. = 0, |
| 62 | }; |
| 63 | |
| 64 | enum class IniFileMakeOptionscxx . . $ CppUtilities/IniFileMakeOptions# { |
| 65 | Nonecxx . . $ CppUtilities/IniFileMakeOptions#None. = 0, |
| 66 | }; |
| 67 | |
| 68 | enum class IniFileFieldFlagscxx . . $ CppUtilities/IniFileFieldFlags# { |
| 69 | Nonecxx . . $ CppUtilities/IniFileFieldFlags#None. = 0, |
| 70 | HasValuecxx . . $ CppUtilities/IniFileFieldFlags#HasValue. = (1 << 0), |
| 71 | }; |
| 72 | |
| 73 | enum class IniFileSectionFlagscxx . . $ CppUtilities/IniFileSectionFlags# { |
| 74 | Nonecxx . . $ CppUtilities/IniFileSectionFlags#None. = 0, |
| 75 | Implicitcxx . . $ CppUtilities/IniFileSectionFlags#Implicit. = (1 << 0), |
| 76 | Truncatedcxx . . $ CppUtilities/IniFileSectionFlags#Truncated. = (1 << 1), |
| 77 | }; |
| 78 | |
| 79 | struct CPP_UTILITIES_EXPORTcxx . . $ `global.h:11:9`! AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile# { |
| 80 | struct Fieldcxx . . $ CppUtilities/AdvancedIniFile#Field# { |
| 81 | stdcxx . . $ std/::stringcxx . . $ std/string# keycxx . . $ CppUtilities/AdvancedIniFile#Field#key.; |
| 82 | stdcxx . . $ std/::stringcxx . . $ std/string# valuecxx . . $ CppUtilities/AdvancedIniFile#Field#value.; |
| 83 | stdcxx . . $ std/::stringcxx . . $ std/string# precedingCommentBlockcxx . . $ CppUtilities/AdvancedIniFile#Field#precedingCommentBlock.; |
| 84 | stdcxx . . $ std/::stringcxx . . $ std/string# followingInlineCommentcxx . . $ CppUtilities/AdvancedIniFile#Field#followingInlineComment.; |
| 85 | stdcxx . . $ std/::size_tcxx . . $ std/size_t# paddedKeyLengthcxx . . $ CppUtilities/AdvancedIniFile#Field#paddedKeyLength. = 0; |
| 86 | IniFileFieldFlagscxx . . $ CppUtilities/IniFileFieldFlags# flagscxx . . $ CppUtilities/AdvancedIniFile#Field#flags. = IniFileFieldFlagscxx . . $ CppUtilities/IniFileFieldFlags#::HasValuecxx . . $ CppUtilities/IniFileFieldFlags#HasValue.; |
| 87 | }; |
| 88 | using FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList# = stdcxx . . $ std/::vectorcxx . . $ std/vector#<Fieldcxx . . $ CppUtilities/AdvancedIniFile#Field#>; |
| 89 | struct Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section# { |
| 90 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(ec430cc680812467).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key); |
| 91 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(c240c26a25bfada5).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const; |
| 92 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(fe6837d4c2a20def).(FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key); |
| 93 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(1a95af1c0c3820f5).(FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const; |
| 94 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# fieldEndcxx . . $ CppUtilities/AdvancedIniFile#Section#fieldEnd(704b81716f3b9e5e).(); |
| 95 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# fieldEndcxx . . $ CppUtilities/AdvancedIniFile#Section#fieldEnd(5b3e2caf5efbde3a).() const; |
| 96 | |
| 97 | stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ CppUtilities/AdvancedIniFile#Section#name.; |
| 98 | FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList# fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields.; |
| 99 | stdcxx . . $ std/::stringcxx . . $ std/string# precedingCommentBlockcxx . . $ CppUtilities/AdvancedIniFile#Section#precedingCommentBlock.; |
| 100 | stdcxx . . $ std/::stringcxx . . $ std/string# followingInlineCommentcxx . . $ CppUtilities/AdvancedIniFile#Section#followingInlineComment.; |
| 101 | IniFileSectionFlagscxx . . $ CppUtilities/IniFileSectionFlags# flagscxx . . $ CppUtilities/AdvancedIniFile#Section#flags. = IniFileSectionFlagscxx . . $ CppUtilities/IniFileSectionFlags#::Nonecxx . . $ CppUtilities/IniFileSectionFlags#None.; |
| 102 | }; |
| 103 | using SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList# = stdcxx . . $ std/::vectorcxx . . $ std/vector#<Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#>; |
| 104 | |
| 105 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(67f506aeaaf235ee).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName); |
| 106 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(b138e5fc79e04729).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) const; |
| 107 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(fd11b401c6c043af).(SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName); |
| 108 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(93c06af2fa8f08f2).(SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) const; |
| 109 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# sectionEndcxx . . $ CppUtilities/AdvancedIniFile#sectionEnd(fead5ec3434bb986).(); |
| 110 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# sectionEndcxx . . $ CppUtilities/AdvancedIniFile#sectionEnd(8a7d2b2c05a7b3e7).() const; |
| 111 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator#> findFieldcxx . . $ CppUtilities/AdvancedIniFile#findField(4cd1aedc7977d9ad).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key); |
| 112 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator#> findFieldcxx . . $ CppUtilities/AdvancedIniFile#findField(f6bd54234f19c4ad).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const; |
| 113 | void parsecxx . . $ CppUtilities/AdvancedIniFile#parse(d9a2730576a3dc9e).(stdcxx . . $ std/::istreamcxx . . $ std/istream# &inputStream, IniFileParseOptionscxx . . $ CppUtilities/IniFileParseOptions# options = IniFileParseOptionscxx . . $ CppUtilities/IniFileParseOptions#::Nonecxx . . $ CppUtilities/IniFileParseOptions#None.); |
| 114 | void makecxx . . $ CppUtilities/AdvancedIniFile#make(3110db1ef2ba6445).(stdcxx . . $ std/::ostreamcxx . . $ std/ostream# &outputStream, IniFileMakeOptionscxx . . $ CppUtilities/IniFileMakeOptions# options = IniFileMakeOptionscxx . . $ CppUtilities/IniFileMakeOptions#::Nonecxx . . $ CppUtilities/IniFileMakeOptions#None.); |
| 115 | |
| 116 | SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList# sectionscxx . . $ CppUtilities/AdvancedIniFile#sections.; |
| 117 | }; |
| 118 | |
| 119 | /*! |
| 120 | * \brief Returns an iterator to the first section with the name \a sectionName. |
| 121 | */ |
| 122 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(67f506aeaaf235ee).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) |
| 123 | { |
| 124 | return stdcxx . . $ std/::find_ifcxx . . $ std/find_if(f0a0a4f94ee5cb00).(sectionscxx . . $ CppUtilities/AdvancedIniFile#sections..begincxx . . $ std/vector#begin(55a6de06420d4903).(), sectionscxx . . $ CppUtilities/AdvancedIniFile#sections..endcxx . . $ std/vector#end(55a6de06420d4903).(), [§ionName](const auto &scope) { return scope.name == sectionName; }); |
| 125 | } |
| 126 | |
| 127 | /*! |
| 128 | * \brief Returns an iterator to the first section with the name \a sectionName. |
| 129 | */ |
| 130 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(b138e5fc79e04729).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) const |
| 131 | { |
| 132 | return const_castcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).<AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile# *>(this)->findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(67f506aeaaf235ee).(sectionNamecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 133 | } |
| 134 | |
| 135 | /*! |
| 136 | * \brief Returns an iterator to the first section with the name \a sectionName which comes after \a after. |
| 137 | */ |
| 138 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(fd11b401c6c043af).(SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) |
| 139 | { |
| 140 | return stdcxx . . $ std/::find_ifcxx . . $ std/find_if(f0a0a4f94ee5cb00).(after +cxx . . $ __gnu_cxx/__normal_iterator#operator+(192bf940fa7bb3b2). 1, sectionscxx . . $ CppUtilities/AdvancedIniFile#sections..endcxx . . $ std/vector#end(55a6de06420d4903).(), [§ionName](const auto &scope) { return scope.name == sectionName; }); |
| 141 | } |
| 142 | |
| 143 | /*! |
| 144 | * \brief Returns an iterator to the first section with the name \a sectionName which comes after \a after. |
| 145 | */ |
| 146 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(93c06af2fa8f08f2).(SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName) const |
| 147 | { |
| 148 | return const_castcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).<AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile# *>(this)->findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(fd11b401c6c043af).(after, sectionNamecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 149 | } |
| 150 | |
| 151 | /*! |
| 152 | * \brief Returns an iterator that points one past the last section. |
| 153 | */ |
| 154 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::sectionEndcxx . . $ CppUtilities/AdvancedIniFile#sectionEnd(fead5ec3434bb986).() |
| 155 | { |
| 156 | return sectionscxx . . $ CppUtilities/AdvancedIniFile#sections..endcxx . . $ std/vector#end(55a6de06420d4903).(); |
| 157 | } |
| 158 | |
| 159 | /*! |
| 160 | * \brief Returns an iterator that points one past the last section. |
| 161 | */ |
| 162 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::sectionEndcxx . . $ CppUtilities/AdvancedIniFile#sectionEnd(8a7d2b2c05a7b3e7).() const |
| 163 | { |
| 164 | return sectionscxx . . $ CppUtilities/AdvancedIniFile#sections..endcxx . . $ std/vector#end(d1e1699016b9d7e6).(); |
| 165 | } |
| 166 | |
| 167 | /*! |
| 168 | * \brief Returns an iterator to the first field within the first section with matching \a sectionName and \a key. |
| 169 | */ |
| 170 | inline stdcxx . . $ std/::optionalcxx . . $ std/optional#<AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator#> AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#findField(4cd1aedc7977d9ad).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) |
| 171 | { |
| 172 | const SectionListcxx . . $ CppUtilities/AdvancedIniFile#SectionList#::iteratorcxx . . $ std/vector#iterator# scope = findSectioncxx . . $ CppUtilities/AdvancedIniFile#findSection(67f506aeaaf235ee).(sectionNamecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 173 | if (scope ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). sectionEndcxx . . $ CppUtilities/AdvancedIniFile#sectionEnd(fead5ec3434bb986).()) { |
| 174 | return stdcxx . . $ std/optional#optional(eb2253fdec8870b5).::nulloptcxx . . $ std/nullopt.; |
| 175 | } |
| 176 | const FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# field = scope->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(ec430cc680812467).(keycxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 177 | if (field ==cxx . . $ __gnu_cxx/`operator==`(30ee64f2df4eef8b). scope->cxx . . $ __gnu_cxx/__normal_iterator#`operator->`(65c2ec7035a77d3e).fieldEndcxx . . $ CppUtilities/AdvancedIniFile#Section#fieldEnd(704b81716f3b9e5e).()) { |
| 178 | return stdcxx . . $ std/optional#optional(eb2253fdec8870b5).::nulloptcxx . . $ std/nullopt.; |
| 179 | } |
| 180 | return fieldcxx . . $ std/optional#optional(e3f0d6382bd52f24).; |
| 181 | } |
| 182 | |
| 183 | /*! |
| 184 | * \brief Returns an iterator to the first field within the first section with matching \a sectionName and \a key. |
| 185 | */ |
| 186 | inline stdcxx . . $ std/::optionalcxx . . $ std/optional#<AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator#> AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#findField(f6bd54234f19c4ad).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# sectionName, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const |
| 187 | { |
| 188 | return const_castcxx . . $ std/optional#optional(a2a857736dc5363f).<AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile# *>(this)->findFieldcxx . . $ CppUtilities/AdvancedIniFile#findField(4cd1aedc7977d9ad).(sectionNamecxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02)., keycxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 189 | } |
| 190 | |
| 191 | /*! |
| 192 | * \brief Returns an iterator to the first field with the key \a key. |
| 193 | */ |
| 194 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(ec430cc680812467).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) |
| 195 | { |
| 196 | return stdcxx . . $ std/::find_ifcxx . . $ std/find_if(f0a0a4f94ee5cb00).(fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields..begincxx . . $ std/vector#begin(55a6de06420d4903).(), fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields..endcxx . . $ std/vector#end(55a6de06420d4903).(), [&key](const auto &field) { return field.key == key; }); |
| 197 | } |
| 198 | |
| 199 | /*! |
| 200 | * \brief Returns an iterator to the first field with the key \a key. |
| 201 | */ |
| 202 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(c240c26a25bfada5).(stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const |
| 203 | { |
| 204 | return const_castcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).<Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section# *>(this)->findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(ec430cc680812467).(keycxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 205 | } |
| 206 | |
| 207 | /*! |
| 208 | * \brief Returns an iterator to the first field with the key \a key which comes after \a after. |
| 209 | */ |
| 210 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(fe6837d4c2a20def).(FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) |
| 211 | { |
| 212 | return stdcxx . . $ std/::find_ifcxx . . $ std/find_if(f0a0a4f94ee5cb00).(after +cxx . . $ __gnu_cxx/__normal_iterator#operator+(192bf940fa7bb3b2). 1, fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields..endcxx . . $ std/vector#end(55a6de06420d4903).(), [&key](const auto &field) { return field.key == key; }); |
| 213 | } |
| 214 | |
| 215 | /*! |
| 216 | * \brief Returns an iterator to the first field with the key \a key which comes after \a after. |
| 217 | */ |
| 218 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(1a95af1c0c3820f5).(FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# after, stdcxx . . $ std/::string_viewcxx . . $ std/string_view# key) const |
| 219 | { |
| 220 | return const_castcxx . . $ __gnu_cxx/__normal_iterator#__normal_iterator(459a7e7b9fbe7640).<Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section# *>(this)->findFieldcxx . . $ CppUtilities/AdvancedIniFile#Section#findField(fe6837d4c2a20def).(after, keycxx . . $ std/basic_string_view#basic_string_view(b419d9def655ef02).); |
| 221 | } |
| 222 | |
| 223 | /*! |
| 224 | * \brief Returns an iterator that points one past the last field. |
| 225 | */ |
| 226 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::iteratorcxx . . $ std/vector#iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::fieldEndcxx . . $ CppUtilities/AdvancedIniFile#Section#fieldEnd(704b81716f3b9e5e).() |
| 227 | { |
| 228 | return fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields..endcxx . . $ std/vector#end(55a6de06420d4903).(); |
| 229 | } |
| 230 | |
| 231 | /*! |
| 232 | * \brief Returns an iterator that points one past the last field. |
| 233 | */ |
| 234 | inline AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::FieldListcxx . . $ CppUtilities/AdvancedIniFile#FieldList#::const_iteratorcxx . . $ std/vector#const_iterator# AdvancedIniFilecxx . . $ CppUtilities/AdvancedIniFile#::Sectioncxx . . $ CppUtilities/AdvancedIniFile#Section#::fieldEndcxx . . $ CppUtilities/AdvancedIniFile#Section#fieldEnd(5b3e2caf5efbde3a).() const |
| 235 | { |
| 236 | return fieldscxx . . $ CppUtilities/AdvancedIniFile#Section#fields..endcxx . . $ std/vector#end(d1e1699016b9d7e6).(); |
| 237 | } |
| 238 | |
| 239 | } // namespace CppUtilities |
| 240 | |
| 241 | CPP_UTILITIES_MARK_FLAG_ENUM_CLASScxx . . $ `misc/flagenumclass.h:18:9`!(CppUtilities, IniFileParseOptions); |
| 242 | CPP_UTILITIES_MARK_FLAG_ENUM_CLASScxx . . $ `misc/flagenumclass.h:18:9`!(CppUtilities, IniFileMakeOptions); |
| 243 | CPP_UTILITIES_MARK_FLAG_ENUM_CLASScxx . . $ `misc/flagenumclass.h:18:9`!(CppUtilities, IniFileFieldFlags); |
| 244 | CPP_UTILITIES_MARK_FLAG_ENUM_CLASScxx . . $ `misc/flagenumclass.h:18:9`!(CppUtilities, IniFileSectionFlags); |
| 245 | |
| 246 | #endif // IOUTILITIES_INIFILE_H |