beautypg.com

Tools.h++ and the c++ philosophy – HP Integrity NonStop J-Series User Manual

Page 15

background image

Click on the banner to return to the user guide home page.

©Copyright 1996 Rogue Wave Software

Tools.h++ and the C++ Philosophy

If you're familiar with C++, you'll feel comfortable with Tools.h++. As a C++ class library,
Tools.h++ shares many design goals with the C++ language itself. These mutual goals include:

Efficiency. In general, you will find no feature in Tools.h++ that impairs non-users of
the feature. As many decisions as possible are made at compile time, consistent with the
C++ philosophy of static type checking. In most cases, Tools.h++ offers you a choice
between classes with extreme simplicity, but little generality, and complex classes with
more generality.

Simplicity. To maintain simplicity, Tools.h++ uses few subclasses. Although the overall
architecture is sophisticated and integrated, each class usually plays just one well-defined
role. Many functions are also simple, consisting of a few lines of code. New features are
added sparingly: in general, if there is already a way to do it, we leave it out!

Compactness. Like C++, Tools.h++ aims to make programs compile small. Always a
desirable design goal, it also facilitates using programs in embedded systems. Templates
have a mixed effect in this regard: encouraging compact source code, but in many cases
compromising compactness when compiling.

Predictability. All of the familiar operators work just as you might expect_there are no
surprises, no esoteric overloaded operators. And Tools.h++ offers you great symmetry,
making it possible to do things like change the implementation of a dictionary from a
hash table to a B-tree with impunity.

This manual is related to the following products: