首页 | 本学科首页   官方微博 | 高级检索  
     

一种类属编程方法的应用及分析
引用本文:吕智源,王平涛,杨献春,许满武.一种类属编程方法的应用及分析[J].计算机应用研究,2005,22(10):209-212.
作者姓名:吕智源  王平涛  杨献春  许满武
作者单位:南京大学,软件新技术国家重点实验室,计算机科学与技术系,江苏,南京,210093;南京大学,软件新技术国家重点实验室,计算机科学与技术系,江苏,南京,210093;南京大学,软件新技术国家重点实验室,计算机科学与技术系,江苏,南京,210093;南京大学,软件新技术国家重点实验室,计算机科学与技术系,江苏,南京,210093
基金项目:国家自然科学资金资助项目(60273035);国家高技术研究发展计划资助项目(2001AA113161)
摘    要:传统以C++实现的面向对象的软件系统中,类接口往往以虚拟基类与虚拟函数定义。然而随着软件更新速度的加快,这种方法难以使接口兼顾效率与兼容性。实现一种Policiesbased的设计,以类属组件的形式实现类接口,使其具有按需定制的特点,从而具有更大的复用性。经理论分析和模拟实验证明,这种方法表现优于虚拟函数机制。

关 键 词:面向对象  类属编程  Policies-based  设计模式
文章编号:1001-3695(2005)10-0209-04
收稿时间:2004-10-10
修稿时间:2004-10-102004-11-25

Application and Analysis of a Kind of Generic Programming
LV Zhi-yuan,WANG Ping-tao,YANG Xian-chun,XU Man-wu.Application and Analysis of a Kind of Generic Programming[J].Application Research of Computers,2005,22(10):209-212.
Authors:LV Zhi-yuan  WANG Ping-tao  YANG Xian-chun  XU Man-wu
Affiliation:(State Key Laboratory for Novel Software Technology, Dept. of Computer Science & Technology, Nanjing University, Nanjing Jiangsu 210093, China)
Abstract:In an OO software system implemented in (C++) language, class interfaces are usually defined by virtual base class and virtual functions. However, with the acceleration of software renewal,this technique is difficult to satisfied both efficiency and compatibility. A policies-based design is introduced, the class interface with generic components and the class interface according to need is defined and the class interface reuse becomes much easier. Analysis and experimental results show that the performance of polices-based implementation method is superior to virtual function mechanism.
Keywords:Object-Oriented(OO)  Generic Programming  Policies-based  Design Pattern
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机应用研究》浏览原始摘要信息
点击此处可从《计算机应用研究》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号