mirror of
https://github.com/huihut/interview.git
synced 2024-03-22 13:10:48 +08:00
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
//
|
|
// 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;
|
|
} |