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

利用虚函数实现鼠标、键盘事件的模块化
引用本文:王建军,黄晓萍.利用虚函数实现鼠标、键盘事件的模块化[J].电脑开发与应用,2006,19(5):36-37.
作者姓名:王建军  黄晓萍
作者单位:中国地质大学,武汉,430074;中国地质大学,武汉,430074
摘    要:虚函数是C++中实现多态性的一个重要机制,常常使用它在父类中对某种操作提供一个框架,而在不同的子类中为该框架提供不同的实现,据此特点,介绍了目前图形图像处理软件中常用的一种鼠标键盘事件的新的封装机制。该机制以面向对象的多态性及技术基础,可实现鼠标键盘事件的模块化和不同功能间的自动切换。

关 键 词:虚函数  多态性机制  模块化  消息映射  VC++
文章编号:1003-5850(2006)05-0036-02
收稿时间:2005-11-17
修稿时间:2006-03-17

Using Virtual Function to Realize Modulation of Mouse and Keyboard Events
Wang JianJun;Huang XiaoPing.Using Virtual Function to Realize Modulation of Mouse and Keyboard Events[J].Computer Development & Applications,2006,19(5):36-37.
Authors:Wang JianJun;Huang XiaoPing
Abstract:Virtual function is one of the important facilities to support polymorphism in C++,normally the virtual function mechanism is used to provide the frame and the declaration of public methods of some operations for the parent or base class,then the implementation details of the operation would been given in the derived classes individually.With this characteristic,this paper presents a new packaging mechanism which could modulate mouse and keyboard events in graphic and image processing software.On the basis of object-oriented polymorphism technique,the mechanism also can realize automatization of mouse and keyboard and automatic exchange among different events.
Keywords:VC
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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