Modern C++ Design

(häftad)

Generic Programming and Design Patterns Applied

av Andrei Alexandrescu

Bloggar      
Format:
Häftad (paperback)
Utgiven:
2001-02-01
Språk:
Engelska

Modern C++ Designis an important book. Fundamentally, it demonstrates generic patterns or pattern templates as a powerful new way of creating extensible designs in C++a new way to combine templates and patterns that you may never have dreamt was possible, but is. If your work involves C++ design and coding, you should read this book. Highly recommended.
Herb Sutter

Whats left to say about C++ that hasnt already been said? Plenty, it turns out.
From the Foreword by John Vlissides

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 flexibility
  • Partial template specialization
  • Typelistspowerful 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.

In addition, an accompanying Web site, http://www.awl.com/cseng/titles/0-201-70431-5, makes the code implementations available for the generic components in the book and provides a free, downloadable C++ library, called Loki, created by the author. Loki provides out-of-the-box functionality for virtually any C++ project.

Get a value-added service! Try out all the examples from this book at "http://www.codesaw.com www.codesaw.com . CodeSaw is a free online learning tool that allows you to experiment with live code from your book right in your browser.



0201704315B11102003

Passar bra ihop

Modern C++ Design + C++ Coding Standards: 101 Rules, Guidelines, & Best Practices
De som köpt den här boken har ofta också köpt C++ Coding Standards: 101 Rules, Guidelines, & Best Practices (häftad) av Herb Sutter, Andrei Alexandrescu
Pris för båda:
580:-Köp

Fler böcker av Andrei Alexandrescu

C++ Coding Standards: 101 Rules, Guidelines, & Best Practices (häftad)
The D Programming Language (häftad)
Scalable Graph-Based Learning Applied to Human Language Technology. (häftad)
Modernes C++ Design (häftad)

C++ Coding Standards: 101 Rules, Guidelines, & Best ...

Herb Sutter, Andrei Alexandrescu (häftad)

The D Programming Language

Andrei Alexandrescu (häftad)

Scalable Graph-Based Learning Applied to Human Langu...

Andrei Alexandrescu (häftad)

Modernes C++ Design

Andrei Alexandrescu (häftad)
267:- Köp
290:- Köp
694:- Köp
323:- Köp

Kundrecensioner

Bli först med att recensera och betygsätt boken Modern C++ Design - du kan vinna 200 kr varje månad i tävlingen "Månadens recension".

Bloggat om Modern C++ Design

Övrig information

Andrei Alexandrescu is the author of the award-winning book Modern C++ Design (Addison-Wesley, 2001) and is a columnist for C/C++ Users Journal.

Innehållsförteckning



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 Mapping.

Type Selection.

Detecting Convertibility and Inheritance at Compile Time.

A Wrapper Around type_info.

NullType and EmptyType.

Type Traits.

Summary.

3. Typelists.

The Need for Typelists.

Defining Typelists.

Linearizing Typelist Creation.

Calculating Length.

Intermezzo.

Indexed Access.

Searching Typelists.

Appending to Typelists.

Erasing a Type from a Typelist.

Erasing Duplicates.

Replacing an Element in a Typelist.

Partially Ordering Typelists.

Class Generation with Typelists.

Summary.

Typelist Quick Facts.

4. Small-Object Allocation.

The Default Free Store Allocator.

The Workings of a Memory Allocator.

A Small-Object Allocator.

Chunks.

The Fixed-Size Allocator.

The SmallObjAllocator Class.

A Hat Trick.

Simple, Complicated, Yet Simple in the End.

Administrivia.

Summary.

Small-Object Allocator Quick Facts.

II. COMPONENTS.

5. Generalized Functors.

The Command Design Pattern.

Command in the Real World.

C11 Callable Entities.

The Functor Class Template Skeleton.

Implementing the Forwarding Functor::operator().

Handling Functors.

Build One, Get One Free.

Argument and Return Type Conversions.

Handling Pointers to Member Functions.

Binding.

Chaining Requests.

Real-World Issues I: The Cost of Forwarding Functions.

Real-World Issues II: Heap Allocation.

Implementing Undo and Redo with Functor.

Summary.

...

De som köpt "Modern C++ Design" har även köpt:

More Exceptional C++ (häftad)

More Exceptional C++

Herb Sutter (häftad)
267:-
C++ Template Metaprogramming: Concepts, Tools, & Techniques from Boost & Beyond Book/CD Package ()

C++ Template Metaprogramming: Concepts, Tools, & Tec...

David Abrahams, Aleksey Gurtovoy
293:-
More Effective C++ (häftad)

More Effective C++

Scott Meyers (häftad)
290:-
Effective STL (häftad)

Effective STL

Scott Meyers (häftad)
282:-
Beyond The C++ Standard Library (häftad)

Beyond The C++ Standard Library

Björn Karlsson (häftad)
344:-
Modern C++ Design (häftad)
  • Titel: Modern C++ Design
  • ISBN: 9780201704310
  • Förlag: ADDISON-WESLEY
  • Utgivningsland: USA
  • Utgivningsort: Boston
  • Medarbetare: Meyers, Scott (foreword)/Vlissides, John (foreword)/Meyers, Scott (foreword)/Vlissides, John (foreword)
  • Upplaga: 1
  • Antal sidor: 318
  • Vikt: 520 g
  • Höjd: 230 mm
  • Antal komponenter: 1
  • Format: Häftad (paperback)