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>
13
14namespace icu4x {
15namespace capi { struct DataProvider; }
16class DataProvider;
17namespace capi { struct LineBreakIteratorLatin1; }
19namespace capi { struct LineBreakIteratorUtf16; }
21namespace capi { struct LineBreakIteratorUtf8; }
23namespace capi { struct LineSegmenter; }
24class LineSegmenter;
25namespace capi { struct Locale; }
26class Locale;
28class DataError;
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_auto_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
78
86
93 inline static std::unique_ptr<icu4x::LineSegmenter> create_lstm_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
94
102
109 inline static std::unique_ptr<icu4x::LineSegmenter> create_dictionary_with_options_v2(const icu4x::Locale* content_locale, icu4x::LineBreakOptionsV2 options);
110
118
127 inline std::unique_ptr<icu4x::LineBreakIteratorUtf8> segment(std::string_view input) const;
128
137 inline std::unique_ptr<icu4x::LineBreakIteratorUtf16> segment16(std::u16string_view input) const;
138
144 inline std::unique_ptr<icu4x::LineBreakIteratorLatin1> segment_latin1(diplomat::span<const uint8_t> input) const;
145
146 inline const icu4x::capi::LineSegmenter* AsFFI() const;
147 inline icu4x::capi::LineSegmenter* AsFFI();
148 inline static const icu4x::LineSegmenter* FromFFI(const icu4x::capi::LineSegmenter* ptr);
149 inline static icu4x::LineSegmenter* FromFFI(icu4x::capi::LineSegmenter* ptr);
150 inline static void operator delete(void* ptr);
151private:
152 LineSegmenter() = delete;
153 LineSegmenter(const icu4x::LineSegmenter&) = delete;
154 LineSegmenter(icu4x::LineSegmenter&&) noexcept = delete;
155 LineSegmenter operator=(const icu4x::LineSegmenter&) = delete;
156 LineSegmenter operator=(icu4x::LineSegmenter&&) noexcept = delete;
157 static void operator delete[](void*, size_t) = delete;
158};
159
160} // namespace
161#endif // icu4x_LineSegmenter_D_HPP
Definition diplomat_runtime.hpp:140
Definition diplomat_runtime.hpp:223
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:102
std::unique_ptr< icu4x::LineBreakIteratorLatin1 > segment_latin1(diplomat::span< const uint8_t > input) const
Definition LineSegmenter.hpp:127
std::unique_ptr< icu4x::LineBreakIteratorUtf16 > segment16(std::u16string_view input) const
Definition LineSegmenter.hpp:121
std::unique_ptr< icu4x::LineBreakIteratorUtf8 > segment(std::string_view input) const
Definition LineSegmenter.hpp:115
static std::unique_ptr< icu4x::LineSegmenter > create_auto_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:76
static 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:95
static std::unique_ptr< icu4x::LineSegmenter > create_lstm_with_options_v2(const icu4x::Locale *content_locale, icu4x::LineBreakOptionsV2 options)
Definition LineSegmenter.hpp:89
static std::unique_ptr< icu4x::LineSegmenter > create_dictionary()
Definition LineSegmenter.hpp:71
static std::unique_ptr< icu4x::LineSegmenter > create_lstm()
Definition LineSegmenter.hpp:66
static 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:82
static 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:108
static std::unique_ptr< icu4x::LineSegmenter > create_auto()
Definition LineSegmenter.hpp:61
Definition Locale.d.hpp:33
Definition Bidi.d.hpp:14
Definition LineBreakOptionsV2.d.hpp:38