Script.d.hpp (10601B)
1 #ifndef icu4x_Script_D_HPP 2 #define icu4x_Script_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 Script; 16 } 17 18 19 namespace icu4x { 20 namespace capi { 21 enum Script { 22 Script_Adlam = 167, 23 Script_Ahom = 161, 24 Script_AnatolianHieroglyphs = 156, 25 Script_Arabic = 2, 26 Script_Armenian = 3, 27 Script_Avestan = 117, 28 Script_Balinese = 62, 29 Script_Bamum = 130, 30 Script_BassaVah = 134, 31 Script_Batak = 63, 32 Script_Bengali = 4, 33 Script_Bhaiksuki = 168, 34 Script_Bopomofo = 5, 35 Script_Brahmi = 65, 36 Script_Braille = 46, 37 Script_Buginese = 55, 38 Script_Buhid = 44, 39 Script_CanadianAboriginal = 40, 40 Script_Carian = 104, 41 Script_CaucasianAlbanian = 159, 42 Script_Chakma = 118, 43 Script_Cham = 66, 44 Script_Cherokee = 6, 45 Script_Chorasmian = 189, 46 Script_Common = 0, 47 Script_Coptic = 7, 48 Script_Cuneiform = 101, 49 Script_Cypriot = 47, 50 Script_CyproMinoan = 193, 51 Script_Cyrillic = 8, 52 Script_Deseret = 9, 53 Script_Devanagari = 10, 54 Script_DivesAkuru = 190, 55 Script_Dogra = 178, 56 Script_Duployan = 135, 57 Script_EgyptianHieroglyphs = 71, 58 Script_Elbasan = 136, 59 Script_Elymaic = 185, 60 Script_Ethiopian = 11, 61 Script_Georgian = 12, 62 Script_Glagolitic = 56, 63 Script_Gothic = 13, 64 Script_Grantha = 137, 65 Script_Greek = 14, 66 Script_Gujarati = 15, 67 Script_GunjalaGondi = 179, 68 Script_Gurmukhi = 16, 69 Script_Han = 17, 70 Script_Hangul = 18, 71 Script_HanifiRohingya = 182, 72 Script_Hanunoo = 43, 73 Script_Hatran = 162, 74 Script_Hebrew = 19, 75 Script_Hiragana = 20, 76 Script_ImperialAramaic = 116, 77 Script_Inherited = 1, 78 Script_InscriptionalPahlavi = 122, 79 Script_InscriptionalParthian = 125, 80 Script_Javanese = 78, 81 Script_Kaithi = 120, 82 Script_Kannada = 21, 83 Script_Katakana = 22, 84 Script_Kawi = 198, 85 Script_KayahLi = 79, 86 Script_Kharoshthi = 57, 87 Script_KhitanSmallScript = 191, 88 Script_Khmer = 23, 89 Script_Khojki = 157, 90 Script_Khudawadi = 145, 91 Script_Lao = 24, 92 Script_Latin = 25, 93 Script_Lepcha = 82, 94 Script_Limbu = 48, 95 Script_LinearA = 83, 96 Script_LinearB = 49, 97 Script_Lisu = 131, 98 Script_Lycian = 107, 99 Script_Lydian = 108, 100 Script_Mahajani = 160, 101 Script_Makasar = 180, 102 Script_Malayalam = 26, 103 Script_Mandaic = 84, 104 Script_Manichaean = 121, 105 Script_Marchen = 169, 106 Script_MasaramGondi = 175, 107 Script_Medefaidrin = 181, 108 Script_MeeteiMayek = 115, 109 Script_MendeKikakui = 140, 110 Script_MeroiticCursive = 141, 111 Script_MeroiticHieroglyphs = 86, 112 Script_Miao = 92, 113 Script_Modi = 163, 114 Script_Mongolian = 27, 115 Script_Mro = 149, 116 Script_Multani = 164, 117 Script_Myanmar = 28, 118 Script_Nabataean = 143, 119 Script_NagMundari = 199, 120 Script_Nandinagari = 187, 121 Script_Nastaliq = 200, 122 Script_NewTaiLue = 59, 123 Script_Newa = 170, 124 Script_Nko = 87, 125 Script_Nushu = 150, 126 Script_NyiakengPuachueHmong = 186, 127 Script_Ogham = 29, 128 Script_OlChiki = 109, 129 Script_OldHungarian = 76, 130 Script_OldItalic = 30, 131 Script_OldNorthArabian = 142, 132 Script_OldPermic = 89, 133 Script_OldPersian = 61, 134 Script_OldSogdian = 184, 135 Script_OldSouthArabian = 133, 136 Script_OldTurkic = 88, 137 Script_OldUyghur = 194, 138 Script_Oriya = 31, 139 Script_Osage = 171, 140 Script_Osmanya = 50, 141 Script_PahawhHmong = 75, 142 Script_Palmyrene = 144, 143 Script_PauCinHau = 165, 144 Script_PhagsPa = 90, 145 Script_Phoenician = 91, 146 Script_PsalterPahlavi = 123, 147 Script_Rejang = 110, 148 Script_Runic = 32, 149 Script_Samaritan = 126, 150 Script_Saurashtra = 111, 151 Script_Sharada = 151, 152 Script_Shavian = 51, 153 Script_Siddham = 166, 154 Script_SignWriting = 112, 155 Script_Sinhala = 33, 156 Script_Sogdian = 183, 157 Script_SoraSompeng = 152, 158 Script_Soyombo = 176, 159 Script_Sundanese = 113, 160 Script_SylotiNagri = 58, 161 Script_Syriac = 34, 162 Script_Tagalog = 42, 163 Script_Tagbanwa = 45, 164 Script_TaiLe = 52, 165 Script_TaiTham = 106, 166 Script_TaiViet = 127, 167 Script_Takri = 153, 168 Script_Tamil = 35, 169 Script_Tangsa = 195, 170 Script_Tangut = 154, 171 Script_Telugu = 36, 172 Script_Thaana = 37, 173 Script_Thai = 38, 174 Script_Tibetan = 39, 175 Script_Tifinagh = 60, 176 Script_Tirhuta = 158, 177 Script_Toto = 196, 178 Script_Ugaritic = 53, 179 Script_Unknown = 103, 180 Script_Vai = 99, 181 Script_Vithkuqi = 197, 182 Script_Wancho = 188, 183 Script_WarangCiti = 146, 184 Script_Yezidi = 192, 185 Script_Yi = 41, 186 Script_ZanabazarSquare = 177, 187 }; 188 189 typedef struct Script_option {union { Script ok; }; bool is_ok; } Script_option; 190 } // namespace capi 191 } // namespace 192 193 namespace icu4x { 194 /** 195 * See the [Rust documentation for `Script`](https://docs.rs/icu/latest/icu/properties/props/struct.Script.html) for more information. 196 */ 197 class Script { 198 public: 199 enum Value { 200 Adlam = 167, 201 Ahom = 161, 202 AnatolianHieroglyphs = 156, 203 Arabic = 2, 204 Armenian = 3, 205 Avestan = 117, 206 Balinese = 62, 207 Bamum = 130, 208 BassaVah = 134, 209 Batak = 63, 210 Bengali = 4, 211 Bhaiksuki = 168, 212 Bopomofo = 5, 213 Brahmi = 65, 214 Braille = 46, 215 Buginese = 55, 216 Buhid = 44, 217 CanadianAboriginal = 40, 218 Carian = 104, 219 CaucasianAlbanian = 159, 220 Chakma = 118, 221 Cham = 66, 222 Cherokee = 6, 223 Chorasmian = 189, 224 Common = 0, 225 Coptic = 7, 226 Cuneiform = 101, 227 Cypriot = 47, 228 CyproMinoan = 193, 229 Cyrillic = 8, 230 Deseret = 9, 231 Devanagari = 10, 232 DivesAkuru = 190, 233 Dogra = 178, 234 Duployan = 135, 235 EgyptianHieroglyphs = 71, 236 Elbasan = 136, 237 Elymaic = 185, 238 Ethiopian = 11, 239 Georgian = 12, 240 Glagolitic = 56, 241 Gothic = 13, 242 Grantha = 137, 243 Greek = 14, 244 Gujarati = 15, 245 GunjalaGondi = 179, 246 Gurmukhi = 16, 247 Han = 17, 248 Hangul = 18, 249 HanifiRohingya = 182, 250 Hanunoo = 43, 251 Hatran = 162, 252 Hebrew = 19, 253 Hiragana = 20, 254 ImperialAramaic = 116, 255 Inherited = 1, 256 InscriptionalPahlavi = 122, 257 InscriptionalParthian = 125, 258 Javanese = 78, 259 Kaithi = 120, 260 Kannada = 21, 261 Katakana = 22, 262 Kawi = 198, 263 KayahLi = 79, 264 Kharoshthi = 57, 265 KhitanSmallScript = 191, 266 Khmer = 23, 267 Khojki = 157, 268 Khudawadi = 145, 269 Lao = 24, 270 Latin = 25, 271 Lepcha = 82, 272 Limbu = 48, 273 LinearA = 83, 274 LinearB = 49, 275 Lisu = 131, 276 Lycian = 107, 277 Lydian = 108, 278 Mahajani = 160, 279 Makasar = 180, 280 Malayalam = 26, 281 Mandaic = 84, 282 Manichaean = 121, 283 Marchen = 169, 284 MasaramGondi = 175, 285 Medefaidrin = 181, 286 MeeteiMayek = 115, 287 MendeKikakui = 140, 288 MeroiticCursive = 141, 289 MeroiticHieroglyphs = 86, 290 Miao = 92, 291 Modi = 163, 292 Mongolian = 27, 293 Mro = 149, 294 Multani = 164, 295 Myanmar = 28, 296 Nabataean = 143, 297 NagMundari = 199, 298 Nandinagari = 187, 299 Nastaliq = 200, 300 NewTaiLue = 59, 301 Newa = 170, 302 Nko = 87, 303 Nushu = 150, 304 NyiakengPuachueHmong = 186, 305 Ogham = 29, 306 OlChiki = 109, 307 OldHungarian = 76, 308 OldItalic = 30, 309 OldNorthArabian = 142, 310 OldPermic = 89, 311 OldPersian = 61, 312 OldSogdian = 184, 313 OldSouthArabian = 133, 314 OldTurkic = 88, 315 OldUyghur = 194, 316 Oriya = 31, 317 Osage = 171, 318 Osmanya = 50, 319 PahawhHmong = 75, 320 Palmyrene = 144, 321 PauCinHau = 165, 322 PhagsPa = 90, 323 Phoenician = 91, 324 PsalterPahlavi = 123, 325 Rejang = 110, 326 Runic = 32, 327 Samaritan = 126, 328 Saurashtra = 111, 329 Sharada = 151, 330 Shavian = 51, 331 Siddham = 166, 332 SignWriting = 112, 333 Sinhala = 33, 334 Sogdian = 183, 335 SoraSompeng = 152, 336 Soyombo = 176, 337 Sundanese = 113, 338 SylotiNagri = 58, 339 Syriac = 34, 340 Tagalog = 42, 341 Tagbanwa = 45, 342 TaiLe = 52, 343 TaiTham = 106, 344 TaiViet = 127, 345 Takri = 153, 346 Tamil = 35, 347 Tangsa = 195, 348 Tangut = 154, 349 Telugu = 36, 350 Thaana = 37, 351 Thai = 38, 352 Tibetan = 39, 353 Tifinagh = 60, 354 Tirhuta = 158, 355 Toto = 196, 356 Ugaritic = 53, 357 Unknown = 103, 358 Vai = 99, 359 Vithkuqi = 197, 360 Wancho = 188, 361 WarangCiti = 146, 362 Yezidi = 192, 363 Yi = 41, 364 ZanabazarSquare = 177, 365 }; 366 367 Script() = default; 368 // Implicit conversions between enum and ::Value 369 constexpr Script(Value v) : value(v) {} 370 constexpr operator Value() const { return value; } 371 // Prevent usage as boolean value 372 explicit operator bool() const = delete; 373 374 /** 375 * See the [Rust documentation for `for_char`](https://docs.rs/icu/latest/icu/properties/props/trait.EnumeratedProperty.html#tymethod.for_char) for more information. 376 */ 377 inline static icu4x::Script for_char(char32_t ch); 378 379 /** 380 * Get the "long" name of this property value (returns empty if property value is unknown) 381 * 382 * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/struct.PropertyNamesLongBorrowed.html#method.get) for more information. 383 */ 384 inline std::optional<std::string_view> long_name() const; 385 386 /** 387 * Get the "short" name of this property value (returns empty if property value is unknown) 388 * 389 * See the [Rust documentation for `get`](https://docs.rs/icu/latest/icu/properties/struct.PropertyNamesShortBorrowed.html#method.get) for more information. 390 */ 391 inline std::optional<std::string_view> short_name() const; 392 393 /** 394 * Convert to an integer value usable with ICU4C and CodePointMapData 395 * 396 * See the [Rust documentation for `to_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.Script.html#method.to_icu4c_value) for more information. 397 */ 398 inline uint16_t to_integer_value() const; 399 400 /** 401 * Convert from an integer value from ICU4C or CodePointMapData 402 * 403 * See the [Rust documentation for `from_icu4c_value`](https://docs.rs/icu/latest/icu/properties/props/struct.Script.html#method.from_icu4c_value) for more information. 404 */ 405 inline static std::optional<icu4x::Script> from_integer_value(uint16_t other); 406 407 inline icu4x::capi::Script AsFFI() const; 408 inline static icu4x::Script FromFFI(icu4x::capi::Script c_enum); 409 private: 410 Value value; 411 }; 412 413 } // namespace 414 #endif // icu4x_Script_D_HPP