Tools.h++ Manual

104011 Tandem Computers Incorporated 3-3
3
Generic collection classes
“Generic collection classes” are so called because they use the
<generic.h>
preprocessor macros supplied with your C++ compiler. They can approximate
templates for those compilers that do not support them. As such, they are
highly portable. However, because they depend heavily on the preprocessor,
they can be difficult to debug.
3.2 Abstract data types
The library also includes a set of abstract data types (ADTs), and
corresponding specializing classes, that provide a framework for persistence,
localization, and other issues.
Locale, discussed in Chapter , “Internationalization;”
Time zones, discussed in Chapter , “Internationalization;”
Virtual streams, discussed in Chapter 8, “Virtual Streams;”
A comprehensive Smalltalk hierarchy, discussed in Chapter 15, “Smalltalk-
like Collection Classes;”
Isomorphic persistence, discussed in Chapter 16, “Persistence;”
Virtual page heaps, discussed in Chapter , “Class Reference;”
Model-View-Controller abstraction, discussed in Chapter 21, “Class
Reference.”
Smalltalk-like collection classes
The “Smalltalk-like collection classes” are so called because they offer much of
the functionality of their Smalltalk namesakes, such as
Bag,
SortedCollection
, etc. However, they are not slavish imitations and instead
pay homage to the strengths and weaknesses of C++. Their greatest
advantages are their simple programming interface, powerful I/O abilities,
and high code reuse. Their biggest disadvantages are their relatively high
object code size when used in only small doses (because of an initially high
overhead in code machinery) and their relative lack of type safeness. All
objects to be used by the Smalltalk-like collection classes must also inherit from
the abstract base class
RWCollectable
.