#include <Parser.h>
|
virtual void | walk (const std::string &, const std::string &, hit::Node *section) override |
|
|
std::vector< hit::ErrorMessage > | errors |
|
Definition at line 48 of file Parser.h.
◆ walk()
void BadActiveWalker::walk |
( |
const std::string & |
fullpath, |
|
|
const std::string & |
, |
|
|
hit::Node * |
section |
|
) |
| |
|
overridevirtual |
Definition at line 210 of file Parser.C.
214 auto actives = section->find(
"active");
215 auto inactives = section->find(
"inactive");
217 if (actives && inactives && actives->type() == hit::NodeType::Field &&
218 inactives->type() == hit::NodeType::Field && actives->parent() == inactives->parent())
221 "'active' and 'inactive' parameters both provided in section '" + fullpath +
"'", section);
226 if (actives && actives->type() == hit::NodeType::Field && actives->parent() == section)
228 auto vars = section->param<std::vector<std::string>>(
"active");
229 std::string msg =
"";
230 for (
auto & var :
vars)
232 if (!section->find(var))
237 msg = msg.substr(0, msg.size() - 2);
238 errors.emplace_back(
"variables listed as active (" + msg +
") in section '" +
239 section->fullpath() +
"' not found in input",
244 if (inactives && inactives->type() == hit::NodeType::Field && inactives->parent() == section)
246 auto vars = section->param<std::vector<std::string>>(
"inactive");
247 std::string msg =
"";
248 for (
auto & var :
vars)
250 if (!section->find(var))
255 msg = msg.substr(0, msg.size() - 2);
256 errors.emplace_back(
"variables listed as inactive (" + msg +
") in section '" +
257 section->fullpath() +
"' not found in input",
std::vector< hit::ErrorMessage > errors
◆ errors
std::vector<hit::ErrorMessage> BadActiveWalker::errors |
The documentation for this class was generated from the following files: