ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
Weekday.d.hpp
Go to the documentation of this file.
1#ifndef icu4x_Weekday_D_HPP
2#define icu4x_Weekday_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
14
15namespace icu4x {
16namespace capi {
17 enum Weekday {
18 Weekday_Monday = 1,
19 Weekday_Tuesday = 2,
20 Weekday_Wednesday = 3,
21 Weekday_Thursday = 4,
22 Weekday_Friday = 5,
23 Weekday_Saturday = 6,
24 Weekday_Sunday = 7,
25 };
26
27 typedef struct Weekday_option {union { Weekday ok; }; bool is_ok; } Weekday_option;
28} // namespace capi
29} // namespace
30
31namespace icu4x {
32class Weekday {
33public:
34 enum Value {
35 Monday = 1,
39 Friday = 5,
41 Sunday = 7,
42 };
43
44 Weekday() = default;
45 // Implicit conversions between enum and ::Value
46 constexpr Weekday(Value v) : value(v) {}
47 constexpr operator Value() const { return value; }
48 // Prevent usage as boolean value
49 explicit operator bool() const = delete;
50
51 inline icu4x::capi::Weekday AsFFI() const;
52 inline static icu4x::Weekday FromFFI(icu4x::capi::Weekday c_enum);
53private:
54 Value value;
55};
56
57} // namespace
58#endif // icu4x_Weekday_D_HPP
Definition Weekday.d.hpp:32
Weekday()=default
constexpr Weekday(Value v)
Definition Weekday.d.hpp:46
Value
Definition Weekday.d.hpp:34
@ Friday
Definition Weekday.d.hpp:39
@ Wednesday
Definition Weekday.d.hpp:37
@ Sunday
Definition Weekday.d.hpp:41
@ Thursday
Definition Weekday.d.hpp:38
@ Tuesday
Definition Weekday.d.hpp:36
@ Saturday
Definition Weekday.d.hpp:40
@ Monday
Definition Weekday.d.hpp:35
Definition Bidi.d.hpp:14