半导体 发表于 2025-3-23 10:40:22

BuilderThe Builder pattern is concerned with the creation of . objects, that is, objects that cannot be built up in a single-line constructor call. These types of objects may themselves be composed of other objects and might involve less-than-obvious logic, necessitating a separate component specifically dedicated to object construction.

吹牛者 发表于 2025-3-23 17:47:35

http://reply.papertrans.cn/27/2685/268416/268416_12.png

Alcove 发表于 2025-3-23 20:16:40

http://reply.papertrans.cn/27/2685/268416/268416_13.png

OWL 发表于 2025-3-24 00:42:28

CompositeIt’s a fact of life that objects are quite often composed of other objects (or, in other words, they aggregate other objects). Remember, we agreed to equate aggregation and composition at the start of this section of the book.

Radiculopathy 发表于 2025-3-24 04:31:35

http://reply.papertrans.cn/27/2685/268416/268416_15.png

使痛苦 发表于 2025-3-24 10:18:18

http://reply.papertrans.cn/27/2685/268416/268416_16.png

Coordinate 发表于 2025-3-24 14:08:36

FlyweightA Flyweight (also sometimes called a . or a .) is a temporary component that acts as a “smart reference” to something. Typically, flyweights are used in situations where you have a very large number of very similar objects, and you want to minimize the amount of memory that is dedicated to storing all these values.

Expiration 发表于 2025-3-24 15:30:42

ProxyWhen we looked at the Decorator design pattern, we saw the different ways of enhancing the functionality of an object. The Proxy design pattern is similar, but its goal is generally to preserve exactly (or as closely as possible) the API that is being used while offering certain internal ehnancements.

microscopic 发表于 2025-3-24 20:55:49

http://reply.papertrans.cn/27/2685/268416/268416_19.png

远地点 发表于 2025-3-25 00:41:49

IteratorAn iterator is, quite simply, an object that can point to an element of a collection and also knows how to move to the next element in the collection. As such, it is only required to implement the . operator and the . operator (so you can compare two iterators and check if they point to the same thing). That’s it.
页: 1 [2] 3 4 5 6
查看完整版本: Titlebook: Design Patterns in Modern C++; Reusable Approaches Dmitri Nesteruk Book 20181st edition Dmitri Nesteruk 2018 C++.C plus plus.Cpp.design.pa