The Abstract Factory
Conjure families of related objects through dynamic message passing.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Subschool: NeXTSTEP Runes
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// OBJC PATTERN //
@protocol TKSpell <NSObject>
- (void)cast;
@end
@protocol TkWand <NSObject>
- (void)channel;
@end
@protocol TKMagicFactory <NSObject>
- (id<TKSpell>)createSpell;
- (id<TkWand>)createWand;
@end
@interface TKPyromancyFactory : NSObject <TKMagicFactory>
@end
@implementation TKPyromancyFactory
- (id<TKSpell>)createSpell { return nil; }
- (id<TkWand>)createWand { return nil; }
@end
The Abstract Factory within the Objective-C runtime uses dynamic message passing to conjure related families of magical constructs.
Runic Tags:
#objc
#neXTSTEP
#abstract-factory
#creational