mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-06 09:41:09 +08:00
Other changes include: * Eliminated the RKObjectFactory protocol and implementations. Object mapping instances themselves are now responsible for instantiating target objects for mapping. * Introduced RKObjectAbstractMapping superclass for RKObjectMapping and RKObjectPolymorphicMapping. * Updated example applications to use block object loaders (RKTwitter and RKTwitterCoreData) * Refactored method signatures of RKObjectMapper, RKObjectMapping, and RKObjectMappingProvider to reflect the existence of abstract mapping types. This was necessary to make polymorphic mappings integrate cleanly. * Fixed overlap in RestKit error domains between network and object mapping. fixes #208
27 lines
898 B
Objective-C
27 lines
898 B
Objective-C
//
|
|
// RKObjectRelationshipMapping.h
|
|
// RestKit
|
|
//
|
|
// Created by Blake Watters on 5/4/11.
|
|
// Copyright 2011 Two Toasters. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "RKObjectAttributeMapping.h"
|
|
|
|
@class RKObjectAbstractMapping;
|
|
|
|
@interface RKObjectRelationshipMapping : RKObjectAttributeMapping {
|
|
RKObjectAbstractMapping* _mapping;
|
|
BOOL _reversible;
|
|
}
|
|
|
|
@property (nonatomic, retain) RKObjectAbstractMapping* mapping;
|
|
@property (nonatomic, assign) BOOL reversible;
|
|
|
|
+ (RKObjectRelationshipMapping*)mappingFromKeyPath:(NSString*)sourceKeyPath toKeyPath:(NSString*)destinationKeyPath withMapping:(RKObjectAbstractMapping*)objectOrPolymorphicMapping;
|
|
|
|
+ (RKObjectRelationshipMapping*)mappingFromKeyPath:(NSString*)sourceKeyPath toKeyPath:(NSString*)destinationKeyPath withMapping:(RKObjectAbstractMapping*)objectOrPolymorphicMapping reversible:(BOOL)reversible;
|
|
|
|
@end
|