利用虚函数实现鼠标、键盘事件的模块化  

Using Virtual Function to Realize Modulation of Mouse and Keyboard Events

在线阅读下载全文

作  者:王建军[1] 黄晓萍[1] 

机构地区:[1]中国地质大学,武汉430074

出  处:《电脑开发与应用》2006年第5期36-37,共2页Computer Development & Applications

摘  要:虚函数是C++中实现多态性的一个重要机制,常常使用它在父类中对某种操作提供一个框架,而在不同的子类中为该框架提供不同的实现,据此特点,介绍了目前图形图像处理软件中常用的一种鼠标键盘事件的新的封装机制。该机制以面向对象的多态性及技术基础,可实现鼠标键盘事件的模块化和不同功能间的自动切换。Virt.ual 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.

关 键 词:虚函数 多态性机制 模块化 消息映射 VC++ 

分 类 号:O174.6[理学—数学] O141.4[理学—基础数学]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象