#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 215 of file Parser.C.
219 auto actives = section->find(
"active");
220 auto inactives = section->find(
"inactive");
222 if (actives && inactives && actives->type() == hit::NodeType::Field &&
223 inactives->type() == hit::NodeType::Field && actives->parent() == inactives->parent())
226 hit::errormsg(section,
"'active' and 'inactive' parameters both provided in section"));
231 if (actives && actives->type() == hit::NodeType::Field && actives->parent() == section)
233 auto vars = section->param<std::vector<std::string>>(
"active");
234 std::string msg =
"";
235 for (
auto & var : vars)
237 if (!section->find(var))
242 msg = msg.substr(0, msg.size() - 2);
243 errors.push_back(hit::errormsg(section,
244 "variables listed as active (",
248 "' not found in input"));
252 if (inactives && inactives->type() == hit::NodeType::Field && inactives->parent() == section)
254 auto vars = section->param<std::vector<std::string>>(
"inactive");
255 std::string msg =
"";
256 for (
auto & var : vars)
258 if (!section->find(var))
263 msg = msg.substr(0, msg.size() - 2);
264 errors.push_back(hit::errormsg(section,
265 "variables listed as inactive (",
269 "' 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: