#import <GPBDictionary.h>
Instance Methods | |
(void) | - addEntriesFromDictionary: |
(void) | - enumerateKeysAndBoolsUsingBlock: |
(BOOL) | - getBool:forKey: |
(instancetype) | - initWithBools:forKeys:count: |
(instancetype) | - initWithCapacity: |
(instancetype) | - initWithDictionary: |
(void) | - removeAll |
(void) | - removeBoolForKey: |
(void) | - setBool: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 <BOOL, BOOL> values. This performs better than boxing into NSNumbers in NSDictionaries.
Definition at line 4121 of file GPBDictionary.h.
- (void) addEntriesFromDictionary: | (GPBBoolBoolDictionary *) | otherDictionary |
Adds the keys and values from another dictionary.
otherDictionary | Dictionary containing entries to be added to this dictionary. |
- (void) enumerateKeysAndBoolsUsingBlock: | (void(NS_NOESCAPE ^ block)(BOOL key, BOOL 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) getBool: | (nullable BOOL *) | 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. |
- (instancetype) initWithBools: | (const BOOL) | values[__nullable] | |
forKeys: | (const BOOL) | 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. |
- (instancetype) initWithCapacity: | (NSUInteger) | numItems |
Initializes this dictionary with the requested capacity.
numItems | Number of items needed for this dictionary. |
- (instancetype) initWithDictionary: | (GPBBoolBoolDictionary *) | dictionary |
Initializes this dictionary, copying the entries from the given dictionary.
dictionary | Dictionary containing the entries to add to this dictionary. |
- (void) removeAll |
Removes all entries in this dictionary.
- (void) removeBoolForKey: | (BOOL) | aKey |
Removes the entry for the given key.
aKey | Key to be removed from this dictionary. |
- (void) setBool: | (BOOL) | 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. |
|
protected |
Definition at line 364 of file GPBDictionary_PackagePrivate.h.
|
readnonatomicassign |
Number of entries stored in this dictionary.
Definition at line 4124 of file GPBDictionary.h.