author | František Kučera <franta-hg@frantovo.cz> |
Sat, 20 Aug 2022 22:51:07 +0200 | |
branch | v_0 |
changeset 31 | 17cea3a6d33f |
parent 8 | 3e17086fffea |
permissions | -rw-r--r-- |
0 | 1 |
/** |
2 |
* Relational pipes |
|
3 |
* Copyright © 2022 František Kučera (Frantovo.cz, GlobalCode.info) |
|
4 |
* |
|
5 |
* This program is free software: you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation, version 3 of the License. |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
16 |
*/ |
|
17 |
#pragma once |
|
18 |
||
19 |
#include <vector> |
|
20 |
#include <iostream> |
|
21 |
||
22 |
#include <relpipe/common/type/typedefs.h> |
|
23 |
||
5
e57e2a2798b2
configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents:
4
diff
changeset
|
24 |
#include "Socket.h" |
e57e2a2798b2
configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents:
4
diff
changeset
|
25 |
|
0 | 26 |
|
27 |
namespace relpipe { |
|
28 |
namespace out { |
|
29 |
namespace socket { |
|
30 |
||
5
e57e2a2798b2
configuration: protocol, role, mode, host, port, path
František Kučera <franta-hg@frantovo.cz>
parents:
4
diff
changeset
|
31 |
|
0 | 32 |
class Configuration { |
33 |
public: |
|
34 |
||
4
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
35 |
class SocketOption { |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
36 |
public: |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
37 |
const relpipe::common::type::StringX name; |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
38 |
const relpipe::common::type::StringX value; |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
39 |
|
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
40 |
SocketOption(const relpipe::common::type::StringX name, const relpipe::common::type::StringX value) : name(name), value(value) { |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
41 |
} |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
42 |
|
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
43 |
virtual ~SocketOption() = default; |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
44 |
}; |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
45 |
|
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
46 |
|
8
3e17086fffea
process only relations named 'message' or matching the --relation pattern
František Kučera <franta-hg@frantovo.cz>
parents:
7
diff
changeset
|
47 |
relpipe::common::type::StringX relation = L"message"; |
4
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
48 |
std::vector<SocketOption> options; |
0 | 49 |
|
50 |
virtual ~Configuration() { |
|
51 |
} |
|
52 |
}; |
|
53 |
||
54 |
} |
|
55 |
} |
|
56 |
} |