首页 > 编程 > C++ > 正文

boolan——c++学习笔记之类关系

2019-11-10 17:30:25
字体:
来源:转载
供稿:网友
类的的三种关系:1)继承(inheritance)2)复合(composition)3)委托(delegation)

1)继承(inheritance)

1、继承关系表现

2、继承关系的构造和析构

2)复合(composition)

1、复合关系表现及应用场景(adapter)

2、复合的构造和析构

3)委托(delegation)

1、委托关系表现,引用计数,写拷贝。

(继承(inheritance)+委托(delegation))应用:

1、设计模式——composite

2、设计模式——PRototype


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选