In this chapter, we explore multithreaded and
We also discuss exception handling, and provide specific recommendations for top-level catch handlers, as well as detailed guidelines for creating your own exception handling framework. Smaller topics, such as catching specific types of exceptions like memory allocation errors, and exception specifications are also covered. See Figure 5.1 for a checklist of rules for handling exceptions. See Figure 5.2 for a checklist of guidelines for using assertions.
It is important to understand the effects of these constructs in both compile-time and run-time environments. The
Finally, we provide a discussion of building an application such that it is ready for internationalization, should the business requirements require it. This section
In Chapter 6, we use everything we have
Chapter 6. Implementation Considerations
IN THIS CHAPTER
In this chapter, we apply what we have learned through prototyping and examples to finalize the design for the image framework. The
Figure 6.1. Image Framework Components
Our design has had many iterations, using a variety of C++ techniques. We started by using inheritance to create a framework that could handle
Each prototype was incomplete, but collectively they allowed us to test different design principles. We used a single, trivial, image processing function (computing thumbnail images) to observe the merits of each design. And, we wrote a unit test for each prototype to verify the correctness and the behavior of memory allocation, and to verify how pixels are accessed.
Often, the final design grows out of one or more prototypes. Sometimes it is obvious that you have hit on the right design, and other times it becomes an iterative process. From our