⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 command.cpp

📁 设计模式中 命令模式的一个例子 C++编写 有工程文件可直接运行
💻 CPP
字号:
//Command.cpp

#include "2.h"

#include "1.h"

#include <iostream>

Command::Command()
{

}

Command::~Command()
{

}

void Command::Excute()
{

}

ConcreteCommand::ConcreteCommand(Reciever* rev)
{
 this->_rev = rev;
}

ConcreteCommand::~ConcreteCommand()
{
 delete this->_rev;
}

void ConcreteCommand::Excute()
{
 _rev->Action();

 std::cout<<"ConcreteCommand..."<<std::endl;
}

⌨️ 快捷键说明

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