aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/include/unicode/uniset.h
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:15 +0300
commite9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch)
tree2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/include/unicode/uniset.h
parent60040c91ffe701a84689b2c6310ff845e65cff42 (diff)
downloadydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/include/unicode/uniset.h')
-rw-r--r--contrib/libs/icu/include/unicode/uniset.h132
1 files changed, 66 insertions, 66 deletions
diff --git a/contrib/libs/icu/include/unicode/uniset.h b/contrib/libs/icu/include/unicode/uniset.h
index 9742311003..f1984956c7 100644
--- a/contrib/libs/icu/include/unicode/uniset.h
+++ b/contrib/libs/icu/include/unicode/uniset.h
@@ -1,4 +1,4 @@
-// © 2016 and later: Unicode, Inc. and others.
+// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
***************************************************************************
@@ -13,11 +13,11 @@
#ifndef UNICODESET_H
#define UNICODESET_H
-#include "unicode/utypes.h"
-
-#if U_SHOW_CPLUSPLUS_API
-
-#include "unicode/ucpmap.h"
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+#include "unicode/ucpmap.h"
#include "unicode/unifilt.h"
#include "unicode/unistr.h"
#include "unicode/uset.h"
@@ -279,24 +279,24 @@ class RuleCharacterIterator;
* @stable ICU 2.0
*/
class U_COMMON_API UnicodeSet U_FINAL : public UnicodeFilter {
-private:
- /**
- * Enough for sets with few ranges.
- * For example, White_Space has 10 ranges, list length 21.
- */
- static constexpr int32_t INITIAL_CAPACITY = 25;
- // fFlags constant
- static constexpr uint8_t kIsBogus = 1; // This set is bogus (i.e. not valid)
-
- UChar32* list = stackList; // MUST be terminated with HIGH
- int32_t capacity = INITIAL_CAPACITY; // capacity of list
- int32_t len = 1; // length of list used; 1 <= len <= capacity
- uint8_t fFlags = 0; // Bit flag (see constants above)
-
- BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not NULL.
- UChar32* buffer = nullptr; // internal buffer, may be NULL
- int32_t bufferCapacity = 0; // capacity of buffer
-
+private:
+ /**
+ * Enough for sets with few ranges.
+ * For example, White_Space has 10 ranges, list length 21.
+ */
+ static constexpr int32_t INITIAL_CAPACITY = 25;
+ // fFlags constant
+ static constexpr uint8_t kIsBogus = 1; // This set is bogus (i.e. not valid)
+
+ UChar32* list = stackList; // MUST be terminated with HIGH
+ int32_t capacity = INITIAL_CAPACITY; // capacity of list
+ int32_t len = 1; // length of list used; 1 <= len <= capacity
+ uint8_t fFlags = 0; // Bit flag (see constants above)
+
+ BMPSet *bmpSet = nullptr; // The set is frozen iff either bmpSet or stringSpan is not NULL.
+ UChar32* buffer = nullptr; // internal buffer, may be NULL
+ int32_t bufferCapacity = 0; // capacity of buffer
+
/**
* The pattern representation of this set. This may not be the
* most economical pattern. It is the pattern supplied to
@@ -306,19 +306,19 @@ private:
* indicating that toPattern() must generate a pattern
* representation from the inversion list.
*/
- char16_t *pat = nullptr;
- int32_t patLen = 0;
-
- UVector* strings = nullptr; // maintained in sorted order
- UnicodeSetStringSpan *stringSpan = nullptr;
-
- /**
- * Initial list array.
- * Avoids some heap allocations, and list is never nullptr.
- * Increases the object size a bit.
- */
- UChar32 stackList[INITIAL_CAPACITY];
-
+ char16_t *pat = nullptr;
+ int32_t patLen = 0;
+
+ UVector* strings = nullptr; // maintained in sorted order
+ UnicodeSetStringSpan *stringSpan = nullptr;
+
+ /**
+ * Initial list array.
+ * Avoids some heap allocations, and list is never nullptr.
+ * Increases the object size a bit.
+ */
+ UChar32 stackList[INITIAL_CAPACITY];
+
public:
/**
* Determine if this object contains a valid set.
@@ -494,7 +494,7 @@ public:
* <tt>true</tt> if the specified set is not equal to this set.
* @stable ICU 2.0
*/
- inline UBool operator!=(const UnicodeSet& o) const;
+ inline UBool operator!=(const UnicodeSet& o) const;
/**
* Returns a copy of this object. All UnicodeFunctor objects have
@@ -505,7 +505,7 @@ public:
* @see cloneAsThawed
* @stable ICU 2.0
*/
- virtual UnicodeSet* clone() const;
+ virtual UnicodeSet* clone() const;
/**
* Returns the hash code value for this set.
@@ -583,7 +583,7 @@ public:
* @see cloneAsThawed
* @stable ICU 3.8
*/
- UnicodeSet *freeze();
+ UnicodeSet *freeze();
/**
* Clone the set and make the clone mutable.
@@ -593,15 +593,15 @@ public:
* @see isFrozen
* @stable ICU 3.8
*/
- UnicodeSet *cloneAsThawed() const;
+ UnicodeSet *cloneAsThawed() const;
//----------------------------------------------------------------
// Public API
//----------------------------------------------------------------
/**
- * Make this object represent the range `start - end`.
- * If `end > start` then this object is set to an empty range.
+ * Make this object represent the range `start - end`.
+ * If `end > start` then this object is set to an empty range.
* A frozen set will not be modified.
*
* @param start first character in the set, inclusive
@@ -906,7 +906,7 @@ public:
* @stable ICU 3.8
* @see USetSpanCondition
*/
- int32_t span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
+ int32_t span(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
/**
* Returns the end of the substring of the input string according to the USetSpanCondition.
@@ -939,7 +939,7 @@ public:
* @stable ICU 3.8
* @see USetSpanCondition
*/
- int32_t spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
+ int32_t spanBack(const char16_t *s, int32_t length, USetSpanCondition spanCondition) const;
/**
* Returns the start of the substring of the input string according to the USetSpanCondition.
@@ -1519,7 +1519,7 @@ private:
//----------------------------------------------------------------
UnicodeSet(const UnicodeSet& o, UBool /* asThawed */);
- UnicodeSet& copyFrom(const UnicodeSet& o, UBool asThawed);
+ UnicodeSet& copyFrom(const UnicodeSet& o, UBool asThawed);
//----------------------------------------------------------------
// Implementation: Pattern parsing
@@ -1535,25 +1535,25 @@ private:
UnicodeString& rebuiltPat,
uint32_t options,
UnicodeSet& (UnicodeSet::*caseClosure)(int32_t attribute),
- int32_t depth,
+ int32_t depth,
UErrorCode& ec);
//----------------------------------------------------------------
// Implementation: Utility methods
//----------------------------------------------------------------
- static int32_t nextCapacity(int32_t minCapacity);
+ static int32_t nextCapacity(int32_t minCapacity);
- bool ensureCapacity(int32_t newLen);
-
- bool ensureBufferCapacity(int32_t newLen);
+ bool ensureCapacity(int32_t newLen);
+ bool ensureBufferCapacity(int32_t newLen);
+
void swapBuffers(void);
UBool allocateStrings(UErrorCode &status);
- UBool hasStrings() const;
- int32_t stringsSize() const;
- UBool stringsContains(const UnicodeString &s) const;
+ UBool hasStrings() const;
+ int32_t stringsSize() const;
+ UBool stringsContains(const UnicodeString &s) const;
UnicodeString& _toPattern(UnicodeString& result,
UBool escapeUnprintable) const;
@@ -1652,21 +1652,21 @@ private:
*/
void applyFilter(Filter filter,
void* context,
- const UnicodeSet* inclusions,
+ const UnicodeSet* inclusions,
UErrorCode &status);
- // UCPMap is now stable ICU 63
- void applyIntPropertyValue(const UCPMap *map,
- UCPMapValueFilter *filter, const void *context,
- UErrorCode &errorCode);
-
+ // UCPMap is now stable ICU 63
+ void applyIntPropertyValue(const UCPMap *map,
+ UCPMapValueFilter *filter, const void *context,
+ UErrorCode &errorCode);
+
/**
* Set the new pattern to cache.
*/
- void setPattern(const UnicodeString& newPat) {
- setPattern(newPat.getBuffer(), newPat.length());
- }
- void setPattern(const char16_t *newPat, int32_t newPatLen);
+ void setPattern(const UnicodeString& newPat) {
+ setPattern(newPat.getBuffer(), newPat.length());
+ }
+ void setPattern(const char16_t *newPat, int32_t newPatLen);
/**
* Release existing cached pattern.
*/
@@ -1739,6 +1739,6 @@ inline int32_t UnicodeSet::spanBack(const UnicodeString &s, int32_t limit, USetS
U_NAMESPACE_END
-#endif /* U_SHOW_CPLUSPLUS_API */
-
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif