Автор: Andrei Alexandrescu
Название: Modern C++ Design: Generic Programming and Design Patterns Applied
Издательство: Addison-Wesley Professional
Год: 2001
ISBN: 0201704315
Язык: English
Формат: epub
Размер: 22,7 mb
Страниц: 352
This book introduces the concept of generic components—reusable design templates that produce boilerplate code for compiler consumption—all within C++. Generic components enable an easier and more seamless transition from design to application code, generate code that better expresses the original design intention, and support the reuse of design structures with minimal recoding.
The author describes the specific C++ techniques and features that are used in building generic components and goes on to implement industrial strength generic components for real-world applications. Recurring issues that C++ developers face in their day-to-day activity are discussed in depth and implemented in a generic way. These include:
– Policy-based design for flexibility
– Partial template specialization
– Typelists—powerful type manipulation structures
– Patterns such as Visitor, Singleton, Command, and Factories
– Multi-method engines
For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution.