summaryrefslogtreecommitdiff
path: root/server/src/queryparser.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/queryparser.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/queryparser.cc')
-rw-r--r--server/src/queryparser.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/src/queryparser.cc b/server/src/queryparser.cc
index 3d228f6..138b7ab 100644
--- a/server/src/queryparser.cc
+++ b/server/src/queryparser.cc
@@ -36,7 +36,7 @@ QueryParser::QueryParser()
stack.push_back(&result);
}
-void QueryParser::startTag(std::string name, std::map< std::string, std::string> attributes)
+void QueryParser::startTag(std::string name, attributes_t &attr)
{
if(name == "results") {
@@ -44,24 +44,24 @@ void QueryParser::startTag(std::string name, std::map< std::string, std::string>
}
if(name == "result") {
- this->timestamp = atol(attributes["timestamp"].c_str());
+ this->timestamp = atol(attr["timestamp"].c_str());
QueryResult q;
q.source = "pentominos";
q.timestamp = this->timestamp;
- stack.back()->groups[attributes["class"]] = q;
- stack.push_back(&stack.back()->groups[attributes["class"]]);
+ stack.back()->groups[attr["class"]] = q;
+ stack.push_back(&stack.back()->groups[attr["class"]]);
}
if(name == "group") {
QueryResult q;
q.timestamp = this->timestamp;
- stack.back()->groups[attributes["name"]] = q;
- stack.push_back(&stack.back()->groups[attributes["name"]]);
+ stack.back()->groups[attr["name"]] = q;
+ stack.push_back(&stack.back()->groups[attr["name"]]);
}
if(name == "value") {
- stack.back()->values[attributes["name"]] = utf8.decode(attributes["value"]);
+ stack.back()->values[attr["name"]] = utf8.decode(attr["value"]);
}
}