Defined Terms
abstract base classClass that has or inherits one or more pure virtual functions. It is not possible to create objects of an abstract base-class type. Abstract base classes exist to define an interface. Derived classes will complete the type by defining type-specific implementations for the pure virtuals defined in the base.
base classClass from which another class inherits. The members of the base class become members of the derived class.
class derivation listUsed by a class definition to indicate that the class is a derived class. A derivation list includes an optional access level and names the base class. If no access label is specified, the type of inheritance depends on the keyword used to define the derived class. By default, if the derived class is defined with the struct keyword, then the base class is inherited publicly. If the class is defined using the class keyword, then the base class is inherited privately.
derived classA class that inherits from another class. The members of the base class are also members of the derived class. A derived class can redefine the members of its base and can define new members. A derived-class scope is nested in the scope of its base class(es), so the derived class can access members of the base class directly. Members defined in the derived with the same name as members in the base hide those base members; in particular, member functions in the derived do not overload members from the base. A hidden member in the base can be accessed using the scope operator.
direct base classSynonym for immediate base class.
dynamic bindingDelaying until run time the selection of which function to run. In C++, dynamic binding refers to the run-time choice of which virtual function to run based on the underlying type of the object to which a reference or pointer is bound.
dynamic typeType at run time. Pointers and references to base-class types can be bound to objects of derived type. In such cases the static type is reference (or pointer) to base, but the dynamic type is reference (or pointer) to derived.
handle classClass that provides an interface to another class. Commonly used to allocate and manage a pointer to an object of an inheritance hierarchy.
immediate base classA base class from which a derived class inherits directly. The immediate base is the class named in the derivation list. The immediate base may itself be a derived class.
indirect base classA base class that is not immediate. A class from which the immediate base class inherits, directly or indirectly, is an indirect base class to the derived class.
inheritance hierarchyTerm used to describe the relationships among classes related by inheritance that share a common base class.
object-oriented programmingTerm used to describe programs that use data abstraction, inheritance, and dynamic binding.
polymorphismA term derived from a Greek word that means "many forms." In object-oriented programming, polymorphism refers to the ability to obtain type-specific behavior based on the dynamic type of a reference or pointer.
private inheritanceA form of implementation inheritance in which the public and protected members of a private base class are private in the derived.
protected access labelMembers defined after a protected label may be accessed by class members and friends and by the members (but not friends) of a derived class. protected members are not accessible to ordinary users of the class.
protected inheritanceIn protected inheritance the protected and public members of the base class are protected in the derived class.
public inheritanceThe public interface of the base class is part of the public interface of the derived class.
pure virtualA virtual function declared in the class header using =0 at the end of the function's parameter list. A pure virtual is one that need not be (but may be) defined by the class. A class with a pure virtual is an abstract class. If a derived class does not define its own version of an inherited pure virtual, then the derived class is abstract as well.
refactoringRedesigning programs to collect related parts into a single abstraction, replacing the original code by uses of the new abstraction. In OO programs, refactoring frequently happens when redesigning the classes in an inheritance hierarchy. Refactoring often occurs in response to a change in requirements. In general, classes are refactored to move data or function members to the highest common point in the hierarchy to avoid code duplication.
slicedTerm used to describe what happens when an object of derived type is used to initialize or assign an object of the base type. The derived portion of the object is "sliced down," leaving only the base portion, which is assigned to the base.
static typeCompile-time type. Static type of an object is the same as its dynamic type. The dynamic type of an object to which a reference or pointer refers may differ from the static type of the reference or pointer.
virtual functionA member function that defines type-specific behavior. Calls to a virtual made through a reference or pointer are resolved at run time, based on the type of the object to which the reference or pointer is bound.