xref: /aosp_15_r20/external/cronet/third_party/libc++/src/src/include/tzdb/time_zone_private.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // For information see https://libcxx.llvm.org/DesignDocs/TimeZone.html
11 
12 #ifndef _LIBCPP_SRC_INCLUDE_TZDB_TIME_ZONE_PRIVATE_H
13 #define _LIBCPP_SRC_INCLUDE_TZDB_TIME_ZONE_PRIVATE_H
14 
15 #include <chrono>
16 #include <string>
17 #include <vector>
18 
19 #include "types_private.h"
20 
21 _LIBCPP_BEGIN_NAMESPACE_STD
22 
23 namespace chrono {
24 
25 class time_zone::__impl {
26 public:
__impl(string && __name)27   explicit _LIBCPP_HIDE_FROM_ABI __impl(string&& __name) : __name_(std::move(__name)) {}
28 
__name()29   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI string_view __name() const noexcept { return __name_; }
30 
__continuations()31   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI vector<__tz::__continuation>& __continuations() { return __continuations_; }
__continuations()32   [[nodiscard]] _LIBCPP_HIDE_FROM_ABI const vector<__tz::__continuation>& __continuations() const {
33     return __continuations_;
34   }
35 
36 private:
37   string __name_;
38   // Note the first line has a name + __continuation, the other lines
39   // are just __continuations. So there is always at least one item in
40   // the vector.
41   vector<__tz::__continuation> __continuations_;
42 };
43 
44 } // namespace chrono
45 
46 _LIBCPP_END_NAMESPACE_STD
47 
48 #endif // _LIBCPP_SRC_INCLUDE_TZDB_TIME_ZONE_PRIVATE_H
49