|
1 /** |
|
2 * Relational pipes |
|
3 * Copyright © 2018 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 #include <cstdlib> |
|
18 #include <vector> |
|
19 #include <memory> |
|
20 #include <locale> |
|
21 #include <regex> |
|
22 #include <algorithm> |
|
23 #include <unistd.h> |
|
24 |
|
25 #include <relpipe/writer/RelationalWriter.h> |
|
26 #include <relpipe/writer/RelpipeWriterException.h> |
|
27 #include <relpipe/writer/AttributeMetadata.h> |
|
28 #include <relpipe/writer/Factory.h> |
|
29 #include <relpipe/writer/TypeId.h> |
|
30 |
|
31 #include <relpipe/cli/CLI.h> |
|
32 |
|
33 #include "PosixMQCommand.h" |
|
34 |
|
35 using namespace std; |
|
36 using namespace relpipe::cli; |
|
37 using namespace relpipe::writer; |
|
38 |
|
39 namespace relpipe { |
|
40 namespace in { |
|
41 namespace posixmq { |
|
42 |
|
43 void PosixMQCommand::process(std::shared_ptr<writer::RelationalWriter> writer, Configuration& configuration) { |
|
44 wstring_convert < codecvt_utf8<wchar_t>> convertor; // UTF-8 is required for PosixMQ |
|
45 vector<AttributeMetadata> metadata; |
|
46 |
|
47 writer->startRelation(L"posix_mq",{ |
|
48 {L"message", TypeId::STRING} |
|
49 }, true); |
|
50 |
|
51 writer->writeAttribute(L"TODO: read messages from POSIX MQ"); |
|
52 |
|
53 |
|
54 } |
|
55 |
|
56 } |
|
57 } |
|
58 } |