Skip to content

Commit

Permalink
Rename category linker. Add type converter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper Blues committed Nov 29, 2013
1 parent 53d4311 commit 9d22ede
Show file tree
Hide file tree
Showing 11 changed files with 3,566 additions and 13,185 deletions.
2 changes: 1 addition & 1 deletion Source/Component/TyphoonDefinition+Infrastructure.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(TyphoonDefinition_Infrastructure)
TYPHOON_LINK_CATEGORY(TyphoonDefinition_Infrastructure)

#import "TyphoonDefinition+Infrastructure.h"
#import "TyphoonPropertyPlaceholderConfigurer.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(TyphoonComponentFactory_InstanceBuilder)
TYPHOON_LINK_CATEGORY(TyphoonComponentFactory_InstanceBuilder)

#import <objc/message.h>
#import "TyphoonComponentFactory+InstanceBuilder.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
////////////////////////////////////////////////////////////////////////////////

#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(TyphoonDefinition_InstanceBuilder)
TYPHOON_LINK_CATEGORY(TyphoonDefinition_InstanceBuilder)

#import "TyphoonDefinition+InstanceBuilder.h"
#import "TyphoonPropertyInjectedWithStringRepresentation.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(TyphoonInitializer_InstanceBuilder)
TYPHOON_LINK_CATEGORY(TyphoonInitializer_InstanceBuilder)

#import "TyphoonInitializer+InstanceBuilder.h"
#import "TyphoonParameterInjectedWithStringRepresentation.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(TyphoonRXMLElement_XmlComponentFactory)
TYPHOON_LINK_CATEGORY(TyphoonRXMLElement_XmlComponentFactory)

#import "TyphoonRXMLElement+XmlComponentFactory.h"
#import "TyphoonInjectedProperty.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Utils/NSObject+TyphoonIntrospectionUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


#import "TyphoonLinkerCategoryBugFix.h"
TYPHOON_FIX_CATEGORY_BUG(NSObject_TyphoonIntrospectionUtils)
TYPHOON_LINK_CATEGORY(NSObject_TyphoonIntrospectionUtils)

#import <objc/runtime.h>
#import "TyphoonTypeDescriptor.h"
Expand Down
6 changes: 3 additions & 3 deletions Source/Utils/TyphoonLinkerCategoryBugFix.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
Shamelessly borrowed from Three20 and RestKit
*/

#define TYPHOON_FIX_CATEGORY_BUG(name) \
@interface TYPHOON_FIX_CATEGORY_BUG_##name : NSObject \
#define TYPHOON_LINK_CATEGORY(name) \
@interface TYPHOON_LINK_CATEGORY_##name : NSObject \
@end \
@implementation TYPHOON_FIX_CATEGORY_BUG_##name \
@implementation TYPHOON_LINK_CATEGORY_##name \
@end
17 changes: 17 additions & 0 deletions Source/ios/Converters/TyphoonBundledImageTypeConverter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Jasper Blues & Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>
#import "TyphoonTypeConverter.h"


@interface TyphoonBundledImageTypeConverter : NSObject<TyphoonTypeConverter>
@end
26 changes: 26 additions & 0 deletions Source/ios/Converters/TyphoonBundledImageTypeConverter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
////////////////////////////////////////////////////////////////////////////////
//
// TYPHOON FRAMEWORK
// Copyright 2013, Jasper Blues & Contributors
// All Rights Reserved.
//
// NOTICE: The authors permit you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////


#import "TyphoonBundledImageTypeConverter.h"
#import <UIKit/UIKit.h>


@implementation TyphoonBundledImageTypeConverter


- (id)convert:(NSString*)stringValue
{
return [UIImage imageNamed:stringValue];
}


@end
Loading

0 comments on commit 9d22ede

Please sign in to comment.