Created
October 15, 2013 08:09
-
-
Save advantis/6988180 to your computer and use it in GitHub Desktop.
Thoughts about a bit more formal approach to indexed/keyed subscripting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@protocol ADVIndexedSubscripting <NSObject> | |
- (id) objectAtIndexedSubscript:(NSUInteger)index; | |
@end | |
@protocol ADVMutableIndexedSubscripting <ADVIndexedSubscripting> | |
- (void) setObject:(id)object atIndexedSubscript:(NSUInteger)index; | |
@end | |
@protocol ADVKeyedSubscripting <NSObject> | |
- (id) objectForKeyedSubscript:(id)key; | |
@end | |
@protocol ADVMutableKeySubscripting <ADVKeyedSubscripting> | |
- (void) setObject:(id)object forKeyedSubscript:(id <NSCopying>)key; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment