#include <Parser.h>
|
| virtual std::string | eval (hit::Field *n, const std::list< std::string > &args, hit::BraceExpander &exp) |
| |
Definition at line 43 of file Parser.h.
◆ eval()
| std::string RepeatEvaler::eval |
( |
hit::Field * |
n, |
|
|
const std::list< std::string > & |
args, |
|
|
hit::BraceExpander & |
exp |
|
) |
| |
|
virtual |
Definition at line 190 of file Parser.C.
192 std::vector<std::string> argv;
193 argv.insert(argv.begin(), args.begin(), args.end());
195 if (argv.size() != 2)
197 exp.errors.emplace_back(
198 "repeat error: Expected 2 arguments ${repeat name count} in '" + n->fullpath() +
"'", n);
202 const auto & count_arg = argv[1];
203 if (count_arg.empty() || count_arg.find_first_not_of(
"0123456789") != std::string::npos)
205 exp.errors.emplace_back(
"repeat error: count '" + count_arg +
206 "' is not a non-negative integer in '" + n->fullpath() +
"'",
211 const std::vector<std::string>
values(MooseUtils::convert<int>(count_arg), argv[0]);
std::array< Real, 2 > values
std::string stringJoin(const std::vector< std::string > &values, const std::string &separator=" ")
Concatenates value into a single string separated by separator.
The documentation for this class was generated from the following files: