#include <Parser.h>
|
virtual void | walk (const std::string &, const std::string &, hit::Node *section) override |
|
|
std::vector< std::string > | errors |
|
Definition at line 61 of file Parser.h.
◆ walk()
void BadActiveWalker::walk |
( |
const std::string & |
, |
|
|
const std::string & |
, |
|
|
hit::Node * |
section |
|
) |
| |
|
overridevirtual |
Definition at line 216 of file Parser.C.
220 auto actives = section->find(
"active");
221 auto inactives = section->find(
"inactive");
223 if (actives && inactives && actives->type() == hit::NodeType::Field &&
224 inactives->type() == hit::NodeType::Field && actives->parent() == inactives->parent())
227 hit::errormsg(section,
"'active' and 'inactive' parameters both provided in section"));
232 if (actives && actives->type() == hit::NodeType::Field && actives->parent() == section)
234 auto vars = section->param<std::vector<std::string>>(
"active");
235 std::string msg =
"";
236 for (
auto & var :
vars)
238 if (!section->find(var))
243 msg = msg.substr(0, msg.size() - 2);
244 errors.push_back(hit::errormsg(section,
245 "variables listed as active (",
249 "' not found in input"));
253 if (inactives && inactives->type() == hit::NodeType::Field && inactives->parent() == section)
255 auto vars = section->param<std::vector<std::string>>(
"inactive");
256 std::string msg =
"";
257 for (
auto & var :
vars)
259 if (!section->find(var))
264 msg = msg.substr(0, msg.size() - 2);
265 errors.push_back(hit::errormsg(section,
266 "variables listed as inactive (",
270 "' not found in input"));
std::vector< std::string > errors
◆ errors
std::vector<std::string> BadActiveWalker::errors |
The documentation for this class was generated from the following files: