设计模式
无风也流
1 最早从事atmel单片机开发,目前从事arm linux开发(安防行业)。
2 开发过的产品。有些产品的具体型号记不清楚了。
a 染整机器,atmel。
b baby monitor(2.4g婴儿监控),stm。
c 智能电表(microchip)+电力集中器(arm atmel + linux)。
d 行车记录仪(lpc1778 + ucos)。
e DVR/NVR + 智能门铃/扫地机/无人机等(安防,hisi/gm/goke芯片)。
3 硬件同事合作接单的产品
a stm32f103rc 一拖八充电器。
b stm32f407vg 跑步机采集+网络传输到PC控制平台(stm端使用嵌入式tcp/ip协议 lwip)。
c 安防类的视频流传输(rtsp/rtp/rtcp)等。
d 未完待续。
展开
-
设计模式之一:简单工厂模式
2014-01-06 22:27:29 本系列以GOF为蓝本,辅之网上有价值的和个人的理解。网上有许多设计模式的例子,本人也看了不少。本着“纸上得来终觉浅,绝知此事要躬行”的原则,自己动手再温习一遍,以期巩固和更深入的理解。在进行这个系列下,找了不少UML工具,最终选定了WhiteStarUML,她是StarUML的后续。各种支持也比较全面,一直有维护,而且是免费的(间隔也会使用Astah原创 2014-01-11 23:27:01 · 912 阅读 · 0 评论 -
设计模式之四:单例模式
2014-01-18 星期六 11:12:42Singleton,继续GOF。1、IntentEnsure a class only has one instance, and provide a global point of access to it.保证一个类仅有一个实例,并提供一个访问它的全局访问点。2、Also Known As3、原创 2014-01-20 21:03:47 · 700 阅读 · 0 评论 -
Command设计模式2
2014-11-07 星期五 22:52:07 接1,先说下typename和class的差异。● 修饰template形参时,两者无差异● 重定义(typedef)或要使用template内部的类型时,在此前面只能用typename来表明template::inherent_type,例如(typename ParentFunctor::ResultType)原创 2014-11-07 22:55:45 · 853 阅读 · 0 评论 -
Command设计模式3
2014-11-18 星期一 20:44:45 接下来对struct TestFunctor的泛化,主要是对返回值的返回。分void和非void1、TestFunctorImpl123456789101112131415原创 2014-11-18 20:57:14 · 607 阅读 · 0 评论 -
Command设计模式1
2014-11-06 星期四 21:54:23 随便记录,本文是loki command模式的简化版本。虽然是简化的,但是泛化的精髓还是原汁原味的。我们在泛化编程时,对模板形参可以用具现的眼光来看待。泛化编程,具现理解。1、代码(.h)12345678910111原创 2014-11-07 22:54:56 · 642 阅读 · 0 评论 -
设计模式之十二:Proxy(代理)—对象结构型模式
2014-05-29 星期四 21:08:37 Proxy,继续GOF。此模式未按GOF编写。c++中使用StringBuilder1、IntentProvide a surrogate or placeholder for another object to control access to it.为其他对象提供一种代理以控制对这个对象的原创 2014-05-31 21:30:58 · 803 阅读 · 0 评论 -
设计模式之十一:Composite(组合)—对象结构型模式
2014-05-28 星期三 21:41:44 Composite,继续GOF。Composite组合模式1、IntentCompose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individu原创 2014-05-31 21:28:30 · 645 阅读 · 0 评论 -
设计模式之十:Prototype(原型)—对象创建型模式
中间因为一些琐事,停更了一段时间,现在补将起来。2014-05-17 星期六 8:21:46 Prototype,继续GOF。可以参考:http://www.codeproject.com/Articles/185348/Prototype-Design-Pattern1、IntentSpecify the kinds of objects to c原创 2014-05-31 21:24:56 · 661 阅读 · 0 评论 -
设计模式之十四:Decorator(装饰)—对象结构型模式
2014-06-15 星期日 10:42:12 Decorator,继续GOF。1、IntentAttach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extendin原创 2014-06-30 21:17:02 · 681 阅读 · 0 评论 -
设计模式之十三:Flyweight(享元)—对象结构型模式
2014-06-15 星期日 9:35:04 Flyweight,继续GOF。1、IntentUse sharing to support large numbers of fine-grained objects efficiently.运用共享技术有效地支持大量细粒度的对象。2、Also Known As3、Motivation原创 2014-06-29 19:53:22 · 774 阅读 · 0 评论 -
设计模式之五:BUILDER(生成器)—对象创建型模式
2014-03-16 星期日 15:26:39 Builder,继续GOF。1、IntentSeparate the construction of a complex object from its representation so that the same construction process can create different representa原创 2014-03-23 11:39:14 · 706 阅读 · 0 评论 -
设计模式之八:Bridge(桥接)—对象结构型模式
22:01:24 星期一 22:01:37 Bridge,继续GOF。博客园 设计模式之八:Bridge(桥接)—对象结构型模式和Stratege模式相比,Bridge可以说是“包含Stratege”。Stratege : 1个物件对应N个实现。仅 实现端(类) 有细分。Bridge : M个物件对应N个实现。抽象端(类) 和 实现端(类) 都有细原创 2014-03-25 21:29:49 · 724 阅读 · 0 评论 -
设计模式之七:Strategy(策略)—对象行为型模式
2014-03-23 星期日 21:19:26 Builder,继续GOF。1、IntentDefine a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clie原创 2014-03-24 21:52:39 · 554 阅读 · 0 评论 -
设计模式之六:工厂模式汇总
2014-03-25 星期日 13:37:34工厂模式汇总。1、工厂模式UML●简单工厂Factory没有子类,Core只有一个父类。●工厂方法Factory有子类,Core只有一个父类,Factory子类和Core子类一一对应。相比于简单工厂模式,细分了Factory。原创 2014-03-23 20:46:28 · 589 阅读 · 0 评论 -
设计模式之二:工厂方法模式
22:31:27 2014-01-11 个人认为GOF中对Factory Method描述的很清楚,所以会大量引用其内容。Factory Method in GOFIntentDefine an interface for creating an object, but let subclasses decide which class to insta原创 2014-01-13 21:10:21 · 679 阅读 · 0 评论 -
设计模式之九:Adapter(适配器)—类对象结构型模式
22:01:24 星期一 22:01:37 Adapter,继续GOF。设计模式之九:Adapter(适配器)—类对象结构型模式1、IntentConvert the interface of a class into another interface clients expect. Adapter lets classes work together tha原创 2014-04-01 20:39:40 · 856 阅读 · 0 评论 -
设计模式之三:抽象工厂模式
2014-01-14 22:21:30 Abstract Factory,继续GOF。1、IntentProvide an interface for creating families of related or dependent objects without specifying their concrete classes.提供一个创建一系列相关或相互依赖原创 2014-01-15 21:30:40 · 638 阅读 · 0 评论 -
Reactor
1.类图不管设计模式,reactor中的Add/Del/Process就是SelectDemultiplexer(此次只关注此多路分发器)中的+ AddHandler_ : FD_SET 把EventHandler::GetHandle()放入select监听集。+ DelHandler_ : FD_CLR+ ProcessHandler : api select检测到rd/w原创 2016-03-13 13:19:39 · 530 阅读 · 0 评论