Knight's Tour Generator
Tourneys and the Fast Generation and Obfuscation of Closed Knight's Tours
Public Member Functions | Private Member Functions | List of all members
CSearchThread Class Reference

Search thread. More...

#include <SearchThread.h>

Inheritance diagram for CSearchThread:
CSearchThreadQueues

Public Member Functions

void operator() ()
 The code that gets run by each thread. More...
 

Private Member Functions

void Generate (CSearchRequest &request)
 Generate knight's tour/tourney. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from CSearchThreadQueues
static CThreadSafeQueue< CSearchRequestm_cSearchRequest
 Search request queue.
 
static CThreadSafeQueue< CSearchResultm_cSearchResult
 Search result queue.
 

Detailed Description

The code that is run in each search thread, consisting of the generation code and an override for operator() so that threads can be created in the approved C++ manner.

Definition at line 41 of file SearchThread.h.

Member Function Documentation

◆ Generate()

void CSearchThread::Generate ( CSearchRequest request)
private

Generate a knight's tour or tourney according to a search request.

Parameters
requestSearch request.

Definition at line 51 of file SearchThread.cpp.

◆ operator()()

void CSearchThread::operator() ( )

The function executed by a search thread, which repeatedly pops a search request from the thread-safe request queue m_cSearchRequest and calls Generate() to perform the requested search. The thread terminates when the request queue is empty.

Definition at line 41 of file SearchThread.cpp.