2.4 Summary


In this chapter, we created a test application that takes an image and generates a thumbnail image, which is an image of reduced size. We designed and implemented an image class for the original input image, and a thumbnail class that computes the thumbnail image. In doing so, we employed a very simple memory management scheme for manipulating images, which was useful in highlighting the deficiencies that we may want to correct in the final image framework. We also used this simple application to explore assignment operators and how to write safe ones using Sutter's technique. See [Sutter00].

In Chapter 3, we construct a more robust memory management object that can effectively fulfill our defined requirements for a real image framework. We also review reference counting and provide a primer on templates, including some of the exacting syntactic requirements. We use this memory management object as we prototype various aspects of the image framework, with each prototype employing different C++ constructs and techniques to arrive at the final design for the image framework. Although we concretely apply these techniques to an image framework to explore their advantages and disadvantages, these techniques can be applied to other types of software.



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