crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
ThreadOptions.hpp
Go to the documentation of this file.
1 /*
2  *
3  * ---
4  *
5  * Copyright (C) 2020 Anselm Schmidt (ans[ät]ohai.su)
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version in addition to the terms of any
11  * licences already herein identified.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  *
21  * ---
22  *
23  * ThreadOptions.hpp
24  *
25  * Thread options (name of module, IDs of website, URL list and configuration).
26  *
27  * Created on: Oct 13, 2018
28  * Author: ans
29  */
30 
31 #ifndef STRUCT_THREADOPTIONS_HPP_
32 #define STRUCT_THREADOPTIONS_HPP_
33 
34 #include <cstdint> // std::uint64_t
35 #include <string> // std::string
36 
37 namespace crawlservpp::Struct {
38 
40  struct ThreadOptions {
43 
45  std::string module;
46 
48  std::uint64_t website{};
49 
51  std::uint64_t urlList{};
52 
54  std::uint64_t config{};
55 
59 
61  ThreadOptions() = default;
62 
64 
76  const std::string& setModule,
77  std::uint64_t setWebsite,
78  std::uint64_t setUrlList,
79  std::uint64_t setConfig)
80  : module(setModule),
81  website(setWebsite),
82  urlList(setUrlList),
83  config(setConfig) {}
84 
86  };
87 
88 } /* namespace crawlservpp::Struct */
89 
90 #endif /* STRUCT_THREADOPTIONS_HPP_ */
std::uint64_t config
The ID of the configuration used by the thread.
Definition: ThreadOptions.hpp:54
Thread options containing the name of the module run, as well as the IDs of the website, URL list, and configuration used.
Definition: ThreadOptions.hpp:40
ThreadOptions(const std::string &setModule, std::uint64_t setWebsite, std::uint64_t setUrlList, std::uint64_t setConfig)
Constructor setting the options of the thread.
Definition: ThreadOptions.hpp:75
ThreadOptions()=default
Default constructor.
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43
std::string module
The name of the module run by the thread.
Definition: ThreadOptions.hpp:45
std::uint64_t urlList
The ID of the URL list used by the thread.
Definition: ThreadOptions.hpp:51
std::uint64_t website
The ID of the website used by the thread.
Definition: ThreadOptions.hpp:48