-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathidl_test.idl.hh
90 lines (68 loc) · 1.91 KB
/
idl_test.idl.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
* Copyright 2016-present ScyllaDB
*/
/*
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
*/
// TODO: test final types more
#include "idl/uuid.idl.hh"
class simple_compound {
uint32_t foo;
uint32_t bar;
};
class writable_final_simple_compound final stub [[writable]] {
uint32_t foo;
uint32_t bar;
};
class writable_simple_compound stub [[writable]] {
uint32_t foo;
uint32_t bar;
};
struct wrapped_vector {
std::vector<simple_compound> vector;
};
struct vectors_of_compounds {
std::vector<simple_compound> first;
wrapped_vector second;
};
struct writable_wrapped_vector stub [[writable]] {
std::vector<simple_compound> vector;
};
struct writable_vectors_of_compounds stub [[writable]] {
std::vector<writable_simple_compound> first;
writable_wrapped_vector second;
};
struct writable_vector stub [[writable]] {
std::vector<simple_compound> vector;
};
struct writable_variants stub [[writable]] {
int id;
boost::variant<writable_vector, simple_compound, writable_final_simple_compound> first;
boost::variant<writable_vector, simple_compound, writable_final_simple_compound> second;
boost::variant<writable_vector, simple_compound, writable_final_simple_compound> third;
};
struct compound_with_optional {
std::optional<simple_compound> first;
simple_compound second;
};
class non_final_composite_test_object {
simple_compound x();
};
class final_composite_test_object final {
simple_compound x();
};
struct empty_struct { };
struct empty_final_struct final { };
struct just_a_variant stub [[writable]] {
std::variant<writable_simple_compound, simple_compound> variant;
};
template <typename T>
struct const_template_arg_wrapper {
T x;
}
struct const_template_arg_test_object {
std::vector<const_template_arg_wrapper<const simple_compound>> first;
};
struct frozen_object stub [[writable]] {
utils::UUID id;
};