#import <GPBDictionary.h>
Instance Methods | |
(void) | - addEntriesFromDictionary: |
(void) | - enumerateKeysAndUInt32sUsingBlock: |
(BOOL) | - getUInt32:forKey: |
(instancetype) | - initWithCapacity: |
(instancetype) | - initWithDictionary: |
(instancetype) | - initWithUInt32s:forKeys:count: |
(void) | - removeAll |
(void) | - removeUInt32ForKey: |
(void) | - setUInt32:forKey: |
![]() | |
(size_t) | - computeSerializedSizeAsField: |
(void) | - enumerateForTextFormat: |
(void) | - setGPBGenericValue:forGPBGenericValueKey: |
(void) | - writeToCodedOutputStream:asField: |
Protected Attributes | |
package GPB_UNSAFE_UNRETAINED GPBMessage * | _autocreator |
Properties | |
NSUInteger | count |
Class used for map fields of <uint32_t, uint32_t> values. This performs better than boxing into NSNumbers in NSDictionaries.
Definition at line 57 of file GPBDictionary.h.
- (void) addEntriesFromDictionary: | (GPBUInt32UInt32Dictionary *) | otherDictionary |
Adds the keys and values from another dictionary.
otherDictionary | Dictionary containing entries to be added to this dictionary. |
- (void) enumerateKeysAndUInt32sUsingBlock: | (void(NS_NOESCAPE ^ block)(uint32_t key, uint32_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. |
- (BOOL) getUInt32: | (nullable uint32_t *) | value | |
forKey: | (uint32_t) | 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. |
- (instancetype) initWithCapacity: | (NSUInteger) | numItems |
Initializes this dictionary with the requested capacity.
numItems | Number of items needed for this dictionary. |
- (instancetype) initWithDictionary: | (GPBUInt32UInt32Dictionary *) | dictionary |
Initializes this dictionary, copying the entries from the given dictionary.
dictionary | Dictionary containing the entries to add to this dictionary. |
- (instancetype) initWithUInt32s: | (const uint32_t) | values[__nullable] | |
forKeys: | (const uint32_t) | keys[__nullable] | |
count: | (NSUInteger) | NS_DESIGNATED_INITIALIZER | |
Initializes this dictionary, copying the given values and keys.
values | The values to be placed in this dictionary. |
keys | The keys under which to store the values. |
count | The number of elements to copy into the dictionary. |
- (void) removeAll |
Removes all entries in this dictionary.
- (void) removeUInt32ForKey: | (uint32_t) | aKey |
Removes the entry for the given key.
aKey | Key to be removed from this dictionary. |
- (void) setUInt32: | (uint32_t) | value | |
forKey: | (uint32_t) | key | |
Sets the value for the given key.
value | The value to set. |
key | The key under which to store the value. |
|
protected |
Definition at line 88 of file GPBDictionary_PackagePrivate.h.
|
readnonatomicassign |
Number of entries stored in this dictionary.
Definition at line 60 of file GPBDictionary.h.