Product Cover Image

Designing and Coding Reusable C++

By Martin D. Carroll, Margaret A. Ellis

Published by Addison-Wesley Professional

Published Date: Apr 27, 1995

Table of Contents



Introduction To Reusability.

What is Reusability?

Myths of Reuse.

Obstacles to Reuse.

Is There Any Hope?

How This Book Can Help.



Class Design.

Abstraction.

Regular Functions.

Nice Classes.

A Minimal Standard Interface?

Shallow and Deep Copy.

Interface Consistency.

Conversions.

Use of const.

Summary.



Extensibility.

Tradeoffs of Extensibility.

Extensibility and Inheritance.

Inheritance Semantics.

Obstacles to Inheritability.

The Derived Assignment Problem.

Allowing Invasive Inheritance.

Summary.



Efficiency.

Efficiency and Reusability.

Build Time.

Code Size.

Run Time.

Free-Store and Stack Space.

Tradeoffs of Efficiency.

Summary.



Errors.

Errors in Reusable Code.

Error Detection.

Handling Errors.

Resource-Limit Errors.

Exception Safety.

Summary.



Conflict.

Global Names.

Macro Names.

Environmental Names.

Unclean Libraries.

Good-Citizen Libraries .

Summary.



Compatibility.

Backward and Forward Compatibility.

Forms of Compatibility.

Source Compatibility in Theory.

Source Compatibility in Practice.

Link Compatibility.

Run Compatibility.

Process Compatibility.

Documenting Incompatibilities.

Undocumented Properties.

Summary.



Inheritance Hierarchies.

Rootedness, Depth, and Fanout.

Hierarchy Styles.

Templates or Inheritance?

Summary.



Portability.

Should You Write Portable Code?

The Evolving Language Definition.

Undefined Behavior.

Legal, Nonportable Code.

Implementation Dependencies.

Portable Data Files.

Template Instantiation.

Run-Time Libraries.

Other Portability Concerns.

Summary.



Using Other Libraries.

Why Reuse Other Libraries?

Drawbacks of Reusing Other Libraries.

Self-Contained Libraries.

Summary.



Documentation.

Documentation and Reusability.

The Design Paper.

Tutorials.

Reference Manual.

Summary.



Miscellaneous Topics.

The Static Initialization Problem.

The Principle of Localized Cost.

Endogenous and Exogenous Classes.

Iterators.

Class Coupling.

Deferring Decisions.

Summary. 020151284XT04062001

Purchase Info

ISBN-10: 0-201-51284-X

ISBN-13: 978-0-201-51284-7

Format: Book

$46.99 | Free Ground Shipping.

Add to Cart