src/ASN1Command.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 25 Jul 2021 11:53:55 +0200
branchv_0
changeset 2 7128fabeede0
parent 0 28294b895e5e
permissions -rw-r--r--
FreeformASN1ContentHandler: basic ASN.1 tree in a relation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2021 František Kučera (Frantovo.cz, GlobalCode.info)
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
28294b895e5e project skeleton + configuration
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
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include <iostream>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
#include <sstream>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
#include <vector>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
#include <memory>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
#include <relpipe/writer/TypeId.h>
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
#include "Configuration.h"
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
namespace relpipe {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
namespace in {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
namespace asn1 {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
class ASN1Command {
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
private:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	wstring_convert < codecvt_utf8<wchar_t>> convertor; // ASN.1 parser works with UTF-8
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
public:
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
	void process(std::istream& input, std::shared_ptr<writer::RelationalWriter> writer, Configuration& configuration);
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
};
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
}
28294b895e5e project skeleton + configuration
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
}