由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Is "Singleton" design pattern a type of "Factory method" de
相关主题
factory and abstract factory 的区别C++ linking 弱问 (one file)
C++做题,麻烦师傅们再看看。C++ template problem
请教template和factory有啥区别?tempalte as the overloaded conversion operator
工厂模式 (转载)recursive template?
sgi stl 源代码一问如何 initialize array member?
template class instantiation问题一个关于C++ template和overload的问题
interview questionscompile error
问个先后的问题C++ online Test 2题
相关话题的讨论汇总
话题: method话题: factory话题: singleton话题: pattern话题: type
进入Programming版参与讨论
1 (共1页)
s*i
发帖数: 31
1
A factory method is a method that instantiates an object and returns it. And in a singleton, it must have such a factory method.
So can I say that Singleton pattern is an example of a factory method pattern?
Another example of factory method pattern is of course to return different subclasses of the method's return type.
r**u
发帖数: 130
2
why bother playing with this "words"? they are for different purposes. It
makes no sense to call a Singleton pattern as a Factory pattern.
g****g
发帖数: 310
3
o
1 (共1页)
进入Programming版参与讨论
相关主题
C++ online Test 2题sgi stl 源代码一问
模板对象能不能作为成员变量使用template class instantiation问题
C++ Q 103-105 (转载)interview questions
非虚函数里调用虚函数无效?问个先后的问题
factory and abstract factory 的区别C++ linking 弱问 (one file)
C++做题,麻烦师傅们再看看。C++ template problem
请教template和factory有啥区别?tempalte as the overloaded conversion operator
工厂模式 (转载)recursive template?
相关话题的讨论汇总
话题: method话题: factory话题: singleton话题: pattern话题: type