ICU 50.2 50.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
11
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
39typedef void UCD;
40
55U_INTERNAL UCD * U_EXPORT2
57
65U_INTERNAL void U_EXPORT2
67
81U_INTERNAL UCollator * U_EXPORT2
83
96U_INTERNAL void U_EXPORT2
98
106U_INTERNAL void U_EXPORT2
108
186struct BMS;
187typedef struct BMS BMS;
188
207U_INTERNAL BMS * U_EXPORT2
209 const UChar *pattern, int32_t patternLength,
210 const UChar *target, int32_t targetLength,
211 UErrorCode *status);
212
220U_INTERNAL void U_EXPORT2
222
231U_INTERNAL UBool U_EXPORT2
233
245U_INTERNAL UCD * U_EXPORT2
247
260U_INTERNAL UBool U_EXPORT2
261bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end);
262
273U_INTERNAL void U_EXPORT2
274bms_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 */
BMS * bms_open(UCD *ucd, const UChar *pattern, int32_t patternLength, const UChar *target, int32_t targetLength, UErrorCode *status)
Construct a MBS object.
void UCD
A UCD object holds the Collator-specific data needed to compute the length of the shortest string tha...
Definition bms.h:39
struct BMS BMS
Definition bms.h:187
UCollator * ucd_getCollator(UCD *ucd)
Get the UCollator object used to create a UCD object.
void ucd_flushCache()
UCD objects are expensive to compute, and so may be cached.
void ucd_freeCache()
UCD objects are expensive to compute, and so may be cached.
void bms_close(BMS *bms)
Close a BMS object and release all the storage associated with it.
UCD * ucd_open(UCollator *coll, UErrorCode *status)
Open a UCD object.
void bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status)
Set the target string for the match.
void ucd_close(UCD *ucd)
Release a UCD object.
UBool bms_empty(BMS *bms)
Test the pattern to see if it generates any CEs.
UCD * bms_getData(BMS *bms)
Get the UCD object used to create a given BMS object.
UBool bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end)
Search for the pattern string in the target string.
C API: Collator.
struct UCollator UCollator
structure representing a collator object instance
Definition ucol.h:62
#define U_INTERNAL
This is used to declare a function as an internal ICU C API.
Definition umachine.h:117
int8_t UBool
The ICU boolean type.
Definition umachine.h:200
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
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476