uset_imp.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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) 2004-2007, International Business Machines
  7. * Corporation and others. All Rights Reserved.
  8. *
  9. *******************************************************************************
  10. * file name: uset_imp.h
  11. * encoding: UTF-8
  12. * tab size: 8 (not used)
  13. * indentation:4
  14. *
  15. * created on: 2004sep07
  16. * created by: Markus W. Scherer
  17. *
  18. * Internal USet definitions.
  19. */
  20. #ifndef __USET_IMP_H__
  21. #define __USET_IMP_H__
  22. #include "unicode/utypes.h"
  23. #include "unicode/uset.h"
  24. U_CDECL_BEGIN
  25. typedef void U_CALLCONV
  26. USetAdd(USet *set, UChar32 c);
  27. typedef void U_CALLCONV
  28. USetAddRange(USet *set, UChar32 start, UChar32 end);
  29. typedef void U_CALLCONV
  30. USetAddString(USet *set, const UChar *str, int32_t length);
  31. typedef void U_CALLCONV
  32. USetRemove(USet *set, UChar32 c);
  33. typedef void U_CALLCONV
  34. USetRemoveRange(USet *set, UChar32 start, UChar32 end);
  35. /**
  36. * Interface for adding items to a USet, to keep low-level code from
  37. * statically depending on the USet implementation.
  38. * Calls will look like sa->add(sa->set, c);
  39. */
  40. struct USetAdder {
  41. USet *set;
  42. USetAdd *add;
  43. USetAddRange *addRange;
  44. USetAddString *addString;
  45. USetRemove *remove;
  46. USetRemoveRange *removeRange;
  47. };
  48. typedef struct USetAdder USetAdder;
  49. U_CDECL_END
  50. #ifdef __cplusplus
  51. namespace {
  52. constexpr int32_t USET_CASE_MASK = USET_CASE_INSENSITIVE | USET_ADD_CASE_MAPPINGS;
  53. } // namespace
  54. #endif // __cplusplus
  55. #endif