blob: 54b37dd85587475bfc470c21224488b72ae91135 [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;
37@class GPBExtensionRegistry;
38@class GPBFieldDescriptor;
39
40//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME)
41//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
42//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object)
43//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
44//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic)
45//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic)
46//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic)
47//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic)
48//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic)
49//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic)
50//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic)
51//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum)
52
53//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER)
54//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary ()
55//%- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
56//%- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
57//% asField:(GPBFieldDescriptor *)field;
58//%- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
59//%- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
60//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end
61//%
62
63//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic()
64// Empty
65//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object()
66//%- (BOOL)isInitialized;
67//%- (instancetype)deepCopyWithZone:(NSZone *)zone
68//% __attribute__((ns_returns_retained));
69//%
70//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum()
71//%- (NSData *)serializedDataForUnknownValue:(int32_t)value
72//% forKey:(GPBValue *)key
73//% keyType:(GPBType)keyType;
74//%
75
76//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32)
77// This block of code is generated, do not edit it directly.
78
79@interface GPBUInt32UInt32Dictionary ()
80- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
81- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
82 asField:(GPBFieldDescriptor *)field;
83- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
84- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
85@end
86
87@interface GPBUInt32Int32Dictionary ()
88- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
89- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
90 asField:(GPBFieldDescriptor *)field;
91- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
92- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
93@end
94
95@interface GPBUInt32UInt64Dictionary ()
96- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
97- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
98 asField:(GPBFieldDescriptor *)field;
99- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
100- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
101@end
102
103@interface GPBUInt32Int64Dictionary ()
104- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
105- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
106 asField:(GPBFieldDescriptor *)field;
107- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
108- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
109@end
110
111@interface GPBUInt32BoolDictionary ()
112- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
113- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
114 asField:(GPBFieldDescriptor *)field;
115- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
116- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
117@end
118
119@interface GPBUInt32FloatDictionary ()
120- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
121- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
122 asField:(GPBFieldDescriptor *)field;
123- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
124- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
125@end
126
127@interface GPBUInt32DoubleDictionary ()
128- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
129- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
130 asField:(GPBFieldDescriptor *)field;
131- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
132- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
133@end
134
135@interface GPBUInt32EnumDictionary ()
136- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
137- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
138 asField:(GPBFieldDescriptor *)field;
139- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
140- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
141- (NSData *)serializedDataForUnknownValue:(int32_t)value
142 forKey:(GPBValue *)key
143 keyType:(GPBType)keyType;
144@end
145
146@interface GPBUInt32ObjectDictionary ()
147- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
148- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
149 asField:(GPBFieldDescriptor *)field;
150- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
151- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
152- (BOOL)isInitialized;
153- (instancetype)deepCopyWithZone:(NSZone *)zone
154 __attribute__((ns_returns_retained));
155@end
156
157//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32)
158// This block of code is generated, do not edit it directly.
159
160@interface GPBInt32UInt32Dictionary ()
161- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
162- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
163 asField:(GPBFieldDescriptor *)field;
164- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
165- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
166@end
167
168@interface GPBInt32Int32Dictionary ()
169- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
170- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
171 asField:(GPBFieldDescriptor *)field;
172- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
173- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
174@end
175
176@interface GPBInt32UInt64Dictionary ()
177- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
178- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
179 asField:(GPBFieldDescriptor *)field;
180- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
181- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
182@end
183
184@interface GPBInt32Int64Dictionary ()
185- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
186- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
187 asField:(GPBFieldDescriptor *)field;
188- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
189- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
190@end
191
192@interface GPBInt32BoolDictionary ()
193- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
194- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
195 asField:(GPBFieldDescriptor *)field;
196- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
197- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
198@end
199
200@interface GPBInt32FloatDictionary ()
201- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
202- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
203 asField:(GPBFieldDescriptor *)field;
204- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
205- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
206@end
207
208@interface GPBInt32DoubleDictionary ()
209- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
210- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
211 asField:(GPBFieldDescriptor *)field;
212- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
213- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
214@end
215
216@interface GPBInt32EnumDictionary ()
217- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
218- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
219 asField:(GPBFieldDescriptor *)field;
220- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
221- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
222- (NSData *)serializedDataForUnknownValue:(int32_t)value
223 forKey:(GPBValue *)key
224 keyType:(GPBType)keyType;
225@end
226
227@interface GPBInt32ObjectDictionary ()
228- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
229- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
230 asField:(GPBFieldDescriptor *)field;
231- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
232- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
233- (BOOL)isInitialized;
234- (instancetype)deepCopyWithZone:(NSZone *)zone
235 __attribute__((ns_returns_retained));
236@end
237
238//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64)
239// This block of code is generated, do not edit it directly.
240
241@interface GPBUInt64UInt32Dictionary ()
242- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
243- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
244 asField:(GPBFieldDescriptor *)field;
245- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
246- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
247@end
248
249@interface GPBUInt64Int32Dictionary ()
250- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
251- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
252 asField:(GPBFieldDescriptor *)field;
253- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
254- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
255@end
256
257@interface GPBUInt64UInt64Dictionary ()
258- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
259- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
260 asField:(GPBFieldDescriptor *)field;
261- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
262- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
263@end
264
265@interface GPBUInt64Int64Dictionary ()
266- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
267- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
268 asField:(GPBFieldDescriptor *)field;
269- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
270- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
271@end
272
273@interface GPBUInt64BoolDictionary ()
274- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
275- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
276 asField:(GPBFieldDescriptor *)field;
277- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
278- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
279@end
280
281@interface GPBUInt64FloatDictionary ()
282- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
283- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
284 asField:(GPBFieldDescriptor *)field;
285- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
286- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
287@end
288
289@interface GPBUInt64DoubleDictionary ()
290- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
291- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
292 asField:(GPBFieldDescriptor *)field;
293- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
294- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
295@end
296
297@interface GPBUInt64EnumDictionary ()
298- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
299- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
300 asField:(GPBFieldDescriptor *)field;
301- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
302- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
303- (NSData *)serializedDataForUnknownValue:(int32_t)value
304 forKey:(GPBValue *)key
305 keyType:(GPBType)keyType;
306@end
307
308@interface GPBUInt64ObjectDictionary ()
309- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
310- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
311 asField:(GPBFieldDescriptor *)field;
312- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
313- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
314- (BOOL)isInitialized;
315- (instancetype)deepCopyWithZone:(NSZone *)zone
316 __attribute__((ns_returns_retained));
317@end
318
319//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64)
320// This block of code is generated, do not edit it directly.
321
322@interface GPBInt64UInt32Dictionary ()
323- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
324- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
325 asField:(GPBFieldDescriptor *)field;
326- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
327- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
328@end
329
330@interface GPBInt64Int32Dictionary ()
331- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
332- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
333 asField:(GPBFieldDescriptor *)field;
334- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
335- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
336@end
337
338@interface GPBInt64UInt64Dictionary ()
339- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
340- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
341 asField:(GPBFieldDescriptor *)field;
342- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
343- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
344@end
345
346@interface GPBInt64Int64Dictionary ()
347- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
348- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
349 asField:(GPBFieldDescriptor *)field;
350- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
351- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
352@end
353
354@interface GPBInt64BoolDictionary ()
355- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
356- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
357 asField:(GPBFieldDescriptor *)field;
358- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
359- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
360@end
361
362@interface GPBInt64FloatDictionary ()
363- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
364- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
365 asField:(GPBFieldDescriptor *)field;
366- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
367- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
368@end
369
370@interface GPBInt64DoubleDictionary ()
371- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
372- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
373 asField:(GPBFieldDescriptor *)field;
374- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
375- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
376@end
377
378@interface GPBInt64EnumDictionary ()
379- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
380- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
381 asField:(GPBFieldDescriptor *)field;
382- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
383- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
384- (NSData *)serializedDataForUnknownValue:(int32_t)value
385 forKey:(GPBValue *)key
386 keyType:(GPBType)keyType;
387@end
388
389@interface GPBInt64ObjectDictionary ()
390- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
391- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
392 asField:(GPBFieldDescriptor *)field;
393- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
394- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
395- (BOOL)isInitialized;
396- (instancetype)deepCopyWithZone:(NSZone *)zone
397 __attribute__((ns_returns_retained));
398@end
399
400//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool)
401// This block of code is generated, do not edit it directly.
402
403@interface GPBBoolUInt32Dictionary ()
404- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
405- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
406 asField:(GPBFieldDescriptor *)field;
407- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
408- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
409@end
410
411@interface GPBBoolInt32Dictionary ()
412- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
413- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
414 asField:(GPBFieldDescriptor *)field;
415- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
416- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
417@end
418
419@interface GPBBoolUInt64Dictionary ()
420- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
421- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
422 asField:(GPBFieldDescriptor *)field;
423- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
424- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
425@end
426
427@interface GPBBoolInt64Dictionary ()
428- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
429- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
430 asField:(GPBFieldDescriptor *)field;
431- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
432- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
433@end
434
435@interface GPBBoolBoolDictionary ()
436- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
437- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
438 asField:(GPBFieldDescriptor *)field;
439- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
440- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
441@end
442
443@interface GPBBoolFloatDictionary ()
444- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
445- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
446 asField:(GPBFieldDescriptor *)field;
447- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
448- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
449@end
450
451@interface GPBBoolDoubleDictionary ()
452- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
453- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
454 asField:(GPBFieldDescriptor *)field;
455- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
456- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
457@end
458
459@interface GPBBoolEnumDictionary ()
460- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
461- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
462 asField:(GPBFieldDescriptor *)field;
463- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
464- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
465- (NSData *)serializedDataForUnknownValue:(int32_t)value
466 forKey:(GPBValue *)key
467 keyType:(GPBType)keyType;
468@end
469
470@interface GPBBoolObjectDictionary ()
471- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
472- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
473 asField:(GPBFieldDescriptor *)field;
474- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
475- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
476- (BOOL)isInitialized;
477- (instancetype)deepCopyWithZone:(NSZone *)zone
478 __attribute__((ns_returns_retained));
479@end
480
481//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String)
482// This block of code is generated, do not edit it directly.
483
484@interface GPBStringUInt32Dictionary ()
485- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
486- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
487 asField:(GPBFieldDescriptor *)field;
488- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
489- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
490@end
491
492@interface GPBStringInt32Dictionary ()
493- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
494- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
495 asField:(GPBFieldDescriptor *)field;
496- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
497- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
498@end
499
500@interface GPBStringUInt64Dictionary ()
501- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
502- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
503 asField:(GPBFieldDescriptor *)field;
504- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
505- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
506@end
507
508@interface GPBStringInt64Dictionary ()
509- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
510- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
511 asField:(GPBFieldDescriptor *)field;
512- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
513- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
514@end
515
516@interface GPBStringBoolDictionary ()
517- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
518- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
519 asField:(GPBFieldDescriptor *)field;
520- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
521- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
522@end
523
524@interface GPBStringFloatDictionary ()
525- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
526- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
527 asField:(GPBFieldDescriptor *)field;
528- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
529- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
530@end
531
532@interface GPBStringDoubleDictionary ()
533- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
534- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
535 asField:(GPBFieldDescriptor *)field;
536- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
537- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
538@end
539
540@interface GPBStringEnumDictionary ()
541- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
542- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
543 asField:(GPBFieldDescriptor *)field;
544- (void)setGPBValue:(GPBValue *)value forGPBValueKey:(GPBValue *)key;
545- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
546- (NSData *)serializedDataForUnknownValue:(int32_t)value
547 forKey:(GPBValue *)key
548 keyType:(GPBType)keyType;
549@end
550
551//%PDDM-EXPAND-END (6 expansions)
552
553CF_EXTERN_C_BEGIN
554
555// Helper to compute size when an NSDictionary is used for the map instead
556// of a custom type.
557size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict,
558 GPBFieldDescriptor *field);
559
560// Helper to write out when an NSDictionary is used for the map instead
561// of a custom type.
562void GPBDictionaryWriteToStreamInternalHelper(
563 GPBCodedOutputStream *outputStream, NSDictionary *dict,
564 GPBFieldDescriptor *field);
565
566// Helper to check message initialization when an NSDictionary is used for
567// the map instead of a custom type.
568BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict,
569 GPBFieldDescriptor *field);
570
571// Helper to read a map instead.
572void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream,
573 GPBExtensionRegistry *registry,
574 GPBFieldDescriptor *field,
575 GPBMessage *parentMessage);
576
577CF_EXTERN_C_END