crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
TableProperties.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  * TableProperties.hpp
24  *
25  * Table properties (name, columns, data directory and compression).
26  *
27  * Created on: Mar 4, 2019
28  * Author: ans
29  */
30 
31 
32 #ifndef STRUCT_TABLEPROPERTIES_HPP_
33 #define STRUCT_TABLEPROPERTIES_HPP_
34 
35 #include "TableColumn.hpp"
36 
37 #include <string> // std::string
38 #include <vector> // std::vector
39 
40 namespace crawlservpp::Struct {
42  struct TableProperties {
45 
47  std::string name;
48 
50  std::vector<TableColumn> columns;
51 
53 
58  std::string dataDirectory;
59 
61  bool compressed{false};
62 
66 
68  TableProperties() = default;
69 
71 
89  const std::string& setName,
90  const std::vector<TableColumn>& setColumns,
91  const std::string& setDataDirectory,
92  bool setCompressed
93  ) : name(setName),
94  columns(setColumns),
95  dataDirectory(setDataDirectory),
96  compressed(setCompressed) {}
97 
99  };
100 
101 } /* namespace crawlservpp::Struct */
102 
103 #endif /* STRUCT_TABLEPROPERTIES_HPP_ */
104 
TableProperties(const std::string &setName, const std::vector< TableColumn > &setColumns, const std::string &setDataDirectory, bool setCompressed)
Constructor setting table properties.
Definition: TableProperties.hpp:88
std::vector< TableColumn > columns
Vector containing the columns of the table.
Definition: TableProperties.hpp:50
bool compressed
Indicates whether compression is active for this table.
Definition: TableProperties.hpp:61
Table properties containing its name, columns, data directory, and compression.
Definition: TableProperties.hpp:42
std::string dataDirectory
The data directory of the table.
Definition: TableProperties.hpp:58
TableProperties()=default
Default constructor.
std::string name
The name of the table.
Definition: TableProperties.hpp:47
Namespace for data structures.
Definition: AlgoThreadProperties.hpp:43