MCPcopy Create free account
hub / github.com/NanoMichael/MicroTeX / parseParameters

Method parseParameters

src/res/parser/font_parser.cpp:359–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359void DefaultTeXFontParser::parseParameters(_out_ map<string, float>& res) throw(ex_res_parse) {
360 const XMLElement* parameters = _root->FirstChildElement("Parameters");
361 if (parameters == nullptr) throw ex_xml_parse(RESOURCE_NAME, "Parameter");
362
363 const XMLAttribute* attr = parameters->FirstAttribute();
364 // iterate all attributes
365 while (attr != nullptr) {
366 const string name = attr->Name();
367 float value = getFloatAndCheck(name.c_str(), parameters);
368 res[name] = value;
369 attr = attr->Next();
370 }
371}
372
373void DefaultTeXFontParser::parseGeneralSettings(_out_ map<string, float>& res) throw(ex_res_parse) {
374 const XMLElement* settings = _root->FirstChildElement("GeneralSettings");

Callers

nothing calls this directly

Calls 3

ex_xml_parseClass · 0.85
FirstChildElementMethod · 0.80
NameMethod · 0.80

Tested by

no test coverage detected