1#ifndef ICU4X_TimeZone_HPP
2#define ICU4X_TimeZone_HPP
23 icu4x::capi::TimeZone* icu4x_TimeZone_unknown_mv1(
void);
25 bool icu4x_TimeZone_is_unknown_mv1(
const icu4x::capi::TimeZone* self);
27 icu4x::capi::TimeZone* icu4x_TimeZone_create_from_iana_id_mv1(icu4x::diplomat::capi::DiplomatStringView iana_id);
29 icu4x::capi::TimeZone* icu4x_TimeZone_create_from_windows_id_mv1(icu4x::diplomat::capi::DiplomatStringView windows_id, icu4x::diplomat::capi::DiplomatStringView region);
31 icu4x::capi::TimeZone* icu4x_TimeZone_create_from_system_id_mv1(icu4x::diplomat::capi::DiplomatStringView
id, icu4x::diplomat::capi::DiplomatStringView _region);
33 icu4x::capi::TimeZone* icu4x_TimeZone_create_from_bcp47_mv1(icu4x::diplomat::capi::DiplomatStringView
id);
35 icu4x::capi::TimeZoneInfo* icu4x_TimeZone_with_offset_mv1(
const icu4x::capi::TimeZone* self,
const icu4x::capi::UtcOffset* offset);
37 icu4x::capi::TimeZoneInfo* icu4x_TimeZone_without_offset_mv1(
const icu4x::capi::TimeZone* self);
39 void icu4x_TimeZone_destroy_mv1(TimeZone* self);
46 auto result = icu4x::capi::icu4x_TimeZone_unknown_mv1();
47 return std::unique_ptr<icu4x::TimeZone>(icu4x::TimeZone::FromFFI(result));
51 auto result = icu4x::capi::icu4x_TimeZone_is_unknown_mv1(this->AsFFI());
56 auto result = icu4x::capi::icu4x_TimeZone_create_from_iana_id_mv1({iana_id.data(), iana_id.size()});
57 return std::unique_ptr<icu4x::TimeZone>(icu4x::TimeZone::FromFFI(result));
61 auto result = icu4x::capi::icu4x_TimeZone_create_from_windows_id_mv1({windows_id.data(), windows_id.size()},
62 {region.data(), region.size()});
63 return std::unique_ptr<icu4x::TimeZone>(icu4x::TimeZone::FromFFI(result));
67 auto result = icu4x::capi::icu4x_TimeZone_create_from_system_id_mv1({
id.data(),
id.size()},
68 {_region.data(), _region.size()});
69 return std::unique_ptr<icu4x::TimeZone>(icu4x::TimeZone::FromFFI(result));
73 auto result = icu4x::capi::icu4x_TimeZone_create_from_bcp47_mv1({
id.data(),
id.size()});
74 return std::unique_ptr<icu4x::TimeZone>(icu4x::TimeZone::FromFFI(result));
78 auto result = icu4x::capi::icu4x_TimeZone_with_offset_mv1(this->AsFFI(),
80 return std::unique_ptr<icu4x::TimeZoneInfo>(icu4x::TimeZoneInfo::FromFFI(result));
84 auto result = icu4x::capi::icu4x_TimeZone_without_offset_mv1(this->AsFFI());
85 return std::unique_ptr<icu4x::TimeZoneInfo>(icu4x::TimeZoneInfo::FromFFI(result));
88inline const icu4x::capi::TimeZone* icu4x::TimeZone::AsFFI()
const {
89 return reinterpret_cast<const icu4x::capi::TimeZone*
>(
this);
92inline icu4x::capi::TimeZone* icu4x::TimeZone::AsFFI() {
93 return reinterpret_cast<icu4x::capi::TimeZone*
>(
this);
96inline const icu4x::TimeZone* icu4x::TimeZone::FromFFI(
const icu4x::capi::TimeZone* ptr) {
97 return reinterpret_cast<const icu4x::TimeZone*
>(ptr);
100inline icu4x::TimeZone* icu4x::TimeZone::FromFFI(icu4x::capi::TimeZone* ptr) {
101 return reinterpret_cast<icu4x::TimeZone*
>(ptr);
104inline void icu4x::TimeZone::operator
delete(
void* ptr) {
105 icu4x::capi::icu4x_TimeZone_destroy_mv1(
reinterpret_cast<icu4x::capi::TimeZone*
>(ptr));
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