|
Streaming<ToolKit>
Universal Streaming Service
|
 |
Streaming<ToolKit> contains
a portable implementation of the Universal Streaming Service (USS). This service
provides a simple mechanism to make objects persistent or send them across
communication mechanisms without changing their inheritance structure. This
library is designed for use with most Recursion Software objects, your objects,
and a variety of third party vendor classes.
Streaming<ToolKit> contains
a set of classes that provides the following functionality.
- Object persistence - Easily
stores objects to and retrieves them from files.
- Object transport - Sends
objects across TCP sockets or other devices to another computer.
- IOStream interfaces - Uses
familiar text streaming interfaces and manipulators on a variety of I/O
devices, such as TCP sockets.
Streaming<ToolKit> provides
the following benefits.
- Ease of use - All
stream interfaces are based on well known semantics using
operator>>
and operator<< .
- Non-intrusive design - Designed
to provide object persistence and transport without requiring class
modifications. Requires no inheritance and, in most cases, requires no code
changes.
- Full language support - Fully
supports advanced language features including templates, multiple
inheritance, and virtual base classes.
- Cross-platform usage - Uses
the Network Data Representation (NDR) protocol by default to ensure data is
portable between different operating systems. Correctly manages issues like
byte ordering and data size.
- Protocol independence - Through
layered architecture, allows users to easily change protocols. In addition
to NDR, native and ASCII protocols are provided. Users can easily include
their variants.
- Vendor neutrality - Due
to non-intrusive design, streams any object, any Standard Template Library
container or string, and any of several third party vendor objects, using
the same mechanism.
- Device independence - You
can easily adapt Streaming<ToolKit>'s architecture to support any
number of devices. All Recursion Software devices are automatically
supported including files, pipes, and sockets. Recursion Software supports a
CORBA 2 integration so objects can be passed by value through CORBA IDL
interfaces.
- Debug type safety - Streaming<ToolKit>
provides an optional type-safety mode that encodes the stream data for
runtime type-safety. When enabled, type-safety clearly indicates data
sequencing errors in a predictable manner. When disabled, the stream is
compacted to a smaller size and runs at high performance.
- Precision loss detection - Streaming<ToolKit>
provides optional precision loss detection, which can help locate difficult
and costly data corruption errors during development.
- Morphology preservation - Streaming<ToolKit>
is careful to preserve the objects so object/pointer relationships are
correctly restored on the receiving side of the stream.
- ANSI IOStream compatible - The
text streaming interface provides a complete IOStream compatible interface
to any Recursion Software device. This allows IOStream interfaces on devices
like TCP sockets or pipes and provides consistent text streaming throughout
your entire application, regardless of device.
An object must be USS enabled to be
streamed in a binary format. Many of the Recursion Software <ToolKits>,
such as Standards<ToolKit> and Time<ToolKit>, are preenabled for
binary streaming. USS enabled objects do not have to inherit from a common base
class, so you can enable your objects for binary I/O without changing their
inheritance structure. In many cases, you do not need to modify a class' header
or source files.
This chapter describes how to
construct and use the Universal Streaming Service, as well as how to USS enable
your classes. Because the steps you must perform to USS enable your classes are
slightly different for non-template and template classes, there is a separate
section for each.
Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only.