aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/unicode/normalization/decomposition_table.h
blob: 23f3da334f3c5a34aea992829f3b34a1759a840c (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