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

面向接口的C++编程技术研究
引用本文:郭新苍,王兴刚.面向接口的C++编程技术研究[J].无线电工程,2009,39(12):55-58.
作者姓名:郭新苍  王兴刚
作者单位:1. 中国电子科技集团公司第五十四研究所,河北,石家庄,050081
2. 中国石油天然气管道工程有限公司天津分公司,天津,300280
摘    要:结合C++开发工程实践,分析了目前C++开发所面临的问题,包括C++缺少二进制级标准导致的可移植性问题,和C++头文件不能完全隐藏实现部分而导致的封装性问题。分析了目前C++开发的2种通知机制的问题,包括使用虚函数继承实现接收通知导致的不符合常识的问题,以及使用组件类与客户类紧耦合导致的独立性差的问题。针对以上问题,结合目前主流的面向接口的编程技术,给出了在C++下的一种实现。

关 键 词:C++  接口  通知  耦合

Research on Interface-oriented Programming Technology Using C++
GUO Xin-cang,WANG Xing-gang.Research on Interface-oriented Programming Technology Using C++[J].Radio Engineering of China,2009,39(12):55-58.
Authors:GUO Xin-cang  WANG Xing-gang
Affiliation:GUO Xin-cang, WANG Xing-gang (1. The 54th Research Institute of CETC, Shijiazhuang Hebei 050081, China; 2. China Petroleum Pipeline Engineering Corporation Tianjin Branch, Tianjin 300280, China )
Abstract:Based on the programming practices of C + + development, the article analyzes the problems in C + + development, including the portability problem because of the absence of binary level standard, and encapsulation problem because the C ++ header file cannot hide implementation part entirely. Then it analyzes two notification mechanism problems in C ++ development, including the common sense violation problem caused by using virtual function inheritance to receive notification, and inter-dependence problem caused by tight coupling of component class and it's client class. Finally, the paper presents an interface-oriented programming implementation in C ++ to solve these problems.
Keywords:C++
本文献已被 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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