author | František Kučera <franta-hg@frantovo.cz> |
Thu, 06 Jun 2019 13:21:43 +0200 | |
branch | v_0 |
changeset 0 | f28025ce355d |
child 2 | bca03092cdb6 |
permissions | -rw-r--r-- |
0
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
1 |
/** |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
2 |
* Relational pipes |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
3 |
* Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info) |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
4 |
* |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
5 |
* This program is free software: you can redistribute it and/or modify |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
7 |
* the Free Software Foundation, either version 3 of the License, or |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
8 |
* (at your option) any later version. |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
9 |
* |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
10 |
* This program is distributed in the hope that it will be useful, |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
13 |
* GNU General Public License for more details. |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
14 |
* |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
17 |
*/ |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
18 |
#include <cstdlib> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
19 |
#include <unistd.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
20 |
#include <memory> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
21 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
22 |
#include <gtkmm.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
23 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
24 |
#include <relpipe/cli/CLI.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
25 |
#include <relpipe/cli/RelpipeCLIException.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
26 |
#include <relpipe/reader/Factory.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
27 |
#include <relpipe/reader/RelationalReader.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
28 |
#include <relpipe/reader/RelpipeReaderException.h> |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
29 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
30 |
using namespace relpipe::cli; |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
31 |
using namespace relpipe::reader; |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
32 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
33 |
int main(int argc, char** argv) { |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
34 |
setlocale(LC_ALL, ""); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
35 |
CLI::untieStdIO(); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
36 |
CLI cli(argc, argv); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
37 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
38 |
auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base"); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
39 |
Gtk::Window window; |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
40 |
window.set_default_size(640, 480); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
41 |
window.set_title("relpipe-out-gui.gtk"); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
42 |
|
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
43 |
return app->run(window); |
f28025ce355d
empty GTK/cmake/netbeans project
František Kučera <franta-hg@frantovo.cz>
parents:
diff
changeset
|
44 |
} |