makeconv.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #ifndef __MAKECONV_H__
  19. #define __MAKECONV_H__
  20. #include "unicode/utypes.h"
  21. #include "ucnv_bld.h"
  22. #include "unewdata.h"
  23. #include "ucm.h"
  24. /* exports from makeconv.c */
  25. U_CFUNC UBool VERBOSE;
  26. U_CFUNC UBool SMALL;
  27. U_CFUNC UBool IGNORE_SISO_CHECK;
  28. /* converter table type for writing */
  29. enum {
  30. TABLE_NONE,
  31. TABLE_BASE,
  32. TABLE_EXT,
  33. TABLE_BASE_AND_EXT
  34. };
  35. /* abstract converter generator struct, C++ - style */
  36. struct NewConverter;
  37. typedef struct NewConverter NewConverter;
  38. U_CDECL_BEGIN
  39. struct NewConverter {
  40. void
  41. (* U_CALLCONV_FPTR close)(NewConverter *cnvData);
  42. /** is this byte sequence valid? */
  43. UBool
  44. (*U_CALLCONV_FPTR isValid)(NewConverter *cnvData,
  45. const uint8_t *bytes, int32_t length);
  46. UBool
  47. (*U_CALLCONV_FPTR addTable)(NewConverter *cnvData, UCMTable *table, UConverterStaticData *staticData);
  48. uint32_t
  49. (*U_CALLCONV_FPTR write)(NewConverter *cnvData, const UConverterStaticData *staticData,
  50. UNewDataMemory *pData, int32_t tableType);
  51. };
  52. U_CDECL_END
  53. #endif /* __MAKECONV_H__ */