1 #ifndef icu4x_WindowsParser_D_HPP 2 #define icu4x_WindowsParser_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 DataProvider; } 15 class DataProvider; 16 namespace capi { struct TimeZone; } 17 class TimeZone; 18 namespace capi { struct WindowsParser; } 19 class WindowsParser; 20 class DataError; 21 } 22 23 24 namespace icu4x { 25 namespace capi { 26 struct WindowsParser; 27 } // namespace capi 28 } // namespace 29 30 namespace icu4x { 31 class WindowsParser { 32 public: 33 34 inline static std::unique_ptr<icu4x::WindowsParser> create(); 35 36 inline static diplomat::result<std::unique_ptr<icu4x::WindowsParser>, icu4x::DataError> create_with_provider(const icu4x::DataProvider& provider); 37 38 inline std::unique_ptr<icu4x::TimeZone> parse(std::string_view value, std::string_view region) const; 39 40 inline const icu4x::capi::WindowsParser* AsFFI() const; 41 inline icu4x::capi::WindowsParser* AsFFI(); 42 inline static const icu4x::WindowsParser* FromFFI(const icu4x::capi::WindowsParser* ptr); 43 inline static icu4x::WindowsParser* FromFFI(icu4x::capi::WindowsParser* ptr); 44 inline static void operator delete(void* ptr); 45 private: 46 WindowsParser() = delete; 47 WindowsParser(const icu4x::WindowsParser&) = delete; 48 WindowsParser(icu4x::WindowsParser&&) noexcept = delete; 49 WindowsParser operator=(const icu4x::WindowsParser&) = delete; 50 WindowsParser operator=(icu4x::WindowsParser&&) noexcept = delete; 51 static void operator delete[](void*, size_t) = delete; 52 }; 53 54 } // namespace 55 #endif // icu4x_WindowsParser_D_HPP 56