tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CollatorStrength.hpp (1066B)


      1 #ifndef icu4x_CollatorStrength_HPP
      2 #define icu4x_CollatorStrength_HPP
      3 
      4 #include "CollatorStrength.d.hpp"
      5 
      6 #include <stdio.h>
      7 #include <stdint.h>
      8 #include <stddef.h>
      9 #include <stdbool.h>
     10 #include <memory>
     11 #include <functional>
     12 #include <optional>
     13 #include <cstdlib>
     14 #include "../diplomat_runtime.hpp"
     15 
     16 
     17 namespace icu4x {
     18 namespace capi {
     19    extern "C" {
     20 
     21    } // extern "C"
     22 } // namespace capi
     23 } // namespace
     24 
     25 inline icu4x::capi::CollatorStrength icu4x::CollatorStrength::AsFFI() const {
     26  return static_cast<icu4x::capi::CollatorStrength>(value);
     27 }
     28 
     29 inline icu4x::CollatorStrength icu4x::CollatorStrength::FromFFI(icu4x::capi::CollatorStrength c_enum) {
     30  switch (c_enum) {
     31    case icu4x::capi::CollatorStrength_Primary:
     32    case icu4x::capi::CollatorStrength_Secondary:
     33    case icu4x::capi::CollatorStrength_Tertiary:
     34    case icu4x::capi::CollatorStrength_Quaternary:
     35    case icu4x::capi::CollatorStrength_Identical:
     36      return static_cast<icu4x::CollatorStrength::Value>(c_enum);
     37    default:
     38      std::abort();
     39  }
     40 }
     41 #endif // icu4x_CollatorStrength_HPP