I l@ve RuBoard Previous Section Next Section

   
•  Table of Contents
Modern C++ Design: Generic Programming and Design Patterns Applied
By Andrei Alexandrescu
   
Publisher : Addison Wesley
Pub Date : February 01, 2001
ISBN : 0-201-70431-5
Pages : 352


    Copyright
    Foreword
    Foreword
    Preface
      Audience
      Loki
      Organization
   
    Acknowledgments
    Part I.  Techniques
      Chapter 1.  Policy-Based Class Design
      Section 1.1.  The Multiplicity of Software Design
      Section 1.2.  The Failure of the Do-It-All Interface
      Section 1.3.  Multiple Inheritance to the Rescue?
      Section 1.4.  The Benefit of Templates
      Section 1.5.  Policies and Policy Classes
      Section 1.6.  Enriched Policies
      Section 1.7.  Destructors of Policy Classes
      Section 1.8.  Optional Functionality Through Incomplete Instantiation
      Section 1.9.  Combining Policy Classes
      Section 1.10.  Customizing Structure with Policy Classes
      Section 1.11.  Compatible and Incompatible Policies
      Section 1.12.  Decomposing a Class into Policies
      Section 1.13.  Summary
   
      Chapter 2.  Techniques
      Section 2.1.  Compile-Time Assertions
      Section 2.2.  Partial Template Specialization
      Section 2.3.  Local Classes
      Section 2.4.  Mapping Integral Constants to Types
      Section 2.5.  Type-to-Type Mapping
      Section 2.6.  Type Selection
      Section 2.7.  Detecting Convertibility and Inheritance at Compile Time
      Section 2.8.  A Wrapper Around type_info
      Section 2.9.  NullType and EmptyType
      Section 2.10.  Type Traits
      Section 2.11.  Summary
   
      Chapter 3.  Typelists
      Section 3.1.  The Need for Typelists
      Section 3.2.  Defining Typelists
      Section 3.3.  Linearizing Typelist Creation
      Section 3.4.  Calculating Length
      Section 3.5.  Intermezzo
      Section 3.6.  Indexed Access
      Section 3.7.  Searching Typelists
      Section 3.8.  Appending to Typelists
      Section 3.9.  Erasing a Type from a Typelist
      Section 3.10.  Erasing Duplicates
      Section 3.11.  Replacing an Element in a Typelist
      Section 3.12.  Partially Ordering Typelists
      Section 3.13.  Class Generation with Typelists
      Section 3.14.  Summary
      Section 3.15.  Typelist Quick Facts
   
      Chapter 4.  Small-Object Allocation
      Section 4.1.  The Default Free Store Allocator
      Section 4.2.  The Workings of a Memory Allocator
      Section 4.3.  A Small-Object Allocator
      Section 4.4.  Chunks
      Section 4.5.  The Fixed-Size Allocator
      Section 4.6.  The SmallObjAllocator Class
      Section 4.7.  A Hat Trick
      Section 4.8.  Simple, Complicated, Yet Simple in the End
      Section 4.9.  Administrivia
      Section 4.10.  Summary
      Section 4.11.  Small-Object Allocator Quick Facts
   
   
    Part II.  Components
      Chapter 5.  Generalized Functors
      Section 5.1.  The Command Design Pattern
      Section 5.2.  Command in the Real World
      Section 5.3.  C++ Callable Entities
      Section 5.4.  The Functor Class Template Skeleton
      Section 5.5.  Implementing the Forwarding Functor::operator()
      Section 5.6.  Handling Functors
      Section 5.7.  Build One, Get One Free
      Section 5.8.  Argument and Return Type Conversions
      Section 5.9.  Handling Pointers to Member Functions
      Section 5.10.  Binding
      Section 5.11.  Chaining Requests
      Section 5.12.  Real-World Issues I: The Cost of Forwarding Functions
      Section 5.13.  Real-World Issues II: Heap Allocation
      Section 5.14.  Implementing Undo and Redo with Functor
      Section 5.15.  Summary
      Section 5.16.  Functor Quick Facts
   
      Chapter 6.  Implementing Singletons
      Section 6.1.  Static Data + Static Functions != Singleton
      Section 6.2.  The Basic C++ Idioms Supporting Singletons
      Section 6.3.  Enforcing the Singleton's Uniqueness
      Section 6.4.  Destroying the Singleton
      Section 6.5.  The Dead Reference Problem
      Section 6.6.  Addressing the Dead Reference Problem (I):
The Phoenix Singleton
      Section 6.7.  Addressing the Dead Reference Problem (II):
Singletons with Longevity
      Section 6.8.  Implementing Singletons with Longevity
      Section 6.9.  Living in a Multithreaded World
      Section 6.10.  Putting It All Together
      Section 6.11.  Working with SingletonHolder
      Section 6.12.  Summary
      Section 6.13.  SingletonHolder Class Template Quick Facts
   
      Chapter 7.  Smart Pointers
      Section 7.1.  Smart Pointers 101
      Section 7.2.  The Deal
      Section 7.3.  Storage of Smart Pointers
      Section 7.4.  Smart Pointer Member Functions
      Section 7.5.  Ownership-Handling Strategies
      Section 7.6.  The Address-of Operator
      Section 7.7.  Implicit Conversion to Raw Pointer Types
      Section 7.8.  Equality and Inequality
      Section 7.9.  Ordering Comparisons
      Section 7.10.  Checking and Error Reporting
      Section 7.11.  Smart Pointers to const and const Smart Pointers
      Section 7.12.  Arrays
      Section 7.13.  Smart Pointers and Multithreading
      Section 7.14.  Putting It All Together
      Section 7.15.  Summary
      Section 7.16.  SmartPtr Quick Facts
   
      Chapter 8.  Object Factories
      Section 8.1.  The Need for Object Factories
      Section 8.2.  Object Factories in C++: Classes and Objects
      Section 8.3.  Implementing an Object Factory
      Section 8.4.  Type Identifiers
      Section 8.5.  Generalization
      Section 8.6.  Minutiae
      Section 8.7.  Clone Factories
      Section 8.8.  Using Object Factories with Other Generic Components
      Section 8.9.  Summary
      Section 8.10.  Factory Class Template Quick Facts
      Section 8.11.  CloneFactory Class Template Quick Facts
   
      Chapter 9.  Abstract Factory
      Section 9.1.  The Architectural Role of Abstract Factory
      Section 9.2.  A Generic Abstract Factory Interface
      Section 9.3.  Implementing AbstractFactory
      Section 9.4.  A Prototype-Based Abstract Factory Implementation
      Section 9.5.  Summary
      Section 9.6.  AbstractFactory and ConcreteFactory Quick Facts
   
      Chapter 10.  Visitor
      Section 10.1.  Visitor Basics
      Section 10.2.  Overloading and the Catch-All Function
      Section 10.3.  An Implementation Refinement: The Acyclic Visitor
      Section 10.4.  A Generic Implementation of Visitor
      Section 10.5.  Back to the "Cyclic" Visitor
      Section 10.6.  Hooking Variations
      Section 10.7.  Summary
      Section 10.8.  Visitor Generic Components Quick Facts
   
      Chapter 11.  Multimethods
      Section 11.1.  What Are Multimethods?
      Section 11.2.  When Are Multimethods Needed?
      Section 11.3.  Double Switch-on-Type: Brute Force
      Section 11.4.  The Brute-Force Approach Automated
      Section 11.5.  Symmetry with the Brute-Force Dispatcher
      Section 11.6.  The Logarithmic Double Dispatcher
      Section 11.7.  FnDispatcher and Symmetry
      Section 11.8.  Double Dispatch to Functors
      Section 11.9.  Converting Arguments: static_cast or dynamic_cast?
      Section 11.10.  Constant-Time Multimethods: Raw Speed
      Section 11.11.  BasicDispatcher and BasicFastDispatcher as Policies
      Section 11.12.  Looking Forward
      Section 11.13.  Summary
      Section 11.14.  Double Dispatcher Quick Facts
   
      Appendix A Minimalist Multithreading Library
      Section A.1.  A Critique of Multithreading
      Section A.2.  Loki's Approach
      Section A.3.  Atomic Operations on Integral Types
      Section A.4.  Mutexes
      Section A.5.  Locking Semantics in Object-Oriented Programming
      Section A.6.  Optional volatile Modifier
      Section A.7.  Semaphores, Events, and Other Good Things
      Section A.8.  Summary
   
   
    Bibliography
I l@ve RuBoard Previous Section Next Section