1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#ifndef ICU4X_BidiClass_D_HPP
#define ICU4X_BidiClass_D_HPP
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <memory>
#include <functional>
#include <optional>
#include <cstdlib>
#include "diplomat_runtime.hpp"
namespace icu4x {
class BidiClass;
} // namespace icu4x
namespace icu4x {
namespace capi {
enum BidiClass {
BidiClass_LeftToRight = 0,
BidiClass_RightToLeft = 1,
BidiClass_EuropeanNumber = 2,
BidiClass_EuropeanSeparator = 3,
BidiClass_EuropeanTerminator = 4,
BidiClass_ArabicNumber = 5,
BidiClass_CommonSeparator = 6,
BidiClass_ParagraphSeparator = 7,
BidiClass_SegmentSeparator = 8,
BidiClass_WhiteSpace = 9,
BidiClass_OtherNeutral = 10,
BidiClass_LeftToRightEmbedding = 11,
BidiClass_LeftToRightOverride = 12,
BidiClass_ArabicLetter = 13,
BidiClass_RightToLeftEmbedding = 14,
BidiClass_RightToLeftOverride = 15,
BidiClass_PopDirectionalFormat = 16,
BidiClass_NonspacingMark = 17,
BidiClass_BoundaryNeutral = 18,
BidiClass_FirstStrongIsolate = 19,
BidiClass_LeftToRightIsolate = 20,
BidiClass_RightToLeftIsolate = 21,
BidiClass_PopDirectionalIsolate = 22,
};
typedef struct BidiClass_option {union { BidiClass ok; }; bool is_ok; } BidiClass_option;
} // namespace capi
} // namespace
namespace icu4x {
/**
* See the [Rust documentation for `BidiClass`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html) for more information.
*/
class BidiClass {
public:
enum Value {
/**
* See the [Rust documentation for `LeftToRight`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.LeftToRight) for more information.
*/
LeftToRight = 0,
/**
* See the [Rust documentation for `RightToLeft`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.RightToLeft) for more information.
*/
RightToLeft = 1,
/**
* See the [Rust documentation for `EuropeanNumber`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.EuropeanNumber) for more information.
*/
EuropeanNumber = 2,
/**
* See the [Rust documentation for `EuropeanSeparator`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.EuropeanSeparator) for more information.
*/
EuropeanSeparator = 3,
/**
* See the [Rust documentation for `EuropeanTerminator`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.EuropeanTerminator) for more information.
*/
EuropeanTerminator = 4,
/**
* See the [Rust documentation for `ArabicNumber`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.ArabicNumber) for more information.
*/
ArabicNumber = 5,
/**
* See the [Rust documentation for `CommonSeparator`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.CommonSeparator) for more information.
*/
CommonSeparator = 6,
/**
* See the [Rust documentation for `ParagraphSeparator`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.ParagraphSeparator) for more information.
*/
ParagraphSeparator = 7,
/**
* See the [Rust documentation for `SegmentSeparator`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.SegmentSeparator) for more information.
*/
SegmentSeparator = 8,
/**
* See the [Rust documentation for `WhiteSpace`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.WhiteSpace) for more information.
*/
WhiteSpace = 9,
/**
* See the [Rust documentation for `OtherNeutral`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.OtherNeutral) for more information.
*/
OtherNeutral = 10,
/**
* See the [Rust documentation for `LeftToRightEmbedding`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.LeftToRightEmbedding) for more information.
*/
LeftToRightEmbedding = 11,
/**
* See the [Rust documentation for `LeftToRightOverride`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.LeftToRightOverride) for more information.
*/
LeftToRightOverride = 12,
/**
* See the [Rust documentation for `ArabicLetter`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.ArabicLetter) for more information.
*/
ArabicLetter = 13,
/**
* See the [Rust documentation for `RightToLeftEmbedding`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.RightToLeftEmbedding) for more information.
*/
RightToLeftEmbedding = 14,
/**
* See the [Rust documentation for `RightToLeftOverride`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.RightToLeftOverride) for more information.
*/
RightToLeftOverride = 15,
/**
* See the [Rust documentation for `PopDirectionalFormat`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.PopDirectionalFormat) for more information.
*/
PopDirectionalFormat = 16,
/**
* See the [Rust documentation for `NonspacingMark`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.NonspacingMark) for more information.
*/
NonspacingMark = 17,
/**
* See the [Rust documentation for `BoundaryNeutral`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.BoundaryNeutral) for more information.
*/
BoundaryNeutral = 18,
/**
* See the [Rust documentation for `FirstStrongIsolate`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.FirstStrongIsolate) for more information.
*/
FirstStrongIsolate = 19,
/**
* See the [Rust documentation for `LeftToRightIsolate`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.LeftToRightIsolate) for more information.
*/
LeftToRightIsolate = 20,
/**
* See the [Rust documentation for `RightToLeftIsolate`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.RightToLeftIsolate) for more information.
*/
RightToLeftIsolate = 21,
/**
* See the [Rust documentation for `PopDirectionalIsolate`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#associatedconstant.PopDirectionalIsolate) for more information.
*/
PopDirectionalIsolate = 22,
};
BidiClass(): value(Value::LeftToRight) {}
// Implicit conversions between enum and ::Value
constexpr BidiClass(Value v) : value(v) {}
constexpr operator Value() const { return value; }
// Prevent usage as boolean value
explicit operator bool() const = delete;
/**
* See the [Rust documentation for `for_char`](https://docs.rs/icu/2.3.1/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information.
*/
inline static icu4x::BidiClass for_char(char32_t ch);
/**
* Get the "long" name of this property value (returns empty if property value is unknown)
*
* See the [Rust documentation for `get`](https://docs.rs/icu/2.3.1/icu/properties/struct.PropertyNamesLongBorrowed.html#method.get) for more information.
*/
inline std::optional<std::string_view> long_name() const;
/**
* Get the "short" name of this property value (returns empty if property value is unknown)
*
* See the [Rust documentation for `get`](https://docs.rs/icu/2.3.1/icu/properties/struct.PropertyNamesShortBorrowed.html#method.get) for more information.
*/
inline std::optional<std::string_view> short_name() const;
/**
* Convert to an integer value usable with ICU4C and `CodePointMapData`
*
* See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#method.to_icu4c_value) for more information.
*/
inline uint8_t to_integer_value() const;
/**
* Convert from an integer value from ICU4C or `CodePointMapData`
*
* See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/2.3.1/icu/properties/props/struct.BidiClass.html#method.from_icu4c_value) for more information.
*/
inline static std::optional<icu4x::BidiClass> from_integer_value(uint8_t other);
/**
* Creates a `BidiClass` from a string.
*
* Short names, long names, and aliases are supported, and matching is case-insensitive.
*/
inline static std::optional<icu4x::BidiClass> try_from_str(std::string_view s);
inline icu4x::capi::BidiClass AsFFI() const;
inline static icu4x::BidiClass FromFFI(icu4x::capi::BidiClass c_enum);
private:
Value value;
};
} // namespace
#endif // ICU4X_BidiClass_D_HPP