ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
TimeZone.d.hpp
Go to the documentation of this file.
1#ifndef ICU4X_TimeZone_D_HPP
2#define ICU4X_TimeZone_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"
13namespace icu4x {
14namespace capi { struct TimeZone; }
15class TimeZone;
16namespace capi { struct TimeZoneInfo; }
17class TimeZoneInfo;
18namespace capi { struct UtcOffset; }
19class UtcOffset;
20} // namespace icu4x
21
22
23
24namespace icu4x {
25namespace capi {
26 struct TimeZone;
27} // namespace capi
28} // namespace
29
30namespace icu4x {
34class TimeZone {
35public:
36
42 inline static std::unique_ptr<icu4x::TimeZone> unknown();
43
49 inline bool is_unknown() const;
50
56 inline static std::unique_ptr<icu4x::TimeZone> create_from_iana_id(std::string_view iana_id);
57
63 inline static std::unique_ptr<icu4x::TimeZone> create_from_windows_id(std::string_view windows_id, std::string_view region);
64
70 inline static std::unique_ptr<icu4x::TimeZone> create_from_system_id(std::string_view id, std::string_view _region);
71
79 inline static std::unique_ptr<icu4x::TimeZone> create_from_bcp47(std::string_view id);
80
84 inline std::unique_ptr<icu4x::TimeZoneInfo> with_offset(const icu4x::UtcOffset& offset) const;
85
89 inline std::unique_ptr<icu4x::TimeZoneInfo> without_offset() const;
90
91 inline const icu4x::capi::TimeZone* AsFFI() const;
92 inline icu4x::capi::TimeZone* AsFFI();
93 inline static const icu4x::TimeZone* FromFFI(const icu4x::capi::TimeZone* ptr);
94 inline static icu4x::TimeZone* FromFFI(icu4x::capi::TimeZone* ptr);
95 inline static void operator delete(void* ptr);
96private:
97 TimeZone() = delete;
98 TimeZone(const icu4x::TimeZone&) = delete;
99 TimeZone(icu4x::TimeZone&&) noexcept = delete;
100 TimeZone operator=(const icu4x::TimeZone&) = delete;
101 TimeZone operator=(icu4x::TimeZone&&) noexcept = delete;
102 static void operator delete[](void*, size_t) = delete;
103};
104
105} // namespace
106#endif // ICU4X_TimeZone_D_HPP
Definition TimeZoneInfo.d.hpp:44
Definition TimeZone.d.hpp:34
static std::unique_ptr< icu4x::TimeZone > create_from_iana_id(std::string_view iana_id)
Definition TimeZone.hpp:55
static std::unique_ptr< icu4x::TimeZone > create_from_system_id(std::string_view id, std::string_view _region)
Definition TimeZone.hpp:66
std::unique_ptr< icu4x::TimeZoneInfo > without_offset() const
Definition TimeZone.hpp:83
bool is_unknown() const
Definition TimeZone.hpp:50
std::unique_ptr< icu4x::TimeZoneInfo > with_offset(const icu4x::UtcOffset &offset) const
Definition TimeZone.hpp:77
static std::unique_ptr< icu4x::TimeZone > create_from_bcp47(std::string_view id)
Definition TimeZone.hpp:72
static std::unique_ptr< icu4x::TimeZone > create_from_windows_id(std::string_view windows_id, std::string_view region)
Definition TimeZone.hpp:60
static std::unique_ptr< icu4x::TimeZone > unknown()
Definition TimeZone.hpp:45
Definition UtcOffset.d.hpp:31
Definition Bidi.d.hpp:13