aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unicode/normalization/decomposition_table.h
blob: 0e62dd3149fd4e9b3fe904f358d9297008671ba9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <util/charset/unicode_table.h>

namespace NUnicode {
    namespace NPrivate {
        typedef NUnicodeTable::TTable<NUnicodeTable::TSubtable<
            NUnicodeTable::UNICODE_TABLE_SHIFT, NUnicodeTable::TValues<const wchar32*>>>
            TDecompositionTable;

        const TDecompositionTable& CannonDecompositionTable();
        const TDecompositionTable& CompatDecompositionTable();

        template <bool compat>
        inline const TDecompositionTable& DecompositionTable();

        template <>
        inline const TDecompositionTable& DecompositionTable<false>() {
            return CannonDecompositionTable();
        }

        template <>
        inline const TDecompositionTable& DecompositionTable<true>() {
            return CompatDecompositionTable();
        }

    }
}  // namespace NUnicode