ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
LineBreakOptionsV2.hpp
Go to the documentation of this file.
1#ifndef ICU4X_LineBreakOptionsV2_HPP
2#define ICU4X_LineBreakOptionsV2_HPP
3
5
6#include <stdio.h>
7#include <stdint.h>
8#include <stddef.h>
9#include <stdbool.h>
10#include <memory>
11#include <functional>
12#include <optional>
13#include <cstdlib>
16#include "diplomat_runtime.hpp"
17
18
19namespace icu4x {
20namespace capi {
21
22} // namespace capi
23} // namespace
24
25
26inline icu4x::capi::LineBreakOptionsV2 icu4x::LineBreakOptionsV2::AsFFI() const {
27 return icu4x::capi::LineBreakOptionsV2 {
28 /* .strictness = */ strictness.has_value() ? (icu4x::capi::LineBreakStrictness_option{ { strictness.value().AsFFI() }, true }) : (icu4x::capi::LineBreakStrictness_option{ {}, false }),
29 /* .word_option = */ word_option.has_value() ? (icu4x::capi::LineBreakWordOption_option{ { word_option.value().AsFFI() }, true }) : (icu4x::capi::LineBreakWordOption_option{ {}, false }),
30 };
31}
32
33inline icu4x::LineBreakOptionsV2 icu4x::LineBreakOptionsV2::FromFFI(icu4x::capi::LineBreakOptionsV2 c_struct) {
34 return icu4x::LineBreakOptionsV2 {
35 /* .strictness = */ c_struct.strictness.is_ok ? std::optional(icu4x::LineBreakStrictness::FromFFI(c_struct.strictness.ok)) : std::nullopt,
36 /* .word_option = */ c_struct.word_option.is_ok ? std::optional(icu4x::LineBreakWordOption::FromFFI(c_struct.word_option.ok)) : std::nullopt,
37 };
38}
39
40
41#endif // ICU4X_LineBreakOptionsV2_HPP
Definition LineBreakWordOption.d.hpp:31
Definition Bidi.d.hpp:13
std::optional< icu4x::LineBreakStrictness > strictness
Definition LineBreakOptionsV2.d.hpp:39