Lines Matching defs:BMS
8 #include "unicode/bms.h"
62 struct BMS
64 BoyerMooreSearch *bms;
68 U_CAPI BMS * U_EXPORT2
74 BMS *bms = STATIC_CAST(BMS *, uprv_malloc(sizeof(BMS)));
76 if (bms == NULL) {
85 bms->targetString = new UnicodeString(target, targetLength);
87 if (bms->targetString == NULL) {
88 bms->bms = NULL;
90 return bms;
93 bms->targetString = NULL;
96 bms->bms = new BoyerMooreSearch(data, patternString, bms->targetString, *status);
98 if (bms->bms == NULL) {
102 return bms;
106 bms_close(BMS *bms)
108 delete bms->bms;
110 delete bms->targetString;
112 uprv_free(bms);
116 bms_empty(BMS *bms)
118 return bms->bms->empty();
122 bms_getData(BMS *bms)
124 return STATIC_CAST(UCD *, bms->bms->getData());
128 bms_search(BMS *bms, int32_t offset, int32_t *start, int32_t *end)
130 return bms->bms->search(offset, *start, *end);
134 bms_setTargetString(BMS *bms, const UChar *target, int32_t targetLength, UErrorCode *status)
140 if (bms->targetString != NULL) {
141 delete bms->targetString;
145 bms->targetString = new UnicodeString(target, targetLength);
147 bms->targetString = NULL;
150 bms->bms->setTargetString(bms->targetString, *status);