Team LiB
Previous Section Next Section

Chapter 17. Tools for Large Programs

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

CONTENTS

Section 17.1 Exception Handling

688

Section 17.2 Namespaces

712

Section 17.3 Multiple and Virtual Inheritance

731

Chapter Summary

748

Defined Terms

748


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