summaryrefslogtreecommitdiff
path: root/server/src/macrotool/dump.cc
diff options
context:
space:
mode:
authordeva <deva>2011-07-01 11:54:26 +0000
committerdeva <deva>2011-07-01 11:54:26 +0000
commit23f39df8b8edeacfa5821050abbdc855acb2edd6 (patch)
treee56f7826c361a85a3bac9e0b3206086c81114748 /server/src/macrotool/dump.cc
parent2c53b5ef16626112dfc738420eec3e1963b1a343 (diff)
removed macrotool.
add lua wrapper for praxisd. new type attributes_t for sax parser and children. make macros/templates use real vars instead of var map. add data ttl on macro level. add 'important' attribute to macrotags in templates.
Diffstat (limited to 'server/src/macrotool/dump.cc')
-rw-r--r--server/src/macrotool/dump.cc20
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 ) {