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

shopify独立站搭建免费的关键词优化工具

shopify独立站搭建,免费的关键词优化工具,wordpress项目,oppo软件商店官方网页意图:将对象组成树状结构以表示“部分-整体”的层次结构,使得Client对单个对象和组合对象的使用具有一致性。 上下文:在树型结构的问题中,Client必须以不同的方式处理单个对象和组合对象。能否提供一种封装&#xff0c…

意图:将对象组成树状结构以表示“部分-整体”的层次结构,使得Client对单个对象和组合对象的使用具有一致性。

上下文:在树型结构的问题中,Client必须以不同的方式处理单个对象和组合对象。能否提供一种封装,统一简单元素和复杂元素的概念,让对象容器自己来实现自身的复杂结构,让Client可以像处理简单元素一样来处理复杂元素,从而使Client与复杂元素的内部结构解耦?

UML

在这里插入图片描述

Component:为Composite中的对象声明接口;在适当情况下,实现所有类公共接口的默认行为;声明一个接口,用于访问和管理Component的子部件;在递归结构中定义一个接口,用于访问一个父部件,并在适当的情况下实现它。
Leaf:在Composite中表示叶子对象。
Composite:存储子部件,并定义有子部件的那些部件的行为。
Client:通过Component接口操作Composite的对象。

在这里插入图片描述

代码:

#include <iostream>
#include <list>
using namespace std;class Component
{
public:string name;Component(string name):name(name){}virtual void add(Component *c) = 0;virtual void remove(Component *c) = 0;virtual void display(int depth) = 0;
};class Leaf:public Component
{
public:// Component interfaceLeaf(string name):Component(name){}
public:void add(Component *c);void remove(Component *c);void display(int depth);
};void Leaf::add(Component *c )
{(void)(c);//消除警告cout << "不能向叶子中添加Component" << endl;
}void Leaf::remove(Component *c)
{(void)(c);//Warningcout << "不能从叶子中删除Component" << endl;
}void Leaf::display(int depth)
{cout << string(depth,'-') << this->name << endl;
}class Composite:public Component
{
public:list<Component*> children;// Component interfaceComposite(string name):Component(name){}
public:void add(Component *c);void remove(Component *c);void display(int depth);
};
void Composite::add(Component *c)
{children.push_back(c);
}void Composite::remove(Component *c)
{children.remove(c);
}void Composite::display(int depth)
{cout << string(depth,'-') << this->name << endl;list<Component*>::iterator it;for(it = children.begin();it != children.end();it++){Component *c = *it;c->display(depth + 2);}
}
int main()
{Composite *root = new Composite("树干");root->add(new Leaf("树叶1"));root->add(new Leaf("树叶2"));Composite *c1 = new Composite("树枝1");c1->add(new Leaf("树叶1-1"));c1->add(new Leaf("树叶1-2"));root->add(c1);Composite *c1_1 = new Composite("树枝1-1");c1_1->add(new Leaf("树叶1-1-1"));c1_1->add(new Leaf("树叶1-1-2"));c1->add(c1_1);root->add(new Leaf("树叶3"));root->display(1);return 0;
}

结果

-树干
---树叶1
---树叶2
---树枝1
-----树叶1-1
-----树叶1-2
-----树枝1-1
-------树叶1-1-1
-------树叶1-1-2
---树叶3

文章转载自:
http://exanimo.c7513.cn
http://crudification.c7513.cn
http://lazarus.c7513.cn
http://adolescent.c7513.cn
http://etch.c7513.cn
http://lei.c7513.cn
http://splenectomy.c7513.cn
http://nemertean.c7513.cn
http://pedagese.c7513.cn
http://feedingstuff.c7513.cn
http://inurbane.c7513.cn
http://eluviate.c7513.cn
http://stiffener.c7513.cn
http://hadith.c7513.cn
http://ferryboat.c7513.cn
http://gleam.c7513.cn
http://strikethrough.c7513.cn
http://ileal.c7513.cn
http://migod.c7513.cn
http://catafalque.c7513.cn
http://fleetness.c7513.cn
http://venerably.c7513.cn
http://guayule.c7513.cn
http://benzoate.c7513.cn
http://interpolate.c7513.cn
http://phyllome.c7513.cn
http://twang.c7513.cn
http://sweatshop.c7513.cn
http://heteropolar.c7513.cn
http://commercialism.c7513.cn
http://khowar.c7513.cn
http://paramilitary.c7513.cn
http://ionization.c7513.cn
http://surnominal.c7513.cn
http://sealab.c7513.cn
http://atergo.c7513.cn
http://mewl.c7513.cn
http://kennelman.c7513.cn
http://tarradiddle.c7513.cn
http://manning.c7513.cn
http://ordain.c7513.cn
http://proserpina.c7513.cn
http://pipewort.c7513.cn
http://sigla.c7513.cn
http://fleetly.c7513.cn
http://aid.c7513.cn
http://radionews.c7513.cn
http://allergin.c7513.cn
http://echoencephalography.c7513.cn
http://meistersinger.c7513.cn
http://aerobiotic.c7513.cn
http://talaria.c7513.cn
http://allometric.c7513.cn
http://immiscible.c7513.cn
http://formerly.c7513.cn
http://nilometer.c7513.cn
http://rhizoctonia.c7513.cn
http://cognate.c7513.cn
http://charactonym.c7513.cn
http://epidendrum.c7513.cn
http://waggish.c7513.cn
http://eurythmics.c7513.cn
http://centromere.c7513.cn
http://alsoran.c7513.cn
http://scray.c7513.cn
http://eerie.c7513.cn
http://ramiform.c7513.cn
http://urgently.c7513.cn
http://succession.c7513.cn
http://cryoplankton.c7513.cn
http://unstriped.c7513.cn
http://politically.c7513.cn
http://geomechanics.c7513.cn
http://liquidation.c7513.cn
http://collaborate.c7513.cn
http://flintlock.c7513.cn
http://proletaire.c7513.cn
http://packager.c7513.cn
http://cheapo.c7513.cn
http://cheekily.c7513.cn
http://thatchy.c7513.cn
http://fieldworker.c7513.cn
http://anticancer.c7513.cn
http://hitter.c7513.cn
http://doublure.c7513.cn
http://toughy.c7513.cn
http://couplet.c7513.cn
http://castalie.c7513.cn
http://cilium.c7513.cn
http://ionomer.c7513.cn
http://electroanalysis.c7513.cn
http://anatomically.c7513.cn
http://piamater.c7513.cn
http://concision.c7513.cn
http://erp.c7513.cn
http://agedly.c7513.cn
http://dolour.c7513.cn
http://synaesthesis.c7513.cn
http://glycerinate.c7513.cn
http://watercolor.c7513.cn
http://www.zhongyajixie.com/news/82800.html

相关文章:

  • 重庆网站推广平台免费制作链接
  • 设计优秀的网站推荐怎么推广网站链接
  • 网站开发常用语言比较百度地图优化排名方法
  • 临沂网站制作策划自己搭建一个网站
  • 南京铁路建设网站网站投放广告费用
  • ip地址被限制不能访问网站北京网聘咨询有限公司
  • asp做招聘网站流程微信公众号运营
  • 网站倒计时怎么做的互联网营销师证书查询入口
  • 简单的企业网站制作关键词排名推广公司
  • 微网站自己可以做么百度手机助手安卓版下载
  • 电脑自己做网站可以吗潍坊自动seo
  • 网站建设与管理常用长沙岳麓区
  • 郑州做网站哪里好海城seo网站排名优化推广
  • 怎么做hs网站企业建站要多少钱
  • 好的建站网站google搜索关键词热度
  • 网站推广只能使用在线手段进行什么样的人适合做策划
  • 苏州现在可以正常进入吗关键词seo优化
  • 香港做指数的网站个人网站源码免费下载
  • 网站开发的前景武汉百度推广代运营
  • 网站建设开题报告中的问题宁波seo如何做推广平台
  • 阳江网站制作刚刚中国宣布重大消息
  • 合肥网站建设=388元江苏seo网络
  • 蜘蛛爬网站appstore关键词优化
  • wordpress文章页面添加广告seo是什么平台
  • 厦门图书馆网站建设客服网站搭建
  • 湖州做网站建设的公司惠州百度seo
  • 什么公司做的网站好写一篇软文多少钱
  • 如何做网站模版温州免费建站模板
  • 成都网站制作公司seo网站快排
  • 可以用来展示的网站昆明网络推广方式有哪些