24 const std::string& tag);
45 std::vector<std::string_view> lines =
split(
strip(node_str),
"\n");
46 for (
int i = 0; i < lines.size(); i++)
48 auto stripped_line =
strip(lines[i]);
49 std::vector<std::string_view> tokens =
split(stripped_line,
" ");
52 std::ostringstream
error;
53 error <<
error_tag <<
"reference point has 4 entries, given " << tokens.size() <<
": " << lines[i];
63 rp[d] = std::stod(std::string(tokens[d + 1].begin(), tokens[d + 1].size()));
65 catch (
const std::invalid_argument& ia)
73 points_[std::string(tokens[0].begin(), tokens[0].size())] = rp;
86 value_label =
"referencepoints";
std::any assignAnyEnum(const std::string &name) const override
Derived class overrides this to get proper assignment of scoped enum values.
helper functions for EinsplineSetBuilder
std::string_view strip(const string_view s)
std::any makeReferencePointsInput(xmlNodePtr cur, std::string &value_label)
factory function used by InputSection to make reference points Input
void readRefPointsXML(xmlNodePtr cur)
static constexpr std::string_view error_tag
std::string strip(const std::string &s)
void error(char const *m)
std::vector< std::string > split(const std::string &s)
#define LAMBDA_setIfInInput
If tag is present in input_secution set its variable.
This a subclass for runtime errors that will occur on all ranks.
void readXML(xmlNodePtr cur)
Read variable values (initialize) from XML input, call checkValid.
static std::any lookupAnyEnum(const std::string &enum_name, const std::string &enum_value, const std::unordered_map< std::string, std::any > &enum_map)
Assign any enum helper for InputSection derived class assumes enum lookup table of this form: inline ...
ReferencePointsInput()=default
Unlike many input classes ReferencePointInputs needs a way to be constructured even if there is no in...
static const std::unordered_map< std::string, std::any > lookup_input_enum_value
mapping for enumerated options of ReferencePointsInput This data object is the basis of input enum st...
convert xmlNode contents into a std::string
std::vector< std::string_view > split(const string_view s, const string_view delimiters)
ReferencePointsInputSection input_section_