1#ifndef ICU4X_LineSegmenter_HPP
2#define ICU4X_LineSegmenter_HPP
28 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_auto_mv1(
void);
30 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_lstm_mv1(
void);
32 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_dictionary_mv1(
void);
34 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_for_non_complex_scripts_mv1(
void);
36 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_auto_with_options_v2_mv1(
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
38 typedef struct icu4x_LineSegmenter_create_auto_with_options_v2_and_provider_mv1_result {
union {icu4x::capi::LineSegmenter* ok; icu4x::capi::DataError err;};
bool is_ok;} icu4x_LineSegmenter_create_auto_with_options_v2_and_provider_mv1_result;
39 icu4x_LineSegmenter_create_auto_with_options_v2_and_provider_mv1_result icu4x_LineSegmenter_create_auto_with_options_v2_and_provider_mv1(
const icu4x::capi::DataProvider* provider,
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
41 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_lstm_with_options_v2_mv1(
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
43 typedef struct icu4x_LineSegmenter_create_lstm_with_options_v2_and_provider_mv1_result {
union {icu4x::capi::LineSegmenter* ok; icu4x::capi::DataError err;};
bool is_ok;} icu4x_LineSegmenter_create_lstm_with_options_v2_and_provider_mv1_result;
44 icu4x_LineSegmenter_create_lstm_with_options_v2_and_provider_mv1_result icu4x_LineSegmenter_create_lstm_with_options_v2_and_provider_mv1(
const icu4x::capi::DataProvider* provider,
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
46 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_dictionary_with_options_v2_mv1(
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
48 typedef struct icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1_result {
union {icu4x::capi::LineSegmenter* ok; icu4x::capi::DataError err;};
bool is_ok;} icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1_result;
49 icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1_result icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1(
const icu4x::capi::DataProvider* provider,
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
51 icu4x::capi::LineSegmenter* icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_mv1(
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
53 typedef struct icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_and_provider_mv1_result {
union {icu4x::capi::LineSegmenter* ok; icu4x::capi::DataError err;};
bool is_ok;} icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_and_provider_mv1_result;
54 icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_and_provider_mv1_result icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_and_provider_mv1(
const icu4x::capi::DataProvider* provider,
const icu4x::capi::Locale* content_locale, icu4x::capi::LineBreakOptionsV2 options);
56 icu4x::capi::LineBreakIteratorUtf8* icu4x_LineSegmenter_segment_utf8_mv1(
const icu4x::capi::LineSegmenter* self, icu4x::diplomat::capi::DiplomatStringView input);
58 icu4x::capi::LineBreakIteratorUtf16* icu4x_LineSegmenter_segment_utf16_mv1(
const icu4x::capi::LineSegmenter* self, icu4x::diplomat::capi::DiplomatString16View input);
60 icu4x::capi::LineBreakIteratorLatin1* icu4x_LineSegmenter_segment_latin1_mv1(
const icu4x::capi::LineSegmenter* self, icu4x::diplomat::capi::DiplomatU8View input);
62 void icu4x_LineSegmenter_destroy_mv1(LineSegmenter* self);
69 auto result = icu4x::capi::icu4x_LineSegmenter_create_auto_mv1();
70 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
74 auto result = icu4x::capi::icu4x_LineSegmenter_create_lstm_mv1();
75 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
79 auto result = icu4x::capi::icu4x_LineSegmenter_create_dictionary_mv1();
80 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
84 auto result = icu4x::capi::icu4x_LineSegmenter_create_for_non_complex_scripts_mv1();
85 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
89 auto result = icu4x::capi::icu4x_LineSegmenter_create_auto_with_options_v2_mv1(content_locale ? content_locale->AsFFI() :
nullptr,
91 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
95 auto result = icu4x::capi::icu4x_LineSegmenter_create_auto_with_options_v2_and_provider_mv1(provider.AsFFI(),
96 content_locale ? content_locale->AsFFI() :
nullptr,
102 auto result = icu4x::capi::icu4x_LineSegmenter_create_lstm_with_options_v2_mv1(content_locale ? content_locale->AsFFI() :
nullptr,
104 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
108 auto result = icu4x::capi::icu4x_LineSegmenter_create_lstm_with_options_v2_and_provider_mv1(provider.AsFFI(),
109 content_locale ? content_locale->AsFFI() :
nullptr,
115 auto result = icu4x::capi::icu4x_LineSegmenter_create_dictionary_with_options_v2_mv1(content_locale ? content_locale->AsFFI() :
nullptr,
117 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
121 auto result = icu4x::capi::icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1(provider.AsFFI(),
122 content_locale ? content_locale->AsFFI() :
nullptr,
128 auto result = icu4x::capi::icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_mv1(content_locale ? content_locale->AsFFI() :
nullptr,
130 return std::unique_ptr<icu4x::LineSegmenter>(icu4x::LineSegmenter::FromFFI(result));
134 auto result = icu4x::capi::icu4x_LineSegmenter_create_for_non_complex_scripts_with_options_v2_and_provider_mv1(provider.AsFFI(),
135 content_locale ? content_locale->AsFFI() :
nullptr,
141 auto result = icu4x::capi::icu4x_LineSegmenter_segment_utf8_mv1(this->AsFFI(),
142 {input.data(), input.size()});
143 return std::unique_ptr<icu4x::LineBreakIteratorUtf8>(icu4x::LineBreakIteratorUtf8::FromFFI(result));
147 auto result = icu4x::capi::icu4x_LineSegmenter_segment_utf16_mv1(this->AsFFI(),
148 {input.data(), input.size()});
149 return std::unique_ptr<icu4x::LineBreakIteratorUtf16>(icu4x::LineBreakIteratorUtf16::FromFFI(result));
153 auto result = icu4x::capi::icu4x_LineSegmenter_segment_latin1_mv1(this->AsFFI(),
155 return std::unique_ptr<icu4x::LineBreakIteratorLatin1>(icu4x::LineBreakIteratorLatin1::FromFFI(result));
158inline const icu4x::capi::LineSegmenter* icu4x::LineSegmenter::AsFFI()
const {
159 return reinterpret_cast<const icu4x::capi::LineSegmenter*
>(
this);
162inline icu4x::capi::LineSegmenter* icu4x::LineSegmenter::AsFFI() {
163 return reinterpret_cast<icu4x::capi::LineSegmenter*
>(
this);
166inline const icu4x::LineSegmenter* icu4x::LineSegmenter::FromFFI(
const icu4x::capi::LineSegmenter* ptr) {
167 return reinterpret_cast<const icu4x::LineSegmenter*
>(ptr);
170inline icu4x::LineSegmenter* icu4x::LineSegmenter::FromFFI(icu4x::capi::LineSegmenter* ptr) {
171 return reinterpret_cast<icu4x::LineSegmenter*
>(ptr);
174inline void icu4x::LineSegmenter::operator
delete(
void* ptr) {
175 icu4x::capi::icu4x_LineSegmenter_destroy_mv1(
reinterpret_cast<icu4x::capi::LineSegmenter*
>(ptr));
Definition DataError.d.hpp:37
Definition DataProvider.d.hpp:40
static std::unique_ptr< icu4x::LineSegmenter > create_dictionary_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:114
std::unique_ptr< icu4x::LineBreakIteratorUtf16 > segment16(std::u16string_view input) const
Definition LineSegmenter.hpp:146
std::unique_ptr< icu4x::LineBreakIteratorUtf8 > segment(std::string_view input) const
Definition LineSegmenter.hpp:140
std::unique_ptr< icu4x::LineBreakIteratorLatin1 > segment_latin1(icu4x::diplomat::span< const uint8_t > input) const
Definition LineSegmenter.hpp:152
static std::unique_ptr< icu4x::LineSegmenter > create_auto_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:88
static icu4x::diplomat::result< std::unique_ptr< icu4x::LineSegmenter >, icu4x::DataError > create_auto_with_options_v2_and_provider(const icu4x::DataProvider &provider, const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:94
static std::unique_ptr< icu4x::LineSegmenter > create_lstm_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:101
static icu4x::diplomat::result< std::unique_ptr< icu4x::LineSegmenter >, icu4x::DataError > create_dictionary_with_options_v2_and_provider(const icu4x::DataProvider &provider, const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:120
static icu4x::diplomat::result< std::unique_ptr< icu4x::LineSegmenter >, icu4x::DataError > create_lstm_with_options_v2_and_provider(const icu4x::DataProvider &provider, const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:107
static icu4x::diplomat::result< std::unique_ptr< icu4x::LineSegmenter >, icu4x::DataError > create_for_non_complex_scripts_with_options_v2_and_provider(const icu4x::DataProvider &provider, const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:133
static std::unique_ptr< icu4x::LineSegmenter > create_dictionary()
Definition LineSegmenter.hpp:78
static std::unique_ptr< icu4x::LineSegmenter > create_lstm()
Definition LineSegmenter.hpp:73
static std::unique_ptr< icu4x::LineSegmenter > create_for_non_complex_scripts_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:127
static std::unique_ptr< icu4x::LineSegmenter > create_for_non_complex_scripts()
Definition LineSegmenter.hpp:83
static std::unique_ptr< icu4x::LineSegmenter > create_auto()
Definition LineSegmenter.hpp:68
Definition Locale.d.hpp:33
Definition diplomat_runtime.hpp:166
Definition diplomat_runtime.hpp:252
constexpr T * data() const noexcept
Definition diplomat_runtime.hpp:263
constexpr size_t size() const noexcept
Definition diplomat_runtime.hpp:266
Definition LineBreakOptionsV2.d.hpp:38
Definition diplomat_runtime.hpp:146
Definition diplomat_runtime.hpp:128