This chapter introduces the concepts and shows some examples of how to define inheritance relationships between C++ classes. Overriding methods, the virtual keyword, and simple examples show how polymorphism works.
6.1 |
Simple Derivation |
136 |
6.2 |
Derivation with Polymorphism |
142 |
6.3 |
Derivation from an Abstract Base Class |
148 |
6.4 |
Inheritance Design |
152 |
6.5 |
Overloading, Hiding, and Overriding |
154 |
6.6 |
Constructors, Destructors, and Copy Assignment Operators |
155 |
6.7 |
Processing Command-Line Arguments |
158 |
Simple Derivation |
Part I: Introduction to C++ and Qt 4
C++ Introduction
Classes
Introduction to Qt
Lists
Functions
Inheritance and Polymorphism
Part II: Higher-Level Programming
Libraries
Introduction to Design Patterns
QObject
Generics and Containers
Qt GUI Widgets
Concurrency
Validation and Regular Expressions
Parsing XML
Meta Objects, Properties, and Reflective Programming
More Design Patterns
Models and Views
Qt SQL Classes
Part III: C++ Language Reference
Types and Expressions
Scope and Storage Class
Statements and Control Structures
Memory Access
Chapter Summary
Inheritance in Detail
Miscellaneous Topics
Part IV: Programming Assignments
MP3 Jukebox Assignments
Part V: Appendices
MP3 Jukebox Assignments
Bibliography
MP3 Jukebox Assignments