Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 1 | // 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 Lenten | f191ab0 | 2022-09-15 14:40:15 -0400 | [diff] [blame] | 37 | @protocol GPBExtensionRegistry; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 38 | @class GPBFieldDescriptor; |
| 39 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 40 | @protocol GPBDictionaryInternalsProtocol |
| 41 | - (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field; |
| 42 | - (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream |
| 43 | asField:(GPBFieldDescriptor *)field; |
Thomas Van Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 44 | - (void)setGPBGenericValue:(GPBGenericValue *)value forGPBGenericValueKey:(GPBGenericValue *)key; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 45 | - (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block; |
| 46 | @end |
| 47 | |
Thomas Van Lenten | 9e069b2 | 2022-09-19 13:34:01 -0400 | [diff] [blame] | 48 | // Disable clang-format for the macros. |
| 49 | // clang-format off |
| 50 | |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 51 | //%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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 65 | //%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () <GPBDictionaryInternalsProtocol> { |
| 66 | //% @package |
| 67 | //% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 68 | //%} |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 69 | //%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 Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 81 | //% forKey:(GPBGenericValue *)key |
| 82 | //% keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 83 | //% |
| 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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 88 | @interface GPBUInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 89 | @package |
| 90 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 91 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 92 | @end |
| 93 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 94 | @interface GPBUInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 95 | @package |
| 96 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 97 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 98 | @end |
| 99 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 100 | @interface GPBUInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 101 | @package |
| 102 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 103 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 104 | @end |
| 105 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 106 | @interface GPBUInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 107 | @package |
| 108 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 109 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 110 | @end |
| 111 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 112 | @interface GPBUInt32BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 113 | @package |
| 114 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 115 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 116 | @end |
| 117 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 118 | @interface GPBUInt32FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 119 | @package |
| 120 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 121 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 122 | @end |
| 123 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 124 | @interface GPBUInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 125 | @package |
| 126 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 127 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 128 | @end |
| 129 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 130 | @interface GPBUInt32EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 131 | @package |
| 132 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 133 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 134 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 135 | forKey:(GPBGenericValue *)key |
| 136 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 137 | @end |
| 138 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 139 | @interface GPBUInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 140 | @package |
| 141 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 142 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 143 | - (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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 151 | @interface GPBInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 152 | @package |
| 153 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 154 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 155 | @end |
| 156 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 157 | @interface GPBInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 158 | @package |
| 159 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 160 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 161 | @end |
| 162 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 163 | @interface GPBInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 164 | @package |
| 165 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 166 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 167 | @end |
| 168 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 169 | @interface GPBInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 170 | @package |
| 171 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 172 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 173 | @end |
| 174 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 175 | @interface GPBInt32BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 176 | @package |
| 177 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 178 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 179 | @end |
| 180 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 181 | @interface GPBInt32FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 182 | @package |
| 183 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 184 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 185 | @end |
| 186 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 187 | @interface GPBInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 188 | @package |
| 189 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 190 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 191 | @end |
| 192 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 193 | @interface GPBInt32EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 194 | @package |
| 195 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 196 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 197 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 198 | forKey:(GPBGenericValue *)key |
| 199 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 200 | @end |
| 201 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 202 | @interface GPBInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 203 | @package |
| 204 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 205 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 206 | - (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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 214 | @interface GPBUInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 215 | @package |
| 216 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 217 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 218 | @end |
| 219 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 220 | @interface GPBUInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 221 | @package |
| 222 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 223 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 224 | @end |
| 225 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 226 | @interface GPBUInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 227 | @package |
| 228 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 229 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 230 | @end |
| 231 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 232 | @interface GPBUInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 233 | @package |
| 234 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 235 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 236 | @end |
| 237 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 238 | @interface GPBUInt64BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 239 | @package |
| 240 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 241 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 242 | @end |
| 243 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 244 | @interface GPBUInt64FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 245 | @package |
| 246 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 247 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 248 | @end |
| 249 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 250 | @interface GPBUInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 251 | @package |
| 252 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 253 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 254 | @end |
| 255 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 256 | @interface GPBUInt64EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 257 | @package |
| 258 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 259 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 260 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 261 | forKey:(GPBGenericValue *)key |
| 262 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 263 | @end |
| 264 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 265 | @interface GPBUInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 266 | @package |
| 267 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 268 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 269 | - (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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 277 | @interface GPBInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 278 | @package |
| 279 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 280 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 281 | @end |
| 282 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 283 | @interface GPBInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 284 | @package |
| 285 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 286 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 287 | @end |
| 288 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 289 | @interface GPBInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 290 | @package |
| 291 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 292 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 293 | @end |
| 294 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 295 | @interface GPBInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 296 | @package |
| 297 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 298 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 299 | @end |
| 300 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 301 | @interface GPBInt64BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 302 | @package |
| 303 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 304 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 305 | @end |
| 306 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 307 | @interface GPBInt64FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 308 | @package |
| 309 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 310 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 311 | @end |
| 312 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 313 | @interface GPBInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 314 | @package |
| 315 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 316 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 317 | @end |
| 318 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 319 | @interface GPBInt64EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 320 | @package |
| 321 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 322 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 323 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 324 | forKey:(GPBGenericValue *)key |
| 325 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 326 | @end |
| 327 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 328 | @interface GPBInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 329 | @package |
| 330 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 331 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 332 | - (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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 340 | @interface GPBBoolUInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 341 | @package |
| 342 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 343 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 344 | @end |
| 345 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 346 | @interface GPBBoolInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 347 | @package |
| 348 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 349 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 350 | @end |
| 351 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 352 | @interface GPBBoolUInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 353 | @package |
| 354 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 355 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 356 | @end |
| 357 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 358 | @interface GPBBoolInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 359 | @package |
| 360 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 361 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 362 | @end |
| 363 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 364 | @interface GPBBoolBoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 365 | @package |
| 366 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 367 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 368 | @end |
| 369 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 370 | @interface GPBBoolFloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 371 | @package |
| 372 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 373 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 374 | @end |
| 375 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 376 | @interface GPBBoolDoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 377 | @package |
| 378 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 379 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 380 | @end |
| 381 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 382 | @interface GPBBoolEnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 383 | @package |
| 384 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 385 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 386 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 387 | forKey:(GPBGenericValue *)key |
| 388 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 389 | @end |
| 390 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 391 | @interface GPBBoolObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 392 | @package |
| 393 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 394 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 395 | - (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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 403 | @interface GPBStringUInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 404 | @package |
| 405 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 406 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 407 | @end |
| 408 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 409 | @interface GPBStringInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 410 | @package |
| 411 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 412 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 413 | @end |
| 414 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 415 | @interface GPBStringUInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 416 | @package |
| 417 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 418 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 419 | @end |
| 420 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 421 | @interface GPBStringInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 422 | @package |
| 423 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 424 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 425 | @end |
| 426 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 427 | @interface GPBStringBoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 428 | @package |
| 429 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 430 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 431 | @end |
| 432 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 433 | @interface GPBStringFloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 434 | @package |
| 435 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 436 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 437 | @end |
| 438 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 439 | @interface GPBStringDoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 440 | @package |
| 441 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 442 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 443 | @end |
| 444 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 445 | @interface GPBStringEnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 446 | @package |
| 447 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 448 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 449 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 450 | forKey:(GPBGenericValue *)key |
| 451 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 452 | @end |
| 453 | |
| 454 | //%PDDM-EXPAND-END (6 expansions) |
| 455 | |
Thomas Van Lenten | 9e069b2 | 2022-09-19 13:34:01 -0400 | [diff] [blame] | 456 | // clang-format on |
| 457 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 458 | #pragma mark - NSDictionary Subclass |
| 459 | |
| 460 | @interface GPBAutocreatedDictionary : NSMutableDictionary { |
Thomas Van Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 461 | @package |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 462 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 463 | } |
| 464 | @end |
| 465 | |
| 466 | #pragma mark - Helpers |
| 467 | |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 468 | CF_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 Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 472 | size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field); |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 473 | |
| 474 | // Helper to write out when an NSDictionary is used for the map instead |
| 475 | // of a custom type. |
Thomas Van Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 476 | void GPBDictionaryWriteToStreamInternalHelper(GPBCodedOutputStream *outputStream, |
| 477 | NSDictionary *dict, GPBFieldDescriptor *field); |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 478 | |
| 479 | // Helper to check message initialization when an NSDictionary is used for |
| 480 | // the map instead of a custom type. |
Thomas Van Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 481 | BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, GPBFieldDescriptor *field); |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 482 | |
| 483 | // Helper to read a map instead. |
| 484 | void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream, |
Thomas Van Lenten | 5d0b217 | 2022-09-19 17:20:35 -0400 | [diff] [blame] | 485 | id<GPBExtensionRegistry> registry, GPBFieldDescriptor *field, |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 486 | GPBMessage *parentMessage); |
| 487 | |
| 488 | CF_EXTERN_C_END |