#import <GPBArray.h>

Instance Methods | |
| (void) | - addRawValue: |
| (void) | - addRawValues:count: |
| (void) | - addRawValuesFromArray: |
| (void) | - addValue: |
| (void) | - addValues:count: |
| (void) | - enumerateRawValuesWithBlock: |
| (void) | - enumerateRawValuesWithOptions:usingBlock: |
| (void) | - enumerateValuesWithBlock: |
| (void) | - enumerateValuesWithOptions:usingBlock: |
| (void) | - exchangeValueAtIndex:withValueAtIndex: |
| (instancetype) | - initWithValidationFunction: |
| (instancetype) | - initWithValidationFunction:capacity: |
| (instancetype) | - initWithValidationFunction:rawValues:count: |
| (instancetype) | - initWithValueArray: |
| (void) | - insertRawValue:atIndex: |
| (void) | - insertValue:atIndex: |
| (int32_t) | - rawValueAtIndex: |
| (void) | - removeAll |
| (void) | - removeValueAtIndex: |
| (void) | - replaceValueAtIndex:withRawValue: |
| (void) | - replaceValueAtIndex:withValue: |
| (int32_t) | - valueAtIndex: |
Class Methods | |
| (instancetype) | + array |
| (instancetype) | + arrayWithValidationFunction: |
| (instancetype) | + arrayWithValidationFunction:capacity: |
| (instancetype) | + arrayWithValidationFunction:rawValue: |
| (instancetype) | + arrayWithValueArray: |
Protected Attributes | |
| package GPB_UNSAFE_UNRETAINED GPBMessage * | _autocreator |
Properties | |
| NSUInteger | count |
| GPBEnumValidationFunc | validationFunc |
This class is used for repeated fields of int32_t values. This performs better than boxing into NSNumbers in NSArrays.
Definition at line 1252 of file GPBArray.h.
| - (void) addRawValue: | (int32_t) | value |
Adds a raw enum value to this array.
| value | The raw enum value to add to the array. |
| - (void) addRawValues: | (const int32_t) | values[__nullable] | |
| count: | (NSUInteger) | count | |
Adds raw enum values to this array.
| values | Array containing the raw enum values to add to this array. |
| count | The number of raw values to add. |
| - (void) addRawValuesFromArray: | (GPBEnumArray *) | array |
Adds raw enum values to this array.
| array | Array containing the raw enum values to add to this array. |
| - (void) addValue: | (int32_t) | value |
Adds a value to this array.
| value | The value to add to this array. |
| - (void) addValues: | (const int32_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. |
| + (instancetype) array |
| + (instancetype) arrayWithValidationFunction: | (nullable GPBEnumValidationFunc) | func |
Creates and initializes a GPBEnumArray with the enum validation function given.
| func | The enum validation function for the array. |
| + (instancetype) arrayWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
| capacity: | (NSUInteger) | count | |
Creates and initializes a GPBEnumArray with the given enum validation function and with the givencapacity.
| func | The enum validation function for the array. |
| count | The capacity needed for the array. |
| + (instancetype) arrayWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
| rawValue: | (int32_t) | value | |
Creates and initializes a GPBEnumArray with the enum validation function given and the single raw value given.
| func | The enum validation function for the array. |
| value | The raw value to add to this array. |
| + (instancetype) arrayWithValueArray: | (GPBEnumArray *) | array |
Creates and initializes a GPBEnumArray that adds the elements from the given array.
| array | Array containing the values to add to the new array. |
| - (void) enumerateRawValuesWithBlock: | (void(NS_NOESCAPE ^ block)(int32_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) enumerateRawValuesWithOptions: | (NSEnumerationOptions) | opts | |
| usingBlock: | (void(NS_NOESCAPE ^ block)(int32_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) enumerateValuesWithBlock: | (void(NS_NOESCAPE ^ block)(int32_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)(int32_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) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | NS_DESIGNATED_INITIALIZER |
Initializes the array with the given enum validation function.
| func | The enum validation function for the array. |
| - (instancetype) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
| capacity: | (NSUInteger) | count | |
Initializes the array with the given capacity.
| func | The enum validation function for the array. |
| count | The capacity needed for the array. |
| - (instancetype) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
| rawValues: | (const int32_t) | values[__nullable] | |
| count: | (NSUInteger) | count | |
Initializes the array, copying the given values.
| func | The enum validation function for the array. |
| values | An array with the values to put inside this array. |
| count | The number of elements to copy into the array. |
| - (instancetype) initWithValueArray: | (GPBEnumArray *) | array |
Initializes the array, copying the given values.
| array | An array with the values to put inside this array. |
| - (void) insertRawValue: | (int32_t) | value | |
| atIndex: | (NSUInteger) | index | |
Inserts a raw enum value at the given index.
| value | Raw enum value to add. |
| index | The index into which to insert the value. |
| - (void) insertValue: | (int32_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. |
| - (int32_t) rawValueAtIndex: | (NSUInteger) | index |
Gets the raw enum value at the given index.
| index | The index of the raw enum value to get. |
| - (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 | |
| withRawValue: | (int32_t) | value | |
Replaces the raw enum value at the given index with the given value.
| index | The index for which to replace the value. |
| value | The raw enum value to replace with. |
| - (void) replaceValueAtIndex: | (NSUInteger) | index | |
| withValue: | (int32_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. |
| - (int32_t) valueAtIndex: | (NSUInteger) | index |
Gets the value at the given index.
| index | The index of the value to get. |
|
protected |
Definition at line 118 of file GPBArray_PackagePrivate.h.
|
readnonatomicassign |
The number of elements contained in the array.
Definition at line 1255 of file GPBArray.h.
|
readnonatomicassign |
The validation function to check if the enums are valid.
Definition at line 1257 of file GPBArray.h.