ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
IndicConjunctBreak.d.hpp
Go to the documentation of this file.
1#ifndef ICU4X_IndicConjunctBreak_D_HPP
2#define ICU4X_IndicConjunctBreak_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"
13namespace icu4x {
15} // namespace icu4x
16
17
18
19namespace icu4x {
20namespace capi {
21 enum IndicConjunctBreak {
22 IndicConjunctBreak_None = 0,
23 IndicConjunctBreak_Consonant = 1,
24 IndicConjunctBreak_Extend = 2,
25 IndicConjunctBreak_Linker = 3,
26 };
27
28 typedef struct IndicConjunctBreak_option {union { IndicConjunctBreak ok; }; bool is_ok; } IndicConjunctBreak_option;
29} // namespace capi
30} // namespace
31
32namespace icu4x {
37public:
38 enum Value {
42 None = 0,
50 Extend = 2,
54 Linker = 3,
55 };
56
58
59 // Implicit conversions between enum and ::Value
60 constexpr IndicConjunctBreak(Value v) : value(v) {}
61 constexpr operator Value() const { return value; }
62 // Prevent usage as boolean value
63 explicit operator bool() const = delete;
64
68 inline static icu4x::IndicConjunctBreak for_char(char32_t ch);
69
75 inline std::optional<std::string_view> long_name() const;
76
82 inline std::optional<std::string_view> short_name() const;
83
89 inline uint8_t to_integer_value() const;
90
96 inline static std::optional<icu4x::IndicConjunctBreak> from_integer_value(uint8_t other);
97
98 inline static std::optional<icu4x::IndicConjunctBreak> try_from_str(std::string_view s);
99
100 inline icu4x::capi::IndicConjunctBreak AsFFI() const;
101 inline static icu4x::IndicConjunctBreak FromFFI(icu4x::capi::IndicConjunctBreak c_enum);
102private:
103 Value value;
104};
105
106} // namespace
107#endif // ICU4X_IndicConjunctBreak_D_HPP
Definition IndicConjunctBreak.d.hpp:36
static icu4x::IndicConjunctBreak for_char(char32_t ch)
Definition IndicConjunctBreak.hpp:57
IndicConjunctBreak()
Definition IndicConjunctBreak.d.hpp:57
uint8_t to_integer_value() const
Definition IndicConjunctBreak.hpp:72
std::optional< std::string_view > long_name() const
Definition IndicConjunctBreak.hpp:62
std::optional< std::string_view > short_name() const
Definition IndicConjunctBreak.hpp:67
static std::optional< icu4x::IndicConjunctBreak > from_integer_value(uint8_t other)
Definition IndicConjunctBreak.hpp:77
constexpr IndicConjunctBreak(Value v)
Definition IndicConjunctBreak.d.hpp:60
static std::optional< icu4x::IndicConjunctBreak > try_from_str(std::string_view s)
Definition IndicConjunctBreak.hpp:82
Value
Definition IndicConjunctBreak.d.hpp:38
@ None
Definition IndicConjunctBreak.d.hpp:42
@ Consonant
Definition IndicConjunctBreak.d.hpp:46
@ Linker
Definition IndicConjunctBreak.d.hpp:54
@ Extend
Definition IndicConjunctBreak.d.hpp:50
Definition Bidi.d.hpp:13