Tools.h++ Manual
3-2 104011 Tandem Computers Incorporated
3
“Information flow” on page 7 lists the hierarchy of all the public Tools.h++
classes. In addition, there are some other classes that are used internally by the
library.
3.1 Concrete classes
The concrete classes consist of
• A set of simple classes (such as dates, times, strings, etc.), discussed in
Chapter 5, “Strings;” Chapter , “Using Class RWDate;” and Chapter 7,
“Using Class RWTime.”
• A set of collection classes based on templates, discussed in Chapter 13,
“Templates;”
• A set of collection classes that use the preprocessor
<generic.h>
facilities,
discussed in Chapter 14, ““Generic” Collection Classes.”
Simple classes
Tools.h++ provides a rich set of lightweight simple classes. By “lightweight”
we mean classes with low-cost initializers and copy constructors. Examples
include
RWDate
(dates, following the Gregorian calendar),
RWTime
(times,
including support for various time zones and locales),
RWCString
(single- and
multi-byte strings),
RWWString
(wide character strings), and
RWCRegexp
(regular expressions). Most of these classes are four bytes or less, with very
simple copy constructors (usually just a bit copy) and no virtual functions.
Template classes
Template classes use the template facility of AT&T V3.0 compliant compilers.
They offer the advantages of speed and type safe usage. Their code size can
also be quite small when used sparingly. Their disadvantages is that when
used with many different types, code size can become large because each type
effectively generates a whole new class.