crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
ModuleOptions.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  * ModuleOptions.hpp
24  *
25  * Module options (thread ID, website ID and namespace, URL list ID and namespace).
26  *
27  * Created on: May 8, 2019
28  * Author: ans
29  */
30 
31 #ifndef STRUCT_MODULEOPTIONS_HPP_
32 #define STRUCT_MODULEOPTIONS_HPP_
33 
34 #include <cstdint> // std::uint64_t
35 #include <string> // std::string
36 
37 namespace crawlservpp::Struct {
38 
40  struct ModuleOptions {
43 
45  std::uint64_t threadId{};
46 
48  std::uint64_t websiteId{};
49 
51  std::string websiteNamespace;
52 
54  std::uint64_t urlListId{};
55 
57  std::string urlListNamespace;
58 
62 
64  ModuleOptions() = default;
65 
67 
81  std::uint64_t setThreadId,
82  std::uint64_t setWebsiteId,
83  const std::string& setWebsiteNamespace,
84  std::uint64_t setUrlListId,
85  const std::string& setUrlListNamespace
86  ) : threadId(setThreadId),
87  websiteId(setWebsiteId),
88  websiteNamespace(setWebsiteNamespace),
89  urlListId(setUrlListId),
90  urlListNamespace(setUrlListNamespace) {}
91 
93  };
94 
95 } /* namespace crawlservpp::Struct */
96 
97 #endif /* STRUCT_MODULEOPTIONS_HPP_ */
std::string urlListNamespace
The namespace of the URL list used by the thread.
Definition: ModuleOptions.hpp:57
std::uint64_t websiteId
The ID of the website used by the thread.
Definition: ModuleOptions.hpp:48
std::uint64_t urlListId
The ID of the URL list used by the thread.
Definition: ModuleOptions.hpp:54
std::string websiteNamespace
The namespace of the website used by the thread.
Definition: ModuleOptions.hpp:51
Module options containing the thread ID, as well as ID and namespace of website and URL list used by ...
Definition: ModuleOptions.hpp:40
ModuleOptions(std::uint64_t setThreadId, std::uint64_t setWebsiteId, const std::string &setWebsiteNamespace, std::uint64_t setUrlListId, const std::string &setUrlListNamespace)
Constructor setting the basic module options for the thread.
Definition: ModuleOptions.hpp:80
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43
ModuleOptions()=default
Default constructor.
std::uint64_t threadId
The ID of the thread.
Definition: ModuleOptions.hpp:45