Skip to content

Commit 559fc62

Browse files
committed
add readme
add readme
1 parent fb5ca50 commit 559fc62

File tree

3 files changed

+27
-165
lines changed

3 files changed

+27
-165
lines changed

Assembly-CSharp.csproj

Lines changed: 0 additions & 165 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Type Object Pattern 类型对象模式
2+
3+
## Definition
4+
5+
Allow the flexible creation of new “classes” by creating a single class, each instance of which represents a different type of object.
6+
<br>
7+
通过创建一个类来支持新类型的灵活创建,其每个实例都代表一个不同对象类型。
8+
9+
![](https://github.com/QianMo/Unity-Design-Pattern/blob/master/UML_Picture/type-object.png)
10+
两个类,无限的种类
11+
12+
## Participants
13+
14+
The classes and objects participating in this pattern are:
15+
16+
### Product (Page)
17+
* defines the interface of objects the factory method creates
18+
* ConcreteProduct (SkillsPage, EducationPage, ExperiencePage)
19+
* implements the Product interface
20+
21+
### Creator (Document)
22+
* declares the factory method, which returns an object of type Product. Creator may also define a default implementation of the factory method that returns a default ConcreteProduct object.
23+
* may call the factory method to create a Product object.
24+
25+
### ConcreteCreator (Report, Resume)
26+
* overrides the factory method to return an instance of a ConcreteProduct.
27+

UML_Picture/type-object.png

50.5 KB
Loading

0 commit comments

Comments
 (0)