- 博客(7)
- 收藏
- 关注
原创 创建型设计模式之Prototype
文章目录一、使用意图二、应用场合三、UML图四、组织结构(building blocks)五、特性六、实现注意点七、相关设计模式八、参考资料一、使用意图Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.A ...
2019-05-12 21:21:37
303
原创 创建型设计模式之Builder
文章目录一、使用意图二、UML图三、组织结构(building blocks)四、Client使用时的时序图五、特性六、实现注意点七、相关设计模式八、参考资料一、使用意图Separate the construction of a complex object from its representation so that the same construction process can c...
2019-05-12 20:40:49
459
原创 创建型设计模式之Abstract Factory
文章目录一、使用意图二、UML图三、组织结构(building blocks)四、特性五、实现注意点六、相关设计模式七、参考资料一、使用意图Provide an interface for creating families of related or dependent objects without specifying their concrete classes.二、UML图三、...
2019-05-12 17:10:00
251
原创 创建型设计模式之Factory Method
文章目录一、使用意图二、什么时候使用三、UML图四、组织结构(building blocks)五、特性六、实现注意点七、相关设计模式八、参考资料一、使用意图Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a ...
2019-05-12 16:04:20
200
原创 创建型设计模式之Singleton
文章目录一、使用意图二、实现注意点三、参考资料一、使用意图Ensure a class only has one instance, and provide a global point of access to it.Clients access a Singleton instance solely through Singleton’s Instance operation.二、实现...
2019-05-12 13:53:27
134
翻译 Ubuntu pthread使用指北
pthread_create()#include <pthread.h>int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void*), void *restrict arg);(1)线程一建立就执行start_r...
2019-04-29 21:10:21
1156
翻译 Ubuntu epoll使用指北
本文记录Ubuntu下epoll的使用注意事项。epoll的ET模式。(1)当检测到可读事件后,需要读完buffer中的数据。(2)阻塞读、写会造成饥饿现象,所以当使用ET模式时要设置FD为非阻塞模式The suggested way to use epoll as an edge-triggered (EPOLLET) interface is as follows:i ...
2019-04-29 17:25:23
932
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅