• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 *
6 *   Copyright (C) 2000-2010, International Business Machines
7 *   Corporation and others.  All Rights Reserved.
8 *
9 *******************************************************************************
10 *   file name:  makeconv.h
11 *   encoding:   UTF-8
12 *   tab size:   8 (not used)
13 *   indentation:4
14 *
15 *   created on: 2000nov01
16 *   created by: Markus W. Scherer
17 */
18 
19 #ifndef __MAKECONV_H__
20 #define __MAKECONV_H__
21 
22 #include "unicode/utypes.h"
23 #include "ucnv_bld.h"
24 #include "unewdata.h"
25 #include "ucm.h"
26 
27 /* exports from makeconv.c */
28 U_CFUNC UBool VERBOSE;
29 U_CFUNC UBool SMALL;
30 U_CFUNC UBool IGNORE_SISO_CHECK;
31 
32 /* converter table type for writing */
33 enum {
34     TABLE_NONE,
35     TABLE_BASE,
36     TABLE_EXT,
37     TABLE_BASE_AND_EXT
38 };
39 
40 /* abstract converter generator struct, C++ - style */
41 struct NewConverter;
42 typedef struct NewConverter NewConverter;
43 
44 U_CDECL_BEGIN
45 struct NewConverter {
46     void
47     (* U_CALLCONV_FPTR close)(NewConverter *cnvData);
48 
49     /** is this byte sequence valid? */
50     UBool
51     (*U_CALLCONV_FPTR isValid)(NewConverter *cnvData,
52                const uint8_t *bytes, int32_t length);
53 
54     UBool
55     (*U_CALLCONV_FPTR addTable)(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
56 
57     uint32_t
58     (*U_CALLCONV_FPTR write)(NewConverter *cnvData, const UConverterStaticData *staticData,
59              UNewDataMemory *pData, int32_t tableType);
60 };
61 U_CDECL_END
62 #endif /* __MAKECONV_H__ */
63