diff options
author | deva <deva> | 2008-05-26 13:56:30 +0000 |
---|---|---|
committer | deva <deva> | 2008-05-26 13:56:30 +0000 |
commit | 192e0f80bd2da45f1c612411fded2e805ac205de (patch) | |
tree | 95407dd47edc6062a6250382ca345d320b7665be /server/src/queryparser.cc | |
parent | b0be417b31e2d2577c188a563d531889354b7617 (diff) |
Completed the prefilling of the fields, from the db and pentominos, according to their timestamps.
Diffstat (limited to 'server/src/queryparser.cc')
-rw-r--r-- | server/src/queryparser.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/queryparser.cc b/server/src/queryparser.cc index 187bc76..fc64c76 100644 --- a/server/src/queryparser.cc +++ b/server/src/queryparser.cc @@ -29,6 +29,7 @@ QueryParser::QueryParser(std::string document) { this->document = document; + this->timestamp = 0; // Make sure we always contain a valid xml document. if(this->document == "") this->document = "<xml></xml>"; @@ -40,8 +41,17 @@ QueryParser::QueryParser(std::string document) void QueryParser::startTag(std::string name, std::map< std::string, std::string> attributes) { + if(name == "results") { + // What to do here!? + } + + if(name == "result") { + this->timestamp = atol(attributes["timestamp"].c_str()); + } + if(name == "group") { QueryResult q; + q.timestamp = this->timestamp; stack.back()->groups[attributes["name"]] = q; stack.push_back(&stack.back()->groups[attributes["name"]]); } |