所有的类都从一个通用的基类继承。
不支持访问从虚拟基类继承的数据字段。
Access to data fields inherited from a virtual base class is not supported.
而有时则是直接从超类继承这一特性。
在类继承关系内移动成员。
我们只需要从这个类继承就可利用类aop的功能。
To leverage AOP-like functionality, we need only inherit from this Class.
这个一个经典的转换例子在类继承和委托到一个接口。
This is a classic example of the tradeoff between concrete inheritance and delegation to an interface.
创建一个从预定义grammar类继承而来的派生类。
Create a derived class inherited from the predefined grammar class.
这种句法决策使您在抽象类继承的实现方面有一定的灵活性。
This syntactical decision gives you a degree of flexibility in the implementation of abstract-class derivatives.
OOAD试图找到最优的对象和最自然的类继承来实现它们。
OOAD attempts to find the optimal set of objects and the most natural class hierarchy to implement them.
Ostrich(鸵鸟)是一种鸟(显然是),并从Bird类继承。
Ostrich is a Bird (definitely it is!) and hence it inherits the Bird class.
所有的通过基类实现的接口是由其派生类继承。不可序列化的。
All interfaces implemented by base classes are inherited by their derived classes. Not just Serializable.
使用这种方法,每个数据实体就既包含属性又包含它所表示的类继承的属性。
With this approach each data entity includes both the attributes and the inherited attributes of the class that it represents.
比如,有一个名为customer表,它可以从名为person类继承。
For example, you might have a table called Customer that inherits from a class called Person.
相反,你只是定义个对象,让它从enumeration类继承。
Instead, you just define an object that extends the Enumeration class.
同时也要注意这个类继承了Expando,因为这个在后面很重要。
Also note that this class extends Expando, as this will be important later.
当这个实现的步骤需要在运行时变化。类继承不能适应这个,代理能。
When the implementation of the steps may need to vary at run time. Concrete inheritance can't accommodate this; delegation can.
操作类继承的抽象类也已被创建以保存所有的操作类实现所需的共同代码。
An abstract class that our Action classes extend has also been created, to hold common code needed for all our Action class implementations.
那个问题是说一个类继承两个其他的类,而那两个类都继承自另外一个类。
That's when a class extends two other classes, both of which extend yet another class.
这稍微的更复杂去实现比用模板方法模式在类继承的版本中,但是也更灵活。
This is slightly more complex to implement than the version using concrete inheritance with the Template Method pattern, but is more flexible.
任何时候你定义一个新类继承自已有的类,这个新类就叫做已有那个类的子类。
Whenever you define a new class as an extension of an existing one, the new class is said to be a subclass of the original.
想要开发这样一个抽象,实现者需要从_ templated类继承,如清单13所示。
Implementers who want to exploit an abstraction such as this need to inherit from the _templated class, like in the Listing 13.
另外,即使您从来没有打算让这些类作为基类使用,但还是有些类会从这些类继承。
In addition, someone could inherit from these classes, even though you never intended these classes to serve as base classes.
将基类标记为 “私有”允许派生类从该基类继承而来,而无需实际成为一个基类。
Marking the base class as "private" allowed the derived class to inherit from it without actually becoming one of them.
SalaryRate类继承这些字段并添加一个yearlyRate 字段,见清单5
Then the SalaryRate class inherits those fields and adds a yearlyRate field, as shown in Listing 5
文件equation . pm包含从Persistent:dbi类继承所需的所有代码。
The file Equation.pm contains all the code necessary to inherit from a Persistent: : DBI class.
在我们希望允许类继承类型参数时立即出现的紧迫问题是要决定我们能调用什么样的超级构造函数?
An immediate and pressing problem that arises as soon as we want to allow for classes that extend a type parameter is to decide what super-constructors are we able to call?
GridView的许多事件参数类继承了CancelEventArgs,这意味着所有这些事件都能被取消。
Many of the GridView's event argument classes inherit CancelEventArgs, meaning that all those events can be canceled.
GridView的许多事件参数类继承了CancelEventArgs,这意味着所有这些事件都能被取消。
Many of the GridView's event argument classes inherit CancelEventArgs, meaning that all those events can be canceled.
应用推荐