あるオブジェクトに対してそのオブジェクトを作るクラスを作る事。

製品(Product)と工場(Creator)と呼ぶ事にする。
複数有る場合、製品群と工場群をそれぞれ抽象クラスでまとめておくと便利。

@interface P : NSObject
@end

@interface C : NSObject
+ (P *)create; 
@end


@interface P1 : P
@end

@interface C1 : C
@end


最終更新:2012年02月03日 16:47