uprops.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  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) 2002-2016, International Business Machines
  7. * Corporation and others. All Rights Reserved.
  8. *
  9. *******************************************************************************
  10. * file name: uprops.h
  11. * encoding: UTF-8
  12. * tab size: 8 (not used)
  13. * indentation:4
  14. *
  15. * created on: 2002feb24
  16. * created by: Markus W. Scherer
  17. *
  18. * Constants for mostly non-core Unicode character properties
  19. * stored in uprops.icu.
  20. */
  21. #ifndef __UPROPS_H__
  22. #define __UPROPS_H__
  23. #include "unicode/utypes.h"
  24. #include "unicode/uset.h"
  25. #include "uset_imp.h"
  26. #include "udataswp.h"
  27. /* indexes[] entries */
  28. enum {
  29. UPROPS_PROPS32_INDEX,
  30. UPROPS_EXCEPTIONS_INDEX,
  31. UPROPS_EXCEPTIONS_TOP_INDEX,
  32. UPROPS_ADDITIONAL_TRIE_INDEX,
  33. UPROPS_ADDITIONAL_VECTORS_INDEX,
  34. UPROPS_ADDITIONAL_VECTORS_COLUMNS_INDEX,
  35. UPROPS_SCRIPT_EXTENSIONS_INDEX,
  36. UPROPS_BLOCK_TRIE_INDEX,
  37. UPROPS_RESERVED_INDEX_8,
  38. /** size of the data file (number of 32-bit units after the header) */
  39. UPROPS_DATA_TOP_INDEX,
  40. /** maximum values for code values in vector word 0 */
  41. UPROPS_MAX_VALUES_INDEX=10,
  42. /** maximum values for code values in vector word 2 */
  43. UPROPS_MAX_VALUES_2_INDEX,
  44. /** maximum values for other code values */
  45. UPROPS_MAX_VALUES_OTHER_INDEX,
  46. UPROPS_INDEX_COUNT=16
  47. };
  48. /* definitions for the main properties words */
  49. enum {
  50. /* general category shift==0 0 (5 bits) */
  51. /* reserved 5 (1 bit) */
  52. UPROPS_NUMERIC_TYPE_VALUE_SHIFT=6 /* 6 (10 bits) */
  53. };
  54. #define GET_CATEGORY(props) ((props)&0x1f)
  55. #define CAT_MASK(props) U_MASK(GET_CATEGORY(props))
  56. #define GET_NUMERIC_TYPE_VALUE(props) ((props)>>UPROPS_NUMERIC_TYPE_VALUE_SHIFT)
  57. /* constants for the storage form of numeric types and values */
  58. enum {
  59. /** No numeric value. */
  60. UPROPS_NTV_NONE=0,
  61. /** Decimal digits: nv=0..9 */
  62. UPROPS_NTV_DECIMAL_START=1,
  63. /** Other digits: nv=0..9 */
  64. UPROPS_NTV_DIGIT_START=11,
  65. /** Small integers: nv=0..154 */
  66. UPROPS_NTV_NUMERIC_START=21,
  67. /** Fractions: ((ntv>>4)-12) / ((ntv&0xf)+1) = -1..17 / 1..16 */
  68. UPROPS_NTV_FRACTION_START=0xb0,
  69. /**
  70. * Large integers:
  71. * ((ntv>>5)-14) * 10^((ntv&0x1f)+2) = (1..9)*(10^2..10^33)
  72. * (only one significant decimal digit)
  73. */
  74. UPROPS_NTV_LARGE_START=0x1e0,
  75. /**
  76. * Sexagesimal numbers:
  77. * ((ntv>>2)-0xbf) * 60^((ntv&3)+1) = (1..9)*(60^1..60^4)
  78. */
  79. UPROPS_NTV_BASE60_START=0x300,
  80. /**
  81. * Fraction-20 values:
  82. * frac20 = ntv-0x324 = 0..0x17 -> 1|3|5|7 / 20|40|80|160|320|640
  83. * numerator: num = 2*(frac20&3)+1
  84. * denominator: den = 20<<(frac20>>2)
  85. */
  86. UPROPS_NTV_FRACTION20_START=UPROPS_NTV_BASE60_START+36, // 0x300+9*4=0x324
  87. /**
  88. * Fraction-32 values:
  89. * frac32 = ntv-0x34c = 0..15 -> 1|3|5|7 / 32|64|128|256
  90. * numerator: num = 2*(frac32&3)+1
  91. * denominator: den = 32<<(frac32>>2)
  92. */
  93. UPROPS_NTV_FRACTION32_START=UPROPS_NTV_FRACTION20_START+24, // 0x324+6*4=0x34c
  94. /** No numeric value (yet). */
  95. UPROPS_NTV_RESERVED_START=UPROPS_NTV_FRACTION32_START+16, // 0x34c+4*4=0x35c
  96. UPROPS_NTV_MAX_SMALL_INT=UPROPS_NTV_FRACTION_START-UPROPS_NTV_NUMERIC_START-1
  97. };
  98. #define UPROPS_NTV_GET_TYPE(ntv) \
  99. ((ntv==UPROPS_NTV_NONE) ? U_NT_NONE : \
  100. (ntv<UPROPS_NTV_DIGIT_START) ? U_NT_DECIMAL : \
  101. (ntv<UPROPS_NTV_NUMERIC_START) ? U_NT_DIGIT : \
  102. U_NT_NUMERIC)
  103. /* number of properties vector words */
  104. #define UPROPS_VECTOR_WORDS 3
  105. #ifdef __cplusplus
  106. namespace {
  107. // Properties in vector word 0
  108. // Bits
  109. // 31..26 Age major version (major=0..63)
  110. // 25..24 Age minor version (minor=0..3)
  111. // 23..17 reserved
  112. // 16..15 Indic Conjunct Break
  113. // 14..12 East Asian Width
  114. // 11..10 3..1: Bits 9..0 = Script_Extensions index
  115. // 3: Script value from Script_Extensions
  116. // 2: Script=Inherited
  117. // 1: Script=Common
  118. // 0: Script=bits 9..0
  119. // 9.. 0 UScriptCode, or index to Script_Extensions
  120. // *Note*: If we need more than the available bits for new properties,
  121. // then we could move the Age property out of the properties vectors.
  122. // For example, we could store the Age property in its own trie.
  123. // In a small, 8-bit-value-width CodePointTrie, it would be larger than
  124. // the amount of data that we would save in the properties vectors and their trie,
  125. // but the size increase would be a small percentage of the total uprops.icu size.
  126. // It would certainly be a much smaller increase than widening the properties vectors.
  127. // The savings in the properties vectors+trie from pulling out the Age property
  128. // are partly from mediocre correlation between Age and other property values.
  129. // (Adding new characters to existing scripts tends to split property vectors where
  130. // new characters are similar to old ones.)
  131. // See https://github.com/unicode-org/icu/pull/3025 for details.
  132. inline constexpr uint32_t UPROPS_AGE_MASK = 0xff000000;
  133. inline constexpr int32_t UPROPS_AGE_SHIFT = 24;
  134. inline constexpr uint8_t UPROPS_AGE_MAJOR_MAX = 63;
  135. inline constexpr uint8_t UPROPS_AGE_MINOR_MAX = 3;
  136. inline constexpr uint32_t UPROPS_EA_MASK = 0x00007000;
  137. inline constexpr int32_t UPROPS_EA_SHIFT = 12;
  138. inline constexpr uint32_t UPROPS_INCB_MASK = 0x00018000;
  139. inline constexpr int32_t UPROPS_INCB_SHIFT = 15;
  140. /** Script_Extensions: mask includes Script */
  141. inline constexpr uint32_t UPROPS_SCRIPT_X_MASK = 0x00000fff;
  142. // UPROPS_SCRIPT_X_WITH_COMMON must be the lowest value that involves Script_Extensions.
  143. inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_OTHER = 0xc00;
  144. inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_INHERITED = 0x800;
  145. inline constexpr uint32_t UPROPS_SCRIPT_X_WITH_COMMON = 0x400;
  146. inline constexpr int32_t UPROPS_MAX_SCRIPT = 0x3ff;
  147. /*
  148. * Properties in vector word 1
  149. * Each bit encodes one binary property.
  150. * The following constants represent the bit number, use 1<<UPROPS_XYZ.
  151. * UPROPS_BINARY_1_TOP<=32!
  152. *
  153. * Keep this list of property enums in sync with
  154. * propListNames[] in icu/source/tools/genprops/props2.c!
  155. *
  156. * ICU 2.6/uprops format version 3.2 stores full properties instead of "Other_".
  157. */
  158. enum {
  159. UPROPS_WHITE_SPACE,
  160. UPROPS_DASH,
  161. UPROPS_HYPHEN,
  162. UPROPS_QUOTATION_MARK,
  163. UPROPS_TERMINAL_PUNCTUATION,
  164. UPROPS_MATH,
  165. UPROPS_HEX_DIGIT,
  166. UPROPS_ASCII_HEX_DIGIT,
  167. UPROPS_ALPHABETIC,
  168. UPROPS_IDEOGRAPHIC,
  169. UPROPS_DIACRITIC,
  170. UPROPS_EXTENDER,
  171. UPROPS_NONCHARACTER_CODE_POINT,
  172. UPROPS_GRAPHEME_EXTEND,
  173. UPROPS_GRAPHEME_LINK,
  174. UPROPS_IDS_BINARY_OPERATOR,
  175. UPROPS_IDS_TRINARY_OPERATOR,
  176. UPROPS_RADICAL,
  177. UPROPS_UNIFIED_IDEOGRAPH,
  178. UPROPS_DEFAULT_IGNORABLE_CODE_POINT,
  179. UPROPS_DEPRECATED,
  180. UPROPS_LOGICAL_ORDER_EXCEPTION,
  181. UPROPS_XID_START,
  182. UPROPS_XID_CONTINUE,
  183. UPROPS_ID_START, /* ICU 2.6, uprops format version 3.2 */
  184. UPROPS_ID_CONTINUE,
  185. UPROPS_GRAPHEME_BASE,
  186. UPROPS_S_TERM, /* new in ICU 3.0 and Unicode 4.0.1 */
  187. UPROPS_VARIATION_SELECTOR,
  188. UPROPS_PATTERN_SYNTAX, /* new in ICU 3.4 and Unicode 4.1 */
  189. UPROPS_PATTERN_WHITE_SPACE,
  190. UPROPS_PREPENDED_CONCATENATION_MARK, // new in ICU 60 and Unicode 10
  191. UPROPS_BINARY_1_TOP /* ==32 - full! */
  192. };
  193. /*
  194. * Properties in vector word 2
  195. * Bits
  196. * 31..26 ICU 75: Identifier_Type bit set
  197. * ICU 70..74: unused
  198. * ICU 57..69: emoji properties; moved to uemoji.icu in ICU 70
  199. * 25..20 Line Break
  200. * 19..15 Sentence Break
  201. * 14..10 Word Break
  202. * 9.. 5 Grapheme Cluster Break
  203. * 4.. 0 Decomposition Type
  204. */
  205. // https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type
  206. // The Identifier_Type maps each code point to a *set* of one or more values.
  207. // Some can be combined with others, some can only occur alone.
  208. // Exclusion & Limited_Use are combinable bits, but cannot occur together.
  209. // We use this forbidden combination for enumerated values.
  210. // We use 6 bits for all possible combinations.
  211. // If more combinable values are added, then we need to use more bits.
  212. //
  213. // We do not store separate data for Identifier_Status:
  214. // We can derive that from the encoded Identifier_Type via a simple range check.
  215. inline constexpr uint32_t UPROPS_2_ID_TYPE_MASK = 0xfc000000;
  216. inline constexpr int32_t UPROPS_2_ID_TYPE_SHIFT = 26;
  217. enum {
  218. // A high bit for use in idTypeToEncoded[] but not used in the data
  219. UPROPS_ID_TYPE_BIT = 0x80,
  220. // Combinable bits
  221. UPROPS_ID_TYPE_EXCLUSION = 0x20,
  222. UPROPS_ID_TYPE_LIMITED_USE = 0x10,
  223. UPROPS_ID_TYPE_UNCOMMON_USE = 8,
  224. UPROPS_ID_TYPE_TECHNICAL = 4,
  225. UPROPS_ID_TYPE_OBSOLETE = 2,
  226. UPROPS_ID_TYPE_NOT_XID = 1,
  227. // Exclusive values
  228. UPROPS_ID_TYPE_NOT_CHARACTER = 0,
  229. // Forbidden bit combination used for enumerating other exclusive values
  230. UPROPS_ID_TYPE_FORBIDDEN = UPROPS_ID_TYPE_EXCLUSION | UPROPS_ID_TYPE_LIMITED_USE, // 0x30
  231. UPROPS_ID_TYPE_DEPRECATED = UPROPS_ID_TYPE_FORBIDDEN, // 0x30
  232. UPROPS_ID_TYPE_DEFAULT_IGNORABLE, // 0x31
  233. UPROPS_ID_TYPE_NOT_NFKC, // 0x32
  234. UPROPS_ID_TYPE_ALLOWED_MIN = UPROPS_ID_TYPE_FORBIDDEN + 0xc, // 0x3c
  235. UPROPS_ID_TYPE_INCLUSION = UPROPS_ID_TYPE_FORBIDDEN + 0xe, // 0x3e
  236. UPROPS_ID_TYPE_RECOMMENDED = UPROPS_ID_TYPE_FORBIDDEN + 0xf, // 0x3f
  237. };
  238. /**
  239. * Maps UIdentifierType to encoded bits.
  240. * When UPROPS_ID_TYPE_BIT is set, then use "&" to test whether the value bit is set.
  241. * When UPROPS_ID_TYPE_BIT is not set, then compare ("==") the array value with the data value.
  242. */
  243. inline constexpr uint8_t uprops_idTypeToEncoded[] = {
  244. UPROPS_ID_TYPE_NOT_CHARACTER,
  245. UPROPS_ID_TYPE_DEPRECATED,
  246. UPROPS_ID_TYPE_DEFAULT_IGNORABLE,
  247. UPROPS_ID_TYPE_NOT_NFKC,
  248. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_NOT_XID,
  249. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_EXCLUSION,
  250. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_OBSOLETE,
  251. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_TECHNICAL,
  252. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_UNCOMMON_USE,
  253. UPROPS_ID_TYPE_BIT | UPROPS_ID_TYPE_LIMITED_USE,
  254. UPROPS_ID_TYPE_INCLUSION,
  255. UPROPS_ID_TYPE_RECOMMENDED
  256. };
  257. } // namespace
  258. #endif // __cplusplus
  259. #define UPROPS_LB_MASK 0x03f00000
  260. #define UPROPS_LB_SHIFT 20
  261. #define UPROPS_SB_MASK 0x000f8000
  262. #define UPROPS_SB_SHIFT 15
  263. #define UPROPS_WB_MASK 0x00007c00
  264. #define UPROPS_WB_SHIFT 10
  265. #define UPROPS_GCB_MASK 0x000003e0
  266. #define UPROPS_GCB_SHIFT 5
  267. #define UPROPS_DT_MASK 0x0000001f
  268. #ifdef __cplusplus
  269. namespace {
  270. // Bits 9..0 in UPROPS_MAX_VALUES_OTHER_INDEX
  271. inline constexpr uint32_t UPROPS_MAX_BLOCK = 0x3ff;
  272. } // namespace
  273. #endif // __cplusplus
  274. /**
  275. * Gets the main properties value for a code point.
  276. * Implemented in uchar.c for uprops.cpp.
  277. */
  278. U_CFUNC uint32_t
  279. u_getMainProperties(UChar32 c);
  280. /**
  281. * Get a properties vector word for a code point.
  282. * Implemented in uchar.c for uprops.cpp.
  283. * @return 0 if no data or illegal argument
  284. */
  285. U_CFUNC uint32_t
  286. u_getUnicodeProperties(UChar32 c, int32_t column);
  287. /**
  288. * Get the the maximum values for some enum/int properties.
  289. * Use the same column numbers as for u_getUnicodeProperties().
  290. * The returned value will contain maximum values stored in the same bit fields
  291. * as where the enum values are stored in the u_getUnicodeProperties()
  292. * return values for the same columns.
  293. *
  294. * Valid columns are those for properties words that contain enumerated values.
  295. * (ICU 2.6: columns 0 and 2)
  296. * For other column numbers, this function will return 0.
  297. *
  298. * @internal
  299. */
  300. U_CFUNC int32_t
  301. uprv_getMaxValues(int32_t column);
  302. /**
  303. * Checks if c is alphabetic, or a decimal digit; implements UCHAR_POSIX_ALNUM.
  304. * @internal
  305. */
  306. U_CFUNC UBool
  307. u_isalnumPOSIX(UChar32 c);
  308. /**
  309. * Checks if c is in
  310. * [^\p{space}\p{gc=Control}\p{gc=Surrogate}\p{gc=Unassigned}]
  311. * with space=\p{Whitespace} and Control=Cc.
  312. * Implements UCHAR_POSIX_GRAPH.
  313. * @internal
  314. */
  315. U_CFUNC UBool
  316. u_isgraphPOSIX(UChar32 c);
  317. /**
  318. * Checks if c is in \p{graph}\p{blank} - \p{cntrl}.
  319. * Implements UCHAR_POSIX_PRINT.
  320. * @internal
  321. */
  322. U_CFUNC UBool
  323. u_isprintPOSIX(UChar32 c);
  324. /** Some code points. @internal */
  325. enum {
  326. TAB =0x0009,
  327. LF =0x000a,
  328. FF =0x000c,
  329. CR =0x000d,
  330. NBSP =0x00a0,
  331. CGJ =0x034f,
  332. FIGURESP=0x2007,
  333. HAIRSP =0x200a,
  334. ZWNJ =0x200c,
  335. ZWJ =0x200d,
  336. RLM =0x200f,
  337. NNBSP =0x202f,
  338. ZWNBSP =0xfeff
  339. };
  340. // TODO: Move these two functions into a different header file (new unames.h?) so that uprops.h
  341. // need not be C-compatible any more.
  342. /**
  343. * Get the maximum length of a (regular/1.0/extended) character name.
  344. * @return 0 if no character names available.
  345. */
  346. U_CAPI int32_t U_EXPORT2
  347. uprv_getMaxCharNameLength(void);
  348. /**
  349. * Fills set with characters that are used in Unicode character names.
  350. * Includes all characters that are used in regular/Unicode 1.0/extended names.
  351. * Just empties the set if no character names are available.
  352. * @param sa USetAdder to receive characters.
  353. */
  354. U_CAPI void U_EXPORT2
  355. uprv_getCharNameCharacters(const USetAdder *sa);
  356. /**
  357. * Constants for which data and implementation files provide which properties.
  358. * Used by UnicodeSet for service-specific property enumeration.
  359. * @internal
  360. */
  361. enum UPropertySource {
  362. /** No source, not a supported property. */
  363. UPROPS_SRC_NONE,
  364. /** From uchar.c/uprops.icu main trie */
  365. UPROPS_SRC_CHAR,
  366. /** From uchar.c/uprops.icu properties vectors trie */
  367. UPROPS_SRC_PROPSVEC,
  368. /** From unames.c/unames.icu */
  369. UPROPS_SRC_NAMES,
  370. /** From ucase.c/ucase.icu */
  371. UPROPS_SRC_CASE,
  372. /** From ubidi_props.c/ubidi.icu */
  373. UPROPS_SRC_BIDI,
  374. /** From uchar.c/uprops.icu main trie as well as properties vectors trie */
  375. UPROPS_SRC_CHAR_AND_PROPSVEC,
  376. /** From ucase.c/ucase.icu as well as unorm.cpp/unorm.icu */
  377. UPROPS_SRC_CASE_AND_NORM,
  378. /** From normalizer2impl.cpp/nfc.nrm */
  379. UPROPS_SRC_NFC,
  380. /** From normalizer2impl.cpp/nfkc.nrm */
  381. UPROPS_SRC_NFKC,
  382. /** From normalizer2impl.cpp/nfkc_cf.nrm */
  383. UPROPS_SRC_NFKC_CF,
  384. /** From normalizer2impl.cpp/nfc.nrm canonical iterator data */
  385. UPROPS_SRC_NFC_CANON_ITER,
  386. // Text layout properties.
  387. UPROPS_SRC_INPC,
  388. UPROPS_SRC_INSC,
  389. UPROPS_SRC_VO,
  390. UPROPS_SRC_EMOJI,
  391. UPROPS_SRC_IDSU,
  392. UPROPS_SRC_ID_COMPAT_MATH,
  393. UPROPS_SRC_BLOCK,
  394. UPROPS_SRC_MCM,
  395. /** One more than the highest UPropertySource (UPROPS_SRC_) constant. */
  396. UPROPS_SRC_COUNT
  397. };
  398. typedef enum UPropertySource UPropertySource;
  399. /**
  400. * @see UPropertySource
  401. * @internal
  402. */
  403. U_CFUNC UPropertySource U_EXPORT2
  404. uprops_getSource(UProperty which);
  405. /**
  406. * Enumerate uprops.icu's main data trie and add the
  407. * start of each range of same properties to the set.
  408. * @internal
  409. */
  410. U_CFUNC void U_EXPORT2
  411. uchar_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode);
  412. /**
  413. * Enumerate uprops.icu's properties vectors trie and add the
  414. * start of each range of same properties to the set.
  415. * @internal
  416. */
  417. U_CFUNC void U_EXPORT2
  418. upropsvec_addPropertyStarts(const USetAdder *sa, UErrorCode *pErrorCode);
  419. U_CFUNC void U_EXPORT2
  420. uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *pErrorCode);
  421. #ifdef __cplusplus
  422. U_CFUNC void U_EXPORT2
  423. ublock_addPropertyStarts(const USetAdder *sa, UErrorCode &errorCode);
  424. #endif // __cplusplus
  425. /**
  426. * Return a set of characters for property enumeration.
  427. * For each two consecutive characters (start, limit) in the set,
  428. * all of the properties for start..limit-1 are all the same.
  429. *
  430. * @param sa USetAdder to receive result. Existing contents are lost.
  431. * @internal
  432. */
  433. /*U_CFUNC void U_EXPORT2
  434. uprv_getInclusions(const USetAdder *sa, UErrorCode *pErrorCode);
  435. */
  436. // TODO: Move this into a different header file (udataswp.h? new unames.h?) so that uprops.h
  437. // need not be C-compatible any more.
  438. /**
  439. * Swap the ICU Unicode character names file. See uchar.c.
  440. * @internal
  441. */
  442. U_CAPI int32_t U_EXPORT2
  443. uchar_swapNames(const UDataSwapper *ds,
  444. const void *inData, int32_t length, void *outData,
  445. UErrorCode *pErrorCode);
  446. #ifdef __cplusplus
  447. U_NAMESPACE_BEGIN
  448. class UnicodeSet;
  449. class CharacterProperties {
  450. public:
  451. CharacterProperties() = delete;
  452. static const UnicodeSet *getInclusionsForProperty(UProperty prop, UErrorCode &errorCode);
  453. static const UnicodeSet *getBinaryPropertySet(UProperty property, UErrorCode &errorCode);
  454. };
  455. // implemented in uniset_props.cpp
  456. U_CFUNC UnicodeSet *
  457. uniset_getUnicode32Instance(UErrorCode &errorCode);
  458. U_NAMESPACE_END
  459. #endif
  460. #endif