diff options
author | deva <deva> | 2009-02-11 07:14:22 +0000 |
---|---|---|
committer | deva <deva> | 2009-02-11 07:14:22 +0000 |
commit | 4df8884f155f7558c07949426c248e066df7936f (patch) | |
tree | 61030bad443e366b8fb0e097200693ab56df01c4 /server/src/queryresult.h | |
parent | bbe2b5f899a9c1bd7c99181f8702ec03c60f3028 (diff) |
Added QueryHandler for both Pentominos and Pracro. Added source string to all values, and use these to set the prefill value in the macros.
Diffstat (limited to 'server/src/queryresult.h')
-rw-r--r-- | server/src/queryresult.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/src/queryresult.h b/server/src/queryresult.h index 617d957..649f975 100644 --- a/server/src/queryresult.h +++ b/server/src/queryresult.h @@ -34,8 +34,25 @@ class QueryResult { public: time_t timestamp; + std::string source; std::map< std::string, std::string > values; std::map< std::string, QueryResult > groups; + + void print(std::string tabs = "") { + printf("%sTimestamp: %d\n", tabs.c_str(), (int)timestamp); + printf("%sSource: %s\n", tabs.c_str(), source.c_str()); + printf("%sValues:\n", tabs.c_str()); + for(std::map< std::string, std::string >::iterator i = values.begin(); i != values.end(); i++) { + printf("%s[%s] => [%s]\n", tabs.c_str(), i->first.c_str(), i->second.c_str()); + } + printf("%s{\n", tabs.c_str()); + for(std::map< std::string, QueryResult >::iterator i = groups.begin(); i != groups.end(); i++) { + printf("%s[%s] =>:\n", tabs.c_str(), i->first.c_str()); + i->second.print(tabs +" "); + } + printf("%s}\n", tabs.c_str()); + + } }; #endif/*__PRACRO_QUERYRESULT_H__*/ |