blob: 15e42832641522ac428c4bb3399b2590b5b767e6 [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
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 Lentend846b0b2015-06-08 16:24:57 -040044- (void)setGPBGenericValue:(GPBGenericValue *)value
45 forGPBGenericValueKey:(GPBGenericValue *)key;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040046- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
47@end
48
Thomas Van Lenten30650d82015-05-01 08:57:16 -040049//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME)
50//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
51//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object)
52//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
53//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic)
54//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic)
55//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic)
56//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic)
57//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic)
58//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic)
59//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic)
60//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum)
61
62//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER)
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040063//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () <GPBDictionaryInternalsProtocol> {
64//% @package
65//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
66//%}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040067//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end
68//%
69
70//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic()
71// Empty
72//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object()
73//%- (BOOL)isInitialized;
74//%- (instancetype)deepCopyWithZone:(NSZone *)zone
75//% __attribute__((ns_returns_retained));
76//%
77//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum()
78//%- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040079//% forKey:(GPBGenericValue *)key
80//% keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -040081//%
82
83//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32)
84// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -080085// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -040086
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040087@interface GPBUInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
88 @package
89 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
90}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040091@end
92
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040093@interface GPBUInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
94 @package
95 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
96}
Thomas Van Lenten30650d82015-05-01 08:57:16 -040097@end
98
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040099@interface GPBUInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
100 @package
101 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
102}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400103@end
104
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400105@interface GPBUInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
106 @package
107 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
108}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400109@end
110
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400111@interface GPBUInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
112 @package
113 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
114}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400115@end
116
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400117@interface GPBUInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
118 @package
119 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
120}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400121@end
122
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400123@interface GPBUInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
124 @package
125 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
126}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400127@end
128
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400129@interface GPBUInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
130 @package
131 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
132}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400133- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400134 forKey:(GPBGenericValue *)key
135 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400136@end
137
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400138@interface GPBUInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
139 @package
140 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
141}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400142- (BOOL)isInitialized;
143- (instancetype)deepCopyWithZone:(NSZone *)zone
144 __attribute__((ns_returns_retained));
145@end
146
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800147// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400148//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32)
149// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800150// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400151
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400152@interface GPBInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
153 @package
154 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
155}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400156@end
157
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400158@interface GPBInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
159 @package
160 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
161}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400162@end
163
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400164@interface GPBInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
165 @package
166 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
167}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400168@end
169
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400170@interface GPBInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
171 @package
172 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
173}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400174@end
175
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400176@interface GPBInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
177 @package
178 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
179}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400180@end
181
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400182@interface GPBInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
183 @package
184 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
185}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400186@end
187
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400188@interface GPBInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
189 @package
190 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
191}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400192@end
193
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400194@interface GPBInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
195 @package
196 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
197}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400198- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400199 forKey:(GPBGenericValue *)key
200 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400201@end
202
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400203@interface GPBInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
204 @package
205 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
206}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400207- (BOOL)isInitialized;
208- (instancetype)deepCopyWithZone:(NSZone *)zone
209 __attribute__((ns_returns_retained));
210@end
211
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800212// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400213//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64)
214// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800215// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400216
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400217@interface GPBUInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
218 @package
219 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
220}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400221@end
222
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400223@interface GPBUInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
224 @package
225 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
226}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400227@end
228
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400229@interface GPBUInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
230 @package
231 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
232}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400233@end
234
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400235@interface GPBUInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
236 @package
237 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
238}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400239@end
240
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400241@interface GPBUInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
242 @package
243 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
244}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400245@end
246
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400247@interface GPBUInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
248 @package
249 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
250}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400251@end
252
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400253@interface GPBUInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
254 @package
255 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
256}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400257@end
258
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400259@interface GPBUInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
260 @package
261 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
262}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400263- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400264 forKey:(GPBGenericValue *)key
265 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400266@end
267
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400268@interface GPBUInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
269 @package
270 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
271}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400272- (BOOL)isInitialized;
273- (instancetype)deepCopyWithZone:(NSZone *)zone
274 __attribute__((ns_returns_retained));
275@end
276
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800277// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400278//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64)
279// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800280// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400281
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400282@interface GPBInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
283 @package
284 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
285}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400286@end
287
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400288@interface GPBInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
289 @package
290 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
291}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400292@end
293
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400294@interface GPBInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
295 @package
296 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
297}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400298@end
299
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400300@interface GPBInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
301 @package
302 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
303}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400304@end
305
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400306@interface GPBInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
307 @package
308 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
309}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400310@end
311
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400312@interface GPBInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
313 @package
314 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
315}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400316@end
317
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400318@interface GPBInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
319 @package
320 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
321}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400322@end
323
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400324@interface GPBInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
325 @package
326 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
327}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400328- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400329 forKey:(GPBGenericValue *)key
330 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400331@end
332
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400333@interface GPBInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
334 @package
335 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
336}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400337- (BOOL)isInitialized;
338- (instancetype)deepCopyWithZone:(NSZone *)zone
339 __attribute__((ns_returns_retained));
340@end
341
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800342// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400343//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool)
344// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800345// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400346
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400347@interface GPBBoolUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
348 @package
349 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
350}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400351@end
352
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400353@interface GPBBoolInt32Dictionary () <GPBDictionaryInternalsProtocol> {
354 @package
355 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
356}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400357@end
358
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400359@interface GPBBoolUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
360 @package
361 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
362}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400363@end
364
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400365@interface GPBBoolInt64Dictionary () <GPBDictionaryInternalsProtocol> {
366 @package
367 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
368}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400369@end
370
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400371@interface GPBBoolBoolDictionary () <GPBDictionaryInternalsProtocol> {
372 @package
373 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
374}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400375@end
376
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400377@interface GPBBoolFloatDictionary () <GPBDictionaryInternalsProtocol> {
378 @package
379 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
380}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400381@end
382
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400383@interface GPBBoolDoubleDictionary () <GPBDictionaryInternalsProtocol> {
384 @package
385 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
386}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400387@end
388
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400389@interface GPBBoolEnumDictionary () <GPBDictionaryInternalsProtocol> {
390 @package
391 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
392}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400393- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400394 forKey:(GPBGenericValue *)key
395 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400396@end
397
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400398@interface GPBBoolObjectDictionary () <GPBDictionaryInternalsProtocol> {
399 @package
400 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
401}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400402- (BOOL)isInitialized;
403- (instancetype)deepCopyWithZone:(NSZone *)zone
404 __attribute__((ns_returns_retained));
405@end
406
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800407// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400408//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String)
409// This block of code is generated, do not edit it directly.
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800410// clang-format off
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400411
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400412@interface GPBStringUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
413 @package
414 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
415}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400416@end
417
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400418@interface GPBStringInt32Dictionary () <GPBDictionaryInternalsProtocol> {
419 @package
420 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
421}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400422@end
423
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400424@interface GPBStringUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
425 @package
426 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
427}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400428@end
429
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400430@interface GPBStringInt64Dictionary () <GPBDictionaryInternalsProtocol> {
431 @package
432 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
433}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400434@end
435
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400436@interface GPBStringBoolDictionary () <GPBDictionaryInternalsProtocol> {
437 @package
438 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
439}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400440@end
441
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400442@interface GPBStringFloatDictionary () <GPBDictionaryInternalsProtocol> {
443 @package
444 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
445}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400446@end
447
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400448@interface GPBStringDoubleDictionary () <GPBDictionaryInternalsProtocol> {
449 @package
450 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
451}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400452@end
453
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400454@interface GPBStringEnumDictionary () <GPBDictionaryInternalsProtocol> {
455 @package
456 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
457}
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400458- (NSData *)serializedDataForUnknownValue:(int32_t)value
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400459 forKey:(GPBGenericValue *)key
460 keyDataType:(GPBDataType)keyDataType;
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400461@end
462
Dave MacLachlanab48ecf2020-01-20 13:47:20 -0800463// clang-format on
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400464//%PDDM-EXPAND-END (6 expansions)
465
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400466#pragma mark - NSDictionary Subclass
467
468@interface GPBAutocreatedDictionary : NSMutableDictionary {
469 @package
470 GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
471}
472@end
473
474#pragma mark - Helpers
475
Thomas Van Lenten30650d82015-05-01 08:57:16 -0400476CF_EXTERN_C_BEGIN
477
478// Helper to compute size when an NSDictionary is used for the map instead
479// of a custom type.
480size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict,
481 GPBFieldDescriptor *field);
482
483// Helper to write out when an NSDictionary is used for the map instead
484// of a custom type.
485void GPBDictionaryWriteToStreamInternalHelper(
486 GPBCodedOutputStream *outputStream, NSDictionary *dict,
487 GPBFieldDescriptor *field);
488
489// Helper to check message initialization when an NSDictionary is used for
490// the map instead of a custom type.
491BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict,
492 GPBFieldDescriptor *field);
493
494// Helper to read a map instead.
495void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream,
496 GPBExtensionRegistry *registry,
497 GPBFieldDescriptor *field,
498 GPBMessage *parentMessage);
499
500CF_EXTERN_C_END