src/lib/Dialect.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 28 Nov 2020 21:09:18 +0100
branchv_0
changeset 29 06aaad12c207
child 33 c9a158da6c32
permissions -rw-r--r--
configurable dialects: in separate classes
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
using namespace std;
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
namespace relpipe {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
namespace in {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
namespace ini {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    26
namespace lib {
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 INIReader;
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    30
class Dialect {
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
public:
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
	 * 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
    34
	 * 
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    35
	 * 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
    36
	 * 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
    37
	 */
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
	virtual void apply(INIReader& reader) = 0;
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
06aaad12c207 configurable dialects: in separate classes
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    40
};
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
}