ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ListLength.d.hpp
Go to the documentation of this file.
1#ifndef ICU4X_ListLength_D_HPP
2#define ICU4X_ListLength_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 ListLength {
18 ListLength_Wide = 0,
19 ListLength_Short = 1,
20 ListLength_Narrow = 2,
21 };
22
23 typedef struct ListLength_option {union { ListLength ok; }; bool is_ok; } ListLength_option;
24} // namespace capi
25} // namespace
26
27namespace icu4x {
32public:
33 enum Value {
34 Wide = 0,
35 Short = 1,
36 Narrow = 2,
37 };
38
39 ListLength(): value(Value::Wide) {}
40
41 // Implicit conversions between enum and ::Value
42 constexpr ListLength(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::ListLength AsFFI() const;
48 inline static icu4x::ListLength FromFFI(icu4x::capi::ListLength c_enum);
49private:
50 Value value;
51};
52
53} // namespace
54#endif // ICU4X_ListLength_D_HPP
Definition ListLength.d.hpp:31
ListLength()
Definition ListLength.d.hpp:39
Value
Definition ListLength.d.hpp:33
@ Wide
Definition ListLength.d.hpp:34
@ Short
Definition ListLength.d.hpp:35
@ Narrow
Definition ListLength.d.hpp:36
constexpr ListLength(Value v)
Definition ListLength.d.hpp:42
Definition Bidi.d.hpp:13