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>
13
14namespace icu4x {
15namespace capi { struct TimeZone; }
16class TimeZone;
17namespace capi { struct TimeZoneInfo; }
18class TimeZoneInfo;
19namespace capi { struct UtcOffset; }
20class UtcOffset;
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
58 inline static std::unique_ptr<icu4x::TimeZone> create_from_bcp47(std::string_view id);
59
63 inline std::unique_ptr<icu4x::TimeZoneInfo> with_offset(const icu4x::UtcOffset& offset) const;
64
68 inline std::unique_ptr<icu4x::TimeZoneInfo> without_offset() const;
69
70 inline const icu4x::capi::TimeZone* AsFFI() const;
71 inline icu4x::capi::TimeZone* AsFFI();
72 inline static const icu4x::TimeZone* FromFFI(const icu4x::capi::TimeZone* ptr);
73 inline static icu4x::TimeZone* FromFFI(icu4x::capi::TimeZone* ptr);
74 inline static void operator delete(void* ptr);
75private:
76 TimeZone() = delete;
77 TimeZone(const icu4x::TimeZone&) = delete;
78 TimeZone(icu4x::TimeZone&&) noexcept = delete;
79 TimeZone operator=(const icu4x::TimeZone&) = delete;
80 TimeZone operator=(icu4x::TimeZone&&) noexcept = delete;
81 static void operator delete[](void*, size_t) = delete;
82};
83
84} // namespace
85#endif // icu4x_TimeZone_D_HPP
Definition TimeZoneInfo.d.hpp:42
Definition TimeZone.d.hpp:34
std::unique_ptr< icu4x::TimeZoneInfo > without_offset() const
Definition TimeZone.hpp:60
bool is_unknown() const
Definition TimeZone.hpp:44
std::unique_ptr< icu4x::TimeZoneInfo > with_offset(const icu4x::UtcOffset &offset) const
Definition TimeZone.hpp:54
static std::unique_ptr< icu4x::TimeZone > create_from_bcp47(std::string_view id)
Definition TimeZone.hpp:49
static std::unique_ptr< icu4x::TimeZone > unknown()
Definition TimeZone.hpp:39
Definition UtcOffset.d.hpp:31
Definition Bidi.d.hpp:14