• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef icu4x_DateTimeLength_HPP
2 #define icu4x_DateTimeLength_HPP
3 
4 #include "DateTimeLength.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 "../diplomat_runtime.hpp"
14 
15 
16 namespace icu4x {
17 namespace capi {
18     extern "C" {
19 
20 
21     } // extern "C"
22 } // namespace capi
23 } // namespace
24 
AsFFI() const25 inline icu4x::capi::DateTimeLength icu4x::DateTimeLength::AsFFI() const {
26   return static_cast<icu4x::capi::DateTimeLength>(value);
27 }
28 
FromFFI(icu4x::capi::DateTimeLength c_enum)29 inline icu4x::DateTimeLength icu4x::DateTimeLength::FromFFI(icu4x::capi::DateTimeLength c_enum) {
30   switch (c_enum) {
31     case icu4x::capi::DateTimeLength_Long:
32     case icu4x::capi::DateTimeLength_Medium:
33     case icu4x::capi::DateTimeLength_Short:
34       return static_cast<icu4x::DateTimeLength::Value>(c_enum);
35     default:
36       abort();
37   }
38 }
39 #endif // icu4x_DateTimeLength_HPP
40