ParallelSearch/ParallelSearch.hpp

43 lines
838 B
C++

#ifndef PARALLELSEARCH_HPP
#define PARALLELSEARCH_HPP
#include <string>
#include <vector>
#include "SearchJob.hpp"
template <typename Iterator>
class ParallelSearch
{
public:
// Type of the search result
typedef std::vector<Iterator> ResultList;
// underlying search jobs
typedef std::vector<SearchJob<Iterator>> JobList;
// Create partial search job for provided range
SearchJob(unsigned workerCount, Iterator begin, Iterator end, const std::string& pattern)
{
}
// Destructor
~SearchJob()
{
}
// run the search job and collect results internally
void run()
{
}
// return the result
const ResultList& GetResult() const { return result_; };
private:
// jobs to execute
JobList jobList_;
// result of the search
ResultList result_;
};
#endif