mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-01-12 22:51:50 +08:00
27 lines
605 B
Objective-C
27 lines
605 B
Objective-C
//
|
|
// OTRestModelMapper.h
|
|
// gateguru
|
|
//
|
|
// Created by Blake Watters on 8/6/09.
|
|
// Copyright 2009 Objective 3. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "Element.h"
|
|
|
|
@interface OTRestModelMapper : NSObject {
|
|
NSMutableDictionary* _elementToClassMappings;
|
|
}
|
|
|
|
/**
|
|
* Register a mapping for a given class for an XML element with the given tag name
|
|
*/
|
|
- (void)registerModel:(Class)class forElementNamed:(NSString*)elementName;
|
|
|
|
/**
|
|
* Digest an XML payload and return the an instance of the model class registered for the element
|
|
*/
|
|
- (id)buildModelFromXML:(Element*)XML;
|
|
|
|
@end
|