MCPcopy Create free account
hub / github.com/OpenVPN/openvpn3-linux / IsPresent

Method IsPresent

src/common/configfileparser.cpp:177–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176
177bool File::IsPresent(const std::string &key)
178{
179 configure_mapping();
180
181 auto it = std::find_if(map.begin(),
182 map.end(),
183 [key](OptionMapEntry &e)
184 {
185 return key == e.option;
186 });
187 if (it == map.end())
188 {
189 throw OptionNotFound(key);
190 }
191
192 return it->present;
193}
194
195
196const std::string File::GetValue(const std::string &key)

Callers 2

manage_config_fileFunction · 0.80
TEST_FFunction · 0.80

Calls 1

OptionNotFoundClass · 0.85

Tested by 1

TEST_FFunction · 0.64