ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
SentenceSegmenter.d.hpp
Go to the documentation of this file.
1#ifndef icu4x_SentenceSegmenter_D_HPP
2#define icu4x_SentenceSegmenter_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 Locale; }
18class Locale;
19namespace capi { struct SentenceBreakIteratorLatin1; }
21namespace capi { struct SentenceBreakIteratorUtf16; }
23namespace capi { struct SentenceBreakIteratorUtf8; }
25namespace capi { struct SentenceSegmenter; }
27class DataError;
28}
29
30
31namespace icu4x {
32namespace capi {
33 struct SentenceSegmenter;
34} // namespace capi
35} // namespace
36
37namespace icu4x {
43class SentenceSegmenter {
44public:
45
51 inline static std::unique_ptr<icu4x::SentenceSegmenter> create();
52
57
62
71 inline std::unique_ptr<icu4x::SentenceBreakIteratorUtf8> segment(std::string_view input) const;
72
81 inline std::unique_ptr<icu4x::SentenceBreakIteratorUtf16> segment16(std::u16string_view input) const;
82
88 inline std::unique_ptr<icu4x::SentenceBreakIteratorLatin1> segment_latin1(diplomat::span<const uint8_t> input) const;
89
90 inline const icu4x::capi::SentenceSegmenter* AsFFI() const;
91 inline icu4x::capi::SentenceSegmenter* AsFFI();
92 inline static const icu4x::SentenceSegmenter* FromFFI(const icu4x::capi::SentenceSegmenter* ptr);
93 inline static icu4x::SentenceSegmenter* FromFFI(icu4x::capi::SentenceSegmenter* ptr);
94 inline static void operator delete(void* ptr);
95private:
96 SentenceSegmenter() = delete;
97 SentenceSegmenter(const icu4x::SentenceSegmenter&) = delete;
98 SentenceSegmenter(icu4x::SentenceSegmenter&&) noexcept = delete;
99 SentenceSegmenter operator=(const icu4x::SentenceSegmenter&) = delete;
100 SentenceSegmenter operator=(icu4x::SentenceSegmenter&&) noexcept = delete;
101 static void operator delete[](void*, size_t) = delete;
102};
103
104} // namespace
105#endif // icu4x_SentenceSegmenter_D_HPP
Definition diplomat_runtime.hpp:140
Definition diplomat_runtime.hpp:223
Definition DataError.d.hpp:37
Definition DataProvider.d.hpp:40
Definition Locale.d.hpp:33
Definition SentenceBreakIteratorLatin1.d.hpp:25
Definition SentenceBreakIteratorUtf16.d.hpp:25
Definition SentenceBreakIteratorUtf8.d.hpp:25
Definition SentenceSegmenter.d.hpp:43
std::unique_ptr< icu4x::SentenceBreakIteratorUtf8 > segment(std::string_view input) const
Definition SentenceSegmenter.hpp:63
static std::unique_ptr< icu4x::SentenceSegmenter > create()
Definition SentenceSegmenter.hpp:47
static diplomat::result< std::unique_ptr< icu4x::SentenceSegmenter >, icu4x::DataError > create_with_content_locale(const icu4x::Locale &locale)
Definition SentenceSegmenter.hpp:52
std::unique_ptr< icu4x::SentenceBreakIteratorLatin1 > segment_latin1(diplomat::span< const uint8_t > input) const
Definition SentenceSegmenter.hpp:75
std::unique_ptr< icu4x::SentenceBreakIteratorUtf16 > segment16(std::u16string_view input) const
Definition SentenceSegmenter.hpp:69
static diplomat::result< std::unique_ptr< icu4x::SentenceSegmenter >, icu4x::DataError > create_with_content_locale_and_provider(const icu4x::DataProvider &provider, const icu4x::Locale &locale)
Definition SentenceSegmenter.hpp:57
Definition Bidi.d.hpp:14