beautypg.com

Concrete classes, Simple classes, Template-based collection classes – HP Integrity NonStop J-Series User Manual

Page 28: Generic collection classes

background image

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

©Copyright 1996 Rogue Wave Software

Concrete Classes

The concrete classes consist of:

The simple classes representing dates, times, strings, and so on, discussed in Chapters 3
through 5 (

3

,

4

,

5

);

The template-based collection classes, discussed in

Chapter 11

;

The generic collection classes using the preprocessor facilities, discussed in

Chapter 12

.

Simple Classes

Tools.h++ provides a rich set of lightweight simple classes. By lightweight, we mean classes
with low-cost initializers and copy constructors. These classes include:

RWDate

(for dates);

RWTime

(for times, with support for various time zones and locales);

RWCString

(for single

and multibyte strings);

RWWString

(for wide character strings); and

RWCRegexp

or

RWCRExpr

(for regular expressions). Most of these classes can be held in four bytes or less,

and have very simple copy constructors (usually just a bit copy) and no virtual functions. See
the

Class Reference

.

Template-based Collection Classes

Template-based collection classes, or templates for short, give you the advantages of speed and
type-safe usage. When templates are used sparingly, their code size can be quite small. When
templates are used with many different types, however, their code size can become large
because each type effectively generates a whole new class. If your compiler is capable of using
the Standard C++ Library, you can use the Tools.h++ template-based collections that are based
on the Standard C++ Library. If your compiler does not have access to the Standard C++
Library, you can still use a subset of the templates, as described in Chapter 11,

Standard C++

Library Not Required

and

Using Templates Without the Standard Library

.

This manual is related to the following products: