forked from imarvinle/interview-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
43 lines (35 loc) · 1.32 KB
/
main.cpp
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
34
35
36
37
38
39
40
41
42
43
//
// 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;
std::cout << "*******************" << std::endl;
std::cout << "** µ¥Àýģʽ **" << std::endl;
std::cout << "*******************" << std::endl;
SingletonMain();
std::cout << "*******************" << std::endl;
std::cout << "** ³éÏ󹤳§Ä£Ê½ **" << std::endl;
std::cout << "*******************" << std::endl;
FactoryMain();
std::cout << "*******************" << std::endl;
std::cout << "** ÊÊÅäÆ÷ģʽ **" << std::endl;
std::cout << "*******************" << std::endl;
AdapterMain();
std::cout << "*******************" << std::endl;
std::cout << "** ÇŽÓģʽ **" << std::endl;
std::cout << "*******************" << std::endl;
BridgeMain();
std::cout << "*******************" << std::endl;
std::cout << "** ¹Û²ìÕßģʽ **" << std::endl;
std::cout << "*******************" << std::endl;
ObserverMain();
return 0;
}