Team LiB
Previous Section Next Section

Chapter 17. Tools for Large Programs

第十七章 用于大型程序的工具


Section 17.1 Exception Handling


Section 17.2 Namespaces


Section 17.3 Multiple and Virtual Inheritance


Chapter Summary


Defined Terms


C++ is used on problems that have a wide range in complexity. It is used on problems small enough to be solved by a single programmer after a few hours' work to problems requiring enormous systems consisting of tens of millions of lines of code developed and modified over many years. The facilities we covered in the earlier parts of this book are equally useful across this range of programming problems.

用 C++ 解决的问题,其复杂性千变万化,问题一个程序员几小时便可解决,有的则需要用许多年开发和修改的数千万行代码构成的庞大系统。本书前面所介绍的内容对这些编程问题都同样适用。

The language includes some features that are most useful on systems once problems get to be more complex than those that an individual can manage. These featuresexception handling, namespaces, and multiple inheritanceare the topic of this chapter.

C++ 语言包含的一些特征在问题比较复杂,非个人所能管理时最为有用。本章的主题就是这些特征,即异常处理、命名空间和多重继承。

Large-scale programming places greater demands on programming languages than do the needs of systems that can be developed by small teams of programmers. Among the needs that distinguish large-scale applications are:


  1. Stricter up-time requirements and the need for more robust error detection and error handling. Error handling often must span independently developed subsystems.


  2. The ability to structure programs that are composed of libraries developed more or less independently.


  3. The need to deal with more complicated application concepts.


Three features in C++ are aimed at these needs: exception handling, namespaces, and multiple inheritance. This chapter looks at these three facilities.

C++ 中有下列三个特征分别针对这些要求:异常处理、命名空间和多重继承。本章将这三个特征。

Team LiB
Previous Section Next Section