From 192e0f80bd2da45f1c612411fded2e805ac205de Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 26 May 2008 13:56:30 +0000 Subject: Completed the prefilling of the fields, from the db and pentominos, according to their timestamps. --- server/src/queryparser.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/src/queryparser.cc') 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 = ""; @@ -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"]]); } -- cgit v1.2.3