Preface: v
Contents: xi
Chapter 1: Introduction: 1
1.1 C++: An Evolving Language: 1
1.2 Handling Complexity with Idioms: 2
1.3 Objects for the Nineties: 4
1.4 Design and Language: 5
Chapter 2: Data Abstraction and Abstract Data Types: 7
2.1 Classes: 8
2.2 Object Inversion: 11
2.3 Constructors and Destructors: 14
2.4 Inline Functions: 19
2.5 Initialization of Static Data Members: 21
2.6 Static Member Functions: 21
2.7 Scoping and const: 23
2.8 Initialization ordering of Global Objects, Constants, and Static Class members: 24
2.9 Enforcement of const for Class Object Member Functions: 26
2.10 Pointers to Member Functions: 29
2.11 Program Organization Conventions: 33
Chapter 3: Concrete Data Types: 37
3.1 The Orthodox Canonical Class Form: 38
3.2 Scoping and Access Control: 45
3.3 Overloading: Redefining the Semantics of Operators and Functions: 48
3.4 Type Conversion: 54
3.5 Reference Counting: Making Variables Use "Magic Memory": 58
3.6 Operators new and delete: 72
3.7 Separating Initialization from Instantiation: 79
Chapter 4: Inheritance
4.1 Simple Inheritance: 87
4.2 Scoping and Access Control: 94
4.3 Constructors and Destructors: 104
4.4 Class Pointer Conversion: 108
4.5 Type Selector Fields: 110
Chapter 5: Object-Oriented Programming
5.1 C++ Run-Time Type Support: Virtual Functions
5.2 Destructor Interaction and Virtual Destructors 119
5.3 Virtual Functions and Scoping: 128foreword 127
5.4 Pure Virtual Functions and Abstract Base Classes: 131
5.5 Envelope and Letter Lcasses: 133
5.6 Functors: Functions as Objects: 165
5.7 Multiple Inheritance: 178
5.8 The Inheritance Canonical Form: 189
Chapter 6: Object-Oriented Design: 201
6.1 Types and Classes: 202
6.2 The Activities of Object-Oriented Design: 207
6.3 Object-Oriented Analysis and Domain Analysis: 210
6.4 Object and Class Relationships: 213
6.5 Subtyping, Inheritance and Forwarding: 222
6.6 Rules of Thumb for Subtyping, Inheritance, and Independence: 244
Chapter 7: Reuse and Objects: 249
7.1 All analogies break down somewhere: 251
7.2 Design Reuse
7.3 Four Code Reuse Mechanisms
7.4 Parameterized Types, or Templates
7.5 Private Inheritance: Does Inheritance Support Reuse?: 265
7.6 Storage Reuse: 269
7.7 Interface Ruese: Variants: 270
7.8 Reuse, Inheritance, and Forwarding: 272
7.9 Architectural Alternatives for Source Reuse: 273
7.10 Generalizations on Reuse and Objects: 276
Chapter 8: Programming with Exemplars in C++: 279
8.1 An Example: Employee Exemplars: 282
8.2 Exemplars and Generic Constructors: The Exemplar Community Idiom: 288
8.3 Autonomous Generic Constructors: 289
8.4 Abstract Base Exemplars: 293
8.5 Toward a Frame Exemplar Idiom: 295
8.6 A Word About Notation: 297
8.7 Exemplars and Program Administration: 299
Chapter 9: Emulating Symbolic Language Styles in C++: 307
9.1 Incremental C++ Development: 309
9.2 Symbolic Canonical Form: 311
9.3 An Example: A General Collection Class: 323
9.4 Code and Idioms To Support Incremental Loading: 328
9.5 Garbage Collection: 339
9.6 Primitive Type Encapsulation: 349
9.7 Multi-Methods under the Symbolic Idiom: 349
Chapter 10: Dynamic Multiple Inheritance: 357
10.1 An Example: A Multi-Technology Window System: 359
10.2 Caveats: 362
Chapter 11: Systemic Issues: 365
11.1 Static System Design: 366
11.2 Dynamic System Design: 375
Appendix A: C in a C++ Environment: 391
A.1 Function Calls: 391
A.2 Function Parameters: 392
A.3 Function Prototypes: 393
A.4 Call-by-Reference Parameters: 394
A.5 Variable Number of Parameters: 395
A.6 Function Pointers: 397
A.7 The const Type Modifier: 399
A.8 Interfacing with C Code: 401
Appendix B: Shapes Program: C++ Code: 417
Appendix C: Reference Return Values from Operators: 431
Appendix D: Why Bitwise Copy Doesn't Work: 435
D.1: Why Member-by-Member Copy Isn't a Panacea: 436
Appendix E: Symbolic Shapes
Appendix F: Block-Structured Programming in C++: 477
F.1 What is Block-Structured Programming?: 477
F.2 Basic Building Blocks for Structured C++ Programming: 478
F.3 An Alternative for Blocks with Deeply Nested Scopes: 482
F.4 Implementation Considerations: 487
Block-Structure Video Game Code: 489
Index: 495
Last updated
Sun Aug 11 12:51:33 EDT 1996
cope@bell-labs.com