1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#import <Foundation/Foundation.h>
@protocol Doer
- (void)doSomeWork;
- (void)doSomeWorkWithSpeed:(int)s;
- (void)doSomeWorkWithSpeed:(int)s thoroughness:(int)t
NS_SWIFT_NAME(doVeryImportantWork(speed:thoroughness:));
- (void)doSomeWorkWithSpeed:(int)s alacrity:(int)a
NS_SWIFT_NAME(doSomeWorkWithSpeed(speed:levelOfAlacrity:));
// These we are generally trying to not-import, via laziness.
- (void)goForWalk;
- (void)takeNap;
- (void)eatMeal;
- (void)tidyHome;
- (void)callFamily;
- (void)singSong;
- (void)readBook;
- (void)attendLecture;
- (void)writeLetter;
@end
// Don't conform to the protocol; that loads all protocol members.
@interface SimpleDoer
- (instancetype)initWithValue: (int)value;
// These are names we're hoping don't interfere with Doer, above.
+ (SimpleDoer*)Doer;
+ (SimpleDoer*)DoerOfNoWork;
- (void)simplyDoSomeWork;
- (void)simplyDoSomeWorkWithSpeed:(int)s;
- (void)simplyDoSomeWorkWithSpeed:(int)s thoroughness:(int)t
NS_SWIFT_NAME(simplyDoVeryImportantWork(speed:thoroughness:));
- (void)simplyDoSomeWorkWithSpeed:(int)s alacrity:(int)a
NS_SWIFT_NAME(simplyDoSomeWorkWithSpeed(speed:levelOfAlacrity:));
// Make sure that swift_private correctly adds the '__' prefix.
- (void)count __attribute__((swift_private));
- (void)objectForKey:(NSObject *)key __attribute__((swift_private));
// These we are generally trying to not-import, via laziness.
- (void)simplyGoForWalk;
- (void)simplyTakeNap;
- (void)simplyEatMeal;
- (void)simplyTidyHome;
- (void)simplyCallFamily;
- (void)simplySingSong;
- (void)simplyReadBook;
- (void)simplyAttendLecture;
- (void)simplyWriteLetter;
@end
// Don't conform to the protocol; that loads all protocol members.
@interface SimpleDoer (Category)
- (void)categoricallyDoSomeWork;
- (void)categoricallyDoSomeWorkWithSpeed:(int)s;
- (void)categoricallyDoSomeWorkWithSpeed:(int)s thoroughness:(int)t
NS_SWIFT_NAME(categoricallyDoVeryImportantWork(speed:thoroughness:));
- (void)categoricallyDoSomeWorkWithSpeed:(int)s alacrity:(int)a
NS_SWIFT_NAME(categoricallyDoSomeWorkWithSpeed(speed:levelOfAlacrity:));
// These we are generally trying to not-import, via laziness.
- (void)categoricallyGoForWalk;
- (void)categoricallyTakeNap;
- (void)categoricallyEatMeal;
- (void)categoricallyTidyHome;
- (void)categoricallyCallFamily;
- (void)categoricallySingSong;
- (void)categoricallyReadBook;
- (void)categoricallyAttendLecture;
- (void)categoricallyWriteLetter;
@end
@protocol MirroredBase
+ (void)mirroredBaseClassMethod;
- (void)mirroredBaseInstanceMethod;
@end
@protocol MirroredDoer <MirroredBase>
+ (void)mirroredDerivedClassMethod;
- (void)mirroredDerivedInstanceMethod;
@end
@interface MirroringDoer : NSObject<MirroredDoer>
- (void)unobtrusivelyGoForWalk;
- (void)unobtrusivelyTakeNap;
- (void)unobtrusivelyEatMeal;
- (void)unobtrusivelyTidyHome;
- (void)unobtrusivelyCallFamily;
- (void)unobtrusivelySingSong;
- (void)unobtrusivelyReadBook;
- (void)unobtrusivelyAttendLecture;
- (void)unobtrusivelyWriteLetter;
@end
@interface DerivedFromMirroringDoer : MirroringDoer
@end
@interface SimilarlyNamedThings
- (void)doSomething:(double)x;
- (void)doSomething:(double)x celsius:(double)y;
- (void)doSomething:(double)x fahrenheit:(double)y using:(void (^)(void))block;
@end
@interface SimpleDoerSubclass : SimpleDoer
- (void)simplyDoSomeWorkWithSpeed:(int)s thoroughness:(int)t
NS_SWIFT_NAME(simplyDoVeryImportantWork(speed:thoroughness:));
- (void)exuberantlyGoForWalk;
- (void)exuberantlyTakeNap;
- (void)exuberantlyEatMeal;
- (void)exuberantlyTidyHome;
- (void)exuberantlyCallFamily;
- (void)exuberantlySingSong;
- (void)exuberantlyReadBook;
- (void)exuberantlyAttendLecture;
- (void)exuberantlyWriteLetter;
@end
@protocol PrivateMethods <NSObject>
- (void)count;
- (void)objectForKey:(NSObject *)key;
@end
@interface PrivateDoer
- (void)count;
- (void)objectForKey:(NSObject *)key;
@end
@interface PrivateDoer(Category) <PrivateMethods>
@end
typedef NSString * const SimpleDoerMode NS_TYPED_ENUM NS_SWIFT_NAME(SimpleDoer.Mode);
typedef NSString * const SimpleDoerKind NS_TYPED_ENUM NS_SWIFT_NAME(SimpleDoer.Kind);
|