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; |
| 37 | @class GPBExtensionRegistry; |
| 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 | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 44 | - (void)setGPBGenericValue:(GPBGenericValue *)value |
| 45 | forGPBGenericValueKey:(GPBGenericValue *)key; |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 46 | - (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block; |
| 47 | @end |
| 48 | |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 49 | //%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 Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 63 | //%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () <GPBDictionaryInternalsProtocol> { |
| 64 | //% @package |
| 65 | //% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 66 | //%} |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 67 | //%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 Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 79 | //% forKey:(GPBGenericValue *)key |
| 80 | //% keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 81 | //% |
| 82 | |
| 83 | //%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32) |
| 84 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 85 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 86 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 87 | @interface GPBUInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 88 | @package |
| 89 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 90 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 91 | @end |
| 92 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 93 | @interface GPBUInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 94 | @package |
| 95 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 96 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 97 | @end |
| 98 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 99 | @interface GPBUInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 100 | @package |
| 101 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 102 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 103 | @end |
| 104 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 105 | @interface GPBUInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 106 | @package |
| 107 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 108 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 109 | @end |
| 110 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 111 | @interface GPBUInt32BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 112 | @package |
| 113 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 114 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 115 | @end |
| 116 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 117 | @interface GPBUInt32FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 118 | @package |
| 119 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 120 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 121 | @end |
| 122 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 123 | @interface GPBUInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 124 | @package |
| 125 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 126 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 127 | @end |
| 128 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 129 | @interface GPBUInt32EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 130 | @package |
| 131 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 132 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 133 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 134 | forKey:(GPBGenericValue *)key |
| 135 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 136 | @end |
| 137 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 138 | @interface GPBUInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 139 | @package |
| 140 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 141 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 142 | - (BOOL)isInitialized; |
| 143 | - (instancetype)deepCopyWithZone:(NSZone *)zone |
| 144 | __attribute__((ns_returns_retained)); |
| 145 | @end |
| 146 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 147 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 148 | //%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32) |
| 149 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 150 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 151 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 152 | @interface GPBInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 153 | @package |
| 154 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 155 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 156 | @end |
| 157 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 158 | @interface GPBInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 159 | @package |
| 160 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 161 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 162 | @end |
| 163 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 164 | @interface GPBInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 165 | @package |
| 166 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 167 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 168 | @end |
| 169 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 170 | @interface GPBInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 171 | @package |
| 172 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 173 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 174 | @end |
| 175 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 176 | @interface GPBInt32BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 177 | @package |
| 178 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 179 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 180 | @end |
| 181 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 182 | @interface GPBInt32FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 183 | @package |
| 184 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 185 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 186 | @end |
| 187 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 188 | @interface GPBInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 189 | @package |
| 190 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 191 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 192 | @end |
| 193 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 194 | @interface GPBInt32EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 195 | @package |
| 196 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 197 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 198 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 199 | forKey:(GPBGenericValue *)key |
| 200 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 201 | @end |
| 202 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 203 | @interface GPBInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 204 | @package |
| 205 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 206 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 207 | - (BOOL)isInitialized; |
| 208 | - (instancetype)deepCopyWithZone:(NSZone *)zone |
| 209 | __attribute__((ns_returns_retained)); |
| 210 | @end |
| 211 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 212 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 213 | //%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64) |
| 214 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 215 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 216 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 217 | @interface GPBUInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 218 | @package |
| 219 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 220 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 221 | @end |
| 222 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 223 | @interface GPBUInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 224 | @package |
| 225 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 226 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 227 | @end |
| 228 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 229 | @interface GPBUInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 230 | @package |
| 231 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 232 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 233 | @end |
| 234 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 235 | @interface GPBUInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 236 | @package |
| 237 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 238 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 239 | @end |
| 240 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 241 | @interface GPBUInt64BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 242 | @package |
| 243 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 244 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 245 | @end |
| 246 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 247 | @interface GPBUInt64FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 248 | @package |
| 249 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 250 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 251 | @end |
| 252 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 253 | @interface GPBUInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 254 | @package |
| 255 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 256 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 257 | @end |
| 258 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 259 | @interface GPBUInt64EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 260 | @package |
| 261 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 262 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 263 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 264 | forKey:(GPBGenericValue *)key |
| 265 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 266 | @end |
| 267 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 268 | @interface GPBUInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 269 | @package |
| 270 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 271 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 272 | - (BOOL)isInitialized; |
| 273 | - (instancetype)deepCopyWithZone:(NSZone *)zone |
| 274 | __attribute__((ns_returns_retained)); |
| 275 | @end |
| 276 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 277 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 278 | //%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64) |
| 279 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 280 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 281 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 282 | @interface GPBInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 283 | @package |
| 284 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 285 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 286 | @end |
| 287 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 288 | @interface GPBInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 289 | @package |
| 290 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 291 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 292 | @end |
| 293 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 294 | @interface GPBInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 295 | @package |
| 296 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 297 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 298 | @end |
| 299 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 300 | @interface GPBInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 301 | @package |
| 302 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 303 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 304 | @end |
| 305 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 306 | @interface GPBInt64BoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 307 | @package |
| 308 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 309 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 310 | @end |
| 311 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 312 | @interface GPBInt64FloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 313 | @package |
| 314 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 315 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 316 | @end |
| 317 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 318 | @interface GPBInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 319 | @package |
| 320 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 321 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 322 | @end |
| 323 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 324 | @interface GPBInt64EnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 325 | @package |
| 326 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 327 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 328 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 329 | forKey:(GPBGenericValue *)key |
| 330 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 331 | @end |
| 332 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 333 | @interface GPBInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 334 | @package |
| 335 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 336 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 337 | - (BOOL)isInitialized; |
| 338 | - (instancetype)deepCopyWithZone:(NSZone *)zone |
| 339 | __attribute__((ns_returns_retained)); |
| 340 | @end |
| 341 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 342 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 343 | //%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool) |
| 344 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 345 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 346 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 347 | @interface GPBBoolUInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 348 | @package |
| 349 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 350 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 351 | @end |
| 352 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 353 | @interface GPBBoolInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 354 | @package |
| 355 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 356 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 357 | @end |
| 358 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 359 | @interface GPBBoolUInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 360 | @package |
| 361 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 362 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 363 | @end |
| 364 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 365 | @interface GPBBoolInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 366 | @package |
| 367 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 368 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 369 | @end |
| 370 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 371 | @interface GPBBoolBoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 372 | @package |
| 373 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 374 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 375 | @end |
| 376 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 377 | @interface GPBBoolFloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 378 | @package |
| 379 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 380 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 381 | @end |
| 382 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 383 | @interface GPBBoolDoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 384 | @package |
| 385 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 386 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 387 | @end |
| 388 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 389 | @interface GPBBoolEnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 390 | @package |
| 391 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 392 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 393 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 394 | forKey:(GPBGenericValue *)key |
| 395 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 396 | @end |
| 397 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 398 | @interface GPBBoolObjectDictionary () <GPBDictionaryInternalsProtocol> { |
| 399 | @package |
| 400 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 401 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 402 | - (BOOL)isInitialized; |
| 403 | - (instancetype)deepCopyWithZone:(NSZone *)zone |
| 404 | __attribute__((ns_returns_retained)); |
| 405 | @end |
| 406 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 407 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 408 | //%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String) |
| 409 | // This block of code is generated, do not edit it directly. |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 410 | // clang-format off |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 411 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 412 | @interface GPBStringUInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 413 | @package |
| 414 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 415 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 416 | @end |
| 417 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 418 | @interface GPBStringInt32Dictionary () <GPBDictionaryInternalsProtocol> { |
| 419 | @package |
| 420 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 421 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 422 | @end |
| 423 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 424 | @interface GPBStringUInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 425 | @package |
| 426 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 427 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 428 | @end |
| 429 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 430 | @interface GPBStringInt64Dictionary () <GPBDictionaryInternalsProtocol> { |
| 431 | @package |
| 432 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 433 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 434 | @end |
| 435 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 436 | @interface GPBStringBoolDictionary () <GPBDictionaryInternalsProtocol> { |
| 437 | @package |
| 438 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 439 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 440 | @end |
| 441 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 442 | @interface GPBStringFloatDictionary () <GPBDictionaryInternalsProtocol> { |
| 443 | @package |
| 444 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 445 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 446 | @end |
| 447 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 448 | @interface GPBStringDoubleDictionary () <GPBDictionaryInternalsProtocol> { |
| 449 | @package |
| 450 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 451 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 452 | @end |
| 453 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 454 | @interface GPBStringEnumDictionary () <GPBDictionaryInternalsProtocol> { |
| 455 | @package |
| 456 | GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; |
| 457 | } |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 458 | - (NSData *)serializedDataForUnknownValue:(int32_t)value |
Thomas Van Lenten | d846b0b | 2015-06-08 16:24:57 -0400 | [diff] [blame] | 459 | forKey:(GPBGenericValue *)key |
| 460 | keyDataType:(GPBDataType)keyDataType; |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 461 | @end |
| 462 | |
Dave MacLachlan | ab48ecf | 2020-01-20 13:47:20 -0800 | [diff] [blame] | 463 | // clang-format on |
Thomas Van Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 464 | //%PDDM-EXPAND-END (6 expansions) |
| 465 | |
Thomas Van Lenten | 1dcc329 | 2015-05-21 17:14:52 -0400 | [diff] [blame] | 466 | #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 Lenten | 30650d8 | 2015-05-01 08:57:16 -0400 | [diff] [blame] | 476 | CF_EXTERN_C_BEGIN |
| 477 | |
| 478 | // Helper to compute size when an NSDictionary is used for the map instead |
| 479 | // of a custom type. |
| 480 | size_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. |
| 485 | void 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. |
| 491 | BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, |
| 492 | GPBFieldDescriptor *field); |
| 493 | |
| 494 | // Helper to read a map instead. |
| 495 | void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream, |
| 496 | GPBExtensionRegistry *registry, |
| 497 | GPBFieldDescriptor *field, |
| 498 | GPBMessage *parentMessage); |
| 499 | |
| 500 | CF_EXTERN_C_END |