虚拟函数是C++语言引入的一个很重要的特性,它提供了“动态绑定”机制,正是这一机制使得继承的语义变得相对明晰。对继承体系的使用者而言,此继承体系内部的多样性是“透明的”。它不必关心其继承细节,处理的就是一组对它而言整体行为一致的“对象”。
首先,既然在设计时并不打算让BasicProtocol作为基类被其它类继承,那么它的虚拟函数(virtual function)就是不必要的了,应该被去掉。
基于634个网页-相关网页
虚拟函数表 virtual table ; vtbl ; virtual function table
纯虚拟函数 Pure virtual function
非虚拟函数 non-virtual function ; non-virtual functions
纯虚拟函数的存在 Presence of a Pure Virtual Function
虚拟成员函数 Virtual Member Functions
虚拟函数发生器 virtual function generator
虚拟函数、虚拟型别 virtual function, virtual class
虚拟构造函数 virtual constructors
COM 指定任何接口都必须遵循一个标准的内存规划,这与 C++ 的虚拟函数表(请参阅 参考资料中的 Rogerson96)相同。
COM specifies that any interface must follow a standard memory layout, which is the same as the C++ virtual function table (see Rogerson96 in Resources).
实验表明,所设计的虚拟函数信号发生器输出信号性能优于普通传统信号源。
The experiment has proven that the signal performance generated by virtual function signal generator surpasses ordinary traditional instrument.
然后就可以使用这个返回的指针来配置这个虚拟文件的其他参数,例如在对该文件执行读操作时应该调用的函数。
You can then use the return pointer to configure other aspects of the virtual file, such as the function to call when a read is performed on the file.
应用推荐