Jive reference manual
Functions
General I/O-related utility functions

A collection of handy I/O-related functions. More...

Functions

bool jem::io::canZip ()
 Indicates whether data compression is supported. More...
 
template<class Iterator >
TextOutput & jem::io::printSequence (TextOutput &out, Iterator first, Iterator last, const char *separator)
 Prints a sequence of objects to a text output stream. More...
 

Detailed Description

#include <jem/io/utilities.h>

This header file provides a collection of simple I/O-related utility functions. It is essentially a collection of functions that do not seem to fit anywhere else.

Function Documentation

bool jem::io::canZip ( )

Returns true if this version of Jem supports data compression and decompression using the zlib library (see www.zlib.org). It returns false otherwise.

See also
ZipInputStream, ZipOutputStream
template<class Iterator >
TextOutput& jem::io::printSequence ( TextOutput out,
Iterator  first,
Iterator  last,
const char *  separator 
)

Prints the elements between the iterators first and last to the text output stream out. The string separator is printed between two successive elements.

This function essentially executes the following code:

for ( ; first != last; ++first )
{
out << *first;
if ( first != last )
{
out << separator;
}
}
Parameters
out- a text output stream.
first- an iterator pointing to the first element to be printed.
last- an iterator pointing one position past the last element to be printed.
separator- the string to be printed between two successive elements.
Returns
out
Precondition
The object returned by the expression *first must provide an overloaded print operator.
Exceptions
IOException- if an I/O error occurs.