ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
DateTimeLength.d.hpp
Go to the documentation of this file.
1#ifndef ICU4X_DateTimeLength_D_HPP
2#define ICU4X_DateTimeLength_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>
12#include "diplomat_runtime.hpp"
13
14
15namespace icu4x {
16namespace capi {
17 enum DateTimeLength {
18 DateTimeLength_Long = 0,
19 DateTimeLength_Medium = 1,
20 DateTimeLength_Short = 2,
21 };
22
23 typedef struct DateTimeLength_option {union { DateTimeLength ok; }; bool is_ok; } DateTimeLength_option;
24} // namespace capi
25} // namespace
26
27namespace icu4x {
32public:
33 enum Value {
34 Long = 0,
35 Medium = 1,
36 Short = 2,
37 };
38
40
41 // Implicit conversions between enum and ::Value
42 constexpr DateTimeLength(Value v) : value(v) {}
43 constexpr operator Value() const { return value; }
44 // Prevent usage as boolean value
45 explicit operator bool() const = delete;
46
47 inline icu4x::capi::DateTimeLength AsFFI() const;
48 inline static icu4x::DateTimeLength FromFFI(icu4x::capi::DateTimeLength c_enum);
49private:
50 Value value;
51};
52
53} // namespace
54#endif // ICU4X_DateTimeLength_D_HPP
Definition DateTimeLength.d.hpp:31
Value
Definition DateTimeLength.d.hpp:33
@ Long
Definition DateTimeLength.d.hpp:34
@ Short
Definition DateTimeLength.d.hpp:36
@ Medium
Definition DateTimeLength.d.hpp:35
constexpr DateTimeLength(Value v)
Definition DateTimeLength.d.hpp:42
DateTimeLength()
Definition DateTimeLength.d.hpp:39
Definition Bidi.d.hpp:13