diff options
Diffstat (limited to 'server/src/macrotool/dump.cc')
-rw-r--r-- | server/src/macrotool/dump.cc | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/server/src/macrotool/dump.cc b/server/src/macrotool/dump.cc index b567768..3d28181 100644 --- a/server/src/macrotool/dump.cc +++ b/server/src/macrotool/dump.cc @@ -104,12 +104,12 @@ static std::map<std::string, struct _macro> macroList() parser.parse(); Macro *macro = parser.getMacro(); - std::string key = macro->attributes["name"];// + "-" + macro->attributes["version"]; - macros[key].name = macro->attributes["name"]; + std::string key = macro->name;// + "-" + macro->version; + macros[key].name = macro->name; macros[key].file = *mfs; macros[key].title = macro->widgets.attributes["caption"]; macros[key].fields = getFields(macro->widgets); - macros[key].version = macro->attributes["version"]; + macros[key].version = macro->version; } catch( Exception &e ) { printf("Skipping: %s: %s\n", mfs->c_str(), e.what()); } @@ -127,8 +127,7 @@ static std::map<std::string, struct _macro> macroList() Template *t = parser.getTemplate(); std::vector<Macro>::iterator ms = t->macros.begin(); while(ms != t->macros.end()) { - if(ms->attributes.find("header") == ms->attributes.end()) - macros[ms->attributes["name"]].templates.insert(templ); + if(ms->isHeader) macros[ms->name].templates.insert(templ); ms++; } } catch( Exception &e ) { @@ -234,17 +233,16 @@ static std::map<std::string, struct _template> templateList() parser.parse(); Template *t = parser.getTemplate(); - std::string key = t->attributes["name"]; + std::string key = t->name; templates[key].file = *tfs; - templates[key].name = t->attributes["name"]; - templates[key].title = t->attributes["title"]; - templates[key].version = t->attributes["version"]; + templates[key].name = t->name; + templates[key].title = t->title; + templates[key].version = t->version; std::vector<Macro>::iterator ms = t->macros.begin(); while(ms != t->macros.end()) { - if(ms->attributes.find("header") == ms->attributes.end()) - templates[key].macros.push_back(ms->attributes["name"]); + if(ms->isHeader) templates[key].macros.push_back(ms->name); ms++; } } catch( Exception &e ) { |