src/lib/Dialect.h
author František Kučera <franta-hg@frantovo.cz>
Sun, 31 Oct 2021 17:30:40 +0100
branchv_0
changeset 33 c9a158da6c32
parent 29 06aaad12c207
permissions -rw-r--r--
java-manifest-mf dialect for parsing MANIFEST.MF files (import shared code from relpipe-in-ini)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info)
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
06aaad12c207 configurable dialects: in separate classes
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
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 * the Free Software Foundation, version 3 of the License.
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * GNU General Public License for more details.
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 *
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 */
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
#pragma once
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
#include "INIReader.h"
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    21
namespace relpipe {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
namespace in {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
namespace ini {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
namespace lib {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
class INIReader;
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    28
class Dialect {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
public:
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
	/**
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	 * Configure the reader by calling its setOption() method.
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
	 * 
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
	 * The dialect may be also derived from another dialect (extend or modify it),
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
	 * but obviously there might be no cyclic dependencies among them.
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	 */
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    36
	virtual void apply(INIReader& reader) = 0;
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    37
33
c9a158da6c32 java-manifest-mf dialect for parsing MANIFEST.MF files (import shared code from relpipe-in-ini)
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
    38
	virtual ~Dialect() {
c9a158da6c32 java-manifest-mf dialect for parsing MANIFEST.MF files (import shared code from relpipe-in-ini)
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
    39
	}
c9a158da6c32 java-manifest-mf dialect for parsing MANIFEST.MF files (import shared code from relpipe-in-ini)
František Kučera <franta-hg@frantovo.cz>
parents: 29
diff changeset
    40
29
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
};
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
}
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    44
}
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    45
}
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
}