#import <GPBArray.h>
Instance Methods | |
(void) | - addValue: |
(void) | - addValues:count: |
(void) | - addValuesFromArray: |
(void) | - enumerateValuesWithBlock: |
(void) | - enumerateValuesWithOptions:usingBlock: |
(void) | - exchangeValueAtIndex:withValueAtIndex: |
(instancetype) | - initWithCapacity: |
(instancetype) | - initWithValueArray: |
(instancetype) | - initWithValues:count: |
(void) | - insertValue:atIndex: |
(instancetype) | - NS_DESIGNATED_INITIALIZER |
(void) | - removeAll |
(void) | - removeValueAtIndex: |
(void) | - replaceValueAtIndex:withValue: |
(uint32_t) | - valueAtIndex: |
Class Methods | |
(instancetype) | + array |
(instancetype) | + arrayWithCapacity: |
(instancetype) | + arrayWithValue: |
(instancetype) | + arrayWithValueArray: |
Protected Attributes | |
package GPB_UNSAFE_UNRETAINED GPBMessage * | _autocreator |
Properties | |
NSUInteger | count |
Class used for repeated fields of uint32_t values. This performs better than boxing into NSNumbers in NSArrays.
Definition at line 220 of file GPBArray.h.
- (void) addValue: | (uint32_t) | value |
Adds a value to this array.
value | The value to add to this array. |
- (void) addValues: | (const uint32_t) | values[__nullable] | |
count: | (NSUInteger) | count | |
Adds values to this array.
values | The values to add to this array. |
count | The number of elements to add. |
- (void) addValuesFromArray: | (GPBUInt32Array *) | array |
Adds the values from the given array to this array.
array | The array containing the elements to add to this array. |
+ (instancetype) array |
+ (instancetype) arrayWithCapacity: | (NSUInteger) | count |
Creates and initializes a GPBUInt32Array with the given capacity.
count | The capacity needed for the array. |
+ (instancetype) arrayWithValue: | (uint32_t) | value |
Creates and initializes a GPBUInt32Array with the single element given.
value | The value to be placed in the array. |
+ (instancetype) arrayWithValueArray: | (GPBUInt32Array *) | array |
Creates and initializes a GPBUInt32Array with the contents of the given array.
array | Array with the contents to be put into the new array. |
- (void) enumerateValuesWithBlock: | (void(NS_NOESCAPE ^ block)(uint32_t value, NSUInteger idx, BOOL *stop)) |
Enumerates the values on this array with the given block.
block | The block to enumerate with. value: The current value being enumerated. idx: The index of the current value. stop: A pointer to a boolean that when set stops the enumeration. |
- (void) enumerateValuesWithOptions: | (NSEnumerationOptions) | opts | |
usingBlock: | (void(NS_NOESCAPE ^ block)(uint32_t value, NSUInteger idx, BOOL *stop)) | ||
Enumerates the values on this array with the given block.
opts | Options to control the enumeration. |
block | The block to enumerate with. value: The current value being enumerated. idx: The index of the current value. stop: A pointer to a boolean that when set stops the enumeration. |
- (void) exchangeValueAtIndex: | (NSUInteger) | idx1 | |
withValueAtIndex: | (NSUInteger) | idx2 | |
Exchanges the values between the given indexes.
idx1 | The index of the first element to exchange. |
idx2 | The index of the second element to exchange. |
- (instancetype) initWithCapacity: | (NSUInteger) | count |
Initializes the array with the given capacity.
count | The capacity needed for the array. |
- (instancetype) initWithValueArray: | (GPBUInt32Array *) | array |
Initializes the array, copying the given values.
array | An array with the values to put inside this array. |
- (instancetype) initWithValues: | (const uint32_t) | values[__nullable] | |
count: | (NSUInteger) | count | |
Initializes the array, copying the given values.
values | An array with the values to put inside this array. |
count | The number of elements to copy into the array. |
- (void) insertValue: | (uint32_t) | value | |
atIndex: | (NSUInteger) | index | |
Inserts a value into the given position.
value | The value to add to this array. |
index | The index into which to insert the value. |
- (instancetype) NS_DESIGNATED_INITIALIZER |
- (void) removeAll |
Removes all the values from this array.
- (void) removeValueAtIndex: | (NSUInteger) | index |
Removes the value at the given index.
index | The index of the value to remove. |
- (void) replaceValueAtIndex: | (NSUInteger) | index | |
withValue: | (uint32_t) | value | |
Replaces the value at the given index with the given value.
index | The index for which to replace the value. |
value | The value to replace with. |
- (uint32_t) valueAtIndex: | (NSUInteger) | index |
Gets the value at the given index.
index | The index of the value to get. |
|
protected |
Definition at line 70 of file GPBArray_PackagePrivate.h.
|
readnonatomicassign |
The number of elements contained in the array.
Definition at line 223 of file GPBArray.h.