#import <Foundation/Foundation.h>
#import "GPBRuntimeTypes.h"
NS_ASSUME_NONNULL_BEGIN
#pragma mark - UInt32 -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32UInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32UInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(uint32_t)key;
- (void)removeUInt32ForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32Int32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32Int32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32Int32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(uint32_t)key;
- (void)removeInt32ForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32UInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32UInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(uint32_t)key;
- (void)removeUInt64ForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32Int64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32Int64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32Int64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(uint32_t)key;
- (void)removeInt64ForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32BoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32BoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32BoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(uint32_t)key;
- (void)removeBoolForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32FloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32FloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32FloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(uint32_t)key;
- (void)removeFloatForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32DoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32DoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32DoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(uint32_t)key;
- (void)removeDoubleForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32EnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32EnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint32_t)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint32_t)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBUInt32EnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(uint32_t)key;
- (void)setRawValue:(int32_t)rawValue forKey:(uint32_t)key;
- (void)removeEnumForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt32 -> Object
__attribute__((objc_subclassing_restricted))
@interface GPBUInt32ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
forKeys:(const uint32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt32ObjectDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (ObjectType)objectForKey:(uint32_t)key;
- (void)enumerateKeysAndObjectsUsingBlock:
(void (NS_NOESCAPE ^)(uint32_t key, ObjectType object, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt32ObjectDictionary *)otherDictionary;
- (void)setObject:(ObjectType)object forKey:(uint32_t)key;
- (void)removeObjectForKey:(uint32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBInt32UInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32UInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int32_t)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32UInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(int32_t)key;
- (void)removeUInt32ForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBInt32Int32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32Int32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(int32_t)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32Int32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(int32_t)key;
- (void)removeInt32ForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBInt32UInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32UInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int32_t)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32UInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(int32_t)key;
- (void)removeUInt64ForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBInt32Int64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32Int64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(int32_t)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32Int64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(int32_t)key;
- (void)removeInt64ForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBInt32BoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32BoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(int32_t)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32BoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(int32_t)key;
- (void)removeBoolForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBInt32FloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32FloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(int32_t)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32FloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(int32_t)key;
- (void)removeFloatForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBInt32DoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32DoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(int32_t)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32DoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(int32_t)key;
- (void)removeDoubleForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBInt32EnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32EnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(int32_t)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int32_t)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBInt32EnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(int32_t)key;
- (void)setRawValue:(int32_t)rawValue forKey:(int32_t)key;
- (void)removeEnumForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int32 -> Object
__attribute__((objc_subclassing_restricted))
@interface GPBInt32ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
forKeys:(const int32_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt32ObjectDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (ObjectType)objectForKey:(int32_t)key;
- (void)enumerateKeysAndObjectsUsingBlock:
(void (NS_NOESCAPE ^)(int32_t key, ObjectType object, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt32ObjectDictionary *)otherDictionary;
- (void)setObject:(ObjectType)object forKey:(int32_t)key;
- (void)removeObjectForKey:(int32_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64UInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64UInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(uint64_t)key;
- (void)removeUInt32ForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64Int32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64Int32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64Int32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(uint64_t)key;
- (void)removeInt32ForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64UInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64UInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(uint64_t)key;
- (void)removeUInt64ForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64Int64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64Int64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64Int64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(uint64_t)key;
- (void)removeInt64ForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64BoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64BoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64BoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(uint64_t)key;
- (void)removeBoolForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64FloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64FloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64FloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(uint64_t)key;
- (void)removeFloatForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64DoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64DoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64DoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(uint64_t)key;
- (void)removeDoubleForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64EnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64EnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint64_t)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint64_t)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBUInt64EnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(uint64_t)key;
- (void)setRawValue:(int32_t)rawValue forKey:(uint64_t)key;
- (void)removeEnumForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - UInt64 -> Object
__attribute__((objc_subclassing_restricted))
@interface GPBUInt64ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
forKeys:(const uint64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBUInt64ObjectDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (ObjectType)objectForKey:(uint64_t)key;
- (void)enumerateKeysAndObjectsUsingBlock:
(void (NS_NOESCAPE ^)(uint64_t key, ObjectType object, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBUInt64ObjectDictionary *)otherDictionary;
- (void)setObject:(ObjectType)object forKey:(uint64_t)key;
- (void)removeObjectForKey:(uint64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBInt64UInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64UInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int64_t)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64UInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(int64_t)key;
- (void)removeUInt32ForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBInt64Int32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64Int32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(int64_t)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64Int32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(int64_t)key;
- (void)removeInt32ForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBInt64UInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64UInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int64_t)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64UInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(int64_t)key;
- (void)removeUInt64ForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBInt64Int64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64Int64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(int64_t)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64Int64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(int64_t)key;
- (void)removeInt64ForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBInt64BoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64BoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(int64_t)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64BoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(int64_t)key;
- (void)removeBoolForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBInt64FloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64FloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(int64_t)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64FloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(int64_t)key;
- (void)removeFloatForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBInt64DoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64DoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(int64_t)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64DoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(int64_t)key;
- (void)removeDoubleForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBInt64EnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64EnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(int64_t)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int64_t)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBInt64EnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(int64_t)key;
- (void)setRawValue:(int32_t)rawValue forKey:(int64_t)key;
- (void)removeEnumForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Int64 -> Object
__attribute__((objc_subclassing_restricted))
@interface GPBInt64ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
forKeys:(const int64_t [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBInt64ObjectDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (ObjectType)objectForKey:(int64_t)key;
- (void)enumerateKeysAndObjectsUsingBlock:
(void (NS_NOESCAPE ^)(int64_t key, ObjectType object, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBInt64ObjectDictionary *)otherDictionary;
- (void)setObject:(ObjectType)object forKey:(int64_t)key;
- (void)removeObjectForKey:(int64_t)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBBoolUInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolUInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(BOOL)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolUInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(BOOL)key;
- (void)removeUInt32ForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBBoolInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(BOOL)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolInt32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(BOOL)key;
- (void)removeInt32ForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBBoolUInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolUInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(BOOL)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolUInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(BOOL)key;
- (void)removeUInt64ForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBBoolInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(BOOL)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolInt64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(BOOL)key;
- (void)removeInt64ForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBBoolBoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolBoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(BOOL)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolBoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(BOOL)key;
- (void)removeBoolForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBBoolFloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolFloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(BOOL)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolFloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(BOOL)key;
- (void)removeFloatForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBBoolDoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolDoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(BOOL)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolDoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(BOOL)key;
- (void)removeDoubleForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBBoolEnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolEnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(BOOL)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(BOOL)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBBoolEnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(BOOL)key;
- (void)setRawValue:(int32_t)rawValue forKey:(BOOL)key;
- (void)removeEnumForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - Bool -> Object
__attribute__((objc_subclassing_restricted))
@interface GPBBoolObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
forKeys:(const BOOL [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBBoolObjectDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (ObjectType)objectForKey:(BOOL)key;
- (void)enumerateKeysAndObjectsUsingBlock:
(void (NS_NOESCAPE ^)(BOOL key, ObjectType object, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBBoolObjectDictionary *)otherDictionary;
- (void)setObject:(ObjectType)object forKey:(BOOL)key;
- (void)removeObjectForKey:(BOOL)aKey;
- (void)removeAll;
@end
#pragma mark - String -> UInt32
__attribute__((objc_subclassing_restricted))
@interface GPBStringUInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringUInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(NSString *)key;
- (void)enumerateKeysAndUInt32sUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, uint32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringUInt32Dictionary *)otherDictionary;
- (void)setUInt32:(uint32_t)value forKey:(NSString *)key;
- (void)removeUInt32ForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Int32
__attribute__((objc_subclassing_restricted))
@interface GPBStringInt32Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt32s:(const int32_t [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringInt32Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt32:(nullable int32_t *)value forKey:(NSString *)key;
- (void)enumerateKeysAndInt32sUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, int32_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringInt32Dictionary *)otherDictionary;
- (void)setInt32:(int32_t)value forKey:(NSString *)key;
- (void)removeInt32ForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> UInt64
__attribute__((objc_subclassing_restricted))
@interface GPBStringUInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringUInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(NSString *)key;
- (void)enumerateKeysAndUInt64sUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, uint64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringUInt64Dictionary *)otherDictionary;
- (void)setUInt64:(uint64_t)value forKey:(NSString *)key;
- (void)removeUInt64ForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Int64
__attribute__((objc_subclassing_restricted))
@interface GPBStringInt64Dictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithInt64s:(const int64_t [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringInt64Dictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getInt64:(nullable int64_t *)value forKey:(NSString *)key;
- (void)enumerateKeysAndInt64sUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, int64_t value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringInt64Dictionary *)otherDictionary;
- (void)setInt64:(int64_t)value forKey:(NSString *)key;
- (void)removeInt64ForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Bool
__attribute__((objc_subclassing_restricted))
@interface GPBStringBoolDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithBools:(const BOOL [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringBoolDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getBool:(nullable BOOL *)value forKey:(NSString *)key;
- (void)enumerateKeysAndBoolsUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, BOOL value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringBoolDictionary *)otherDictionary;
- (void)setBool:(BOOL)value forKey:(NSString *)key;
- (void)removeBoolForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Float
__attribute__((objc_subclassing_restricted))
@interface GPBStringFloatDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithFloats:(const float [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringFloatDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getFloat:(nullable float *)value forKey:(NSString *)key;
- (void)enumerateKeysAndFloatsUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, float value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringFloatDictionary *)otherDictionary;
- (void)setFloat:(float)value forKey:(NSString *)key;
- (void)removeFloatForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Double
__attribute__((objc_subclassing_restricted))
@interface GPBStringDoubleDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
- (instancetype)initWithDoubles:(const double [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringDoubleDictionary *)dictionary;
- (instancetype)initWithCapacity:(NSUInteger)numItems;
- (BOOL)getDouble:(nullable double *)value forKey:(NSString *)key;
- (void)enumerateKeysAndDoublesUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, double value, BOOL *stop))block;
- (void)addEntriesFromDictionary:(GPBStringDoubleDictionary *)otherDictionary;
- (void)setDouble:(double)value forKey:(NSString *)key;
- (void)removeDoubleForKey:(NSString *)aKey;
- (void)removeAll;
@end
#pragma mark - String -> Enum
__attribute__((objc_subclassing_restricted))
@interface GPBStringEnumDictionary : NSObject <NSCopying>
@property(nonatomic, readonly) NSUInteger count;
@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
rawValues:(const int32_t [__nullable])values
forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithDictionary:(GPBStringEnumDictionary *)dictionary;
- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
capacity:(NSUInteger)numItems;
- (BOOL)getEnum:(nullable int32_t *)value forKey:(NSString *)key;
- (void)enumerateKeysAndEnumsUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, int32_t value, BOOL *stop))block;
- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(NSString *)key;
- (void)enumerateKeysAndRawValuesUsingBlock:
(void (NS_NOESCAPE ^)(NSString *key, int32_t rawValue, BOOL *stop))block;
- (void)addRawEntriesFromDictionary:(GPBStringEnumDictionary *)otherDictionary;
- (void)setEnum:(int32_t)value forKey:(NSString *)key;
- (void)setRawValue:(int32_t)rawValue forKey:(NSString *)key;
- (void)removeEnumForKey:(NSString *)aKey;
- (void)removeAll;
@end
NS_ASSUME_NONNULL_END