diff --git a/07.AdapterPattern/2.Code/AdapterPattern.h b/07.AdapterPattern/2.Code/AdapterPattern.h index d7d2f31..617af3b 100644 --- a/07.AdapterPattern/2.Code/AdapterPattern.h +++ b/07.AdapterPattern/2.Code/AdapterPattern.h @@ -6,7 +6,7 @@ #include using namespace std; -//Ä¿±ê³éÏóÀà +//Ŀ������� class Controller { public: @@ -16,27 +16,27 @@ public: private: }; -//ÊÊÅäÕßÀàDxfParser +//��������DxfParser class DxfParser { public: DxfParser(){} void parseFile(){ - printf("½âÎöÎļþÌáÈ¡Êý¾Ý\n"); + printf("�����ļ���ȡ����\n"); } }; -//ÊÊÅäÕßÀàPathPlanner +//��������PathPlanner class PathPlanner { public: PathPlanner(){} void calculate(){ - printf("¼ÆËã¼Ó¹¤Â·¾¶\n"); + printf("����ӹ�·��\n"); } }; -//ÊÊÅäÆ÷ÀàAdapter +//��������Adapter class Adapter:public Controller { public: @@ -44,8 +44,14 @@ public: dxfParser = new DxfParser(); pathPlanner = new PathPlanner(); } + ~Adapter(){ + delete dxfParser; + delete pathPlanner; + } + Adapter(const Adapter& other) = delete; + Adapter& operator=(const Adapter& ) = delete; void pathPlanning(){ - printf("·¾¶¹æ»®£º\n"); + printf("·���滮��\n"); dxfParser->parseFile(); pathPlanner->calculate(); }