您的浏览历史

深度探索C++对象模型(影印版) [特价中]

  • 定价 : ¥42.00
  • 会员价 : ¥21.00(50折)
温馨提示
  • 此图书为特价商品,可能会出现部分因出版社库存过久或保存不当造成的如页面轻微折损、纸张稍显陈旧等细小瑕疵,不会影响您的正常阅读。
促销活动
精彩评论

基本信息

内容简介回到顶部↑

本书重点论述了C++面向对象程序设计的底层机制,包括结构式语意,暂时性对象的生成、封装、继承和虚拟——虚拟函数和虚拟继承。书中向你表明:理解底层实现模型,可以极大地提高你的编码效率。Lippman澄清了那些关于C++系统开销与复杂性的各种错误信息和猜测,指出了其中某些成本和利益交换确实存在。他在书中详述了各种实现模型,指出了它们的发展方向以及促使其发展的根本原因。本书涵盖了C++对象模型的语意暗示,并指出了这个模型是如何对程序造成影响的。
探索“面向对象程序所支持的C++对象模型”中的程序行为。
对于“面向对象特点的基础实现技术”以及“有关这些特点的隐含利益交换”提供了一个清楚的认识。
检验由程序变形体带来的效率冲击。
提供丰富的程序范例、图表,以及面向对象概念和底层对象模型之间的效率测量。

作译者回到顶部↑

本书提供作译者介绍

Stanley B.Lippman目前已应微软邀请,加盟了Visual C++开发小组。此前他曾在贝尔实验室领导过cfront 3.0和2.1的编译器开发小组,并曾是Bjarne Stroustrup所领导的贝尔实验室基础项目中的一员。Stan是《C++ Primer》(3个版次,该书第三版的中文版已由中国电力出版社出版)及《Inside The C++ Object Model》(该书的影印版已由中国电力出版社出版)的作者,这些极为成功的书籍由Addison-Wesley出版。他也是《C++ Gems》的编辑,该书由Cambridge University Press出版。
.. << 查看详细

作者: Stanley B.Lippman
畅销图书《C++ Primer (3RD)中文版》的原版作者   Stanley B.Lippman的职业是提供关于C++和面向对象的训练、咨询、设计和指导。他在成为一名独立咨询顾问之前,曾经是迪士尼动化公司的首席软件设计师。当他在AT&T Bell实验室的时候,领导了cfront 3.0版本和2.1版本的编译器开发组。他也是Bjarne Stroustrup领导的Bell实验室Foundation项目的成员之一,负责C++程序设计环境中的对象模型部分。他还撰写了许多关于C++的文章。目前他已受雇于微软公司,负责Visual C++项目。遍及全球,深受广大C++学者的.. << 查看详细

[同作者作品]
深度探索C++对象模型(影印版)
C# Primer(影印版)
C++ Primer (3rd Edition)(英文原版进口)

目录回到顶部↑

Object Lessons 1
Layout Costs for Adding Encapsulation 5
1.1 The C++ Object Model 6
A simple object model 6/ A table-driven object model 7/
The C++ object model/ How the object model effects programs
1.2 A Keyword Distinction 12
Keywords schmeewords 13/ The politically correct struct 16
1.3 An Object Distinction 18
The type of a pointer 24/ Adding polymorphism 25
2 The Semantics of Constructors 31
2.1 Default Constructor Construction 32
Member class object with default constructor 34/ Base
class with default constructor 37/ Class with a virtual
function 37/ Class with a virtual base class 38/
Summary 39
2.2 Copy Constructor Construction 40
Default memberwise initialization 41/ Bitwise copy semantics 43/ Bitwise copy semantics---Not! 45/ Resetting
the Virtual Table Pointer 45/ Handling the Virtual Base
Class Subobject 47
2.3 Program Transformation Semantics 50

前言回到顶部↑

For nearly a decade within Bell Laboratories, I labored at implementing C++. First it was on cfront, Bjarne Stroustrup's original C++ implementation (from Release 1.1 back in 1986 through Release 3.0, made available in September 1991). Then it was on to what became known internally as the Simplifier, the C++ Object Model component of the Foundation project. It was during the Simplifier's design period that I conceived of and began working on this book.
What was the Foundation project? Under Bjarne's leadership, a small group of us within Bell Laboratories was exploring solutions to the problems of large-scale programming using C++. The Foundation was an effort to define a new development model for the construction of large systems
(again, using C++ only; we weren't providing a multilingual solution). It was an exciting project, both for the work we were doing and for the people doing the work: Bjarne, Andy Koenig, Rob Murray, Martin Carroll, Judy Ward, Steve Buroff, Peter Juhl, and myself. Barbara Moo was supervising the gang of us other than Bjarne and Andy. Barbara used to say that managing a software group was like herding a pride of cats.
We thought of the Foundation as a kernel upon which others would layer an actual development environment for users, tailoring it to a UNIX or Smalltalk model as desired. Internally, we called it Grail, as in the quest for, etc. (It seems a Bell Laboratories tradition to mock one's most serious intentions.)
Grail provided for a persistent, semantic-based representation of the program using an object-oriented hierarchy Rob Murray developed and named ALE Within Grail, the traditional compiler was factored into separate executables. The parser built up the ALF representation. Each of the other components (type checking, simplification, and code generation) and any tools,
such as a browser, operated on (and possibly augmented) a centrally stored ALF representation of the program. The Simplifier is the part of the compiler between type checking and code generation. (Bjarne came up with the name Simplifier; it is a phase of the original cfront implementation.)
What does a Simplifier do between type checking and code generation? It transforms the internal program representation. There are three general flavors of transformations required by any object model component:
1. Implementation-dependent transformations. These are implementation-specific aspects and vary across compilers. Under ALF, they involved the transformations of what we called "tentative" nodes.
For example, when the parser sees the expression fct();
it doesn't know if this is (a) an invocation of a function represented or pointed to by tct or (b) the application of an over loaded call operator on a class object fct. By default, the expression is represented as a function call. The Simplifier rewrites and replaces the call subtree when case (b) applies.
2. Language semantics transformations. These include constructor/destructor synthesis and augmentation, memberwise initialization and memberwise copy support, and the insertion within program code of conversion operators, temporaries, and constructor/destructor calls.
3. Code and object model transformations. These include support for virtual functions, virtual base classes and inheritance in general, operators new and delete, arrays of class objects, local static class instances, and the static initialization of global objects with nonconstant expressions. An implementation goal I aimed for in the Simplifier was to provide an Object Model hierarchy in which the object implementation was a virtual interface supporting multiple object models.
These last two categories of transformations form the basis of this book.
Does this mean this book is written for compiler writers? No, absolutely not. It is written by a (former) compiler writer (that's me) for intermediate to advanced C++ programmers (ideally, that's you). The assumption behind this book is that the programmer, by understanding the underlying C++ Object Model, can write programs that are both less error prone and more
efficient.
What Is the C++ Object Model?
There are two aspects to the C++ Object Model:
1. The direct support for object-oriented programming provided within the language
2. The underlying mechanisms by which this support is implemented The language level support is pretty well covered in my C++ Primer and in other books on C++. The second aspect is barely touched on in any current text, with the exception of brief discussions within [ELLIS90] and
[STROUP94]. It is this second aspect of the C++ Object Model that is the primary focus of this book. (In that sense, I consider this text to form a bookend to my C++ Primer, much as my MFA and MS degrees provide a "fearful symmetry" to my education.) The language covered within the text is the draft Standard C++ as of the winter 1995 meeting of the committee. (Except for some minor details, this should reflect the final form of the language.)The first aspect of the C++ Object Model is invariant. For example, under C++ the complete set of virtual functions available to a class is fixed at compile time; the programmer cannot add to or replace a member of that
评论交流

共有21人开贴评论  45人参与评论  18人参与打分 查看

11人
 61%
用户平均打分
我要写评论 help如何参与评论和打分
4人
 22%
1人
 5%
2人
 11%
0人
 0%

touch_224

二级评论员
该会员在china-pub购买过此书 精彩书评
评价等级:  
发表于:2009-12-17 9:36:00
书的内容没的说,对得起“深入”二字,可以让读者获得更多的语法下的语言实现机制的知识。
但是书校对的不是很细,有很多小错误,装帧也一般
您觉得呢? 送鲜花 (得0支)  扔鸡蛋 (得0个)

zhang_gl

五级评论员
该会员在china-pub购买过此书
评价等级:  
发表于:2010-3-15 10:59:00
本书重点论述了C++面向对象程序设计的底层机制,包括结构式语意,暂时性对象的生成
您觉得呢? 送鲜花 (得0支)  扔鸡蛋 (得0个)

xbase100

专家级评论员
该会员在china-pub购买过此书
评价等级:  
发表于:2009-12-27 19:27:00
c++的却对经典啊,高手必读
您觉得呢? 送鲜花 (得0支)  扔鸡蛋 (得0个)

woodhead001

专家级评论员
该会员在china-pub购买过此书
  
该作者发表于:2009-12-23 11:29:00
没有问题,好的书,值得用心读。书中介绍了C++对象模型的编译实现方式。在看这本书之前,我以为C ++ 编译器和C编译器一样,直接将C++内容编译成汇编语言,再进一步编译链接成本地机器码。现在想来,以前的思维有些僵化,程序设计语言编译链接的最终目标是生成能够在本地运行的机器码(或是虚拟机字节码),过程中可能产生多种不同的过渡语言文件,C++编译就可能经历C、汇编两个阶段,过渡阶段越多可能造成越多的编译开销,但也能充分利用已有的程序设计资源,提高编译效率。归根结底,就像本书那样,需要通过实验来证明一项技术或一个想法的实际效果
您觉得呢? 送鲜花 (得0支)  扔鸡蛋 (得0个)

alexandnpu
一级评论员
  
发表于:2009-8-5 15:56:00
快点进货阿,进货,进货!
您觉得呢? 送鲜花 (得0支)  扔鸡蛋 (得0个)
我要写评论
查看所有评论交流(共21条)