JASSv2
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
JASS_anytime_query Class Reference

A query within the anytime parallel search system. More...

#include <JASS_anytime_query.h>

Public Member Functions

 JASS_anytime_query ()=delete
 Constructor.
 
 JASS_anytime_query (const std::string &query)
 Constructor. More...
 
 JASS_anytime_query (JASS_anytime_query &&original)
 Move Constructor. More...
 

Static Public Member Functions

static std::string get_next_query (std::vector< JASS_anytime_query > &list, size_t &starting_from)
 Given a list of queries, return the next un-taken query. More...
 

Public Attributes

std::atomic< uint8_t > taken
 Has this query been "taken" by a thread and processed.
 
std::string query
 The query.
 

Detailed Description

A query within the anytime parallel search system.

Constructor & Destructor Documentation

◆ JASS_anytime_query() [1/2]

JASS_anytime_query::JASS_anytime_query ( const std::string &  query)
inline

Constructor.

Parameters
query[in] this node represents this query (which is copied)

◆ JASS_anytime_query() [2/2]

JASS_anytime_query::JASS_anytime_query ( JASS_anytime_query &&  original)
inline

Move Constructor.

Parameters
original[in] the node to copy

Member Function Documentation

◆ get_next_query()

static std::string JASS_anytime_query::get_next_query ( std::vector< JASS_anytime_query > &  list,
size_t &  starting_from 
)
inlinestatic

Given a list of queries, return the next un-taken query.

Parameters
list[in] The list to search in
starging_from[in/out] Where to start searching (should initially be 0, updated to the current node)
Returns
A copy of the string representing the query

remember that compare_exchange_strong might unexpectedly fail so we loop over the node we're looking at


The documentation for this class was generated from the following file: