ICU 50.1.2  50.1.2
bms.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2012, International Business Machines Corporation and Others.
3  * All rights reserved.
4  */
5 
12 #ifndef _BMS_H
13 #define _BMS_H
14 
15 #include "unicode/utypes.h"
16 
17 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION
18 
19 #include "unicode/ucol.h"
20 
21 #ifndef U_HIDE_INTERNAL_API
22 
39 typedef void UCD;
40 
55 U_INTERNAL UCD * U_EXPORT2
56 ucd_open(UCollator *coll, UErrorCode *status);
57 
65 U_INTERNAL void U_EXPORT2
66 ucd_close(UCD *ucd);
67 
81 U_INTERNAL UCollator * U_EXPORT2
82 ucd_getCollator(UCD *ucd);
83 
96 U_INTERNAL void U_EXPORT2
98 
106 U_INTERNAL void U_EXPORT2
108 
186 struct BMS;
187 typedef struct BMS BMS;
207 U_INTERNAL BMS * U_EXPORT2
208 bms_open(UCD *ucd,
209  const UChar *pattern, int32_t patternLength,
210  const UChar *target, int32_t targetLength,
211  UErrorCode *status);
212 
220 U_INTERNAL void U_EXPORT2
221 bms_close(BMS *bms);
222 
231 U_INTERNAL UBool U_EXPORT2
232 bms_empty(BMS *bms);
233 
245 U_INTERNAL UCD * U_EXPORT2
246 bms_getData(BMS *bms);
247 
260 U_INTERNAL UBool U_EXPORT2
261 bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end);
262 
273 U_INTERNAL void U_EXPORT2
274 bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status);
275 
276 #endif /* U_HIDE_INTERNAL_API */
277 
278 #endif
279 
280 #endif /* _BMS_H */
UCD * bms_getData(BMS *bms)
Get the UCD object used to create a given BMS object.
void ucd_freeCache()
UCD objects are expensive to compute, and so may be cached.
void ucd_flushCache()
UCD objects are expensive to compute, and so may be cached.
void ucd_close(UCD *ucd)
Release a UCD object.
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
Definition: umachine.h:117
UCollator * ucd_getCollator(UCD *ucd)
Get the UCollator object used to create a UCD object.
BMS * bms_open(UCD *ucd, const UChar *pattern, int32_t patternLength, const UChar *target, int32_t targetLength, UErrorCode *status)
Construct a MBS object.
UBool bms_empty(BMS *bms)
Test the pattern to see if it generates any CEs.
C API: Collator.
struct BMS BMS
Definition: bms.h:187
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition: umachine.h:278
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:62
Basic definitions for ICU, for both C and C++ APIs.
UCD * ucd_open(UCollator *coll, UErrorCode *status)
Open a UCD object.
void bms_close(BMS *bms)
Close a BMS object and release all the storage associated with it.
void bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status)
Set the target string for the match.
int8_t UBool
The ICU boolean type.
Definition: umachine.h:200
void UCD
A UCD object holds the Collator-specific data needed to compute the length of the shortest string tha...
Definition: bms.h:39
UBool bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end)
Search for the pattern string in the target string.