OGWKeyedValue Class Reference
Inherits from | NSObject |
Conforms to | NSCoding NSCopying |
Declared in | OGWKeyedValue.h |
Tasks
Other Methods
-
count
property
Bool Variables
Float Variables
Double Variables
Integer Variables
-
– setInteger:forKey:
-
– integerForKey:
-
– setUnsignedInteger:forKey:
-
– unsignedIntegerForKey:
-
– setInt32:forKey:
-
– int32ForKey:
-
– setUnsignedInt32:forKey:
-
– unsignedInt32ForKey:
-
– setInt64:forKey:
-
– int64ForKey:
-
– setUnsignedInt64:forKey:
-
– unsignedInt64ForKey:
Struct Variables
-
– setPoint:forKey:
-
– pointForKey:
-
– setVector:forKey:
-
– vectorForKey:
-
– setSize:forKey:
-
– sizeForKey:
-
– setRect:forKey:
-
– rectForKey:
String Variables
Key-Value Coding
-
– valueForKey:
-
– valueForKeyPath:
-
– stringForKeyPath:
-
– boolForKeyPath:
-
– floatForKeyPath:
-
– doubleForKeyPath:
-
– intForKeyPath:
-
– unsignedIntForKeyPath:
Accessing Mutable Number
Instance Methods
boolForKey:
Returns the value of the given type for key. Returns NO if there’s no value with this key.
- (BOOL)boolForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The BOOL value for the key, or NO if there’s no variable with that key.
Declared In
OGWKeyedValue.h
boolForKeyPath:
The KVC path to a value.
- (BOOL)boolForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
doubleForKey:
Returns the value of the given type for key. Returns 0 if there’s no value with this key.
- (double)doubleForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The double value for the key, or 0.0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
doubleForKeyPath:
The KVC path to a value.
- (double)doubleForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
floatForKey:
Returns the value of the given type for key. Returns 0 if there’s no value with this key.
- (float)floatForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The float value for the key, or 0.0f if there’s no variable with that key.
Declared In
OGWKeyedValue.h
floatForKeyPath:
The KVC path to a value.
- (float)floatForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
int32ForKey:
Returns the value (32-Bit) of the given type for key. Returns 0 if there’s no value with this key.
- (int32_t)int32ForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The int32_t value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
int64ForKey:
Returns the value (64-Bit) of the given type for key. Returns 0 if there’s no value with this key.
- (int64_t)int64ForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The int64_t value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
intForKeyPath:
The KVC path to a value.
- (int32_t)intForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
integerForKey:
Returns the value of the given type for key. Returns 0 if there’s no value with this key.
- (GWInteger)integerForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The intEger value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
mutableNumberForKey:
Accessing the KKMutableNumber object directly allows you to change the value without having to reassign it using a setter method.
- (OGWMutableValue *)mutableNumberForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The underlying KKMutableNumber object for a specific variable.
A mutable number object or nil if no variable with the given key was found.
Declared In
OGWKeyedValue.h
pointForKey:
The point for the given Key. Returns GWPointZero if there’s no point (literally) for the key.
- (GWPoint)pointForKey:(NSString *)key
Parameters
- key
A string uniquely identifying the value.
Return Value
The point for the given Key. Returns GWPointZero if there’s no point (literally) for the key.
Declared In
OGWKeyedValue.h
rectForKey:
The rect for the given Key. Returns GWRectZero if there’s no rect for the key.
- (GWRect)rectForKey:(NSString *)key
Parameters
- key
A string uniquely identifying the value.
Return Value
The rect for the given Key. Returns GWRectZero if there’s no rect for the key.
Declared In
OGWKeyedValue.h
setBool:forKey:
Set value of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setBool:(BOOL)boolValue forKey:(NSString *)key
Parameters
- boolValue
A boolean.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setDouble:forKey:
Set value of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setDouble:(double)doubleValue forKey:(NSString *)key
Parameters
- doubleValue
A double.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setFloat:forKey:
Set value of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setFloat:(float)floatValue forKey:(NSString *)key
Parameters
- floatValue
A float.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setInt32:forKey:
Set value (32-Bit) of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setInt32:(int32_t)int32Value forKey:(NSString *)key
Parameters
- int32Value
A 32-bit integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setInt64:forKey:
Set value (64-Bit) of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setInt64:(int64_t)int64Value forKey:(NSString *)key
Parameters
- int64Value
A 64-bit integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setInteger:forKey:
Set value of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setInteger:(GWInteger)integerValue forKey:(NSString *)key
Parameters
- integerValue
An integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setPoint:forKey:
Sets or replaces a point with the given key.
- (void)setPoint:(GWPoint)point forKey:(NSString *)key
Parameters
- point
The point to set.
- key
A string uniquely identifying the value.
Declared In
OGWKeyedValue.h
setRect:forKey:
Sets or replaces a rect with the given key.
- (void)setRect:(GWRect)rect forKey:(NSString *)key
Parameters
- rect
The rect to set.
- key
A string uniquely identifying the value.
Declared In
OGWKeyedValue.h
setSize:forKey:
Sets or replaces a size with the given key.
- (void)setSize:(GWSize)size forKey:(NSString *)key
Parameters
- size
The size to set.
- key
A string uniquely identifying the value.
Declared In
OGWKeyedValue.h
setString:forKey:
Assign or replace any string with the given key. If string is nil, the string for that key will be removed.
- (void)setString:(NSString *)string forKey:(NSString *)key
Parameters
- string
The string to store in the dictionary.
- key
A unique string to identify the object.
Declared In
OGWKeyedValue.h
setUnsignedInt32:forKey:
Set value (32-Bit) of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setUnsignedInt32:(uint32_t)unsignedInt32Value forKey:(NSString *)key
Parameters
- unsignedInt32Value
An unsigned 32-bit integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setUnsignedInt64:forKey:
Set value (64-Bit) of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setUnsignedInt64:(uint64_t)unsignedInt64Value forKey:(NSString *)key
Parameters
- unsignedInt64Value
An unsigned 64-bit integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setUnsignedInteger:forKey:
Set value of the given type for key. Value is mutable, it is not an NSNumber to avoid alloc/dealloc for every set.
- (void)setUnsignedInteger:(GWUInteger)unsignedIntegerValue forKey:(NSString *)key
Parameters
- unsignedIntegerValue
An unsigned integer.
- key
A unique string to identify the variable.
Declared In
OGWKeyedValue.h
setVector:forKey:
Sets or replaces a vector with the given key.
- (void)setVector:(GWVector)vector forKey:(NSString *)key
Parameters
- vector
The vector to set.
- key
A string uniquely identifying the value.
Declared In
OGWKeyedValue.h
sizeForKey:
The size for the given Key. Returns GWSizeZero if there’s no size for the key.
- (GWSize)sizeForKey:(NSString *)key
Parameters
- key
A string uniquely identifying the value.
Return Value
The size for the given Key. Returns GWSizeZero if there’s no size for the key.
Declared In
OGWKeyedValue.h
stringForKey:
A unique string identifying the object.
- (NSString *)stringForKey:(NSString *)key
Parameters
- key
A unique string identifying the object.
Return Value
The string for key or nil if there’s no string associated with this key.
Declared In
OGWKeyedValue.h
stringForKeyPath:
The KVC path to a string.
- (NSString *)stringForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a string.
Return Value
The string for the path, or nil.
Declared In
OGWKeyedValue.h
unsignedInt32ForKey:
Returns the value (32-Bit) of the given type for key. Returns 0 if there’s no value with this key.
- (uint32_t)unsignedInt32ForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The uint32_t value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
unsignedInt64ForKey:
Returns the value (64-Bit) of the given type for key. Returns 0 if there’s no value with this key.
- (uint64_t)unsignedInt64ForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The uint64_t value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
unsignedIntForKeyPath:
The KVC path to a value.
- (uint32_t)unsignedIntForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
unsignedIntegerForKey:
Returns the value of the given type for key. Returns 0 if there’s no value with this key.
- (GWUInteger)unsignedIntegerForKey:(NSString *)key
Parameters
- key
A unique string identifying the variable.
Return Value
The integer value for the key, or 0 if there’s no variable with that key.
Declared In
OGWKeyedValue.h
valueForKey:
The KVC key to a value.
- (id)valueForKey:(NSString *)key
Parameters
- key
The KVC key to a value.
Return Value
The value for the key, or nil.
Declared In
OGWKeyedValue.h
valueForKeyPath:
The KVC path to a value.
- (id)valueForKeyPath:(NSString *)keyPath
Parameters
- keyPath
The KVC path to a value.
Return Value
The value for the path, or nil.
Declared In
OGWKeyedValue.h
vectorForKey:
The vector for the given Key. Returns GWVectorZero if there’s no vector for the key.
- (GWVector)vectorForKey:(NSString *)key
Parameters
- key
A string uniquely identifying the value.
Return Value
The vector for the given Key. Returns GWVectorZero if there’s no vector for the key.
Declared In
OGWKeyedValue.h