author | František Kučera <franta-hg@frantovo.cz> |
Fri, 29 Jul 2022 18:03:49 +0200 | |
branch | v_0 |
changeset 4 | 8d036e5e5fcc |
parent 0 | 924e354948df |
child 5 | e57e2a2798b2 |
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 |
||
24 |
||
25 |
namespace relpipe { |
|
26 |
namespace out { |
|
27 |
namespace socket { |
|
28 |
||
29 |
class Configuration { |
|
30 |
public: |
|
31 |
||
4
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
32 |
class SocketOption { |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
33 |
public: |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
34 |
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
|
35 |
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
|
36 |
|
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
37 |
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
|
38 |
} |
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 |
virtual ~SocketOption() = default; |
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 |
|
0 | 44 |
relpipe::common::type::StringX relation = L"socket"; |
4
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
45 |
relpipe::common::type::StringX connectionString = L"udp://127.0.0.1:64000"; |
8d036e5e5fcc
configuration: --connection-string --connection-option (role, mode)
František Kučera <franta-hg@frantovo.cz>
parents:
0
diff
changeset
|
46 |
std::vector<SocketOption> options; |
0 | 47 |
|
48 |
virtual ~Configuration() { |
|
49 |
} |
|
50 |
}; |
|
51 |
||
52 |
} |
|
53 |
} |
|
54 |
} |