@@ -42,6 +42,18 @@ typedef void *swift_static_mirror_t;
42
42
typedef struct swift_static_mirror_conformance_info_s
43
43
* swift_static_mirror_conformance_info_t ;
44
44
45
+ /// Opaque container to a field info (property type or enum case)
46
+ typedef struct swift_static_mirror_field_info_s
47
+ * swift_static_mirror_field_info_t ;
48
+
49
+ /// Opaque container to a property type info
50
+ typedef struct swift_static_mirror_property_info_s
51
+ * swift_static_mirror_property_info_t ;
52
+
53
+ /// Opaque container to an enum case info
54
+ typedef struct swift_static_mirror_enum_case_info_s
55
+ * swift_static_mirror_enum_case_info_t ;
56
+
45
57
/// Opaque container to details of an associated type specification.
46
58
typedef struct swift_static_mirror_type_alias_s
47
59
* swift_static_mirror_type_alias_t ;
@@ -55,7 +67,6 @@ typedef struct {
55
67
size_t count ;
56
68
} swift_static_mirror_type_alias_set_t ;
57
69
58
-
59
70
typedef struct {
60
71
swift_static_mirror_associated_type_info_t * associated_type_infos ;
61
72
size_t count ;
@@ -66,26 +77,35 @@ typedef struct {
66
77
size_t count ;
67
78
} swift_static_mirror_conformances_set_t ;
68
79
80
+ typedef struct {
81
+ swift_static_mirror_property_info_t * properties ;
82
+ size_t count ;
83
+ } swift_static_mirror_property_info_set_t ;
69
84
70
- // swift_static_mirror_conformance_info query methods
85
+ typedef struct {
86
+ swift_static_mirror_enum_case_info_t * enum_cases ;
87
+ size_t count ;
88
+ } swift_static_mirror_enum_case_info_set_t ;
89
+
90
+ typedef struct {
91
+ swift_static_mirror_field_info_t * field_infos ;
92
+ size_t count ;
93
+ } swift_static_mirror_field_info_set_t ;
71
94
95
+ // swift_static_mirror_conformance_info query methods
72
96
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
73
97
swift_static_mirror_conformance_info_get_type_name (
74
98
swift_static_mirror_conformance_info_t );
75
-
76
99
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
77
100
swift_static_mirror_conformance_info_get_protocol_name (
78
101
swift_static_mirror_conformance_info_t );
79
-
80
102
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
81
103
swift_static_mirror_conformance_info_get_mangled_type_name (
82
104
swift_static_mirror_conformance_info_t );
105
+ SWIFTSTATICMIRROR_PUBLIC void swift_static_mirror_conformance_info_dispose (
106
+ swift_static_mirror_conformance_info_t );
83
107
84
- SWIFTSTATICMIRROR_PUBLIC void
85
- swift_static_mirror_conformance_info_dispose (
86
- swift_static_mirror_conformance_info_t );
87
-
88
- // swift_static_mirror_associated_type query methods
108
+ // swift_static_mirror_associated_type_info query methods
89
109
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
90
110
swift_static_mirror_type_alias_get_type_alias_name (
91
111
swift_static_mirror_type_alias_t );
@@ -100,41 +120,77 @@ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
100
120
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
101
121
swift_static_mirror_associated_type_info_get_mangled_type_name (
102
122
swift_static_mirror_associated_type_info_t );
103
- SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_type_alias_set_t *
123
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_type_alias_set_t *
104
124
swift_static_mirror_associated_type_info_get_type_alias_set (
105
125
swift_static_mirror_associated_type_info_t );
106
126
127
+ // swift_static_mirror_field_info query methods
128
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
129
+ swift_static_mirror_field_info_get_mangled_type_name (
130
+ swift_static_mirror_field_info_t );
131
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_property_info_set_t *
132
+ swift_static_mirror_field_info_get_property_info_set (
133
+ swift_static_mirror_field_info_t );
134
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_enum_case_info_set_t *
135
+ swift_static_mirror_field_info_get_enum_case_info_set (
136
+ swift_static_mirror_field_info_t );
137
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
138
+ swift_static_mirror_property_info_get_label (
139
+ swift_static_mirror_property_info_t );
140
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
141
+ swift_static_mirror_property_info_get_type_name (
142
+ swift_static_mirror_property_info_t );
143
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
144
+ swift_static_mirror_property_info_get_mangled_type_name (
145
+ swift_static_mirror_property_info_t );
146
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_string_ref_t
147
+ swift_static_mirror_enum_case_info_get_label (
148
+ swift_static_mirror_enum_case_info_t );
149
+
107
150
/// Create an \c swift_static_mirror_t instance.
108
151
/// The returned \c swift_static_mirror_t is owned by the caller and must be
109
152
/// disposed of using \c swift_static_mirror_dispose .
110
153
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_t
111
154
swift_static_mirror_create (int , const char * * , const char * );
112
155
113
156
SWIFTSTATICMIRROR_PUBLIC void
114
- swift_static_mirror_dispose (swift_static_mirror_t );
157
+ swift_static_mirror_dispose (swift_static_mirror_t );
115
158
116
159
/// Identify and collect all types conforming to any of the protocol names
117
160
/// specified as arguments
118
161
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_conformances_set_t *
119
- swift_static_mirror_conformances_set_create (
120
- swift_static_mirror_t , int , const char * * );
162
+ swift_static_mirror_conformances_set_create (swift_static_mirror_t , int ,
163
+ const char * * );
121
164
122
165
SWIFTSTATICMIRROR_PUBLIC void swift_static_mirror_conformances_set_dispose (
123
166
swift_static_mirror_conformances_set_t * );
124
167
125
- /// Identify and collect all associated types of a given input type (by mangled name)
168
+ /// Identify and collect all associated types of a given input type (by mangled
169
+ /// name)
126
170
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_associated_type_info_set_t *
127
- swift_static_mirror_associated_type_info_set_create (
128
- swift_static_mirror_t , const char * );
171
+ swift_static_mirror_associated_type_info_set_create (swift_static_mirror_t ,
172
+ const char * );
129
173
130
174
/// Identify and collect associated types of all discovered types.
131
175
SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_associated_type_info_set_t *
132
- swift_static_mirror_all_associated_type_info_set_create (
133
- swift_static_mirror_t );
176
+ swift_static_mirror_all_associated_type_info_set_create (
177
+ swift_static_mirror_t );
134
178
135
- SWIFTSTATICMIRROR_PUBLIC void swift_static_mirror_associated_type_info_set_dispose (
179
+ SWIFTSTATICMIRROR_PUBLIC void
180
+ swift_static_mirror_associated_type_info_set_dispose (
136
181
swift_static_mirror_associated_type_info_set_t * );
137
182
183
+ /// Identify and collect all field types of a given input type (by mangled name)
184
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_field_info_set_t *
185
+ swift_static_mirror_field_info_set_create (swift_static_mirror_t , const char * );
186
+
187
+ /// Identify and collect field types of all discovered types.
188
+ SWIFTSTATICMIRROR_PUBLIC swift_static_mirror_field_info_set_t *
189
+ swift_static_mirror_all_field_info_set_create (swift_static_mirror_t );
190
+
191
+ SWIFTSTATICMIRROR_PUBLIC void swift_static_mirror_field_info_set_dispose (
192
+ swift_static_mirror_field_info_set_t * );
193
+
138
194
SWIFTSTATICMIRROR_END_DECLS
139
195
140
196
#endif // SWIFT_C_BINARY_SCAN_H
0 commit comments