Instance Methods | Class Methods | Protected Attributes | Properties | List of all members
GPBEnumArray Class Reference

#import <GPBArray.h>

Inheritance diagram for GPBEnumArray:
Inheritance graph
[legend]

Instance Methods

(void) - addRawValue:
 
(void) - addRawValue:
 
(void) - addRawValues:count:
 
(void) - addRawValues:count:
 
(void) - addRawValuesFromArray:
 
(void) - addRawValuesFromArray:
 
(void) - addValue:
 
(void) - addValue:
 
(void) - addValues:count:
 
(void) - addValues:count:
 
(void) - enumerateRawValuesWithBlock:
 
(void) - enumerateRawValuesWithBlock:
 
(void) - enumerateRawValuesWithOptions:usingBlock:
 
(void) - enumerateRawValuesWithOptions:usingBlock:
 
(void) - enumerateValuesWithBlock:
 
(void) - enumerateValuesWithBlock:
 
(void) - enumerateValuesWithOptions:usingBlock:
 
(void) - enumerateValuesWithOptions:usingBlock:
 
(void) - exchangeValueAtIndex:withValueAtIndex:
 
(void) - exchangeValueAtIndex:withValueAtIndex:
 
(instancetype) - initWithValidationFunction:
 
(instancetype) - initWithValidationFunction:
 
(instancetype) - initWithValidationFunction:capacity:
 
(instancetype) - initWithValidationFunction:capacity:
 
(instancetype) - initWithValidationFunction:rawValues:count:
 
(instancetype) - initWithValidationFunction:rawValues:count:
 
(instancetype) - initWithValueArray:
 
(instancetype) - initWithValueArray:
 
(void) - insertRawValue:atIndex:
 
(void) - insertRawValue:atIndex:
 
(void) - insertValue:atIndex:
 
(void) - insertValue:atIndex:
 
(int32_t- rawValueAtIndex:
 
(int32_t- rawValueAtIndex:
 
(void) - removeAll
 
(void) - removeAll
 
(void) - removeValueAtIndex:
 
(void) - removeValueAtIndex:
 
(void) - replaceValueAtIndex:withRawValue:
 
(void) - replaceValueAtIndex:withRawValue:
 
(void) - replaceValueAtIndex:withValue:
 
(void) - replaceValueAtIndex:withValue:
 
(int32_t- valueAtIndex:
 
(int32_t- valueAtIndex:
 

Class Methods

(instancetype) + array
 
(instancetype) + array
 
(instancetype) + arrayWithValidationFunction:
 
(instancetype) + arrayWithValidationFunction:
 
(instancetype) + arrayWithValidationFunction:capacity:
 
(instancetype) + arrayWithValidationFunction:capacity:
 
(instancetype) + arrayWithValidationFunction:rawValue:
 
(instancetype) + arrayWithValidationFunction:rawValue:
 
(instancetype) + arrayWithValueArray:
 
(instancetype) + arrayWithValueArray:
 

Protected Attributes

package GPB_UNSAFE_UNRETAINED GPBMessage_autocreator
 

Properties

NSUInteger count
 
GPBEnumValidationFunc validationFunc
 

Detailed Description

This class is used for repeated fields of int32_t values. This performs better than boxing into NSNumbers in NSArrays.

Note
This class is not meant to be subclassed.

Definition at line 1252 of file bloaty/third_party/protobuf/objectivec/GPBArray.h.

Method Documentation

◆ addRawValue: [1/2]

- (void) addRawValue: (int32_t value

Adds a raw enum value to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valueThe raw enum value to add to the array.

◆ addRawValue: [2/2]

- (void) addRawValue: (int32_t value

Adds a raw enum value to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valueThe raw enum value to add to the array.

◆ addRawValues:count: [1/2]

- (void) addRawValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Adds raw enum values to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valuesArray containing the raw enum values to add to this array.
countThe number of raw values to add.

◆ addRawValues:count: [2/2]

- (void) addRawValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Adds raw enum values to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valuesArray containing the raw enum values to add to this array.
countThe number of raw values to add.

◆ addRawValuesFromArray: [1/2]

- (void) addRawValuesFromArray: (GPBEnumArray *)  array

Adds raw enum values to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
arrayArray containing the raw enum values to add to this array.

◆ addRawValuesFromArray: [2/2]

- (void) addRawValuesFromArray: (GPBEnumArray *)  array

Adds raw enum values to this array.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
arrayArray containing the raw enum values to add to this array.

◆ addValue: [1/2]

- (void) addValue: (int32_t value

Adds a value to this array.

Parameters
valueThe value to add to this array.

◆ addValue: [2/2]

- (void) addValue: (int32_t value

Adds a value to this array.

Parameters
valueThe value to add to this array.

◆ addValues:count: [1/2]

- (void) addValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Adds values to this array.

Parameters
valuesThe values to add to this array.
countThe number of elements to add.

◆ addValues:count: [2/2]

- (void) addValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Adds values to this array.

Parameters
valuesThe values to add to this array.
countThe number of elements to add.

◆ array [1/2]

+ (instancetype) array
Returns
A newly instanced and empty GPBEnumArray.

◆ array [2/2]

+ (instancetype) array
Returns
A newly instanced and empty GPBEnumArray.

◆ arrayWithValidationFunction: [1/2]

+ (instancetype) arrayWithValidationFunction: (nullable GPBEnumValidationFunc func

Creates and initializes a GPBEnumArray with the enum validation function given.

Parameters
funcThe enum validation function for the array.
Returns
A newly instanced GPBEnumArray.

◆ arrayWithValidationFunction: [2/2]

+ (instancetype) arrayWithValidationFunction: (nullable GPBEnumValidationFunc func

Creates and initializes a GPBEnumArray with the enum validation function given.

Parameters
funcThe enum validation function for the array.
Returns
A newly instanced GPBEnumArray.

◆ arrayWithValidationFunction:capacity: [1/2]

+ (instancetype) arrayWithValidationFunction: (nullable GPBEnumValidationFunc func
capacity: (NSUInteger)  count 

Creates and initializes a GPBEnumArray with the given enum validation function and with the givencapacity.

Parameters
funcThe enum validation function for the array.
countThe capacity needed for the array.
Returns
A newly instanced GPBEnumArray with a capacity of count.

◆ arrayWithValidationFunction:capacity: [2/2]

+ (instancetype) arrayWithValidationFunction: (nullable GPBEnumValidationFunc func
capacity: (NSUInteger)  count 

Creates and initializes a GPBEnumArray with the given enum validation function and with the givencapacity.

Parameters
funcThe enum validation function for the array.
countThe capacity needed for the array.
Returns
A newly instanced GPBEnumArray with a capacity of count.

◆ arrayWithValidationFunction:rawValue: [1/2]

+ (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.

Parameters
funcThe enum validation function for the array.
valueThe raw value to add to this array.
Returns
A newly instanced GPBEnumArray.

◆ arrayWithValidationFunction:rawValue: [2/2]

+ (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.

Parameters
funcThe enum validation function for the array.
valueThe raw value to add to this array.
Returns
A newly instanced GPBEnumArray.

◆ arrayWithValueArray: [1/2]

+ (instancetype) arrayWithValueArray: (GPBEnumArray *)  array

Creates and initializes a GPBEnumArray that adds the elements from the given array.

Parameters
arrayArray containing the values to add to the new array.
Returns
A newly instanced GPBEnumArray.

◆ arrayWithValueArray: [2/2]

+ (instancetype) arrayWithValueArray: (GPBEnumArray *)  array

Creates and initializes a GPBEnumArray that adds the elements from the given array.

Parameters
arrayArray containing the values to add to the new array.
Returns
A newly instanced GPBEnumArray.

◆ enumerateRawValuesWithBlock: [1/2]

- (void) enumerateRawValuesWithBlock: (void(NS_NOESCAPE ^ block)(int32_t value, NSUInteger idx, BOOL *stop)) 

Enumerates the values on this array with the given block.

Parameters
blockThe 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.

◆ enumerateRawValuesWithBlock: [2/2]

- (void) enumerateRawValuesWithBlock: (void(NS_NOESCAPE ^ block)(int32_t value, NSUInteger idx, BOOL *stop)) 

Enumerates the values on this array with the given block.

Parameters
blockThe 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.

◆ enumerateRawValuesWithOptions:usingBlock: [1/2]

- (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.

Parameters
optsOptions to control the enumeration.
blockThe 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.

◆ enumerateRawValuesWithOptions:usingBlock: [2/2]

- (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.

Parameters
optsOptions to control the enumeration.
blockThe 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.

◆ enumerateValuesWithBlock: [1/2]

- (void) enumerateValuesWithBlock: (void(NS_NOESCAPE ^ block)(int32_t value, NSUInteger idx, BOOL *stop)) 

Enumerates the values on this array with the given block.

Parameters
blockThe 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.

◆ enumerateValuesWithBlock: [2/2]

- (void) enumerateValuesWithBlock: (void(NS_NOESCAPE ^ block)(int32_t value, NSUInteger idx, BOOL *stop)) 

Enumerates the values on this array with the given block.

Parameters
blockThe 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.

◆ enumerateValuesWithOptions:usingBlock: [1/2]

- (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.

Parameters
optsOptions to control the enumeration.
blockThe 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.

◆ enumerateValuesWithOptions:usingBlock: [2/2]

- (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.

Parameters
optsOptions to control the enumeration.
blockThe 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.

◆ exchangeValueAtIndex:withValueAtIndex: [1/2]

- (void) exchangeValueAtIndex: (NSUInteger)  idx1
withValueAtIndex: (NSUInteger)  idx2 

Exchanges the values between the given indexes.

Parameters
idx1The index of the first element to exchange.
idx2The index of the second element to exchange.

◆ exchangeValueAtIndex:withValueAtIndex: [2/2]

- (void) exchangeValueAtIndex: (NSUInteger)  idx1
withValueAtIndex: (NSUInteger)  idx2 

Exchanges the values between the given indexes.

Parameters
idx1The index of the first element to exchange.
idx2The index of the second element to exchange.

◆ initWithValidationFunction: [1/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc NS_DESIGNATED_INITIALIZER

Initializes the array with the given enum validation function.

Parameters
funcThe enum validation function for the array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ initWithValidationFunction: [2/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc NS_DESIGNATED_INITIALIZER

Initializes the array with the given enum validation function.

Parameters
funcThe enum validation function for the array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ initWithValidationFunction:capacity: [1/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc func
capacity: (NSUInteger)  count 

Initializes the array with the given capacity.

Parameters
funcThe enum validation function for the array.
countThe capacity needed for the array.
Returns
A newly initialized GPBEnumArray with a capacity of count.

◆ initWithValidationFunction:capacity: [2/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc func
capacity: (NSUInteger)  count 

Initializes the array with the given capacity.

Parameters
funcThe enum validation function for the array.
countThe capacity needed for the array.
Returns
A newly initialized GPBEnumArray with a capacity of count.

◆ initWithValidationFunction:rawValues:count: [1/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc func
rawValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Initializes the array, copying the given values.

Parameters
funcThe enum validation function for the array.
valuesAn array with the values to put inside this array.
countThe number of elements to copy into the array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ initWithValidationFunction:rawValues:count: [2/2]

- (instancetype) initWithValidationFunction: (nullable GPBEnumValidationFunc func
rawValues: (const int32_t values[__nullable]
count: (NSUInteger)  count 

Initializes the array, copying the given values.

Parameters
funcThe enum validation function for the array.
valuesAn array with the values to put inside this array.
countThe number of elements to copy into the array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ initWithValueArray: [1/2]

- (instancetype) initWithValueArray: (GPBEnumArray *)  array

Initializes the array, copying the given values.

Parameters
arrayAn array with the values to put inside this array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ initWithValueArray: [2/2]

- (instancetype) initWithValueArray: (GPBEnumArray *)  array

Initializes the array, copying the given values.

Parameters
arrayAn array with the values to put inside this array.
Returns
A newly initialized GPBEnumArray with a copy of the values.

◆ insertRawValue:atIndex: [1/2]

- (void) insertRawValue: (int32_t value
atIndex: (NSUInteger)  index 

Inserts a raw enum value at the given index.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valueRaw enum value to add.
indexThe index into which to insert the value.

◆ insertRawValue:atIndex: [2/2]

- (void) insertRawValue: (int32_t value
atIndex: (NSUInteger)  index 

Inserts a raw enum value at the given index.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
valueRaw enum value to add.
indexThe index into which to insert the value.

◆ insertValue:atIndex: [1/2]

- (void) insertValue: (int32_t value
atIndex: (NSUInteger)  index 

Inserts a value into the given position.

Parameters
valueThe value to add to this array.
indexThe index into which to insert the value.

◆ insertValue:atIndex: [2/2]

- (void) insertValue: (int32_t value
atIndex: (NSUInteger)  index 

Inserts a value into the given position.

Parameters
valueThe value to add to this array.
indexThe index into which to insert the value.

◆ rawValueAtIndex: [1/2]

- (int32_t) rawValueAtIndex: (NSUInteger)  index

Gets the raw enum value at the given index.

Parameters
indexThe index of the raw enum value to get.
Returns
The raw enum value at the given index.

◆ rawValueAtIndex: [2/2]

- (int32_t) rawValueAtIndex: (NSUInteger)  index

Gets the raw enum value at the given index.

Parameters
indexThe index of the raw enum value to get.
Returns
The raw enum value at the given index.

◆ removeAll [1/2]

- (void) removeAll

Removes all the values from this array.

◆ removeAll [2/2]

- (void) removeAll

Removes all the values from this array.

◆ removeValueAtIndex: [1/2]

- (void) removeValueAtIndex: (NSUInteger)  index

Removes the value at the given index.

Parameters
indexThe index of the value to remove.

◆ removeValueAtIndex: [2/2]

- (void) removeValueAtIndex: (NSUInteger)  index

Removes the value at the given index.

Parameters
indexThe index of the value to remove.

◆ replaceValueAtIndex:withRawValue: [1/2]

- (void) replaceValueAtIndex: (NSUInteger)  index
withRawValue: (int32_t value 

Replaces the raw enum value at the given index with the given value.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
indexThe index for which to replace the value.
valueThe raw enum value to replace with.

◆ replaceValueAtIndex:withRawValue: [2/2]

- (void) replaceValueAtIndex: (NSUInteger)  index
withRawValue: (int32_t value 

Replaces the raw enum value at the given index with the given value.

Note
This method bypass the validationFunc to enable the setting of values that were not known at the time the binary was compiled.
Parameters
indexThe index for which to replace the value.
valueThe raw enum value to replace with.

◆ replaceValueAtIndex:withValue: [1/2]

- (void) replaceValueAtIndex: (NSUInteger)  index
withValue: (int32_t value 

Replaces the value at the given index with the given value.

Parameters
indexThe index for which to replace the value.
valueThe value to replace with.

◆ replaceValueAtIndex:withValue: [2/2]

- (void) replaceValueAtIndex: (NSUInteger)  index
withValue: (int32_t value 

Replaces the value at the given index with the given value.

Parameters
indexThe index for which to replace the value.
valueThe value to replace with.

◆ valueAtIndex: [1/2]

- (int32_t) valueAtIndex: (NSUInteger)  index

Gets the value at the given index.

Parameters
indexThe index of the value to get.
Returns
The value at the given index.

◆ valueAtIndex: [2/2]

- (int32_t) valueAtIndex: (NSUInteger)  index

Gets the value at the given index.

Parameters
indexThe index of the value to get.
Returns
The value at the given index.

Member Data Documentation

◆ _autocreator

- (package GPB_UNSAFE_UNRETAINED GPBMessage *) _autocreator
protected

Property Documentation

◆ count

- (NSUInteger) count
readnonatomicassign

The number of elements contained in the array.

Definition at line 1255 of file bloaty/third_party/protobuf/objectivec/GPBArray.h.

◆ validationFunc

- (GPBEnumValidationFunc) validationFunc
readnonatomicassign

The validation function to check if the enums are valid.

Definition at line 1257 of file bloaty/third_party/protobuf/objectivec/GPBArray.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:45