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

关于网站建设的请示范文wordpress 副标题怎么加分类

关于网站建设的请示范文,wordpress 副标题怎么加分类,新闻头条国内大事,如何做好市场营销《C新经典设计模式》之第8章 外观模式 外观模式.cpp 外观模式.cpp #include iostream #include memory using namespace std;// 中间层角色#xff0c;隔离接口#xff0c;两部分模块通过中间层打交道 // 提供简单接口#xff0c;不与底层直接打交道 // 提… 《C新经典设计模式》之第8章 外观模式 外观模式.cpp 外观模式.cpp #include iostream #include memory using namespace std;// 中间层角色隔离接口两部分模块通过中间层打交道 // 提供简单接口不与底层直接打交道 // 提供统一接口访问子系统中的一群接口 // 定义高层接口让子系统更容易使用// 迪米特法则 // 一个对象对其他对象的了解应尽可能少降低对象间耦合提高系统的可维护性namespace ns1 {class graphic // 图形相关类{graphic(){};graphic(const graphic tmpobj);graphic operator(const graphic tmpobj);~graphic(){};public:static graphic getInstance(){static graphic instance;return instance;}public:void display(bool enable) // 是否全屏显示(true是){cout full screen- enable endl;}void effect(bool enable) // 是否开启特效(true是){cout special effects- enable endl;}void resolution(int index) // 设置窗口分辨率{cout resolution ratio- index endl;}void antialiasing(bool enable) // 是否开启抗锯齿(true是){cout anti-aliasing- enable endl;}};class sound // 声音相关类{sound(){};sound(const sound tmpobj);sound operator(const sound tmpobj);~sound(){};public:static sound getInstance(){static sound instance;return instance;}public:void bgsound(bool enable) // 是否开启背景声音(true是){cout background sound- enable endl;}void envirsound(bool enable) // 是否开启环境音效(true是){cout environmental sound effect- enable endl;}void expsound(bool enable) // 是否开启表情声音(true是){cout expressional voice- enable endl;}void setvolume(int level) // 音量大小设置(0-100){cout volume- level endl;}};class chatvoice // 语音聊天相关类{chatvoice(){};chatvoice(const chatvoice tmpobj);chatvoice operator(const chatvoice tmpobj);~chatvoice(){};public:static chatvoice getInstance(){static chatvoice instance;return instance;}public:void micvolume(int level) // 麦克风音量大小设置(0-100){cout microphone volume- level endl;}void micsens(int level) // 麦克灵敏度设置(0-100){cout microphone sensitivity- level endl;}void chatvolume(int level) // 聊天音量设置(0-100){cout chat volume- level endl;}};class conffacade // 扮演外观模式角色的类{conffacade(){};conffacade(const conffacade tmpobj);conffacade operator(const conffacade tmpobj);~conffacade(){};public:static conffacade getInstance(){static conffacade instance;return instance;}public:void LowConfComputer() // 对于低配置电脑只开启一些低配置选项{graphic g_gp graphic::getInstance();g_gp.display(true); // 全屏耗费资源更低g_gp.effect(false);g_gp.resolution(2);g_gp.antialiasing(false);sound g_snd sound::getInstance();g_snd.bgsound(false);g_snd.envirsound(false);g_snd.expsound(false);g_snd.setvolume(15);chatvoice g_cv chatvoice::getInstance();g_cv.micvolume(20);g_cv.micsens(50);g_cv.chatvolume(60);}void HighConfComputer() // 对于高配置电脑能达到最好效果的项全部开启{graphic g_gp graphic::getInstance();g_gp.display(false);g_gp.effect(true);g_gp.resolution(0);g_gp.antialiasing(true);sound g_snd sound::getInstance();g_snd.bgsound(true);g_snd.envirsound(true);g_snd.expsound(true);g_snd.setvolume(50);chatvoice g_cv chatvoice::getInstance();g_cv.micvolume(100);g_cv.micsens(100);g_cv.chatvolume(100);}}; }namespace ns2 {class Screen // 屏幕{public:void On() { cout screen on! endl; }void Off() { cout screen off! endl; }};class Light // 灯光{public:void On() { cout light open! endl; }void Off() { cout light close! endl; }};class Speaker // 音箱{public:void On() { cout speaker on! endl; }void Off() { cout speaker off! endl; }};class DvdPlayer // DVD播放器{public:void On() { cout dvd open! endl; }void Off() { cout dvd close! endl; }};class PlayerStation // 游戏机{public:void On() { cout playerstation on! endl; }void Off() { cout playerstation off! endl; }};class HomeTheaterFacade // 家庭影院外观模式类{Screen scnobj;Light lgobj;Speaker spkobj;DvdPlayer dpobj;PlayerStation psobj;public:void WatchMovie() // 看电影{// 屏幕打开灯光熄灭音箱打开DVD播放器打开游戏机关闭。scnobj.On();lgobj.Off();spkobj.On();dpobj.On();psobj.Off();}void PlayGame() // 玩游戏{// 屏幕打开灯光打开音箱打开DVD播放器关闭游戏机打开。scnobj.On();lgobj.On();spkobj.On();dpobj.Off();psobj.On();}}; }namespace ns3 {class Shape{public:virtual ~Shape() default;virtual void draw() const 0;};class Rectangle : public Shape{public:void draw() const override { cout Rectangle::draw() endl; }};class Square : public Shape{public:void draw() const override { cout Square::draw() endl; }};class Circle : public Shape{public:void draw() const override { cout Circle::draw() endl; }};class ShapeMaker{shared_ptrShape circle;shared_ptrShape rectangle;shared_ptrShape square;public:ShapeMaker(){circle make_sharedCircle();rectangle make_sharedRectangle();square make_sharedSquare();}void drawCircle() const { circle-draw(); }void drawRectangle() const { rectangle-draw(); }void drawSquare() const { square-draw(); }}; }int main() { #if 0using namespace ns1;graphic g_gp graphic::getInstance();g_gp.display(false);g_gp.effect(true);g_gp.resolution(2);g_gp.antialiasing(false);cout --------------- endl;sound g_snd sound::getInstance();g_snd.setvolume(80);g_snd.envirsound(true);g_snd.bgsound(false);cout --------------- endl;chatvoice g_cv chatvoice::getInstance();g_cv.chatvolume(70);g_cv.micsens(65); #endif#if 0using namespace ns1;conffacade g_cffde conffacade::getInstance();cout Low-configuration computer endl;g_cffde.LowConfComputer();cout ------------------ endl;cout high-configuration computer endl;g_cffde.HighConfComputer(); #endif#if 0ns2::HomeTheaterFacade htfacobj;cout movie--------------- endl;htfacobj.WatchMovie();cout game--------------- endl;htfacobj.PlayGame(); #endif#if 1using namespace ns3;shared_ptrShapeMaker shapeMaker(new ShapeMaker());shapeMaker-drawCircle();shapeMaker-drawRectangle();shapeMaker-drawSquare(); #endifcout Over!\n;return 0; }
http://www.pierceye.com/news/770092/

相关文章:

  • 多语言企业网站建设费用怎么自己做购物网站
  • 中国网站排名前100线上网站开发相关书籍
  • 网站制作图书网站建设指南
  • 网站备案简单吗优化关键词排名软件
  • 泉山网站开发安徽建设工程造价信息网
  • 如何使用电子商务网站做seo需要用到什么软件
  • 新乡商城网站建设哪家专业潮汕学院网站开发
  • 西安响应式网站开发网站空间多少钱一年
  • 做电子相册的大网站怎样提高网站的权重
  • seo网站设计外包去哪个网站有客户找做标书的
  • 微商招商网站源码互联网营销推广方案
  • 深圳做网站服务公司河北石家庄最新新闻
  • 山东济南seo整站优化唐山网站建设那家性价比高
  • c 可以做哪些网站小说网站建设采集
  • 公司网站备案条件高校网站集群平台子站开发
  • 制作网站能赚钱吗单位发购物或电影卡有哪些app
  • 我们网站在那里登陆后台系统管理网站建设服务咨询
  • 免费上传图片的网址网站seo工作内容
  • chatgpt 网站一对一直播软件开发
  • 网站做排行多少费用个人电脑做网站打不开数据库
  • 做网站是比特币的滁州做网站电话号码
  • php网站开发说明怎么样建网站卖东西
  • 网站图片做多大浙江建设人才网
  • 网站关键词宝塔wordpress腾讯云
  • 优化排名推广教程网站免费房地产网站模板
  • 商城网站建设都需要多少钱电子商务网站建设预算
  • 万荣做网站怎么优化一个网站关键词
  • 潍坊市建设局网站网络工程师 网站建设
  • 做网站要求什么条件计算机网络技术学什么
  • 建设网站呼叫中心有什么好处中国能源建设集团有限公司级别