KI18n

timezonedata.cpp
1 /*
2  SPDX-FileCopyrightText: 2021 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "timezonedata_p.h"
8 
9 #include "data/country_timezone_map.cpp"
10 #include "data/subdivision_timezone_map.cpp"
11 #include "data/timezone_name_table.cpp"
12 
13 #include <cassert>
14 
15 static_assert(isSortedLookupTable(country_timezone_map));
16 static_assert(isSortedLookupTable(subdivision_timezone_map));
17 
18 const char *TimezoneData::ianaIdLookup(uint16_t offset)
19 {
20  assert(offset < sizeof(timezone_name_table));
21  return timezone_name_table + offset;
22 }
23 
24 const MapEntry<uint16_t> *TimezoneData::countryTimezoneMapBegin()
25 {
26  return std::begin(country_timezone_map);
27 }
28 
29 const MapEntry<uint16_t> *TimezoneData::countryTimezoneMapEnd()
30 {
31  return std::end(country_timezone_map);
32 }
33 
34 const MapEntry<uint32_t> *TimezoneData::subdivisionTimezoneMapBegin()
35 {
36  return std::begin(subdivision_timezone_map);
37 }
38 
39 const MapEntry<uint32_t> *TimezoneData::subdivisionTimezoneMapEnd()
40 {
41  return std::end(subdivision_timezone_map);
42 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 16 2022 04:07:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.