• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef icu4x_PropertyValueNameToEnumMapper_D_HPP
2 #define icu4x_PropertyValueNameToEnumMapper_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 "../diplomat_runtime.hpp"
12 
13 namespace icu4x {
14 namespace capi { struct DataProvider; }
15 class DataProvider;
16 namespace capi { struct PropertyValueNameToEnumMapper; }
17 class PropertyValueNameToEnumMapper;
18 class DataError;
19 }
20 
21 
22 namespace icu4x {
23 namespace capi {
24     struct PropertyValueNameToEnumMapper;
25 } // namespace capi
26 } // namespace
27 
28 namespace icu4x {
29 class PropertyValueNameToEnumMapper {
30 public:
31 
32   inline int16_t get_strict(std::string_view name) const;
33 
34   inline int16_t get_loose(std::string_view name) const;
35 
36   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_general_category();
37 
38   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_general_category_with_provider(const icu4x::DataProvider& provider);
39 
40   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_hangul_syllable_type();
41 
42   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_hangul_syllable_type_with_provider(const icu4x::DataProvider& provider);
43 
44   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_east_asian_width();
45 
46   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_east_asian_width_with_provider(const icu4x::DataProvider& provider);
47 
48   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_bidi_class();
49 
50   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_bidi_class_with_provider(const icu4x::DataProvider& provider);
51 
52   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_indic_syllabic_category();
53 
54   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_indic_syllabic_category_with_provider(const icu4x::DataProvider& provider);
55 
56   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_line_break();
57 
58   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_line_break_with_provider(const icu4x::DataProvider& provider);
59 
60   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_grapheme_cluster_break();
61 
62   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_grapheme_cluster_break_with_provider(const icu4x::DataProvider& provider);
63 
64   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_word_break();
65 
66   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_word_break_with_provider(const icu4x::DataProvider& provider);
67 
68   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_sentence_break();
69 
70   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_sentence_break_with_provider(const icu4x::DataProvider& provider);
71 
72   inline static std::unique_ptr<icu4x::PropertyValueNameToEnumMapper> create_script();
73 
74   inline static diplomat::result<std::unique_ptr<icu4x::PropertyValueNameToEnumMapper>, icu4x::DataError> create_script_with_provider(const icu4x::DataProvider& provider);
75 
76   inline const icu4x::capi::PropertyValueNameToEnumMapper* AsFFI() const;
77   inline icu4x::capi::PropertyValueNameToEnumMapper* AsFFI();
78   inline static const icu4x::PropertyValueNameToEnumMapper* FromFFI(const icu4x::capi::PropertyValueNameToEnumMapper* ptr);
79   inline static icu4x::PropertyValueNameToEnumMapper* FromFFI(icu4x::capi::PropertyValueNameToEnumMapper* ptr);
80   inline static void operator delete(void* ptr);
81 private:
82   PropertyValueNameToEnumMapper() = delete;
83   PropertyValueNameToEnumMapper(const icu4x::PropertyValueNameToEnumMapper&) = delete;
84   PropertyValueNameToEnumMapper(icu4x::PropertyValueNameToEnumMapper&&) noexcept = delete;
85   PropertyValueNameToEnumMapper operator=(const icu4x::PropertyValueNameToEnumMapper&) = delete;
86   PropertyValueNameToEnumMapper operator=(icu4x::PropertyValueNameToEnumMapper&&) noexcept = delete;
87   static void operator delete[](void*, size_t) = delete;
88 };
89 
90 } // namespace
91 #endif // icu4x_PropertyValueNameToEnumMapper_D_HPP
92