initialize repository of design pattern template

This commit is contained in:
2025-08-09 08:41:14 +08:00
commit 1727e31b9d
32 changed files with 2149 additions and 0 deletions

22
inc/prototype.hpp Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include "common.hpp"
class Prototype // C++ <20><><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊdz<CEAA><C7B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>ģʽΪ<CABD><EFBFBD><EEBFBD>
{
public:
Prototype() {}
~Prototype() {}
virtual Prototype* Clone() = 0;
};
class ConcretePrototype :public Prototype
{
public:
ConcretePrototype() {}
~ConcretePrototype() {}
virtual Prototype* Clone();
private:
ConcretePrototype(const ConcretePrototype&); //
};