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
        • 实时光线追踪
        • 实时全局光照
        • 实时抗锯齿与超采样
        • 实时渲染中的工业界技术
        • 实时环境光照
        • 实时阴影
        • 实时高质量着色
    • 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

6 Summary

创建型模式提供了创建对象的机制,能够提升已有代码的灵活性和可复用性。 通过对象创建模式,绕开new,以避免紧耦合,支持对象创建的稳定。 ...
2025-08-10 Programing > Design Pattern > 1 Creational

5 Singleton

单例模式: 保证系统中只存在一个实例。 解决对象的性能问题。 class Singleton {public: static Singleton* GetInstance(); static Singleton* m_Instance;private: Singleton(); Singleton( const Singleton& singleton );};// 线 ...
2025-08-10 Programing > Design Pattern > 1 Creational

4 Prototype

原型模式: 使用原型实例指定要创建对象的种类,并通过拷贝这些原型创建新的对象。对象的状态变化剧烈/创建复杂,需要记忆对象的状态。(对象池思想) class Abstract { virtual Abstract* Clone() { // 需要用 深拷贝 return new Abstract(*this); }; virtual ~Abstract() ...
2025-08-10 Programing > Design Pattern > 1 Creational

3 Builder

构建器模式: 一个复杂对象的一部分变化剧烈,一部分相对稳定。将一个复杂对象的构建与其 表示 相分离,使得同样的构建过程(稳定)可以创建不同的表示(变化)。 (可调用子类虚函数的初始化函数) class Abstract { Abstract(){}; // 其实就是 模板方法,然后新建一个 初始化函数,以完成构造流程。 // 绕开构造函数无法调用虚函数的限制。 // ...
2025-08-10 Programing > Design Pattern > 1 Creational

2 Abstract Factory

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

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 Creational

自动关联目录:1 Creational ...
2025-08-10 Programing > Design Pattern > 1 Creational
©2024-2025 Davids 总访问量 总访客数
Theme Node-Tree Powered by Hexo