logo 有点笨有点猪
  • 关于
  • Base Knowledge
    • Artificial Intelligence
      • Generative AI
      • Reinforcement Learning
    • Compilation Principle
      • 1 Overview
      • 2 Lexical Analysis
      • 3 Syntax Analysis
      • 4 Syntax-Directed Translation
      • 5 Intermediate Code Generation
    • Computer Graphics
      • Animation
        • 刚体
        • 柔体
        • 流体
        • 质点-弹簧系统
      • Geometry
      • Rendering
        • Games101
        • Games102
        • 实时光线追踪
        • 实时全局光照
        • 实时抗锯齿与超采样
        • 实时渲染中的工业界技术
        • 实时环境光照
        • 实时阴影
        • 实时高质量着色
    • Computer Network
      • 1 Overview
      • 2 Application Layer
      • 3 Transport Layer
      • 4 Network Layer
      • 5 Link Layer
    • Computer Organization
    • Data Structures & Algorithm
      • Basic Algorithm
        • Binary Lifting
        • Binary Search
        • Enumerate
        • Greedy
        • Recursion & Divide and Conquer
        • Sort
        • 前缀和 & 差分
      • Dynamic Programming
        • 动态规划
      • Graph
        • Traverse
      • Hash
      • Linear
      • Misc
      • String
      • Tree
        • Traverse
    • Operating system
      • 1 Overview
      • 2 并发
      • 3 虚拟化
      • 4 内核
      • 5 持久化
    • Z Reference Link
  • Programing
    • C&C++
      • C++对象模型
      • 实现双端队列
    • C#
    • Code Style
    • Cuda
    • Design Pattern
      • 1 Creational
        • 1 Factory Method 工厂方法
        • 2 Abstract Factory
        • 3 Builder
        • 4 Prototype
        • 5 Singleton
        • 6 Summary
      • 2 Structural
        • 1 Adapter
        • 2 Bridge
        • 3 Composite
        • 4 Decorator
        • 5 Facade
        • 6 Flyweight
        • 7 Proxy
        • 8 Summary
      • 3 Behavioral
        • 1 Chain of Responsibility
        • 10 Visitor
        • 11 Interpreter
        • 12 Summary
        • 2 Command
        • 3 Iterator
        • 4 Mediator
        • 5 Memento
        • 6 Observer
        • 7 State
        • 8 Strategy
        • 9 Template Method
    • Lua
      • 1 Overview
      • 2 Lua 5.x精要总结
      • 3 Lua GC
      • 4 Lua 虚拟机
      • 5 Lua 面向对象
    • Python
      • 1 Overview
    • Rust
      • 1 基础
    • Shell
      • 1 Overview
    • TypeScript
      • 1 Overview
    • Z Reference Link
  • Unreal Engine
    • AI
      • BehaviorTree
      • EnvironmentQuery
      • NavMesh
    • Animation
      • 动画状态机
    • Asset&Pak&Patch
    • Core
      • UObject
    • Debug
    • Editor Extension
    • GamePlay
      • Framwork
        • AGameModeBase
        • AGameStateBase
      • Game Ability System
        • AGameplayCueNotify_Actor
        • FGameplayTag
        • UAbilitySystemComponent
        • UAbilityTask
        • UAttributeSet
        • UGameplayAbility
        • UGameplayEffect
      • Replication
        • Optimization
        • Replication Graph
        • Significance Manager
    • Physics
    • Platform
      • Java Native Interface
      • Unreal Plugin Language
    • Profile
      • UE性能优化工具
      • Unity性能优化方向
    • Rendering
    • Sounds
    • UI
    • UnLua
      • Unlua指南
      • Unlua源码解析
    • Z Reference Link
  • Work Experience
    • Efficiency
      • UE Project Git Pull&Build
    • Security
      • 哈希函数
    • Serialization
      • Json
      • Protobuf
    • Z Reference Link
  • README

2 Abstract Factory

抽象工厂模式: 创建 一系列 相互依赖对象 的接口,而无需指定它们的具体类。工程模式的进阶版,如果一组类具有相互依赖(服务于同一个类型的任务),就把它们合并到同一个工厂进行创建,而不是每个类单独工程创建,以保证他们的相互依赖性。 class AbstractA { virtual void DoSomethingA() = 0; virtual ~Abstract(){ ...
2025-08-10 Programing > Design Pattern > 1 Creational

2 Bridge

桥接模式: 将抽象和实现部分分离,使得他们都可以独立变化。(适应多个维度的变化)使用对象间的组合关系替换继承,抽象和实现可以沿着各自的维度变化(类似于多继承)。(其实就是功能划分,主体类中一部分功能需要变化时,重新建一个实现类进行组合,减少主体类的变化维度) // 主体类class Abstraction {public: // 将变化性强 且 与主体类主要职责不相符的依赖 用组合进行联 ...
2025-08-10 Programing > Design Pattern > 2 Structural

2 Command

命令模式: 行为请求者 与 行为实现者 通常为紧耦合,将一组行为抽象为对象,实现松耦合。(撤销重做、事务)将请求(行为)封装为对象,从而使得可以用不同的请求对客户进行参数化(对请求排队、记录请求日志、支持可撤销的操作)通过使用 Composite 模式,可以将 多个命令 封装成一个 复合对象。与 C++ 函数对象相似:Command : 通过 接口-实现 来定义行为,更严格,但运行时有开销。函数对 ...
2025-08-10 Programing > Design Pattern > 3 Behavioral

1 Factory Method 工厂方法

工厂模式: 定义一个用于创建对象的接口,让子类决定实例化哪一个类,使得一个类的实例化延迟。解耦 new 对类型的依赖。 class Abstract { virtual void DoSomething() = 0; virtual ~Abstract(){}};class AbstractFactory { virtual Abstract* C ...
2025-08-10 Programing > Design Pattern > 1 Creational

1 Adapter

适配器模式: 系统由于应用环境的变化,常常需要将一些 现存对象 放到 新的环境 中使用,但新环境的 接口 常常是现存对象 不满足的 。将一个类的接口转换成客户希望的另一个接口,达到接口兼容。(常在一些 组件升级 中使用) class Abstract {public: virtual void DoNewSomething(); virtual ~Abstract(){ ...
2025-08-10 Programing > Design Pattern > 2 Structural

1 Chain of Responsibility

责任链模式:一个请求可能被多个对象处理,但是每个请求在运行时只能有一个接收者。让接收者在运行时自行决定谁来处理,从而使得解耦。使多个对象都有机会处理请求,将这些对象链起来,并沿着链传递请求,直到有一个对象处理它。 class ChainHandler {private: ChainHandler* m_Next;protected: virtual bool CanHandle( con ...
2025-08-10 Programing > Design Pattern > 3 Behavioral

5 Lua 面向对象

源码local recursionsetmetatablerecursionsetmetatable = function(t, index) local mt = getmetatable(t) if not mt then mt = {} end if not mt.__index then mt.__index = index ...
2025-08-10 Programing > Lua

4 Lua 虚拟机

...
2025-08-10 Programing > Lua

实现双端队列

源码#include <iostream>template<typename ItemType>class Queue{private: struct Node { Node* next; ItemType data; Node() : next(nullptr) {} ...
2025-08-10 Programing > C&C++

3 Lua GC

...
2025-08-10 Programing > Lua
<123456>
©2024-2025 Davids 总访问量 总访客数
Theme Node-Tree Powered by Hexo