ObjFW
|
A protocol for Key Value Coding. More...
#include <ObjFW/ObjFW.h>
Instance Methods | |
(nullable id) | - valueForKey: |
Returns the value for the specified key. | |
(nullable id) | - valueForKeyPath: |
Returns the value for the specified key path. | |
(nullable id) | - valueForUndefinedKey: |
This is called by valueForKey: if the specified key does not exist. | |
(void) | - setValue:forKey: |
Set the value for the specified key. | |
(void) | - setValue:forKeyPath: |
Set the value for the specified key path. | |
(void) | - setValue:forUndefinedKey: |
This is called by setValue:forKey: if the specified key does not exist. | |
(void) | - setNilValueForKey: |
This is called by setValue:forKey: if the specified key is a scalar, but the value specified is nil . | |
A protocol for Key Value Coding.
Key Value Coding makes it possible to access properties dynamically using the interface described by this protocol.
- (void) setNilValueForKey: | (OFString *) | key |
This is called by setValue:forKey: if the specified key is a scalar, but the value specified is nil
.
By default, this throws an OFInvalidArgumentException.
key | The key for which the value nil was specified |
- (void) setValue: | (nullable id) | value | |
forKey: | (OFString *) | key |
Set the value for the specified key.
value | The value for the specified key |
key | The key of the value to set |
OFUndefinedKeyException | The specified key does not exist and setValue:forUndefinedKey: was not overridden |
- (void) setValue: | (nullable id) | value | |
forKeyPath: | (OFString *) | keyPath |
Set the value for the specified key path.
value | The value for the specified key path |
keyPath | The key path of the value to set |
OFUndefinedKeyException | The specified key does not exist and setValue:forUndefinedKey: was not overridden |
- (void) setValue: | (nullable id) | value | |
forUndefinedKey: | (OFString *) | key |
This is called by setValue:forKey: if the specified key does not exist.
By default, this throws an OFUndefinedKeyException.
value | The value for the specified undefined key |
key | The undefined key of the value to set |
OFUndefinedKeyException | The specified key does not exist |
- (nullable id) valueForKey: | (OFString *) | key |
Returns the value for the specified key.
key | The key of the value to return |
OFUndefinedKeyException | The specified key does not exist and valueForUndefinedKey: was not overridden |
- (nullable id) valueForKeyPath: | (OFString *) | keyPath |
Returns the value for the specified key path.
keyPath | The key path of the value to return |
OFUndefinedKeyException | The specified key does not exist and valueForUndefinedKey: was not overridden |
- (nullable id) valueForUndefinedKey: | (OFString *) | key |
This is called by valueForKey: if the specified key does not exist.
By default, this throws an OFUndefinedKeyException.
key | The undefined key of the value to return |
OFUndefinedKeyException | The specified key does not exist |