...生类时将基类的继承方式指定为protected的,称为保护继承,用保护继承方式建立的派生类称为保护派生类(protected derived class),其基类称为受保护的基类(protected base class),简称保护基类。
基于28个网页-相关网页
在某些情况下,通过限制对类及其派生类的访问权,可以将数据声明为“受保护的”。
In some cases, data can be declared as "protected," with access limited to the class and its derivatives.
与类的成员严格保护能见度是可见的在类中声明它们,和在任何派生类,无论在声明。
Class members with strict protected visibility are visible within the class in which they are declared, and within any descendent class, regardless of where it is declared.
如果显式实现的成员的功能意在由派生类特殊化,则一定要提供具有相同功能的受保护虚拟成员。
Do provide a protected virtual member that offers the same functionality as the explicitly implemented member if the functionality is meant to be specialized by derived classes.
应用推荐