【C++】Breaking Dependencies: Type Erasure - A Design Analysis - Klaus Iglberger - CppCon 2021 - 知识点目录

Breaking Dependencies: Type Erasure - A Design Analysis - Klaus Iglberger - CppCon 2021

Contents

  • The Challenge of Software Design
  • The Naive Solution: Inheritance
  • The Classic Solution: Design Patterns
  • The Modern Solution: Type Erasure

1. The Challenge of Software Design

[2:16] - 软件开发问题的根源:变化
[2:42] - “The truth in our industry: Software must be adaptable to frequent changes”

2. Our Toy Problem: Shapes

Klaus Iglberger在讲座中使用了形状(常用于游戏开发),作为讲解 Type Erasure 的任务示例;常见的图形有:圆形、矩形和三角形等等;

3. Type Erasure 用到的设计模式

  • Bridge Pattern:桥接模式
  • Prototype Pattern:原型模式

4. UML类图讲解

[42:13] - 通过UML类图的方式,展示了 Type Erasure 的整体设计;

5. 代码复现(机械革命笔记本上)

代码示例:《Type Erasure 类型擦除》(博文中给出示例代码)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值