The code generated for the pure virtual function is shown in Listing 1.
为纯虚函数所生成的代码如列表 1 中所示。
The code generated for the virtual function in a header file is shown in Listing 2.
在头文件中为该虚函数所生成的代码如列表2中所示。
The most important part of the client or server code is the virtual function NotifyReceivedPackage, as described below.
客户端或服务器端最重要的部分是虚函数NotifyReceivedPackage,定义如下。
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).
COM指定任何接口都必须遵循一个标准的内存规划,这与 C++ 的虚拟函数表(请参阅 参考资料中的 Rogerson96)相同。
This effectively hides the virtual function in the base class.
这有效地隐藏了基类中的虚函数。
This function is really a message handler, not a virtual function.
这个函数是一个真正的消息句柄,不是虚函数。
Firstly, you should know what a virtual function is, and how to use it.
首先,你应该知道什么是虚函数,以及如何使用它。
If a virtual function is private, it cannot be accessed by a derived type.
如果某虚函数为私有函数,则派生类型无法访问它。
The derived class inherits more than one override of a virtual function of a virtual base class.
派生类继承虚拟基类的虚函数的多个重写。
However, even a non-virtual function should be tested to ensure that you get the correct results.
但是即便如此,也应测试非虚函数,以确保获得正确的结果。
A class function definition has the same name as a virtual function in a base class but not the same number or type of arguments.
类函数定义与基类中的虚函数同名,但参数的数目或类型不同。
If the function was intended to be a static member function, rename it so it doesn't conflict with the base class virtual function.
如果函数用作静态成员函数,则重命名该函数,以便不与基类虚函数冲突。
The experiment has proven that the signal performance generated by virtual function signal generator surpasses ordinary traditional instrument.
实验表明,所设计的虚拟函数信号发生器输出信号性能优于普通传统信号源。
The virtual management pattern includes virtual production, virtual personnel, virtual function, virtual trademark and strategic Allies as well.
企业虚拟经营模式包括虚拟生产、人员虚拟、功能虚拟、品牌虚拟经营和战略联盟。
Dynamic casts should be used with caution. Whenever possible, it is much better to define and use a virtual function rather than to take over managing the types directly.
使用动态强制类型转换要小心。只要有可能,定义和使用虚函数比直接接管类型管理好得多。
In a base class, abstract class is defined by declaring pure virtual function, a derived class must define all inherited pure virtual functions of its base classes to be concrete.
在基类中可以通过将虚函数声明为纯虚函数的手段来定义抽象类,强制派生类在自己的类定义中实现虚函数的具体功能。
A function in a derived class attempted to override a virtual function in a base class, but the derived class function did not have the same return type as the base class function.
衍生类别中的函式试图覆写基底类别中的虚拟函式,但衍生类别函式没有与基底类别函式相同的传回型别。
Member template functions cannot be virtual functions and cannot override virtual functions from a base class when they are declared with the same name as a base class virtual function.
当使用与基类虚函数相同的名称进行声明时,成员模板函数不能是虚函数并且不能从基类重写虚函数。
Virtual Function is the method to realize dynamic polymorphism.
虚函数是实现动态多态性的方法。
Virtual Function is the method to realize dynamic polymorphism.
虚函数是实现动态多态性的方法。
应用推荐