Introduce RKPropertyMapping abstract superclass for RKAttributeMapping and RKRelationshipMapping.

Add primitives for working with attribute, relationship, and property mapping objects.
This commit is contained in:
Blake Watters
2012-08-28 13:40:32 -04:00
parent 15acf30a66
commit d926e240f8
13 changed files with 211 additions and 110 deletions

View File

@@ -18,19 +18,14 @@
// limitations under the License.
//
#import <Foundation/Foundation.h>
#import "RKAttributeMapping.h"
#import "RKMapping.h"
#import "RKPropertyMapping.h"
@interface RKRelationshipMapping : RKAttributeMapping
@class RKMapping;
@property (nonatomic, retain) RKMapping *mapping;
@property (nonatomic, assign) BOOL reversible;
@interface RKRelationshipMapping : RKPropertyMapping
+ (RKRelationshipMapping *)mappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)objectOrDynamicMapping;
@property (nonatomic, strong, readonly) RKMapping *mapping;
+ (RKRelationshipMapping *)mappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)objectOrDynamicMapping reversible:(BOOL)reversible;
- (BOOL)isEqualToMapping:(RKRelationshipMapping *)mapping;
+ (RKRelationshipMapping *)relationshipMappingFromKeyPath:(NSString *)sourceKeyPath toKeyPath:(NSString *)destinationKeyPath withMapping:(RKMapping *)mapping;
@end