出版時(shí)間:2003-11 出版社:中國(guó)電力出版社 作者:奧斯滕 頁(yè)數(shù):548
Tag標(biāo)簽:無(wú)
內(nèi)容概要
許多程序員可能并不知道,C++不僅是一個(gè)面向?qū)ο蟪绦蛘Z(yǔ)言,它還適用于泛型編程(generic programming)。這項(xiàng)技術(shù)可以大大增強(qiáng)你的能力,協(xié)助你寫出高效率并可重復(fù)運(yùn)用的軟件組件(software components)。
本書由知名的C++專家Matthew H.Austern執(zhí)筆,引導(dǎo)你進(jìn)入泛型編程思維模型,并將你帶往此一模型的最重要成品:C++ Standard Template Library(STL)。本書揭示STL的奧秘,告訴你STL不僅僅是一組方便運(yùn)用的容器類(container classes)。對(duì)于泛型組件和可交互作用的組件而言,STL是一個(gè)具備擴(kuò)充能力的框架(framework)。
本書闡述了泛型編程的中心思想:concepts、modeling、refinement,并為你展示這些思想如何導(dǎo)出STL的基礎(chǔ)概念:iterators、containers、function Objects。循此路線,你可以把STL想像為一個(gè)由concepts(而非明確之functions或classes)組成的程序庫(kù)。你將學(xué)習(xí)其正式結(jié)構(gòu)并因此獲得其潛在威力所帶采的完整優(yōu)勢(shì)。
作者簡(jiǎn)介
Matthew H.Austern:擁有博士學(xué)位,曾于MIT和UC Berkeley做研究?,F(xiàn)任職于Silicon Graphics編譯器團(tuán)隊(duì),是SGI STL的主要作者。他是Dr.Dobb's Journal和C++Report兩本刊物的撰稿人,并主持newsgroup comp.std.c++,同時(shí)也是ISO/ANSI C++標(biāo)準(zhǔn)委員會(huì)的一位活躍成員。
作者簡(jiǎn)介
Matthew H·Austern:擁有博士學(xué)位,曾于MIT和UC Berkeley做研究?,F(xiàn)任職于Silicon Graphics編譯器團(tuán)隊(duì),是SGI STL的主要作者。他是Dr.Dobbs Journal和C++Report兩本刊物的撰稿人,并主持newsgroup comp.std.c++,同時(shí)也是ISO/ANSI C++標(biāo)準(zhǔn)委員會(huì)的一位活躍成員。
書籍目錄
PrefacePart I Introduction to Generic ProgrammingChapter 1 A Tour of the STL 1.1 A Simple Example 1.2 SummaryChapter 2 Algorithms and Ranges 2.1 Linear Search 2.2 Concepts and Modeling 2.3 Iterators 2.4 Refinement 2.5 SummaryChapter 3 More about Iterators 3.1 Iterator Traits and Associated Types 3.2 Defining New Components 3.3 SummaryChapter 4 Function Objects 4.1 Generalizing Linear Search 4.2 Function Object Concepts 4.3 Function Object Adaptors 4.4 Predefined Function Objects 4.5 SummaryChapter 5 Containers 5.1 A Simple Container 5.2 Container Concepts 5.3 Variable Size Container Concepts 5.4 SummaryPart II Reference Manual: STL ConceptsChapter 6 Basic Concepts 6.1 Assignable 6.2 Default Constructible 6.3 Equality Comparable 6.4 OrderingChapter 7 Iterators 7.1 Trivial Iterator 7.2 Input Iterator 7.3 Output Iterator 7.4 Forward Iterator 7.5 Bidirectional Iterator 7.6 Random Access IteratorChapter 8 Function Objects 8.1 Basic Function Objects 8.2 Adaptable Function Objects 8.3 Predicates 8.4. Specialized ConceptsChapter 9 Containers 9.1 General Container Concepts 9.2 Sequences 9.3 Associative Containers 9.4 AllocatorPart III Reference Manual: Algorithms and ClassesChapter 10 Basic Components 10.1 pair 10.2 Iterator Primitives 10.3 allocator 10.4 Memory Management Primitives 10.5 Temporary BuffersChapter 11 Nonmutating Algorithms 11.1 Linear Search 11.2 Subsequence Matching 11.3 Counting Elements 11.4 for_each 11.5 Comparing Two Ranges 11.6 Minimum and MaximumChapter 12 Basic Mutating Algorithms 12.1 Copying Ranges 12.2 Swapping Elements 12.3 transform 12.4 Replacing Elements 12.5 Filling Ranges 12.6 Removing Elements 12.7 Permuting Algorithms 12.8 Partitions 12.9 Random Shuffling and Sampling 12.10 Generalized Numeric AlgorithmsChapter 13 Sorting and Searching 13.1 Sorting Ranges 13.2 Operations on Sorted Ranges 13.3 Heap OperationsChapter 14 Iterator Classes 14.1 Insert Iterators 14.2 Stream Iterators 14.3 reverse_iterator 14.4 raw_storage_iteratorChapter 15 Function Object Classes 15.1 Function Object Base Classes 15.2 Arithmetic Operations 15.3 Comparisons 15.4 Logical Operations 15.5 Identity and Projection 15.6 Specialized Function Objects 15.7 Member Function Adaptors 15.8 Other AdaptorsChapter 16 Container Classes 16.1 Sequences 16.2 Associative Containers 16.3 Container AdaptorsAppendix A Portability and Standardization A. 1 Language Changes A.2 Library Changes A.3 Naming and PackagingBibliographyIndex
圖書封面
圖書標(biāo)簽Tags
無(wú)
評(píng)論、評(píng)分、閱讀與下載