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
#ifndef icu4x_WordBreak_D_HPP
#define icu4x_WordBreak_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 WordBreak;
}
namespace icu4x {
namespace capi {
enum WordBreak {
WordBreak_Other = 0,
WordBreak_ALetter = 1,
WordBreak_Format = 2,
WordBreak_Katakana = 3,
WordBreak_MidLetter = 4,
WordBreak_MidNum = 5,
WordBreak_Numeric = 6,
WordBreak_ExtendNumLet = 7,
WordBreak_CR = 8,
WordBreak_Extend = 9,
WordBreak_LF = 10,
WordBreak_MidNumLet = 11,
WordBreak_Newline = 12,
WordBreak_RegionalIndicator = 13,
WordBreak_HebrewLetter = 14,
WordBreak_SingleQuote = 15,
WordBreak_DoubleQuote = 16,
WordBreak_EBase = 17,
WordBreak_EBaseGAZ = 18,
WordBreak_EModifier = 19,
WordBreak_GlueAfterZwj = 20,
WordBreak_ZWJ = 21,
WordBreak_WSegSpace = 22,
};
typedef struct WordBreak_option {union { WordBreak ok; }; bool is_ok; } WordBreak_option;
} // namespace capi
} // namespace
namespace icu4x {
/**
* See the [Rust documentation for `WordBreak`](https://docs.rs/icu/2.0.0/icu/properties/props/struct.WordBreak.html) for more information.
*/
class WordBreak {
public:
enum Value {
Other = 0,
ALetter = 1,
Format = 2,
Katakana = 3,
MidLetter = 4,
MidNum = 5,
Numeric = 6,
ExtendNumLet = 7,
CR = 8,
Extend = 9,
LF = 10,
MidNumLet = 11,
Newline = 12,
RegionalIndicator = 13,
HebrewLetter = 14,
SingleQuote = 15,
DoubleQuote = 16,
EBase = 17,
EBaseGAZ = 18,
EModifier = 19,
GlueAfterZwj = 20,
ZWJ = 21,
WSegSpace = 22,
};
WordBreak() = default;
// Implicit conversions between enum and ::Value
constexpr WordBreak(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.0.0/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information.
*/
inline static icu4x::WordBreak 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.0.0/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.0.0/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.0.0/icu/properties/props/struct.WordBreak.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.0.0/icu/properties/props/struct.WordBreak.html#method.from_icu4c_value) for more information.
*/
inline static std::optional<icu4x::WordBreak> from_integer_value(uint8_t other);
inline icu4x::capi::WordBreak AsFFI() const;
inline static icu4x::WordBreak FromFFI(icu4x::capi::WordBreak c_enum);
private:
Value value;
};
} // namespace
#endif // icu4x_WordBreak_D_HPP