ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
SegmenterWordType.d.hpp
Go to the documentation of this file.
1#ifndef icu4x_SegmenterWordType_D_HPP
2#define icu4x_SegmenterWordType_D_HPP
3
4#include <stdio.h>
5#include <stdint.h>
6#include <stddef.h>
7#include <stdbool.h>
8#include <memory>
9#include <functional>
10#include <optional>
11#include <cstdlib>
13
14
15namespace icu4x {
16namespace capi {
17 enum SegmenterWordType {
18 SegmenterWordType_None = 0,
19 SegmenterWordType_Number = 1,
20 SegmenterWordType_Letter = 2,
21 };
22
23 typedef struct SegmenterWordType_option {union { SegmenterWordType ok; }; bool is_ok; } SegmenterWordType_option;
24} // namespace capi
25} // namespace
26
27namespace icu4x {
32public:
33 enum Value {
34 None = 0,
35 Number = 1,
36 Letter = 2,
37 };
38
39 SegmenterWordType() = default;
40 // Implicit conversions between enum and ::Value
41 constexpr SegmenterWordType(Value v) : value(v) {}
42 constexpr operator Value() const { return value; }
43 // Prevent usage as boolean value
44 explicit operator bool() const = delete;
45
49 inline bool is_word_like() const;
50
51 inline icu4x::capi::SegmenterWordType AsFFI() const;
52 inline static icu4x::SegmenterWordType FromFFI(icu4x::capi::SegmenterWordType c_enum);
53private:
54 Value value;
55};
56
57} // namespace
58#endif // icu4x_SegmenterWordType_D_HPP
Definition SegmenterWordType.d.hpp:31
constexpr SegmenterWordType(Value v)
Definition SegmenterWordType.d.hpp:41
Value
Definition SegmenterWordType.d.hpp:33
@ Number
Definition SegmenterWordType.d.hpp:35
@ None
Definition SegmenterWordType.d.hpp:34
@ Letter
Definition SegmenterWordType.d.hpp:36
bool is_word_like() const
Definition SegmenterWordType.hpp:42
Definition Bidi.d.hpp:14