forked from huihut/DesignPattern
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (25 loc) · 656 Bytes
/
main.cpp
File metadata and controls
33 lines (25 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Created by xiemenghui on 2018/7/20.
//
#include <iostream>
#include "SingletonPattern/SingletonMain.h"
#include "AbstractFactoryPattern/FactoryMain.h"
#include "AdapterPattern/AdapterMain.h"
#include "BridgePattern/BridgeMain.h"
#include "ObserverPattern/ObserverMain.h"
int main() {
std::cout << "*******************" << std::endl;
std::cout << "** 设计模式例子 **" << std::endl;
std::cout << "*******************" << std::endl;
// 单例模式
SingletonMain();
// 抽象工厂模式
FactoryMain();
// 适配器模式
AdapterMain();
// 桥接模式
BridgeMain();
// 观察者模式
ObserverMain();
return 0;
}