Ulteriori informazioni
Informationen zum Autor Andrei Alexandrescu, Ph.D., is the author of the award-winning books Modern C++ Design (Addison-Wesley, 2001) and, with Herb Sutter, C++ Coding Standards (Addison-Wesley, 2005). Through his work, Andrei has garnered a solid reputation as a leading innovator in programming languages and methods. Since 2006, he has collaborated closely with Walter Bright—the original designer and implementer of D—on designing and implementing the language and its standard library. Klappentext In Modern C++ Design, Andrei Alexandrescu opens new vistas for C++ programmers. Displaying extraordinary creativity and programming virtuosity, Alexandrescu offers a cutting-edge approach to design that unites design patterns, generic programming, and C++, enabling programmers to achieve expressive, flexible, and highly reusable code. This book introduces the concept of generic componentsreusable design templates that produce boilerplate code for compiler consumptionall 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 flexibilityPartial template specializationTypelistspowerful type manipulation structuresPatterns such as Visitor, Singleton, Command, and FactoriesMulti-method engines For each generic component, the book presents the fundamental problems and design options, and finally implements a generic solution. Zusammenfassung Demonstrates 'generic patterns' or 'pattern templates' as a way of creating extensible designs in C++. This book introduces the concept of generic components-reusable design templates that produce boilerplate code for compiler consumption, within C++. Inhaltsverzeichnis Foreword by Scott Meyers. Foreword by John Vlissides. Preface. Acknowledgments. I. TECHNIQUES. 1. Policy-Based Class Design. The Multiplicity of Software Design. The Failure of the Do-It-All Interface. Multiple Inheritance to the Rescue? Templates Bring Hope. Policies and Policy Classes. Enriched Policies. Destructors of Policy Classes. Optional Functionality Through Incomplete Instantiation. Combining Policy Classes. Customizing Structure with Policy Classes. Compatible and Noncompatible Policies. Decomposing a Class in Policies. Summary. 2. Techniques. Compile-Time Assertions. Partial Template Specialization. Local Classes 28 2.4 Mapping Integral Constants to Types. Type-to-Type...