IndicSyllabicCategory.d.hpp (4939B)
1 #ifndef icu4x_IndicSyllabicCategory_D_HPP 2 #define icu4x_IndicSyllabicCategory_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" 13 14 namespace icu4x { 15 class IndicSyllabicCategory; 16 } 17 18 19 namespace icu4x { 20 namespace capi { 21 enum IndicSyllabicCategory { 22 IndicSyllabicCategory_Other = 0, 23 IndicSyllabicCategory_Avagraha = 1, 24 IndicSyllabicCategory_Bindu = 2, 25 IndicSyllabicCategory_BrahmiJoiningNumber = 3, 26 IndicSyllabicCategory_CantillationMark = 4, 27 IndicSyllabicCategory_Consonant = 5, 28 IndicSyllabicCategory_ConsonantDead = 6, 29 IndicSyllabicCategory_ConsonantFinal = 7, 30 IndicSyllabicCategory_ConsonantHeadLetter = 8, 31 IndicSyllabicCategory_ConsonantInitialPostfixed = 9, 32 IndicSyllabicCategory_ConsonantKiller = 10, 33 IndicSyllabicCategory_ConsonantMedial = 11, 34 IndicSyllabicCategory_ConsonantPlaceholder = 12, 35 IndicSyllabicCategory_ConsonantPrecedingRepha = 13, 36 IndicSyllabicCategory_ConsonantPrefixed = 14, 37 IndicSyllabicCategory_ConsonantSucceedingRepha = 15, 38 IndicSyllabicCategory_ConsonantSubjoined = 16, 39 IndicSyllabicCategory_ConsonantWithStacker = 17, 40 IndicSyllabicCategory_GeminationMark = 18, 41 IndicSyllabicCategory_InvisibleStacker = 19, 42 IndicSyllabicCategory_Joiner = 20, 43 IndicSyllabicCategory_ModifyingLetter = 21, 44 IndicSyllabicCategory_NonJoiner = 22, 45 IndicSyllabicCategory_Nukta = 23, 46 IndicSyllabicCategory_Number = 24, 47 IndicSyllabicCategory_NumberJoiner = 25, 48 IndicSyllabicCategory_PureKiller = 26, 49 IndicSyllabicCategory_RegisterShifter = 27, 50 IndicSyllabicCategory_SyllableModifier = 28, 51 IndicSyllabicCategory_ToneLetter = 29, 52 IndicSyllabicCategory_ToneMark = 30, 53 IndicSyllabicCategory_Virama = 31, 54 IndicSyllabicCategory_Visarga = 32, 55 IndicSyllabicCategory_Vowel = 33, 56 IndicSyllabicCategory_VowelDependent = 34, 57 IndicSyllabicCategory_VowelIndependent = 35, 58 IndicSyllabicCategory_ReorderingKiller = 36, 59 }; 60 61 typedef struct IndicSyllabicCategory_option {union { IndicSyllabicCategory ok; }; bool is_ok; } IndicSyllabicCategory_option; 62 } // namespace capi 63 } // namespace 64 65 namespace icu4x { 66 /** 67 * See the [Rust documentation for `IndicSyllabicCategory`](https://docs.rs/icu/latest/icu/properties/props/struct.IndicSyllabicCategory.html) for more information. 68 */ 69 class IndicSyllabicCategory { 70 public: 71 enum Value { 72 Other = 0, 73 Avagraha = 1, 74 Bindu = 2, 75 BrahmiJoiningNumber = 3, 76 CantillationMark = 4, 77 Consonant = 5, 78 ConsonantDead = 6, 79 ConsonantFinal = 7, 80 ConsonantHeadLetter = 8, 81 ConsonantInitialPostfixed = 9, 82 ConsonantKiller = 10, 83 ConsonantMedial = 11, 84 ConsonantPlaceholder = 12, 85 ConsonantPrecedingRepha = 13, 86 ConsonantPrefixed = 14, 87 ConsonantSucceedingRepha = 15, 88 ConsonantSubjoined = 16, 89 ConsonantWithStacker = 17, 90 GeminationMark = 18, 91 InvisibleStacker = 19, 92 Joiner = 20, 93 ModifyingLetter = 21, 94 NonJoiner = 22, 95 Nukta = 23, 96 Number = 24, 97 NumberJoiner = 25, 98 PureKiller = 26, 99 RegisterShifter = 27, 100 SyllableModifier = 28, 101 ToneLetter = 29, 102 ToneMark = 30, 103 Virama = 31, 104 Visarga = 32, 105 Vowel = 33, 106 VowelDependent = 34, 107 VowelIndependent = 35, 108 ReorderingKiller = 36, 109 }; 110 111 IndicSyllabicCategory() = default; 112 // Implicit conversions between enum and ::Value 113 constexpr IndicSyllabicCategory(Value v) : value(v) {} 114 constexpr operator Value() const { return value; } 115 // Prevent usage as boolean value 116 explicit operator bool() const = delete; 117 118 /** 119 * See the [Rust documentation for `for_char`](https://docs.rs/icu/latest/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information. 120 */ 121 inline static icu4x::IndicSyllabicCategory for_char(char32_t ch); 122 123 /** 124 * Convert to an integer value usable with ICU4C and CodePointMapData 125 * 126 * See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.IndicSyllabicCategory.html#method.to_icu4c_value) for more information. 127 */ 128 inline uint8_t to_integer_value() const; 129 130 /** 131 * Convert from an integer value from ICU4C or CodePointMapData 132 * 133 * See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.IndicSyllabicCategory.html#method.from_icu4c_value) for more information. 134 */ 135 inline static std::optional<icu4x::IndicSyllabicCategory> from_integer_value(uint8_t other); 136 137 inline icu4x::capi::IndicSyllabicCategory AsFFI() const; 138 inline static icu4x::IndicSyllabicCategory FromFFI(icu4x::capi::IndicSyllabicCategory c_enum); 139 private: 140 Value value; 141 }; 142 143 } // namespace 144 #endif // icu4x_IndicSyllabicCategory_D_HPP