• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef icu4x_IsoDateTime_D_HPP
2 #define icu4x_IsoDateTime_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 IsoDate; }
15 class IsoDate;
16 namespace capi { struct Time; }
17 class Time;
18 struct IsoDateTime;
19 class CalendarParseError;
20 }
21 
22 
23 namespace icu4x {
24 namespace capi {
25     struct IsoDateTime {
26       icu4x::capi::IsoDate* date;
27       icu4x::capi::Time* time;
28     };
29 
30     typedef struct IsoDateTime_option {union { IsoDateTime ok; }; bool is_ok; } IsoDateTime_option;
31 } // namespace capi
32 } // namespace
33 
34 
35 namespace icu4x {
36 struct IsoDateTime {
37   std::unique_ptr<icu4x::IsoDate> date;
38   std::unique_ptr<icu4x::Time> time;
39 
40   inline static diplomat::result<icu4x::IsoDateTime, icu4x::CalendarParseError> from_string(std::string_view v);
41 
42   inline icu4x::capi::IsoDateTime AsFFI() const;
43   inline static icu4x::IsoDateTime FromFFI(icu4x::capi::IsoDateTime c_struct);
44 };
45 
46 } // namespace
47 #endif // icu4x_IsoDateTime_D_HPP
48