JASSv2
JASS_anytime_thread_result.h
Go to the documentation of this file.
1 /*
2  JASS_ANYTIME_THREAD_RESULT.H
3  ----------------------------
4  Copyright (c) 2017 Andrew Trotman
5  Released under the 2-clause BSD license (See:https://en.wikipedia.org/wiki/BSD_licenses)
6 */
13 #pragma once
14 
15 #include <map>
16 
17 #include "JASS_anytime_result.h"
18 
19 /*
20  CLASS JASS_ANYTIME_THREAD_RESULT
21  --------------------------------
22 */
27  {
28  public:
29  std::map<std::string, JASS_anytime_result> results;
30 
31  public:
32  /*
33  JASS_ANYTIME_THREAD_RESULT::JASS_ANYTIME_THREAD_RESULT()
34  --------------------------------------------------------
35  */
37  {
38  /* Nothing */
39  }
40 
41  /*
42  JASS_ANYTIME_THREAD_RESULT::PUSH_BACK()
43  ---------------------------------------
44  */
52  void push_back(const std::string &query_id, const std::string &query, const std::string &results_list, size_t postings_processed, size_t search_time_in_ns)
53  {
54  results[query_id] = JASS_anytime_result(query_id, query, results_list, postings_processed, search_time_in_ns);
55  }
56 
57  /*
58  JASS_ANYTIME_THREAD_RESULT::BEGIN()
59  -----------------------------------
60  */
61  std::map<std::string, JASS_anytime_result>::iterator begin()
62  {
63  return results.begin();
64  }
65 
66  /*
67  JASS_ANYTIME_THREAD_RESULT::END()
68  ---------------------------------
69  */
70  std::map<std::string, JASS_anytime_result>::iterator end()
71  {
72  return results.end();
73  }
74  };
std::map< std::string, JASS_anytime_result > results
The results from each query (keyed on the query id)
Definition: JASS_anytime_thread_result.h:29
Definition: JASS_anytime_result.h:23
void push_back(const std::string &query_id, const std::string &query, const std::string &results_list, size_t postings_processed, size_t search_time_in_ns)
Definition: JASS_anytime_thread_result.h:52
Results from a single thread of execution in parallel search.
Definition: JASS_anytime_thread_result.h:26
The results of a single query.