GPBArray.h revision b0575e93e4c39dec69365b850088a1eb7f82c5b3
1// Protocol Buffers - Google's data interchange format 2// Copyright 2015 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 "GPBRuntimeTypes.h" 34 35// These classes are used for repeated fields of basic data types. They are used because 36// they perform better than boxing into NSNumbers in NSArrays. 37 38// Note: These are not meant to be subclassed. 39 40NS_ASSUME_NONNULL_BEGIN 41 42//%PDDM-EXPAND DECLARE_ARRAYS() 43// This block of code is generated, do not edit it directly. 44 45#pragma mark - Int32 46 47@interface GPBInt32Array : NSObject <NSCopying> 48 49@property(nonatomic, readonly) NSUInteger count; 50 51+ (instancetype)array; 52+ (instancetype)arrayWithValue:(int32_t)value; 53+ (instancetype)arrayWithValueArray:(GPBInt32Array *)array; 54+ (instancetype)arrayWithCapacity:(NSUInteger)count; 55 56- (instancetype)init NS_DESIGNATED_INITIALIZER; 57// Initializes the array, copying the values. 58- (instancetype)initWithValues:(const int32_t [])values 59 count:(NSUInteger)count; 60- (instancetype)initWithValueArray:(GPBInt32Array *)array; 61- (instancetype)initWithCapacity:(NSUInteger)count; 62 63- (int32_t)valueAtIndex:(NSUInteger)index; 64 65- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 66- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 67 usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 68 69- (void)addValue:(int32_t)value; 70- (void)addValues:(const int32_t [])values count:(NSUInteger)count; 71- (void)addValuesFromArray:(GPBInt32Array *)array; 72 73- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; 74 75- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; 76 77- (void)removeValueAtIndex:(NSUInteger)index; 78- (void)removeAll; 79 80- (void)exchangeValueAtIndex:(NSUInteger)idx1 81 withValueAtIndex:(NSUInteger)idx2; 82 83@end 84 85#pragma mark - UInt32 86 87@interface GPBUInt32Array : NSObject <NSCopying> 88 89@property(nonatomic, readonly) NSUInteger count; 90 91+ (instancetype)array; 92+ (instancetype)arrayWithValue:(uint32_t)value; 93+ (instancetype)arrayWithValueArray:(GPBUInt32Array *)array; 94+ (instancetype)arrayWithCapacity:(NSUInteger)count; 95 96- (instancetype)init NS_DESIGNATED_INITIALIZER; 97// Initializes the array, copying the values. 98- (instancetype)initWithValues:(const uint32_t [])values 99 count:(NSUInteger)count; 100- (instancetype)initWithValueArray:(GPBUInt32Array *)array; 101- (instancetype)initWithCapacity:(NSUInteger)count; 102 103- (uint32_t)valueAtIndex:(NSUInteger)index; 104 105- (void)enumerateValuesWithBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; 106- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 107 usingBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; 108 109- (void)addValue:(uint32_t)value; 110- (void)addValues:(const uint32_t [])values count:(NSUInteger)count; 111- (void)addValuesFromArray:(GPBUInt32Array *)array; 112 113- (void)insertValue:(uint32_t)value atIndex:(NSUInteger)index; 114 115- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint32_t)value; 116 117- (void)removeValueAtIndex:(NSUInteger)index; 118- (void)removeAll; 119 120- (void)exchangeValueAtIndex:(NSUInteger)idx1 121 withValueAtIndex:(NSUInteger)idx2; 122 123@end 124 125#pragma mark - Int64 126 127@interface GPBInt64Array : NSObject <NSCopying> 128 129@property(nonatomic, readonly) NSUInteger count; 130 131+ (instancetype)array; 132+ (instancetype)arrayWithValue:(int64_t)value; 133+ (instancetype)arrayWithValueArray:(GPBInt64Array *)array; 134+ (instancetype)arrayWithCapacity:(NSUInteger)count; 135 136- (instancetype)init NS_DESIGNATED_INITIALIZER; 137// Initializes the array, copying the values. 138- (instancetype)initWithValues:(const int64_t [])values 139 count:(NSUInteger)count; 140- (instancetype)initWithValueArray:(GPBInt64Array *)array; 141- (instancetype)initWithCapacity:(NSUInteger)count; 142 143- (int64_t)valueAtIndex:(NSUInteger)index; 144 145- (void)enumerateValuesWithBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; 146- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 147 usingBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; 148 149- (void)addValue:(int64_t)value; 150- (void)addValues:(const int64_t [])values count:(NSUInteger)count; 151- (void)addValuesFromArray:(GPBInt64Array *)array; 152 153- (void)insertValue:(int64_t)value atIndex:(NSUInteger)index; 154 155- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int64_t)value; 156 157- (void)removeValueAtIndex:(NSUInteger)index; 158- (void)removeAll; 159 160- (void)exchangeValueAtIndex:(NSUInteger)idx1 161 withValueAtIndex:(NSUInteger)idx2; 162 163@end 164 165#pragma mark - UInt64 166 167@interface GPBUInt64Array : NSObject <NSCopying> 168 169@property(nonatomic, readonly) NSUInteger count; 170 171+ (instancetype)array; 172+ (instancetype)arrayWithValue:(uint64_t)value; 173+ (instancetype)arrayWithValueArray:(GPBUInt64Array *)array; 174+ (instancetype)arrayWithCapacity:(NSUInteger)count; 175 176- (instancetype)init NS_DESIGNATED_INITIALIZER; 177// Initializes the array, copying the values. 178- (instancetype)initWithValues:(const uint64_t [])values 179 count:(NSUInteger)count; 180- (instancetype)initWithValueArray:(GPBUInt64Array *)array; 181- (instancetype)initWithCapacity:(NSUInteger)count; 182 183- (uint64_t)valueAtIndex:(NSUInteger)index; 184 185- (void)enumerateValuesWithBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; 186- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 187 usingBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; 188 189- (void)addValue:(uint64_t)value; 190- (void)addValues:(const uint64_t [])values count:(NSUInteger)count; 191- (void)addValuesFromArray:(GPBUInt64Array *)array; 192 193- (void)insertValue:(uint64_t)value atIndex:(NSUInteger)index; 194 195- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint64_t)value; 196 197- (void)removeValueAtIndex:(NSUInteger)index; 198- (void)removeAll; 199 200- (void)exchangeValueAtIndex:(NSUInteger)idx1 201 withValueAtIndex:(NSUInteger)idx2; 202 203@end 204 205#pragma mark - Float 206 207@interface GPBFloatArray : NSObject <NSCopying> 208 209@property(nonatomic, readonly) NSUInteger count; 210 211+ (instancetype)array; 212+ (instancetype)arrayWithValue:(float)value; 213+ (instancetype)arrayWithValueArray:(GPBFloatArray *)array; 214+ (instancetype)arrayWithCapacity:(NSUInteger)count; 215 216- (instancetype)init NS_DESIGNATED_INITIALIZER; 217// Initializes the array, copying the values. 218- (instancetype)initWithValues:(const float [])values 219 count:(NSUInteger)count; 220- (instancetype)initWithValueArray:(GPBFloatArray *)array; 221- (instancetype)initWithCapacity:(NSUInteger)count; 222 223- (float)valueAtIndex:(NSUInteger)index; 224 225- (void)enumerateValuesWithBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; 226- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 227 usingBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; 228 229- (void)addValue:(float)value; 230- (void)addValues:(const float [])values count:(NSUInteger)count; 231- (void)addValuesFromArray:(GPBFloatArray *)array; 232 233- (void)insertValue:(float)value atIndex:(NSUInteger)index; 234 235- (void)replaceValueAtIndex:(NSUInteger)index withValue:(float)value; 236 237- (void)removeValueAtIndex:(NSUInteger)index; 238- (void)removeAll; 239 240- (void)exchangeValueAtIndex:(NSUInteger)idx1 241 withValueAtIndex:(NSUInteger)idx2; 242 243@end 244 245#pragma mark - Double 246 247@interface GPBDoubleArray : NSObject <NSCopying> 248 249@property(nonatomic, readonly) NSUInteger count; 250 251+ (instancetype)array; 252+ (instancetype)arrayWithValue:(double)value; 253+ (instancetype)arrayWithValueArray:(GPBDoubleArray *)array; 254+ (instancetype)arrayWithCapacity:(NSUInteger)count; 255 256- (instancetype)init NS_DESIGNATED_INITIALIZER; 257// Initializes the array, copying the values. 258- (instancetype)initWithValues:(const double [])values 259 count:(NSUInteger)count; 260- (instancetype)initWithValueArray:(GPBDoubleArray *)array; 261- (instancetype)initWithCapacity:(NSUInteger)count; 262 263- (double)valueAtIndex:(NSUInteger)index; 264 265- (void)enumerateValuesWithBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; 266- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 267 usingBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; 268 269- (void)addValue:(double)value; 270- (void)addValues:(const double [])values count:(NSUInteger)count; 271- (void)addValuesFromArray:(GPBDoubleArray *)array; 272 273- (void)insertValue:(double)value atIndex:(NSUInteger)index; 274 275- (void)replaceValueAtIndex:(NSUInteger)index withValue:(double)value; 276 277- (void)removeValueAtIndex:(NSUInteger)index; 278- (void)removeAll; 279 280- (void)exchangeValueAtIndex:(NSUInteger)idx1 281 withValueAtIndex:(NSUInteger)idx2; 282 283@end 284 285#pragma mark - Bool 286 287@interface GPBBoolArray : NSObject <NSCopying> 288 289@property(nonatomic, readonly) NSUInteger count; 290 291+ (instancetype)array; 292+ (instancetype)arrayWithValue:(BOOL)value; 293+ (instancetype)arrayWithValueArray:(GPBBoolArray *)array; 294+ (instancetype)arrayWithCapacity:(NSUInteger)count; 295 296- (instancetype)init NS_DESIGNATED_INITIALIZER; 297// Initializes the array, copying the values. 298- (instancetype)initWithValues:(const BOOL [])values 299 count:(NSUInteger)count; 300- (instancetype)initWithValueArray:(GPBBoolArray *)array; 301- (instancetype)initWithCapacity:(NSUInteger)count; 302 303- (BOOL)valueAtIndex:(NSUInteger)index; 304 305- (void)enumerateValuesWithBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; 306- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 307 usingBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; 308 309- (void)addValue:(BOOL)value; 310- (void)addValues:(const BOOL [])values count:(NSUInteger)count; 311- (void)addValuesFromArray:(GPBBoolArray *)array; 312 313- (void)insertValue:(BOOL)value atIndex:(NSUInteger)index; 314 315- (void)replaceValueAtIndex:(NSUInteger)index withValue:(BOOL)value; 316 317- (void)removeValueAtIndex:(NSUInteger)index; 318- (void)removeAll; 319 320- (void)exchangeValueAtIndex:(NSUInteger)idx1 321 withValueAtIndex:(NSUInteger)idx2; 322 323@end 324 325#pragma mark - Enum 326 327@interface GPBEnumArray : NSObject <NSCopying> 328 329@property(nonatomic, readonly) NSUInteger count; 330@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; 331 332+ (instancetype)array; 333+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; 334+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func 335 rawValue:(int32_t)value; 336+ (instancetype)arrayWithValueArray:(GPBEnumArray *)array; 337+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func 338 capacity:(NSUInteger)count; 339 340- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 341 NS_DESIGNATED_INITIALIZER; 342 343// Initializes the array, copying the values. 344- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 345 rawValues:(const int32_t [])values 346 count:(NSUInteger)count; 347- (instancetype)initWithValueArray:(GPBEnumArray *)array; 348- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 349 capacity:(NSUInteger)count; 350 351// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a 352// valid enumerator as defined by validationFunc. If the actual value is 353// desired, use "raw" version of the method. 354 355- (int32_t)valueAtIndex:(NSUInteger)index; 356 357- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 358- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 359 usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 360 361// These methods bypass the validationFunc to provide access to values that were not 362// known at the time the binary was compiled. 363 364- (int32_t)rawValueAtIndex:(NSUInteger)index; 365 366- (void)enumerateRawValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 367- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts 368 usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; 369 370// If value is not a valid enumerator as defined by validationFunc, these 371// methods will assert in debug, and will log in release and assign the value 372// to the default value. Use the rawValue methods below to assign non enumerator 373// values. 374 375- (void)addValue:(int32_t)value; 376- (void)addValues:(const int32_t [])values count:(NSUInteger)count; 377 378- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; 379 380- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; 381 382// These methods bypass the validationFunc to provide setting of values that were not 383// known at the time the binary was compiled. 384 385- (void)addRawValue:(int32_t)value; 386- (void)addRawValuesFromArray:(GPBEnumArray *)array; 387- (void)addRawValues:(const int32_t [])values count:(NSUInteger)count; 388 389- (void)insertRawValue:(int32_t)value atIndex:(NSUInteger)index; 390 391- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(int32_t)value; 392 393// No validation applies to these methods. 394 395- (void)removeValueAtIndex:(NSUInteger)index; 396- (void)removeAll; 397 398- (void)exchangeValueAtIndex:(NSUInteger)idx1 399 withValueAtIndex:(NSUInteger)idx2; 400 401@end 402 403//%PDDM-EXPAND-END DECLARE_ARRAYS() 404 405NS_ASSUME_NONNULL_END 406 407//%PDDM-DEFINE DECLARE_ARRAYS() 408//%ARRAY_INTERFACE_SIMPLE(Int32, int32_t) 409//%ARRAY_INTERFACE_SIMPLE(UInt32, uint32_t) 410//%ARRAY_INTERFACE_SIMPLE(Int64, int64_t) 411//%ARRAY_INTERFACE_SIMPLE(UInt64, uint64_t) 412//%ARRAY_INTERFACE_SIMPLE(Float, float) 413//%ARRAY_INTERFACE_SIMPLE(Double, double) 414//%ARRAY_INTERFACE_SIMPLE(Bool, BOOL) 415//%ARRAY_INTERFACE_ENUM(Enum, int32_t) 416 417// 418// The common case (everything but Enum) 419// 420 421//%PDDM-DEFINE ARRAY_INTERFACE_SIMPLE(NAME, TYPE) 422//%#pragma mark - NAME 423//% 424//%@interface GPB##NAME##Array : NSObject <NSCopying> 425//% 426//%@property(nonatomic, readonly) NSUInteger count; 427//% 428//%+ (instancetype)array; 429//%+ (instancetype)arrayWithValue:(TYPE)value; 430//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; 431//%+ (instancetype)arrayWithCapacity:(NSUInteger)count; 432//% 433//%- (instancetype)init NS_DESIGNATED_INITIALIZER; 434//%// Initializes the array, copying the values. 435//%- (instancetype)initWithValues:(const TYPE [])values 436//% count:(NSUInteger)count; 437//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; 438//%- (instancetype)initWithCapacity:(NSUInteger)count; 439//% 440//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, Basic) 441//% 442//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, Basic) 443//% 444//%@end 445//% 446 447// 448// Macros specific to Enums (to tweak their interface). 449// 450 451//%PDDM-DEFINE ARRAY_INTERFACE_ENUM(NAME, TYPE) 452//%#pragma mark - NAME 453//% 454//%@interface GPB##NAME##Array : NSObject <NSCopying> 455//% 456//%@property(nonatomic, readonly) NSUInteger count; 457//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; 458//% 459//%+ (instancetype)array; 460//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; 461//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func 462//% rawValue:(TYPE)value; 463//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; 464//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func 465//% capacity:(NSUInteger)count; 466//% 467//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 468//% NS_DESIGNATED_INITIALIZER; 469//% 470//%// Initializes the array, copying the values. 471//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 472//% rawValues:(const TYPE [])values 473//% count:(NSUInteger)count; 474//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; 475//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func 476//% capacity:(NSUInteger)count; 477//% 478//%// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a 479//%// valid enumerator as defined by validationFunc. If the actual value is 480//%// desired, use "raw" version of the method. 481//% 482//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, NAME) 483//% 484//%// These methods bypass the validationFunc to provide access to values that were not 485//%// known at the time the binary was compiled. 486//% 487//%- (TYPE)rawValueAtIndex:(NSUInteger)index; 488//% 489//%- (void)enumerateRawValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; 490//%- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts 491//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; 492//% 493//%// If value is not a valid enumerator as defined by validationFunc, these 494//%// methods will assert in debug, and will log in release and assign the value 495//%// to the default value. Use the rawValue methods below to assign non enumerator 496//%// values. 497//% 498//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, NAME) 499//% 500//%@end 501//% 502 503//%PDDM-DEFINE ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) 504//%- (TYPE)valueAtIndex:(NSUInteger)index; 505//% 506//%- (void)enumerateValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; 507//%- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts 508//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; 509 510//%PDDM-DEFINE ARRAY_MUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) 511//%- (void)addValue:(TYPE)value; 512//%- (void)addValues:(const TYPE [])values count:(NSUInteger)count; 513//%ARRAY_EXTRA_MUTABLE_METHODS1_##HELPER_NAME(NAME, TYPE) 514//%- (void)insertValue:(TYPE)value atIndex:(NSUInteger)index; 515//% 516//%- (void)replaceValueAtIndex:(NSUInteger)index withValue:(TYPE)value; 517//%ARRAY_EXTRA_MUTABLE_METHODS2_##HELPER_NAME(NAME, TYPE) 518//%- (void)removeValueAtIndex:(NSUInteger)index; 519//%- (void)removeAll; 520//% 521//%- (void)exchangeValueAtIndex:(NSUInteger)idx1 522//% withValueAtIndex:(NSUInteger)idx2; 523 524// 525// These are hooks invoked by the above to do insert as needed. 526// 527 528//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Basic(NAME, TYPE) 529//%- (void)addValuesFromArray:(GPB##NAME##Array *)array; 530//% 531//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Basic(NAME, TYPE) 532// Empty 533//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Enum(NAME, TYPE) 534// Empty 535//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Enum(NAME, TYPE) 536//% 537//%// These methods bypass the validationFunc to provide setting of values that were not 538//%// known at the time the binary was compiled. 539//% 540//%- (void)addRawValue:(TYPE)value; 541//%- (void)addRawValuesFromArray:(GPB##NAME##Array *)array; 542//%- (void)addRawValues:(const TYPE [])values count:(NSUInteger)count; 543//% 544//%- (void)insertRawValue:(TYPE)value atIndex:(NSUInteger)index; 545//% 546//%- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(TYPE)value; 547//% 548//%// No validation applies to these methods. 549//% 550