Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: source/common/unicode/uniset.h

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/unicode/umachine.h ('k') | source/common/unicode/urename.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 *************************************************************************** 2 ***************************************************************************
3 * Copyright (C) 1999-2013, International Business Machines Corporation 3 * Copyright (C) 1999-2014, International Business Machines Corporation
4 * and others. All Rights Reserved. 4 * and others. All Rights Reserved.
5 *************************************************************************** 5 ***************************************************************************
6 * Date Name Description 6 * Date Name Description
7 * 10/20/99 alan Creation. 7 * 10/20/99 alan Creation.
8 *************************************************************************** 8 ***************************************************************************
9 */ 9 */
10 10
11 #ifndef UNICODESET_H 11 #ifndef UNICODESET_H
12 #define UNICODESET_H 12 #define UNICODESET_H
13 13
14 #include "unicode/unifilt.h" 14 #include "unicode/unifilt.h"
15 #include "unicode/unistr.h" 15 #include "unicode/unistr.h"
16 #include "unicode/uset.h" 16 #include "unicode/uset.h"
17 17
18 /** 18 /**
19 * \file 19 * \file
20 * \brief C++ API: Unicode Set 20 * \brief C++ API: Unicode Set
21 */ 21 */
22 22
23 U_NAMESPACE_BEGIN 23 U_NAMESPACE_BEGIN
24 24
25 // Forward Declarations. 25 // Forward Declarations.
26 void UnicodeSet_initInclusion(int32_t src, UErrorCode &status); /**< @internal * / 26 void U_CALLCONV UnicodeSet_initInclusion(int32_t src, UErrorCode &status); /**< @internal */
27 27
28 class BMPSet; 28 class BMPSet;
29 class ParsePosition; 29 class ParsePosition;
30 class RBBIRuleScanner; 30 class RBBIRuleScanner;
31 class SymbolTable; 31 class SymbolTable;
32 class UnicodeSetStringSpan; 32 class UnicodeSetStringSpan;
33 class UVector; 33 class UVector;
34 class RuleCharacterIterator; 34 class RuleCharacterIterator;
35 35
36 /** 36 /**
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 * there are usually very few opportunities for failure other than a shortage 266 * there are usually very few opportunities for failure other than a shortage
267 * of memory, error codes in low-level C++ string methods would be inconvenien t, 267 * of memory, error codes in low-level C++ string methods would be inconvenien t,
268 * and the error code as the last parameter (ICU convention) would prevent 268 * and the error code as the last parameter (ICU convention) would prevent
269 * the use of default parameter values. 269 * the use of default parameter values.
270 * Instead, such methods set the UnicodeSet into a "bogus" state 270 * Instead, such methods set the UnicodeSet into a "bogus" state
271 * (see isBogus()) if an error occurs. 271 * (see isBogus()) if an error occurs.
272 * 272 *
273 * @author Alan Liu 273 * @author Alan Liu
274 * @stable ICU 2.0 274 * @stable ICU 2.0
275 */ 275 */
276 class U_COMMON_API UnicodeSet : public UnicodeFilter { 276 class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
277 277
278 int32_t len; // length of list used; 0 <= len <= capacity 278 int32_t len; // length of list used; 0 <= len <= capacity
279 int32_t capacity; // capacity of list 279 int32_t capacity; // capacity of list
280 UChar32* list; // MUST be terminated with HIGH 280 UChar32* list; // MUST be terminated with HIGH
281 BMPSet *bmpSet; // The set is frozen iff either bmpSet or stringSpan is not NULL. 281 BMPSet *bmpSet; // The set is frozen iff either bmpSet or stringSpan is not NULL.
282 UChar32* buffer; // internal buffer, may be NULL 282 UChar32* buffer; // internal buffer, may be NULL
283 int32_t bufferCapacity; // capacity of buffer 283 int32_t bufferCapacity; // capacity of buffer
284 int32_t patLen; 284 int32_t patLen;
285 285
286 /** 286 /**
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 * @return a reference to this. 1582 * @return a reference to this.
1583 */ 1583 */
1584 UnicodeSet& applyPropertyPattern(const UnicodeString& pattern, 1584 UnicodeSet& applyPropertyPattern(const UnicodeString& pattern,
1585 ParsePosition& ppos, 1585 ParsePosition& ppos,
1586 UErrorCode &ec); 1586 UErrorCode &ec);
1587 1587
1588 void applyPropertyPattern(RuleCharacterIterator& chars, 1588 void applyPropertyPattern(RuleCharacterIterator& chars,
1589 UnicodeString& rebuiltPat, 1589 UnicodeString& rebuiltPat,
1590 UErrorCode& ec); 1590 UErrorCode& ec);
1591 1591
1592 friend void UnicodeSet_initInclusion(int32_t src, UErrorCode &status); 1592 friend void U_CALLCONV UnicodeSet_initInclusion(int32_t src, UErrorCode &sta tus);
1593 static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status); 1593 static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status);
1594 1594
1595 /** 1595 /**
1596 * A filter that returns TRUE if the given code point should be 1596 * A filter that returns TRUE if the given code point should be
1597 * included in the UnicodeSet being constructed. 1597 * included in the UnicodeSet being constructed.
1598 */ 1598 */
1599 typedef UBool (*Filter)(UChar32 codePoint, void* context); 1599 typedef UBool (*Filter)(UChar32 codePoint, void* context);
1600 1600
1601 /** 1601 /**
1602 * Given a filter, set this UnicodeSet to the code points 1602 * Given a filter, set this UnicodeSet to the code points
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 limit=0; 1682 limit=0;
1683 } else if(limit>sLength) { 1683 } else if(limit>sLength) {
1684 limit=sLength; 1684 limit=sLength;
1685 } 1685 }
1686 return spanBack(s.getBuffer(), limit, spanCondition); 1686 return spanBack(s.getBuffer(), limit, spanCondition);
1687 } 1687 }
1688 1688
1689 U_NAMESPACE_END 1689 U_NAMESPACE_END
1690 1690
1691 #endif 1691 #endif
OLDNEW
« no previous file with comments | « source/common/unicode/umachine.h ('k') | source/common/unicode/urename.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698