blob: 3735fa5905ec4302be563bf2832b926def4e9553 [file] [log] [blame]
Thomas Van Lenten30650d82015-05-01 08:57:16 -04001// Protocol Buffers - Google's data interchange format
2// Copyright 2008 Google Inc. All rights reserved.
3// https://developers.google.com/protocol-buffers/
4//
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// * Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11// * Redistributions in binary form must reproduce the above
12// copyright notice, this list of conditions and the following disclaimer
13// in the documentation and/or other materials provided with the
14// distribution.
15// * Neither the name of Google Inc. nor the names of its
16// contributors may be used to endorse or promote products derived from
17// this software without specific prior written permission.
18//
19// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31#import <Foundation/Foundation.h>
32
33#import "GPBDictionary.h"
34
35@class GPBCodedInputStream;
36@class GPBCodedOutputStream;
Thomas Van Lentenf191ab02022-09-15 14:40:15 -040037@protocol GPBExtensionRegistry;
Thomas Van Lenten30650d82015-05-01 08:57:16 -040038@class GPBFieldDescriptor;
39
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040040@protocol GPBDictionaryInternalsProtocol
41- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
42- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
43 asField:(GPBFieldDescriptor *)field;
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -040044- (void)setGPBGenericValue:(GPBGenericValue *)value forGPBGenericValueKey:(GPBGenericValue *)key;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040045- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
46@end
47
Thomas Van Lenten9e069b22022-09-19 13:34:01 -040048// Disable clang-format for the macros.
49// clang-format off
50
Thomas Van Lenten30650d82015-05-01 08:57:16 -040051//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME)
52//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
53//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object)
54//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
55//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic)
56//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic)
57//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic)
58//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic)
59//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic)
60//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic)
61//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic)
62//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum)
63
64//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER)
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040065//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () <GPBDictionaryInternalsProtocol> {
66//% @package
67//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
68//%}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040069//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end
70//%
71
72//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic()
73// Empty
74//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object()
75//%- (BOOL)isInitialized;
76//%- (instancetype)deepCopyWithZone:(NSZone *)zone
77//% __attribute__((ns_returns_retained));
78//%
79//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum()
80//%- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040081//% forKey:(GPBGenericValue *)key
82//% keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -040083//%
84
85//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32)
86// This block of code is generated, do not edit it directly.
87
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040088@interface GPBUInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
89 @package
90 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
91}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040092@end
93
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040094@interface GPBUInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
95 @package
96 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
97}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040098@end
99
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400100@interface GPBUInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
101 @package
102 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
103}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400104@end
105
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400106@interface GPBUInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
107 @package
108 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
109}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400110@end
111
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400112@interface GPBUInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
113 @package
114 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
115}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400116@end
117
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400118@interface GPBUInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
119 @package
120 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
121}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400122@end
123
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400124@interface GPBUInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
125 @package
126 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
127}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400128@end
129
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400130@interface GPBUInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
131 @package
132 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
133}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400134- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400135 forKey:(GPBGenericValue *)key
136 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400137@end
138
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400139@interface GPBUInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
140 @package
141 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
142}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400143- (BOOL)isInitialized;
144- (instancetype)deepCopyWithZone:(NSZone *)zone
145 __attribute__((ns_returns_retained));
146@end
147
148//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32)
149// This block of code is generated, do not edit it directly.
150
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400151@interface GPBInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
152 @package
153 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
154}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400155@end
156
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400157@interface GPBInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
158 @package
159 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
160}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400161@end
162
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400163@interface GPBInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
164 @package
165 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
166}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400167@end
168
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400169@interface GPBInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
170 @package
171 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
172}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400173@end
174
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400175@interface GPBInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
176 @package
177 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
178}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400179@end
180
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400181@interface GPBInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
182 @package
183 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
184}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400185@end
186
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400187@interface GPBInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
188 @package
189 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
190}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400191@end
192
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400193@interface GPBInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
194 @package
195 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
196}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400197- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400198 forKey:(GPBGenericValue *)key
199 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400200@end
201
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400202@interface GPBInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
203 @package
204 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
205}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400206- (BOOL)isInitialized;
207- (instancetype)deepCopyWithZone:(NSZone *)zone
208 __attribute__((ns_returns_retained));
209@end
210
211//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64)
212// This block of code is generated, do not edit it directly.
213
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400214@interface GPBUInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
215 @package
216 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
217}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400218@end
219
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400220@interface GPBUInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
221 @package
222 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
223}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400224@end
225
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400226@interface GPBUInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
227 @package
228 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
229}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400230@end
231
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400232@interface GPBUInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
233 @package
234 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
235}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400236@end
237
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400238@interface GPBUInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
239 @package
240 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
241}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400242@end
243
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400244@interface GPBUInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
245 @package
246 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
247}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400248@end
249
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400250@interface GPBUInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
251 @package
252 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
253}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400254@end
255
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400256@interface GPBUInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
257 @package
258 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
259}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400260- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400261 forKey:(GPBGenericValue *)key
262 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400263@end
264
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400265@interface GPBUInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
266 @package
267 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
268}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400269- (BOOL)isInitialized;
270- (instancetype)deepCopyWithZone:(NSZone *)zone
271 __attribute__((ns_returns_retained));
272@end
273
274//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64)
275// This block of code is generated, do not edit it directly.
276
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400277@interface GPBInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
278 @package
279 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
280}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400281@end
282
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400283@interface GPBInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
284 @package
285 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
286}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400287@end
288
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400289@interface GPBInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
290 @package
291 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
292}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400293@end
294
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400295@interface GPBInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
296 @package
297 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
298}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400299@end
300
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400301@interface GPBInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
302 @package
303 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
304}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400305@end
306
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400307@interface GPBInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
308 @package
309 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
310}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400311@end
312
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400313@interface GPBInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
314 @package
315 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
316}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400317@end
318
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400319@interface GPBInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
320 @package
321 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
322}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400323- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400324 forKey:(GPBGenericValue *)key
325 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400326@end
327
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400328@interface GPBInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
329 @package
330 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
331}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400332- (BOOL)isInitialized;
333- (instancetype)deepCopyWithZone:(NSZone *)zone
334 __attribute__((ns_returns_retained));
335@end
336
337//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool)
338// This block of code is generated, do not edit it directly.
339
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400340@interface GPBBoolUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
341 @package
342 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
343}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400344@end
345
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400346@interface GPBBoolInt32Dictionary () <GPBDictionaryInternalsProtocol> {
347 @package
348 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
349}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400350@end
351
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400352@interface GPBBoolUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
353 @package
354 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
355}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400356@end
357
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400358@interface GPBBoolInt64Dictionary () <GPBDictionaryInternalsProtocol> {
359 @package
360 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
361}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400362@end
363
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400364@interface GPBBoolBoolDictionary () <GPBDictionaryInternalsProtocol> {
365 @package
366 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
367}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400368@end
369
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400370@interface GPBBoolFloatDictionary () <GPBDictionaryInternalsProtocol> {
371 @package
372 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
373}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400374@end
375
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400376@interface GPBBoolDoubleDictionary () <GPBDictionaryInternalsProtocol> {
377 @package
378 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
379}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400380@end
381
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400382@interface GPBBoolEnumDictionary () <GPBDictionaryInternalsProtocol> {
383 @package
384 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
385}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400386- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400387 forKey:(GPBGenericValue *)key
388 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400389@end
390
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400391@interface GPBBoolObjectDictionary () <GPBDictionaryInternalsProtocol> {
392 @package
393 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
394}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400395- (BOOL)isInitialized;
396- (instancetype)deepCopyWithZone:(NSZone *)zone
397 __attribute__((ns_returns_retained));
398@end
399
400//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String)
401// This block of code is generated, do not edit it directly.
402
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400403@interface GPBStringUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
404 @package
405 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
406}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400407@end
408
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400409@interface GPBStringInt32Dictionary () <GPBDictionaryInternalsProtocol> {
410 @package
411 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
412}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400413@end
414
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400415@interface GPBStringUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
416 @package
417 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
418}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400419@end
420
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400421@interface GPBStringInt64Dictionary () <GPBDictionaryInternalsProtocol> {
422 @package
423 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
424}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400425@end
426
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400427@interface GPBStringBoolDictionary () <GPBDictionaryInternalsProtocol> {
428 @package
429 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
430}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400431@end
432
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400433@interface GPBStringFloatDictionary () <GPBDictionaryInternalsProtocol> {
434 @package
435 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
436}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400437@end
438
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400439@interface GPBStringDoubleDictionary () <GPBDictionaryInternalsProtocol> {
440 @package
441 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
442}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400443@end
444
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400445@interface GPBStringEnumDictionary () <GPBDictionaryInternalsProtocol> {
446 @package
447 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
448}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400449- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400450 forKey:(GPBGenericValue *)key
451 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400452@end
453
454//%PDDM-EXPAND-END (6 expansions)
455
Thomas Van Lenten9e069b22022-09-19 13:34:01 -0400456// clang-format on
457
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400458#pragma mark - NSDictionary Subclass
459
460@interface GPBAutocreatedDictionary : NSMutableDictionary {
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -0400461 @package
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400462 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
463}
464@end
465
466#pragma mark - Helpers
467
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400468CF_EXTERN_C_BEGIN
469
470// Helper to compute size when an NSDictionary is used for the map instead
471// of a custom type.
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -0400472size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field);
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400473
474// Helper to write out when an NSDictionary is used for the map instead
475// of a custom type.
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -0400476void GPBDictionaryWriteToStreamInternalHelper(GPBCodedOutputStream *outputStream,
477 NSDictionary *dict, GPBFieldDescriptor *field);
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400478
479// Helper to check message initialization when an NSDictionary is used for
480// the map instead of a custom type.
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -0400481BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field);
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400482
483// Helper to read a map instead.
484void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream,
Thomas Van Lenten5d0b2172022-09-19 17:20:35 -0400485 id<GPBExtensionRegistry> registry, GPBFieldDescriptor *field,
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400486 GPBMessage *parentMessage);
487
488CF_EXTERN_C_END