aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/include/unicode/stringtriebuilder.h
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:16 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:16 +0300
commit1312621288956f199a5bd5342b0133d4395fa725 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/icu/include/unicode/stringtriebuilder.h
parente9d19cec64684c9c1e6b0c98297e5b895cf904fe (diff)
downloadydb-1312621288956f199a5bd5342b0133d4395fa725.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/include/unicode/stringtriebuilder.h')
-rw-r--r--contrib/libs/icu/include/unicode/stringtriebuilder.h66
1 files changed, 33 insertions, 33 deletions
diff --git a/contrib/libs/icu/include/unicode/stringtriebuilder.h b/contrib/libs/icu/include/unicode/stringtriebuilder.h
index 23bb56122a..2c47dd415b 100644
--- a/contrib/libs/icu/include/unicode/stringtriebuilder.h
+++ b/contrib/libs/icu/include/unicode/stringtriebuilder.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
/*
*******************************************************************************
@@ -6,7 +6,7 @@
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: stringtriebuilder.h
-* encoding: UTF-8
+* encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
@@ -18,9 +18,9 @@
#define __STRINGTRIEBUILDER_H__
#include "unicode/utypes.h"
-
-#if U_SHOW_CPLUSPLUS_API
-
+
+#if U_SHOW_CPLUSPLUS_API
+
#include "unicode/uobject.h"
/**
@@ -29,10 +29,10 @@
*/
// Forward declaration.
-/// \cond
+/// \cond
struct UHashtable;
typedef struct UHashtable UHashtable;
-/// \endcond
+/// \endcond
/**
* Build options for BytesTrieBuilder and CharsTrieBuilder.
@@ -69,7 +69,7 @@ class U_COMMON_API StringTrieBuilder : public UObject {
public:
#ifndef U_HIDE_INTERNAL_API
/** @internal */
- static int32_t hashNode(const void *node);
+ static int32_t hashNode(const void *node);
/** @internal */
static UBool equalNodes(const void *left, const void *right);
#endif /* U_HIDE_INTERNAL_API */
@@ -110,7 +110,7 @@ protected:
/** @internal */
virtual int32_t getElementStringLength(int32_t i) const = 0;
/** @internal */
- virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const = 0;
+ virtual char16_t getElementUnit(int32_t i, int32_t unitIndex) const = 0;
/** @internal */
virtual int32_t getElementValue(int32_t i) const = 0;
@@ -125,7 +125,7 @@ protected:
/** @internal */
virtual int32_t skipElementsBySomeUnits(int32_t i, int32_t unitIndex, int32_t count) const = 0;
/** @internal */
- virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const = 0;
+ virtual int32_t indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, char16_t unit) const = 0;
/** @internal */
virtual UBool matchNodesCanHaveValues() const = 0;
@@ -142,7 +142,7 @@ protected:
/** @internal */
static const int32_t kMaxBranchLinearSubNodeLength=5;
- // Maximum number of nested split-branch levels for a branch on all 2^16 possible char16_t units.
+ // Maximum number of nested split-branch levels for a branch on all 2^16 possible char16_t units.
// log2(2^16/kMaxBranchLinearSubNodeLength) rounded up.
/** @internal */
static const int32_t kMaxSplitBranchLevels=14;
@@ -193,10 +193,10 @@ protected:
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// it is needed for layout of other objects.
- /**
- * @internal
- * \cond
- */
+ /**
+ * @internal
+ * \cond
+ */
class Node : public UObject {
public:
Node(int32_t initialHash) : hash(initialHash), offset(0) {}
@@ -264,7 +264,7 @@ protected:
/** @internal */
class FinalValueNode : public Node {
public:
- FinalValueNode(int32_t v) : Node(0x111111u*37u+v), value(v) {}
+ FinalValueNode(int32_t v) : Node(0x111111u*37u+v), value(v) {}
virtual UBool operator==(const Node &other) const;
virtual void write(StringTrieBuilder &builder);
protected:
@@ -284,7 +284,7 @@ protected:
void setValue(int32_t v) {
hasValue=TRUE;
value=v;
- hash=hash*37u+v;
+ hash=hash*37u+v;
}
protected:
UBool hasValue;
@@ -298,7 +298,7 @@ protected:
class IntermediateValueNode : public ValueNode {
public:
IntermediateValueNode(int32_t v, Node *nextNode)
- : ValueNode(0x222222u*37u+hashCode(nextNode)), next(nextNode) { setValue(v); }
+ : ValueNode(0x222222u*37u+hashCode(nextNode)), next(nextNode) { setValue(v); }
virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder);
@@ -315,7 +315,7 @@ protected:
class LinearMatchNode : public ValueNode {
public:
LinearMatchNode(int32_t len, Node *nextNode)
- : ValueNode((0x333333u*37u+len)*37u+hashCode(nextNode)),
+ : ValueNode((0x333333u*37u+len)*37u+hashCode(nextNode)),
length(len), next(nextNode) {}
virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
@@ -346,25 +346,25 @@ protected:
virtual void write(StringTrieBuilder &builder);
// Adds a unit with a final value.
void add(int32_t c, int32_t value) {
- units[length]=(char16_t)c;
+ units[length]=(char16_t)c;
equal[length]=NULL;
values[length]=value;
++length;
- hash=(hash*37u+c)*37u+value;
+ hash=(hash*37u+c)*37u+value;
}
// Adds a unit which leads to another match node.
void add(int32_t c, Node *node) {
- units[length]=(char16_t)c;
+ units[length]=(char16_t)c;
equal[length]=node;
values[length]=0;
++length;
- hash=(hash*37u+c)*37u+hashCode(node);
+ hash=(hash*37u+c)*37u+hashCode(node);
}
protected:
Node *equal[kMaxBranchLinearSubNodeLength]; // NULL means "has final value".
int32_t length;
int32_t values[kMaxBranchLinearSubNodeLength];
- char16_t units[kMaxBranchLinearSubNodeLength];
+ char16_t units[kMaxBranchLinearSubNodeLength];
};
/**
@@ -372,15 +372,15 @@ protected:
*/
class SplitBranchNode : public BranchNode {
public:
- SplitBranchNode(char16_t middleUnit, Node *lessThanNode, Node *greaterOrEqualNode)
- : BranchNode(((0x555555u*37u+middleUnit)*37u+
- hashCode(lessThanNode))*37u+hashCode(greaterOrEqualNode)),
+ SplitBranchNode(char16_t middleUnit, Node *lessThanNode, Node *greaterOrEqualNode)
+ : BranchNode(((0x555555u*37u+middleUnit)*37u+
+ hashCode(lessThanNode))*37u+hashCode(greaterOrEqualNode)),
unit(middleUnit), lessThan(lessThanNode), greaterOrEqual(greaterOrEqualNode) {}
virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
virtual void write(StringTrieBuilder &builder);
protected:
- char16_t unit;
+ char16_t unit;
Node *lessThan;
Node *greaterOrEqual;
};
@@ -390,7 +390,7 @@ protected:
class BranchHeadNode : public ValueNode {
public:
BranchHeadNode(int32_t len, Node *subNode)
- : ValueNode((0x666666u*37u+len)*37u+hashCode(subNode)),
+ : ValueNode((0x666666u*37u+len)*37u+hashCode(subNode)),
length(len), next(subNode) {}
virtual UBool operator==(const Node &other) const;
virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
@@ -399,9 +399,9 @@ protected:
int32_t length;
Node *next; // A branch sub-node.
};
-
+
#endif /* U_HIDE_INTERNAL_API */
- /// \endcond
+ /// \endcond
/** @internal */
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
@@ -421,6 +421,6 @@ protected:
U_NAMESPACE_END
-#endif /* U_SHOW_CPLUSPLUS_API */
-
+#endif /* U_SHOW_CPLUSPLUS_API */
+
#endif // __STRINGTRIEBUILDER_H__