Chapter 3 SourcePro Core
3.1 Definition
SourcePro Core contains an extensive set of fundamental C++ components capable of supporting a wide range of application development. SourcePro Core consists of five modules:

The
Essential Tools Module
The
Threads Module
The
Advanced Tools Module
The
XML Streams Module
The
Internationalization Module3.1.1 The Essential Tools Module
The Essential Tools Module is an internationalized set of C++ classes that provide the basic building blocks for most C++ applications. The Essential Tools Module is the foundation for all Rogue Wave products. Because all SourcePro C++ products depend on the Essential Tools Module, -SourcePro Core is included with each SourcePro C++ product.
The Essential Tools Module provides broad functionality. To aid navigation, the Essential Tools Module can be divided into the following class groups:

Date and Time Classes

String Processing Classes

Virtual Stream Classes

RWCollectable Classes

Traditional Collection Classes

STL-based Collection Classes

STL Extension-based Collection Classes

Internationalization Classes

File System Classes

Miscellaneous Classes
These class groups are accessible through the Modules tab of the SourcePro C++ API Reference Guide.
For more information on building the Essential Tools Module, see
Installing and Building Your SourcePro C++ Products. For an example using the Essential Tools Module and the C++ Standard Library, see
Section 3.2. For examples using the Essential Tools Module with other SourcePro C++ products, see
Section 5.2 and
Section 6.2.
3.1.2 The Threads Module
The Threads Module in SourcePro Core contains Rogue Wave C++ classes for writing multithreaded applications. The principle role of this module is to provide the mechanisms necessary for the creation and synchronization of threads across a variety of operating systems and platforms.
The Threads Module can be used to create new multithreaded applications, or to add multithreading to existing applications. For code examples using the Threads Module with other SourcePro C++ products, please see
Section 3.3,
Section 4.2 and
Section 5.2.
The classes of the Threads Module are divided into the following packages:

Threading Package

Synchronization Package

Interthread Communication Package

Smart Pointer Package

Functor Package

Execution Tracing Package

Thread-compatible Exception Package
These class groups are accessible through the Modules tab of the SourcePro C++ API Reference Guide.
3.1.3 The Advanced Tools Module
The Advanced Tools Module in SourcePro Core provides mechanisms for complex stream transformations and object serializations. The stream abstractions provide more ways to move data into and out of your application, and can optionally interoperate with the virtual stream mechanism in the Essential Tools Module. The serialization mechanism enables you to flatten and transport objects across communication boundaries and to store the contents of these objects to disk. The Types package provides a single class for manipulating string-based symbols.
In line with this functionality, the classes of the Advanced Tools Module are divided into three packages:

Streams Package

Serialization Package

Types Package
These class groups are accessible through the Modules tab of the SourcePro C++ API Reference Guide.
3.1.4 The XML Streams Module
The XML Streams Module in SourcePro Core allows you to serialize an object and write it as a stream of XML data. The serialized object can later be streamed in and restored, either by the process that streamed the object or by another process equipped to handle XML streams. The XML Streams Module works directly with the data streams and object serialization classes of the Advanced Tools Module.
The XML Streams Module consists of a single package, the XML Streams Package.
This class group is accessible through the Modules tab of the SourcePro C++ API Reference Guide.
3.1.5 The Internationalization Module
The Internationalization Module in SourcePro Core provides classes for:

representing, collating, normalizing, and parsing Unicode strings

conversion between Unicode and hundreds of other character encodings

storing and accessing locale-dependent data, such as message strings
Collectively, these classes provide a framework for internationalization and localization, enabling rapid development of applications targeted for global markets.
The Internationalization Module is built on the International Components for Unicode (ICU), the industry standard for Unicode processing. ICU is an open source library written in C and C++, and developed and maintained by IBM. Unicode is the universal character encoding scheme for written characters and text. It is the industry standard for writing internationalized applications. This is especially true for any environment that requires a wide character encoding (16-bits or greater), such as some Chinese and Japanese character encodings. Using Unicode in your applications, you can represent all major written languages, and most minor ones.
You can build your applications with or without the Internationalization Module. In general, SourcePro Core does not assume that characters are in any particular encoding, and in particular can handle single-byte and multibyte encodings. However, the Internationalization Module offers additional functionality based upon extensive databases of character and locale information.
For a code example using the Internationalization Module with the C++ Standard Library and the Threads Module, see
Section 3.3.
The classes in the Internationalization Module can be divided into the following functional groups:

Unicode String Processing Classes

Character Encoding Scheme Conversion Classes

Localization Classes

Error Handling Classes
These class groups are accessible through the Modules tab of the SourcePro C++ API Reference Guide.