nlib
UnicodeNormalizer.h
Go to the documentation of this file.
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
Symbols for functions and classes are made available outside of the library.
Definition: Platform_unix.h:87
NormalizationForm
Specifies the unicode normalization format.
Class used to normalize a unicode string.
The base class for input streams. This class cannot be instantiated.
Definition: InputStream.h:29
A file that contains the configuration information for each development environment.
The class for writing text to streams.
Definition: TextWriter.h:33
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
Definition: Config.h:224
The base class for output streams. This class cannot be instantiated.
Definition: OutputStream.h:30
int errno_t
Indicates with an int-type typedef that a POSIX error value is returned as the return value...
Definition: NMalloc.h:37