nlib
UnicodeNormalizer.h
[詳解]
1 
2 /*---------------------------------------------------------------------------*
3 
4  Project: CrossRoad
5  Copyright (C)2012-2016 Nintendo. All rights reserved.
6 
7  These coded instructions, statements, and computer programs contain
8  proprietary information of Nintendo of America Inc. and/or Nintendo
9  Company Ltd., and are protected by Federal copyright law. They may
10  not be disclosed to third parties or copied or duplicated in any form,
11  in whole or in part, without the prior written consent of Nintendo.
12 
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:
31  enum NormalizationForm { NFC, NFD, NFKC, NFKD };
32  static errno_t Normalize(InputStream* istr, OutputStream* ostr, NormalizationForm form);
33 
34  static void DumpTable(TextWriter* w); // for debug
35  static uint32_t CheckTable(const uint32_t* data, size_t nwords); // for test
36  static bool CheckNormalizationTxt(const uint32_t* data); // for test
37 };
38 
39 } // namespace unicode
40 NLIB_NAMESPACE_END
41 
42 #endif // INCLUDE_NN_NLIB_UNICODE_UNICODENORMALIZER_H_
#define NLIB_VIS_PUBLIC
関数やクラス等のシンボルをライブラリの外部に公開します。
Definition: Platform_unix.h:87
NormalizationForm
ユニコードの正規化形式を指定します。
ユニコード文字列の正規化を行うためのクラスです。
入力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: InputStream.h:29
開発環境別の設定が書かれるファイルです。
ストリームにテキストを書き込むクラスです。
Definition: TextWriter.h:33
#define NLIB_FINAL
利用可能であればfinalが定義されます。そうでない場合は空文字列です。
Definition: Config.h:224
出力ストリームの基底クラスです。このクラスを実体化することはできません。
Definition: OutputStream.h:30
int errno_t
intのtypedefで、戻り値としてPOSIXのエラー値を返すことを示します。
Definition: NMalloc.h:37