#import <GPBDictionary.h>
Instance Methods | |
(void) | - addRawEntriesFromDictionary: |
(void) | - enumerateKeysAndEnumsUsingBlock: |
(void) | - enumerateKeysAndRawValuesUsingBlock: |
(BOOL) | - getEnum:forKey: |
(BOOL) | - getRawValue:forKey: |
(instancetype) | - initWithDictionary: |
(instancetype) | - initWithValidationFunction: |
(instancetype) | - initWithValidationFunction:capacity: |
(instancetype) | - initWithValidationFunction:rawValues:forKeys:count: |
(void) | - removeAll |
(void) | - removeEnumForKey: |
(NSData *) | - serializedDataForUnknownValue:forKey:keyDataType: [implementation] |
(void) | - setEnum:forKey: |
(void) | - setRawValue:forKey: |
![]() | |
(size_t) | - computeSerializedSizeAsField: |
(void) | - enumerateForTextFormat: |
(void) | - setGPBGenericValue:forGPBGenericValueKey: |
(void) | - writeToCodedOutputStream:asField: |
Protected Attributes | |
package GPB_UNSAFE_UNRETAINED GPBMessage * | _autocreator |
Properties | |
NSUInteger | count |
GPBEnumValidationFunc | validationFunc |
Class used for map fields of <BOOL, int32_t> values. This performs better than boxing into NSNumbers in NSDictionaries.
Definition at line 4406 of file GPBDictionary.h.
- (void) addRawEntriesFromDictionary: | (GPBBoolEnumDictionary *) | otherDictionary |
Adds the keys and raw enum values from another dictionary.
otherDictionary | Dictionary containing entries to be added to this dictionary. |
- (void) enumerateKeysAndEnumsUsingBlock: | (void(NS_NOESCAPE ^ block)(BOOL key, int32_t value, BOOL *stop)) |
Enumerates the keys and values on this dictionary with the given block.
block | The block to enumerate with. key: The key for the current entry. value: The value for the current entry stop: A pointer to a boolean that when set stops the enumeration. |
- (void) enumerateKeysAndRawValuesUsingBlock: | (void(NS_NOESCAPE ^ block)(BOOL key, int32_t rawValue, BOOL *stop)) |
Enumerates the keys and values on this dictionary with the given block.
block | The block to enumerate with. key: The key for the current entry. rawValue: The value for the current entry stop: A pointer to a boolean that when set stops the enumeration. |
- (BOOL) getEnum: | (nullable int32_t *) | value | |
forKey: | (BOOL) | key | |
Gets the value for the given key.
value | Pointer into which the value will be set, if found. |
key | Key under which the value is stored, if present. |
- (BOOL) getRawValue: | (nullable int32_t *) | rawValue | |
forKey: | (BOOL) | key | |
Gets the raw enum value for the given key.
rawValue | Pointer into which the value will be set, if found. |
key | Key under which the value is stored, if present. |
- (instancetype) initWithDictionary: | (GPBBoolEnumDictionary *) | dictionary |
Initializes a dictionary with the entries from the given. dictionary.
dictionary | Dictionary containing the entries to add to the dictionary. |
- (instancetype) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | func |
Initializes a dictionary with the given validation function.
func | The enum validation function for the dictionary. |
- (instancetype) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
capacity: | (NSUInteger) | numItems | |
Initializes a dictionary with the given capacity.
func | The enum validation function for the dictionary. |
numItems | Capacity needed for the dictionary. |
- (instancetype) initWithValidationFunction: | (nullable GPBEnumValidationFunc) | func | |
rawValues: | (const int32_t) | values[__nullable] | |
forKeys: | (const BOOL) | keys[__nullable] | |
count: | (NSUInteger) | NS_DESIGNATED_INITIALIZER | |
Initializes a dictionary with the entries given.
func | The enum validation function for the dictionary. |
values | The raw enum values values to be placed in the dictionary. |
keys | The keys under which to store the values. |
count | The number of entries to store in the dictionary. |
- (void) removeAll |
Removes all entries in this dictionary.
- (void) removeEnumForKey: | (BOOL) | aKey |
Removes the entry for the given key.
aKey | Key to be removed from this dictionary. |
|
implementation |
- (void) setEnum: | (int32_t) | value | |
forKey: | (BOOL) | key | |
Sets the value for the given key.
value | The value to set. |
key | The key under which to store the value. |
- (void) setRawValue: | (int32_t) | rawValue | |
forKey: | (BOOL) | key | |
Sets the raw enum value for the given key.
rawValue | The raw enum value to set. |
key | The key under which to store the raw enum value. |
|
protected |
Definition at line 382 of file GPBDictionary_PackagePrivate.h.
|
readnonatomicassign |
Number of entries stored in this dictionary.
Definition at line 4409 of file GPBDictionary.h.
|
readnonatomicassign |
The validation function to check if the enums are valid.
Definition at line 4411 of file GPBDictionary.h.