C++ Strategies and Tactics
暂无分享,去创建一个
Preface. 0. Introduction. A Note about The Code Examples. A Road Map. Questions. The Language Rules. 1. Abstraction. A Telephone Number Abstraction. Relationships Between Abstractions. Worrying about the Boundary Conditions. Designing with CRC Cards. In Short. Questions. 2. Classes. Constructors. Assignment. Public Data. Implicit Type Conversions. Overloaded Operators: Members or Nonmembers? Overloading, Defaults, and Ellipsis. Const. Returning References. Static Constructors. In Short. Questions. CHAPTER = 3. Handles. String Class. Avoiding Copies with Use Counts. Avoiding Recompilations: The Cheshire Cat. Using Handles to Hide the Design. Multiple Implementations. Handles as Objects. Summary. In Short. Questions. 4. Inheritance. The is-a Relationship. Public Inheritance. Private Inheritance. Protected Inheritance. Conformance to Base Class Abstractions. Pure Virtual Functions. Inheritance Details and Traps. In Short. Questions. 5. Multiple Inheritance. Multiple Inheritance as Set Intersection. Virtual Base Classes. Some Multiple Inheritance Details. In Short. Questions. 6. Designing for Inheritance. The Protected Interface. Should You Design for Inheritance? Design for Inheritance: Some Examples. Summary. In Short. Questions. 7. Templates. A Pair Class Template. Some Template Details. Template Instantiation. Smart Pointers. Expression Arguments to Templates. Function Templates. In Short. Questions. 8. Advanced Templates. Container Classes Using Templates. Example: A Block Class. Detailed Block Design Issues. Containers with Iterators: A List Class. Iterator Design Issues. Performance Issues. Constraints on Template Arguments. Template Specializations. In Short. Questions. 9. Reusability. Discovery and Acquisition. Robustness. Memory Management. Alternative Memory Allocation Schemes. Passing Arguments to Operator New. Managing External Resources. Finding Memory Bugs. Name Collisions. Performance. Don't Guess, Measure! Algorithms. Bottlenecks in Dynamic Memory Allocation. Inlines. Tiemann's Law. In Short. Questions. 10. Exceptions. A Disclaimer. Why Exceptions? An Example Exception. Exceptions Should Be Exceptional. Understanding Exceptions. Blame Assessment. Designing the Exception Object. In Short. Questions. 11. Moving Your Project to C++. Choosing C++. Adopting C++. Design and Implementation. Developing an Asset Base. A Closing Thought. In Short. Questions. Index. 0201563827T04062001