5.5 Summary


In this chapter, we explore multithreaded and multiprocess designs. We introduced the concepts of locking objects and defined an object to manage the lock. We also contrast the UNIX and Win32 implementations of threads and process, and provide practical techniques for avoiding deadlocks.

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 subsequent sections discuss a myriad of common compilers and their specific issues in handling constructs, such as dynamic casting, templates, and template specialization.

Finally, we provide a discussion of building an application such that it is ready for internationalization, should the business requirements require it. This section presents the high-level strategy and background to make the appropriate design decisions, while also providing a resource manager object for handling strings, and which uses XML to save and restore strings to files. We also present an alternative approach to managing strings using a gnu utility, gettext .

In Chapter 6, we use everything we have considered in the past chapters to finalize the design and implementation strategy for the image framework. In addition, we demonstrate how to integrate third-party libraries to further extend the framework's functionality and improve the performance of some image processing functions.



Applied C++
Applied C++: Practical Techniques for Building Better Software
ISBN: 0321108949
EAN: 2147483647
Year: 2003
Pages: 59

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net