nlib
UnicodeNormalizer.h
[詳解]
1 
2 /*--------------------------------------------------------------------------------*
3  Project: CrossRoad
4  Copyright (C)Nintendo All rights reserved.
5 
6  These coded instructions, statements, and computer programs contain proprietary
7  information of Nintendo and/or its licensed developers and are protected by
8  national and international copyright laws. They may not be disclosed to third
9  parties or copied or duplicated in any form, in whole or in part, without the
10  prior written consent of Nintendo.
11 
12  The content herein is highly confidential and should be handled accordingly.
13  *--------------------------------------------------------------------------------*/
14 
15 #pragma once
16 #ifndef INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
17 #define INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
18 
19 #include "nn/nlib/Config.h"
20 
21 NLIB_NAMESPACE_BEGIN
22 
23 class InputStream;
24 class OutputStream;
25 class TextWriter;
26 
27 namespace unicode {
28 
30  public:
36  NFC = kNfc,
37  NFD = kNfd,
38  NFKC = kNfkc,
39  NFKD = kNfkd
40  };
41  static errno_t Normalize(InputStream* istr, OutputStream* ostr, NormalizationForm form);
42 
43  static void DumpTable(TextWriter* w); // for debug
44  static uint32_t CheckTable(const uint32_t* data, size_t nwords); // for test
45  static bool CheckNormalizationTxt(const uint32_t* data); // for test
46 };
47 
48 } // namespace unicode
49 NLIB_NAMESPACE_END
50 
51 #endif // INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
kNfdで変換します。 ユニコード文字列を正規分解で分解し、正規順序で整列します。 濁音や半濁音、アキュー...
kNfkcで変換します。 ユニコード文字列を互換分解で分解し、正規順序で整列し、正規合成します。 全角英数...
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:89
NormalizationForm
ユニコードの正規化形式を指定します。
ユニコード文字列の正規化を行うためのクラスです。
入力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: InputStream.h:29
kNfcで変換します。 ユニコード文字列を正規分解で分解し、正規順序で整列し、正規合成します。 多くの場合...
開発環境別の設定が書かれるファイルです。
ストリームにテキストを書き込むクラスです。
Definition: TextWriter.h:33
#define NLIB_FINAL
利用可能であればfinalが定義されます。そうでない場合は空文字列です。
Definition: Config.h:245
kNfkdで変換します。 ユニコード文字列を互換分解で分解し、正規順序で整列します。 濁音や半濁音、アキュ...
出力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: OutputStream.h:30
int errno_t
intのtypedefで、戻り値としてPOSIXのエラー値を返すことを示します。
Definition: NMalloc.h:37