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

#import <GPBArray.h>

Inheritance diagram for GPBInt64Array:
Inheritance graph
[legend]

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:
 
(int64_t) - valueAtIndex:
 

Class Methods

(instancetype) + array
 
(instancetype) + arrayWithCapacity:
 
(instancetype) + arrayWithValue:
 
(instancetype) + arrayWithValueArray:
 

Protected Attributes

package GPB_UNSAFE_UNRETAINED GPBMessage_autocreator
 

Properties

NSUInteger count
 

Detailed Description

Class used for repeated fields of int64_t values. This performs better than boxing into NSNumbers in NSArrays.

Note
This class is not meant to be subclassed.

Definition at line 392 of file GPBArray.h.

Method Documentation

◆ addValue:

- (void) addValue: (int64_t)  value

Adds a value to this array.

Parameters
valueThe value to add to this array.

◆ addValues:count:

- (void) addValues: (const int64_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.

◆ addValuesFromArray:

- (void) addValuesFromArray: (GPBInt64Array *)  array

Adds the values from the given array to this array.

Parameters
arrayThe array containing the elements to add to this array.

◆ array

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

◆ arrayWithCapacity:

+ (instancetype) arrayWithCapacity: (NSUInteger)  count

Creates and initializes a GPBInt64Array with the given capacity.

Parameters
countThe capacity needed for the array.
Returns
A newly instanced GPBInt64Array with a capacity of count.

◆ arrayWithValue:

+ (instancetype) arrayWithValue: (int64_t)  value

Creates and initializes a GPBInt64Array with the single element given.

Parameters
valueThe value to be placed in the array.
Returns
A newly instanced GPBInt64Array with value in it.

◆ arrayWithValueArray:

+ (instancetype) arrayWithValueArray: (GPBInt64Array *)  array

Creates and initializes a GPBInt64Array with the contents of the given array.

Parameters
arrayArray with the contents to be put into the new array.
Returns
A newly instanced GPBInt64Array with the contents of array.

◆ enumerateValuesWithBlock:

- (void) enumerateValuesWithBlock: (void(NS_NOESCAPE ^ block)(int64_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:

- (void) enumerateValuesWithOptions: (NSEnumerationOptions)  opts
usingBlock: (void(NS_NOESCAPE ^ block)(int64_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:

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

◆ initWithCapacity:

- (instancetype) initWithCapacity: (NSUInteger)  count

Initializes the array with the given capacity.

Parameters
countThe capacity needed for the array.
Returns
A newly initialized GPBInt64Array with a capacity of count.

◆ initWithValueArray:

- (instancetype) initWithValueArray: (GPBInt64Array *)  array

Initializes the array, copying the given values.

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

◆ initWithValues:count:

- (instancetype) initWithValues: (const int64_t)  values[__nullable]
count: (NSUInteger)  count 

Initializes the array, copying the given values.

Parameters
valuesAn array with the values to put inside this array.
countThe number of elements to copy into the array.
Returns
A newly initialized GPBInt64Array with a copy of the values.

◆ insertValue:atIndex:

- (void) insertValue: (int64_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.

◆ NS_DESIGNATED_INITIALIZER

- (instancetype) NS_DESIGNATED_INITIALIZER
Returns
A newly initialized and empty GPBInt64Array.

◆ removeAll

- (void) removeAll

Removes all the values from this array.

◆ removeValueAtIndex:

- (void) removeValueAtIndex: (NSUInteger)  index

Removes the value at the given index.

Parameters
indexThe index of the value to remove.

◆ replaceValueAtIndex:withValue:

- (void) replaceValueAtIndex: (NSUInteger)  index
withValue: (int64_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:

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

Definition at line 78 of file GPBArray_PackagePrivate.h.

Property Documentation

◆ count

- (NSUInteger) count
readnonatomicassign

The number of elements contained in the array.

Definition at line 395 of file GPBArray.h.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:05