 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Virtual
inheritance is an extension of multiple
|
|
|
|
inheritance.
|
|
|
| • |
Its
objective is to allow efficient use of memory and
|
|
|
|
elimination
of duplicate state spaces when designing
|
|
|
|
inheritance
hierarchies that share a common base class.
|
|
|
| • |
The
only time one might use virtual inheritance within a
|
|
|
|
single
inheritance hierarchy is when we can foresee future
|
|
|
extensions
that may result in a derived class sharing a
|
|
|
|
common
base class.
|
|