crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
main.hpp
Go to the documentation of this file.
1 /*
2  *
3  * ---
4  *
5  * Copyright (C) 2021 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  * main.hpp
24  *
25  * Helper function for main() and additional commenting for doxygen.
26  *
27  * Created on: Mai 24, 2020
28  * Author: ans
29  */
30 
31 #ifndef MAIN_HPP_
32 #define MAIN_HPP_
33 
34 #include "Main/App.hpp"
35 
36 #include <string> // std::string
37 #include <vector> // std::vector
38 
40 namespace crawlservpp {
41 
42  /*
43  * DECLARATION
44  */
45 
46  std::vector<std::string> vectorize(int argc, char ** argv);
47 
48  /*
49  * IMPLEMENTATION
50  */
51 
53 
68  std::vector<std::string> vectorize(int argc, char ** argv) {
69  std::vector<std::string> result;
70 
71  for(int n{}; n < argc; ++n) {
72  result.emplace_back(argv[n]);
73  }
74 
75  return result;
76  }
77 } /* namespace crawlservpp */
78 
79 #endif /* MAIN_HPP_ */
80 
81 /*
82  * ADDITIONAL COMMENTING FOR DOXYGEN
83  */
84 
99 
104 
109 
std::vector< std::string > vectorize(int argc, char **argv)
Vectorizes the given arguments to the program.
Definition: main.hpp:68
The global namespace of crawlserv++.