casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::LECanonicalIO Class Reference

Class for IO in little endian canonical format. More...

#include <LECanonicalIO.h>

Inheritance diagram for casa::LECanonicalIO:
casa::TypeIO

List of all members.

Public Member Functions

 LECanonicalIO (ByteIO *byteIO, uInt bufferLength=4096, Bool takeOver=False)
 Constructor.
 LECanonicalIO (const LECanonicalIO &canonicalIO)
 The copy constructor uses reference semantics.
LECanonicalIOoperator= (const LECanonicalIO &canonicalIO)
 The assignment operator uses reference semantics.
 ~LECanonicalIO ()
 Destructor, deletes allocated memory.
virtual uInt write (uInt nvalues, const Bool *value)
 Convert the values and write them to the ByteIO object.
virtual uInt write (uInt nvalues, const Char *data)
virtual uInt write (uInt nvalues, const uChar *data)
virtual uInt write (uInt nvalues, const Short *data)
virtual uInt write (uInt nvalues, const uShort *data)
virtual uInt write (uInt nvalues, const Int *data)
virtual uInt write (uInt nvalues, const uInt *data)
virtual uInt write (uInt nvalues, const Int64 *data)
virtual uInt write (uInt nvalues, const uInt64 *data)
virtual uInt write (uInt nvalues, const Float *data)
virtual uInt write (uInt nvalues, const Double *data)
virtual uInt write (uInt nvalues, const Complex *value)
virtual uInt write (uInt nvalues, const DComplex *value)
virtual uInt write (uInt nvalues, const String *value)
virtual uInt read (uInt nvalues, Bool *value)
 Read the values from the ByteIO object and convert them.
virtual uInt read (uInt nvalues, Char *data)
virtual uInt read (uInt nvalues, uChar *data)
virtual uInt read (uInt nvalues, Short *data)
virtual uInt read (uInt nvalues, uShort *data)
virtual uInt read (uInt nvalues, Int *data)
virtual uInt read (uInt nvalues, uInt *data)
virtual uInt read (uInt nvalues, Int64 *data)
virtual uInt read (uInt nvalues, uInt64 *data)
virtual uInt read (uInt nvalues, Float *data)
virtual uInt read (uInt nvalues, Double *data)
virtual uInt read (uInt nvalues, Complex *value)
virtual uInt read (uInt nvalues, DComplex *value)
virtual uInt read (uInt nvalues, String *value)

Private Attributes

char * itsBuffer
 
     

uInt itsBufferLength

Detailed Description

Class for IO in little endian canonical format.

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>Friso Olnon<dt>Date Reviewed:<dd>1996/11/06<dt>Test programs:<dd>tTypeIO</dl> 

Prerequisite

Synopsis

LECanonicalIO is a specialization of class TypeIO to store data in little endian canonical format.

The class converts the data to/from canonical data and reads/writes them from/into the ByteIO object given at construction time. Conversion is only done when really needed. If not needed, the data is directly read or written.

LECanonical format is little-endian IEEE format, where longs are 8 bytes. Bools are stored as bits to be as space-efficient as possible. This means that on a 32-bit SUN or HP conversions only have to be done for Bools and longs. For a DEC-alpha, however, the data will always be converted because it is a little-endian machine.

Definition at line 70 of file LECanonicalIO.h.


Constructor & Destructor Documentation

casa::LECanonicalIO::LECanonicalIO ( ByteIO byteIO,
uInt  bufferLength = 4096,
Bool  takeOver = False 
) [explicit]

Constructor.

The read/write functions will use the given ByteIO object as the data store.

The read and write functions use an intermediate buffer to hold the data in canonical format. For small arrays it uses a fixed buffer with length bufferLength. For arrays not fitting in this buffer, it uses a temporary buffer allocated on the heap.

If takeOver is True the this class will delete the supplied pointer. Otherwise the caller is responsible for this.

The copy constructor uses reference semantics.

Destructor, deletes allocated memory.


Member Function Documentation

LECanonicalIO& casa::LECanonicalIO::operator= ( const LECanonicalIO canonicalIO)

The assignment operator uses reference semantics.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Bool value 
) [virtual]

Read the values from the ByteIO object and convert them.

Bool, complex and String values are handled by the base class.

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Char data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
uChar data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Short data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
uShort data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Int data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
uInt data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Int64 data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
uInt64 data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Float data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Double data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
Complex *  value 
) [virtual]

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
DComplex *  value 
) [virtual]

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::read ( uInt  nvalues,
String value 
) [virtual]

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Bool value 
) [virtual]

Convert the values and write them to the ByteIO object.

Bool, complex and String values are handled by the base class.

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Char data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const uChar data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Short data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const uShort data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Int data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const uInt data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Int64 data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const uInt64 data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Float data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Double data 
) [virtual]

Implements casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const Complex *  value 
) [virtual]

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const DComplex *  value 
) [virtual]

Reimplemented from casa::TypeIO.

virtual uInt casa::LECanonicalIO::write ( uInt  nvalues,
const String value 
) [virtual]

Reimplemented from casa::TypeIO.


Member Data Documentation

     

Definition at line 136 of file LECanonicalIO.h.

Definition at line 137 of file LECanonicalIO.h.


The documentation for this class was generated from the following file: