|
Inheritance vs Interface Polymorphism (C++)
Doxygen docs for the C++ implementation
|
Abstract base class combining shared state, a concrete default method, and a pure virtual method subclasses must implement. More...

Public Member Functions | |
| void | sleep () |
| A concrete default method, inherited as-is by all subclasses. | |
| virtual void | speak ()=0 |
| Pure virtual method that subclasses must override. | |
| virtual | ~AbstractAnimal ()=default |
Protected Attributes | |
| int | age = 0 |
| Structural state isolated inside a class footprint (interfaces cannot hold this). | |
Abstract base class combining shared state, a concrete default method, and a pure virtual method subclasses must implement.
Definition at line 61 of file C++ Implimentation.cpp.
|
virtualdefault |
|
inline |
A concrete default method, inherited as-is by all subclasses.
Definition at line 70 of file C++ Implimentation.cpp.
|
pure virtual |
Pure virtual method that subclasses must override.
Implemented in DogWithDefault.
|
protected |
Structural state isolated inside a class footprint (interfaces cannot hold this).
Definition at line 64 of file C++ Implimentation.cpp.