ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
LineSegmenter.d.hpp
Go to the documentation of this file.
1#ifndef ICU4X_LineSegmenter_D_HPP
2#define ICU4X_LineSegmenter_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 {
14namespace capi { struct DataProvider; }
15class DataProvider;
16namespace capi { struct LineBreakIteratorLatin1; }
18namespace capi { struct LineBreakIteratorUtf16; }
20namespace capi { struct LineBreakIteratorUtf8; }
22namespace capi { struct LineSegmenter; }
23class LineSegmenter;
24namespace capi { struct Locale; }
25class Locale;
27class DataError;
28} // namespace icu4x
29
30
31
32namespace icu4x {
33namespace capi {
34 struct LineSegmenter;
35} // namespace capi
36} // namespace
37
38namespace icu4x {
44class LineSegmenter {
45public:
46
53 inline static std::unique_ptr<icu4x::LineSegmenter> create_auto();
54
61 inline static std::unique_ptr<icu4x::LineSegmenter> create_lstm();
62
69 inline static std::unique_ptr<icu4x::LineSegmenter> create_dictionary();
70
77 inline static std::unique_ptr<icu4x::LineSegmenter> create_for_non_complex_scripts();
78
85 inline static std::unique_ptr<icu4x::LineSegmenter> create_auto_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
86
94
101 inline static std::unique_ptr<icu4x::LineSegmenter> create_lstm_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
102
110
117 inline static std::unique_ptr<icu4x::LineSegmenter> create_dictionary_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
118
126
133 inline static std::unique_ptr<icu4x::LineSegmenter> create_for_non_complex_scripts_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
134
142
151 inline std::unique_ptr<icu4x::LineBreakIteratorUtf8> segment(std::string_view input) const;
152
161 inline std::unique_ptr<icu4x::LineBreakIteratorUtf16> segment16(std::u16string_view input) const;
162
168 inline std::unique_ptr<icu4x::LineBreakIteratorLatin1> segment_latin1(icu4x::diplomat::span<const uint8_t> input) const;
169
170 inline const icu4x::capi::LineSegmenter* AsFFI() const;
171 inline icu4x::capi::LineSegmenter* AsFFI();
172 inline static const icu4x::LineSegmenter* FromFFI(const icu4x::capi::LineSegmenter* ptr);
173 inline static icu4x::LineSegmenter* FromFFI(icu4x::capi::LineSegmenter* ptr);
174 inline static void operator delete(void* ptr);
175private:
176 LineSegmenter() = delete;
177 LineSegmenter(const icu4x::LineSegmenter&) = delete;
178 LineSegmenter(icu4x::LineSegmenter&&) noexcept = delete;
179 LineSegmenter operator=(const icu4x::LineSegmenter&) = delete;
180 LineSegmenter operator=(icu4x::LineSegmenter&&) noexcept = delete;
181 static void operator delete[](void*, size_t) = delete;
182};
183
184} // namespace
185#endif // ICU4X_LineSegmenter_D_HPP
Definition DataError.d.hpp:37
Definition DataProvider.d.hpp:40
Definition LineBreakIteratorLatin1.d.hpp:25
Definition LineBreakIteratorUtf16.d.hpp:25
Definition LineBreakIteratorUtf8.d.hpp:25
Definition LineSegmenter.d.hpp:44
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
Definition Bidi.d.hpp:13
Definition LineBreakOptionsV2.d.hpp:38