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>
12#include "diplomat_runtime.hpp"
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
40
41 // Implicit conversions between enum and ::Value
42 constexpr SegmenterWordType(Value v) : value(v) {}
43 constexpr operator Value() const { return value; }
44 // Prevent usage as boolean value
45 explicit operator bool() const = delete;
46
50 inline bool is_word_like() const;
51
52 inline icu4x::capi::SegmenterWordType AsFFI() const;
53 inline static icu4x::SegmenterWordType FromFFI(icu4x::capi::SegmenterWordType c_enum);
54private:
55 Value value;
56};
57
58} // namespace
59#endif // ICU4X_SegmenterWordType_D_HPP
Definition SegmenterWordType.d.hpp:31
SegmenterWordType()
Definition SegmenterWordType.d.hpp:39
constexpr SegmenterWordType(Value v)
Definition SegmenterWordType.d.hpp:42
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:13