Adapter模式AS2实现
来源:互联网 发布:网络的发展史 编辑:程序博客网 时间:2024/04/29 03:41
记得riacn有一段时间经常有人贴23种gof设计模式的代码,其实在很早以前,偶就已经把这23种基本模式还有其它的模式如MVC等,用Actionscript写了一遍,嘿嘿.还有thor的一些扩展数组类的与数据结构有关的东东,偶去年九月flash2004刚出来的时候,就写过一个Collection Framework了.慢慢放出一些吧.
// "Adaptee"class Adaptee{ // Methods public function SpecificRequest():Void { trace("Called SpecificRequest()"); }}// "Adapter"class Adapter extends Target{ // Fields private var adaptee:Adaptee; public function Adapter() { adaptee = new Adaptee(); } // Methods public function Request():Void { // Possibly do some data manipulation // and then call SpecificRequest adaptee.SpecificRequest(); }}
class Target{ // Methods public function Request():Void { // Normal implementation goes here }}
//client.flavar t:Target = new Adapter();t.Request();
//output://Called SpecificRequest()
- Adapter模式AS2实现
- C++实现Adapter模式
- Adapter模式C++实现
- python实现Adapter模式
- C++实现Structural - Adapter模式
- 对象的adapter模式实现
- Java 实现适配器(Adapter)模式
- 链表AS2实现
- DFT的AS2实现
- C++设计模式实现--适配器(Adapter)模式
- as2
- 设计模式adapter的C++实现源码
- PHP 实现适配器(Adapter)模式
- 设计模式实现(六): Adapter Pattern
- PHP 实现适配器(Adapter)模式
- Adapter模式实现RCP的property视图
- Adapter 模式 - Object Adapter
- Adapter 模式 - Class Adapter
- 把青春偷走,喂狗!
- 我的.Net童话 五
- WebServices简单例子
- 我所见过最牛X的回复
- Project server 的安装
- Adapter模式AS2实现
- 桜的歌词翻译
- FactoryMethod
- BBS 设计思路系列 ---- 帖子的挑选机制
- Observer模式
- ANTLR, ANother Tool for Language Recognition,
- 【新手必读】JAVA入门及FAQ(转自chinajavaworld)
- Command模式
- 《Microsoft .NET框架程序设计(修订版)》