ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bms.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2010, 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 
35 typedef void UCD;
36 
52 ucd_open(UCollator *coll, UErrorCode *status);
53 
61 U_CAPI void U_EXPORT2
62 ucd_close(UCD *ucd);
63 
78 ucd_getCollator(UCD *ucd);
79 
92 U_CAPI void U_EXPORT2
94 
102 U_CAPI void U_EXPORT2
104 
182 struct BMS;
183 typedef struct BMS BMS;
204 bms_open(UCD *ucd,
205  const UChar *pattern, int32_t patternLength,
206  const UChar *target, int32_t targetLength,
207  UErrorCode *status);
208 
216 U_CAPI void U_EXPORT2
217 bms_close(BMS *bms);
218 
228 bms_empty(BMS *bms);
229 
242 bms_getData(BMS *bms);
243 
257 bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end);
258 
269 U_CAPI void U_EXPORT2
270 bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status);
271 
272 #endif
273 
274 #endif /* _BMS_H */
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:135
U_CAPI BMS * bms_open(UCD *ucd, const UChar *pattern, int32_t patternLength, const UChar *target, int32_t targetLength, UErrorCode *status)
Construct a MBS object.
U_CAPI UBool bms_empty(BMS *bms)
Test the pattern to see if it generates any CEs.
U_CAPI void ucd_freeCache()
UCD objects are expensive to compute, and so may be cached.
U_CAPI UCD * bms_getData(BMS *bms)
Get the UCD object used to create a given BMS object.
U_CAPI UCollator * ucd_getCollator(UCD *ucd)
Get the UCollator object used to create a UCD object.
C API: Collator.
U_CAPI void bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status)
Set the target string for the match.
U_CAPI void ucd_close(UCD *ucd)
Release a UCD object.
#define U_EXPORT2
Definition: platform.h:314
U_CAPI void ucd_flushCache()
UCD objects are expensive to compute, and so may be cached.
struct BMS BMS
Definition: bms.h:183
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
Definition: umachine.h:325
U_CAPI UCD * ucd_open(UCollator *coll, UErrorCode *status)
Open a UCD object.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:639
U_CAPI UBool bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end)
Search for the pattern string in the target string.
struct UCollator UCollator
structure representing a collator object instance
Definition: ucol.h:62
Basic definitions for ICU, for both C and C++ APIs.
U_CAPI void bms_close(BMS *bms)
Close a BMS object and release all the storage associated with it.
int8_t UBool
The ICU boolean type.
Definition: umachine.h:228
void UCD
A UCD object holds the Collator-specific data needed to compute the length of the shortest string tha...
Definition: bms.h:35