prototype.cpp

来自「设计模式全部演示代码,都可以编译通过,通过这些例子,在研究c++下的设计模式,特」· C++ 代码 · 共 33 行

CPP
33
字号
//Prototype.cpp
#include "Prototype.h" 
#include <iostream> 
using namespace std;

Prototype::Prototype() 
{
}
Prototype::~Prototype() 
{
}
Prototype* Prototype::Clone() const 
{ 
	return 0; 
}

ConcretePrototype::ConcretePrototype() 
{
}

ConcretePrototype::~ConcretePrototype()
{
}

ConcretePrototype::ConcretePrototype(const ConcretePrototype& cp) 
{ 
	cout<<"ConcretePrototype copy ..."<<endl; 
}

Prototype* ConcretePrototype::Clone() const 
{
	return new ConcretePrototype(*this); 
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?