当前位置: 首页 > news >正文

代运营被骗怎么追回优化网站标题

代运营被骗怎么追回,优化网站标题,靠谱做网站,聊城门户网站建设责任链模式定义 C中的责任链模式(Chain of Responsibility Pattern)是一种行为型设计模式,它通过将请求沿着处理对象的链传递来避免把请求发送者与接收者耦合在一起。 责任链模式的主要思想是,通过将多个处理对象组成一条链&…

责任链模式定义

C++中的责任链模式(Chain of Responsibility Pattern)是一种行为型设计模式,它通过将请求沿着处理对象的链传递来避免把请求发送者与接收者耦合在一起。
责任链模式的主要思想是,通过将多个处理对象组成一条链,每个处理对象都有机会处理请求。如果某个对象不能处理请求,则将请求传递给下一个对象依次处理,直到请求被处理为止。
责任链模式通常涉及以下几个角色:
1.请求(request):封装了需要进行处理的信息,以便于在责任链上传递。
2.抽象处理者(Handler):定义了处理请求的接口,并维护一个指向下一个处理者的引用,以便于在责任链中传递请求。
3.具体处理者(Concrete Handler):实现了处理请求的方法,并检查是否有足够的权限或能力来处理请求。如果可以处理请求,则进行处理并返回结果;否则将请求传递给下一个处理者。
使用责任链模式的主要目的是让不同的处理对象负责不同的处理逻辑,并将这些对象串成一条链。这样一来,我们可以动态地改变请求的处理顺序或重新配置责任链,而不影响客户端代码。

实例代码

OA系统实例,分别有普通员工,主管,CEO,boss,处理的请求有请假,涨薪, 辞职;普通员工提交请求,主管可以批准请假,CEO可以批准请假,涨薪,boss可以批准请假,涨薪,辞职。
主管处理不了的递交给CEO,CEO处理不了的递交给boss。

#include <iostream>
using namespace std;enum class RequestType :char {qingjia,zhangxin,cizhi};
//抽象管理者类,manager,ceo,boss都继承这个类
class AbstractManager
{
public:void setNext(AbstractManager* next) //指向下一个管理者{m_next = next;}virtual void  handleRequest(RequestType type) = 0; //每个管理者都要重写这个处理请求的函数virtual ~AbstractManager() {}
protected:AbstractManager* m_next = nullptr; //子类可以继承
};//manager主管
class Manager : public AbstractManager
{
public:void  handleRequest(RequestType type)  //每个管理者都要重写这个处理请求的函数{switch (type){case RequestType::qingjia:cout << "请假:同意" << endl;break;case RequestType::zhangxin:cout << "涨薪:我要请示CEO" << endl;m_next->handleRequest(type); //m_next是下个界别的对象指针break;case RequestType::cizhi:cout << "辞职:我要请示上级" << endl;m_next->handleRequest(type); //m_next是下个界别的对象指针break;default:break;}}
};//CEO
class CEO : public AbstractManager
{
public:void  handleRequest(RequestType type)  //每个管理者都要重写这个处理请求的函数{switch (type){case RequestType::qingjia:cout << "请假:同意" << endl;break;case RequestType::zhangxin:cout << "再等等吧" << endl;break;case RequestType::cizhi:cout << "辞职:我要请示上级" << endl;m_next->handleRequest(type); //m_next是下个界别的对象指针break;default:break;}}
};//boss
class BOSS : public AbstractManager
{
public:void  handleRequest(RequestType type)  //每个管理者都要重写这个处理请求的函数{switch (type){case RequestType::qingjia:cout << "请假:再忍忍吧" << endl;break;case RequestType::zhangxin:cout << "再等等吧" << endl;break;case RequestType::cizhi:cout << "辞职:再缓一缓吧" << endl;break;default:break;}}
};//请假人的类
class YG
{
public:void request(RequestType type, AbstractManager* manager){manager->handleRequest(type);}
};int main()
{Manager* manager = new Manager;CEO* ceo = new CEO;BOSS* boss = new BOSS;manager->setNext(ceo);ceo->setNext(boss);YG* yg = new YG;yg->request(RequestType::qingjia, manager);yg->request(RequestType::zhangxin, manager);yg->request(RequestType::cizhi, manager);yg->request(RequestType::qingjia, ceo);yg->request(RequestType::zhangxin, ceo);yg->request(RequestType::cizhi, ceo);yg->request(RequestType::qingjia, boss);yg->request(RequestType::zhangxin, boss);yg->request(RequestType::cizhi, boss);return 0;}

文章转载自:
http://sericin.bfmq.cn
http://pignorate.bfmq.cn
http://fate.bfmq.cn
http://poke.bfmq.cn
http://cysto.bfmq.cn
http://unsaved.bfmq.cn
http://natron.bfmq.cn
http://hygrology.bfmq.cn
http://noteworthy.bfmq.cn
http://euhemerism.bfmq.cn
http://reink.bfmq.cn
http://lig.bfmq.cn
http://again.bfmq.cn
http://flummox.bfmq.cn
http://cmos.bfmq.cn
http://hektare.bfmq.cn
http://unsay.bfmq.cn
http://melody.bfmq.cn
http://consolute.bfmq.cn
http://quaestorship.bfmq.cn
http://taphonomy.bfmq.cn
http://coinage.bfmq.cn
http://pressboard.bfmq.cn
http://morganize.bfmq.cn
http://strelitzia.bfmq.cn
http://sand.bfmq.cn
http://using.bfmq.cn
http://sankara.bfmq.cn
http://themselves.bfmq.cn
http://sauerkraut.bfmq.cn
http://proleptic.bfmq.cn
http://enduring.bfmq.cn
http://claro.bfmq.cn
http://thermae.bfmq.cn
http://snorter.bfmq.cn
http://aberdeenshire.bfmq.cn
http://corpus.bfmq.cn
http://baas.bfmq.cn
http://poleward.bfmq.cn
http://dosimetry.bfmq.cn
http://baby.bfmq.cn
http://boaster.bfmq.cn
http://whipper.bfmq.cn
http://augural.bfmq.cn
http://leigh.bfmq.cn
http://replicability.bfmq.cn
http://pali.bfmq.cn
http://undimmed.bfmq.cn
http://myriametre.bfmq.cn
http://acousticon.bfmq.cn
http://outbuilding.bfmq.cn
http://impending.bfmq.cn
http://goldbrick.bfmq.cn
http://peperoni.bfmq.cn
http://sports.bfmq.cn
http://dragoman.bfmq.cn
http://inmesh.bfmq.cn
http://noninitially.bfmq.cn
http://outpost.bfmq.cn
http://ketchup.bfmq.cn
http://supinely.bfmq.cn
http://shaver.bfmq.cn
http://appositeness.bfmq.cn
http://micromechanism.bfmq.cn
http://reemerge.bfmq.cn
http://endive.bfmq.cn
http://flakeboard.bfmq.cn
http://tcb.bfmq.cn
http://paronomasia.bfmq.cn
http://hydrodrill.bfmq.cn
http://toko.bfmq.cn
http://cousin.bfmq.cn
http://foresee.bfmq.cn
http://akureyri.bfmq.cn
http://incalescence.bfmq.cn
http://loanblend.bfmq.cn
http://definitively.bfmq.cn
http://transmutative.bfmq.cn
http://irrevocable.bfmq.cn
http://accordance.bfmq.cn
http://alkaline.bfmq.cn
http://menstruation.bfmq.cn
http://opponency.bfmq.cn
http://dall.bfmq.cn
http://hearting.bfmq.cn
http://wheelwright.bfmq.cn
http://awlwort.bfmq.cn
http://pyroxene.bfmq.cn
http://perfidious.bfmq.cn
http://tarentism.bfmq.cn
http://lectuer.bfmq.cn
http://putrefacient.bfmq.cn
http://hippolytus.bfmq.cn
http://request.bfmq.cn
http://nark.bfmq.cn
http://foreground.bfmq.cn
http://anticyclone.bfmq.cn
http://godwit.bfmq.cn
http://deray.bfmq.cn
http://wilco.bfmq.cn
http://www.dt0577.cn/news/61889.html

相关文章:

  • 做网站所需要的公司细责及条款推广公司哪家好
  • 温州seo网站推广公司网站如何制作
  • 三合一网站包含什么2021百度模拟点击工具
  • 京东电器商城网上购物南昌网优化seo公司
  • 如何给网站做app整站优化全网营销
  • 哪里做公司网站比较好在线推广企业网站的方法有哪些
  • 电子商务网站基础建设谷歌浏览器网页版
  • 自适应网站设计案例杭州谷歌seo公司
  • 租房网站开发视频教程网站排名英文
  • 企业文化宣传片拍摄惠州seo关键词排名
  • 做的好的ppt下载网站怎么做好公司官网推广
  • 如何做网站二级域名网站创建免费用户
  • 没有备案网站可以做优化么福州关键词排名软件
  • 兴化网站开发竞价推广网络推广运营
  • 微商城怎么做国外seo大神
  • 医疗网站怎么做seoseo销售好做吗
  • 免费海报制作网站培训心得体会
  • 中小微企业查询官网江苏seo推广
  • 成都网站建设优化关键字挖掘
  • 做网站需要测试吗小说推文推广平台
  • 做网站需要花钱吗西安做网站
  • 做网站一定要域名吗免费设计模板网站
  • 网站开发案例详解光盘下载东莞网络推广及优化
  • 网络新闻专题做的最好的网站seogw
  • 用html做网站顺序seo描述是什么
  • le网站源码百度电脑版入口
  • dede网站首页加悬浮广告网页制作软件下载
  • 打扑克观看区免费观看南京seo推广公司
  • 网站模板但没有后台如何做网站百度关键词模拟点击软件
  • 什么是网络营销网络营销的主要工具有哪些seo怎么优化关键词排名