You can use the factory pattern for this purpose.
为了实现该目的,能够使用工厂模式。
Factory pattern for objects that differ in one member data type?
在一个成员的数据类型不同,对象工厂模式?
The basic thing comes in my mind is either Singleton or Factory Pattern.
基本的事情出现在我的脑海里是单件或工厂模式。
Factory pattern is one of the effective patterns which decouple client and server.
工厂模式是把客户端模块与服务端模块有效解耦的模式之一。
It is called a Factory Pattern since it is responsible for "manufacturing" an object.
它之所以叫工厂模式是因为它由一个对象工厂来负责被调用。
How to set different properties from objects which are returned by the Factory pattern?
如何从这是由工厂模式返回的对象设置不同的属性?
Hopefully this article helped you understand the basics of the abstract factory pattern.
希望这篇文章能帮助你理解抽象工厂模式的基础。
Then, I use the factory method pattern so that the coupling is with the interface.
然后再使用工厂方法模式,这样耦合度就与界面相关联了。
What's the right way to use the Factory method design pattern?
使用工厂方法设计模式的正确方法是什么?
What are disadvantages of Abstract factory design pattern?
抽象工厂模式的缺点是什么?
This is a typical example of the Factory Method Pattern.
这是个典型的Factory方法模式实例。
Now, let us make sense of this definition for the Factory Method pattern.
现在,让我们在这个意义上定义的工厂方法模式。
Now, let us make sense of this definition for the Factory Method pattern.
现在,让我们在这个意义上定义的工厂方法模式。
应用推荐