图书介绍

C++设计新思维 影印本PDF|Epub|txt|kindle电子书版本网盘下载

C++设计新思维 影印本
  • (美)亚力山德雷斯库著 著
  • 出版社: 北京:中国电力出版社
  • ISBN:7508314964
  • 出版时间:2003
  • 标注页数:323页
  • 文件大小:15MB
  • 文件页数:347页
  • 主题词:C语言-程序设计-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

C++设计新思维 影印本PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

PartⅠ Techniques1

Chapter 1 Policy-Based Class Design3

1.1 The Multiplicity of Software Design3

1.2 The Failure of the Do-It-All Interface4

1.3 Multiple Inheritance to the Rescue?5

1.4 The Benefit of Templates6

1.5 Policies and Policy Classes7

1.7 Destructors of Policy Classes12

1.6 Enriched Policies12

1.8 Optional Functionality Through Incomplete Instantiation13

1.9 Combining Policy Classes14

1.10 Customizing Structure with Policy Classes16

1.11 Compatible and Incompatible Policies17

1.12 Decomposing a Class into Policies19

1.13 Summary20

Chapter 2 Techniques23

2.1 Compile-Time Assertions23

2.2 Partial Template Specialization26

2.3 Local Classes28

2.4 Mapping Integral Constants to Types29

2.5 Type-to-Type Mapping31

2.6 Type Selection33

2.7 Detecting Convertibility and Inheritance at Compile Time34

2.8 A Wrapper Around type_info37

2.9 NullType and EmptyType39

2.10 Type Traits40

2.11 Summary46

3.1 The Need for Typelists49

Chapter 3 Typelists49

3.2 Defining Typelists51

3.3 Linearizing Typelist Creation52

3.4 Calculating Length53

3.5 Intermezzo54

3.6 Indexed Access55

3.7 Searching Typelists56

3.8 Appending to Typelists57

3.9 Erasing a Type from a Typelist58

3.10 Erasing Duplicates59

3.11 Replacing an Element in a Typelist60

3.12 Partially Ordering Typelists61

3.13 Class Generation with Typelists64

3.14 Summary74

3.15 Typelist Quick Facts75

Chapter 4 Small-Object Allocation77

4.1 The Default Free Store Allocator78

4.2 The Workings of a Memory Allocator78

4.3 A Small-Object Allocator80

4.4 Chunks81

4.5 The Fixed-Size Allocator84

4.6 The SmallObjAllocator Class87

4.7 A Hat Trick89

4.8 Simple,Complicated,Yet Simple in the End92

4.9 Administrivia93

4.10 Summary94

4.11 Small-Object Allocator Quick Facts94

Part Ⅱ Components97

Chapter 5 Generalized Functors99

5.1 The Command Design Pattern100

5.2 Command in the Real World102

5.3 C++ Callable Entities103

5.4 The Functor Class Template Skeleton104

5.5 Implementing the Forwarding Functor::operator()108

5.6 Handling Functors110

5.7 Build One,Get One Free112

5.8 Argument and Return Type Conversions114

5.9 Handling Pointers to Member Functions115

5.10 Binding119

5.12 Real-World IssuesⅠ:The Cost of Forwarding Functions122

5.11 Chaining Requests122

5.13 Real-World IssuesⅡ:Heap Allocation124

5.14 Implementing Undo and Redo with Functor125

5.15 Summary126

5.16 Functor Quick Facts126

Chapter 6 Implementing Singletons129

6.1 Static Data + Static Functions!=Singleton130

6.2 The Basic C++ Idioms Supporting Singleton131

6.3 Enforcing the Singleton s Uniqueness132

6.4 Destroying the Singleton133

6.5 The Dead Reference Problem135

6.6 Addressing the Dead Reference Problem(Ⅰ):The Phoenix Singleton137

6.7 Addressing the Dead Reference Problem(Ⅱ):Singletons with Longevity139

6.8 Implementing Singletons with Longevity142

6.9 Living in a Multithreaded World145

6.10 Putting It All Together148

6.11 Working with SingletonHolder153

6.12 Summary155

6.13 SingletonHo1der Class Template Quick Facts155

7.1 Smart Pointers 101157

Chapter 7 Smart Pointers157

7.2 The Deal158

7.3 Storage of Smart Pointers160

7.4 Smart Pointer Member Functions161

7.5 Ownership-Handling Strategies163

7.6 The Address-of Operator170

7.7 Implicit Conversion to Raw Pointer Types171

7.8 Equality and Inequality173

7.9 Ordering Comparisons178

7.10 Checking and Error Reporting181

7.11 Smart Pointers to const and const Smart Pointers182

7.12 Arrays183

7.13 Smart Pointers and Multithreading184

7.14 Putting It All Together187

7.15 Summary194

7.16 SmartPtr Quick Facts194

Chapter 8 Object Factories197

8.1 The Need for Object Factories198

8.2 Object Factories in C++:Classes and Objects200

8.3 Implementing an Object Factory201

8.4 Type Identifiers206

8.5 Generalization207

8.6 Minutiae210

8.7 Clone Factories211

8.8 Using Object Factories with Other Generic Components215

8.9 Summary216

8.10 Factory Class Template Quick Facts216

8.11 CloneFactory Class Template Quick Facts217

Chapter 9 Abstract Factory219

9.1 The Architectural Role of Abstract Factory219

9.2 A Generic Abstract Factory Interface223

9.3 Implementing AbstractFactory226

9.4 A Prototype-Based Abstract Factory Implementation228

9.5 Summary233

9.6 AbstractFactory and ConcreteFactory Quick Facts233

Chapter 10 Visitor235

10.1 Visitor Basics235

10.2 Overloading and the Catch-All Function242

10.3 An Implementation Refinement: The Acyclic Visitor243

10.4 A Generic Implementation of Visitor248

10.5 Back to the Cyclic Visitor255

10.6 Hooking Variations258

10.7 Summary260

10.8 Visitor Generic Component Quick Facts261

Chapter 11 Multimethods263

11.1 What Are Multimethods?264

11.2 When Are Multimethods Needed?264

11.3 Double Switch-on-Type:Brute Force265

11.4 The Brute-Force Approach Automated268

11.5 Symmetry with the Brute-Force Dispatcher273

11.6 The Logarithmic Double Dispatcher276

11.7 FnDispatcher and Symmetry282

11.8 Double Dispatch to Functors282

11.9 Converting Arguments:static_cast or dynamic_cast?285

11.10 Constant-Time Multimethods:Raw Speed290

11.11 BasicDispatcher and BasicFastDispatcher as Policies293

11.12 Looking Forward294

11.13 Summary296

11.14 Double Dispatcher Quick Facts297

Appendix A Minimalist Multithreading Library301

A.1 A Critique of Multithreading302

A.2 Loki s Approach303

A.3 Atomic Operations on Integral Types303

A.4 Mutexes305

A.5 Locking Semantics in Object-Oriented Programming306

A.6 Optional volatile Modifier308

A.7 Semaphores,Events,and Other Good Things309

A.8 Summary309

Bibliography311

Index313

热门推荐