mirror of
https://github.com/huihut/interview.git
synced 2024-03-22 13:10:48 +08:00
commit
8fe5157ae3
|
@ -11,33 +11,32 @@
|
|||
|
||||
int main() {
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 设计模式例子 **" << std::endl;
|
||||
std::cout << "** Design pattern example **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 单例模式 **" << std::endl;
|
||||
std::cout << "** Singleton mode **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
SingletonMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 抽象工厂模式 **" << std::endl;
|
||||
std::cout << "** Abstract factory pattern **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
FactoryMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 适配器模式 **" << std::endl;
|
||||
std::cout << "** Adapter mode **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
AdapterMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 桥接模式 **" << std::endl;
|
||||
std::cout << "** Bridge mode **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
BridgeMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 观察者模式 **" << std::endl;
|
||||
std::cout << "** Observer mode **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
ObserverMain();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user