rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMapInput Class Reference

This class defines an input stream with extended reading capabilities. More...

#include <ilviews/maps/format/mapinput.h>

List of all members.

Public Member Functions

 IlvMapInput (const char *fileName)
 Initializes an instance of IlvMapInput and updates the error flag.
 IlvMapInput (istream &stream)
 Initializes an instance of IlvMapInput.
IlInt getIndex () const
 Returns the current index in the stream.
IlvMapsError getLastError () const
 Returns the code of last error that occurred.
IL_STDPREF istream * getStream () const
 Returns the input stream.
IlvMapsError read (char *data, int length)
 Reads up to length bytes of data from the specified file and stores it in a char array.

Exceptions:
IOException if an exception occurs while reading the data.

IlvMapsError readBigDouble (IlDouble &value)
 Reads a 64-bit IIIE double coded in big endian format.
IlvMapsError readBigDoubleArray (const IlDouble *values, IlInt count)
 Reads an array of 64-bit IIIE double coded in big endian format.
IlvMapsError readBigInt (IlInt &value)
 Reads a 32-bit integer coded in big endian format.
IlvMapsError readBigIntArray (const IlInt *values, IlInt count)
 Reads an array of 32-bit integer coded in big endian format.
IlvMapsError readBigShort (IlShort &value)
 Reads a 16-bit integer coded in big endian format.
IlvMapsError readBigShortArray (const IlShort *values, IlInt count)
 Reads an array of 16-bit integer coded in big endian format.
IlvMapsError readBigUnsignedInt (IlUInt &value)
 Reads a 32-bit unsigned integer coded in big endian format.
IlvMapsError readBigUnsignedIntArray (const IlUInt *values, IlInt count)
 Reads an array of 32-bit unsigned integer coded in big endian format.
IlvMapsError readBigUnsignedShort (IlUShort &value)
 Reads a 16-bit unsigned integer coded in big endian format.
IlvMapsError readByte (char &value)
 Reads and returns one input byte.
IlvMapsError readLittleDouble (IlDouble &value)
 Reads a 64-bit IIIE double coded in little endian format.
IlvMapsError readLittleDoubleArray (const IlDouble *values, IlInt count)
 Reads an array of 64-bit IIIE double coded in little endian format.
IlvMapsError readLittleInt (IlInt &value)
 Reads a 32-bit integer coded in little endian format.
IlvMapsError readLittleIntArray (const IlInt *values, IlInt count)
 Reads an array of 32-bit integer coded in little endian format.
IlvMapsError readLittleShort (IlShort &value)
 Reads a 16-bit integer coded in little endian format.
IlvMapsError readLittleShortArray (const IlShort *values, IlInt count)
 Reads an array of 16-bit integer coded in little endian format.
IlvMapsError readUnsignedByte (IlUChar &value)
 Reads an unsigned byte and sets it to value.
IlvMapsError setLocation (IlInt loc)
 Sets the location where the next read operation will occur to the specified index.
IlvMapsError skipBytes (IlInt n)
 Skips exactly n bytes of input.

Static Public Member Functions

static IlvMapsError EndOfFileError ()
 Returns the error code for End Of File.
static IlBoolean IsLSBFirst ()
 Returns true if the machine stores internal values with the lLess Significant Byte First, and false if the machine stores internal values with the Most Significant Byte First.
static IlvMapsError ReadError ()
 Returns the error code for a Read Error.

Detailed Description

This class defines an input stream with extended reading capabilities.

Library: ilvmaps


Constructor & Destructor Documentation

IlvMapInput::IlvMapInput ( istream &  stream  ) 

Initializes an instance of IlvMapInput.

Parameters:
input The input data.
IlvMapInput::IlvMapInput ( const char *  fileName  ) 

Initializes an instance of IlvMapInput and updates the error flag.

Parameters:
fileName The name of the input file.

Member Function Documentation

IlvMapsError IlvMapInput::readBigDouble ( IlDouble value  ) 

Reads a 64-bit IIIE double coded in big endian format.

Exceptions:
IOException if an exception occurs while reading the data.
IlvMapsError IlvMapInput::readBigDoubleArray ( const IlDouble values,
IlInt  count 
)

Reads an array of 64-bit IIIE double coded in big endian format.

Parameters:
array An allocated array of double where the result will be stored.
count The number of double to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readBigInt ( IlInt value  ) 

Reads a 32-bit integer coded in big endian format.

Exceptions:
IOException if an exception occurs while reading.
IlvMapsError IlvMapInput::readBigIntArray ( const IlInt values,
IlInt  count 
)

Reads an array of 32-bit integer coded in big endian format.

Parameters:
array An allocated array of IlvInt where the result will be stored.
count The number of integer to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readBigShortArray ( const IlShort values,
IlInt  count 
)

Reads an array of 16-bit integer coded in big endian format.

Parameters:
array An allocated array of IlvShort where the result will be stored.
count The number of integer to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readBigUnsignedIntArray ( const IlUInt values,
IlInt  count 
)

Reads an array of 32-bit unsigned integer coded in big endian format.

Parameters:
array An allocated array of IlvInt where the result will be stored.
count The number of integer to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readByte ( char &  value  ) 

Reads and returns one input byte.

Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readLittleDouble ( IlDouble value  ) 

Reads a 64-bit IIIE double coded in little endian format.

Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readLittleDoubleArray ( const IlDouble values,
IlInt  count 
)

Reads an array of 64-bit IIIE double coded in little endian format.

Parameters:
array An allocated array of double where the result will be stored.
count The number of double to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readLittleIntArray ( const IlInt values,
IlInt  count 
)

Reads an array of 32-bit integer coded in little endian format.

Parameters:
array An allocated array of IlvInt where the result will be stored.
count The number of integer to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readLittleShortArray ( const IlShort values,
IlInt  count 
)

Reads an array of 16-bit integer coded in little endian format.

Parameters:
array An allocated array of IlvShort where the result will be stored.
count The number of integer to be read.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::readUnsignedByte ( IlUChar value  ) 

Reads an unsigned byte and sets it to value.

Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::setLocation ( IlInt  loc  ) 

Sets the location where the next read operation will occur to the specified index.

Parameters:
loc The index where the next read operation will occur.
See also:
IlvMapInput::getIndex
Returns:
The error code if an error occurred, or IlvMaps::NoError.
IlvMapsError IlvMapInput::skipBytes ( IlInt  n  ) 

Skips exactly n bytes of input.

Parameters:
n The number of bytes to be skipped.
Returns:
The error code if an error occurred, or IlvMaps::NoError.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.