SLIMMER
Public Member Functions | Static Public Attributes
ReadDataType Class Reference

Read Low Level Data Types From File. More...

#include <ReadDataType.h>

Inheritance diagram for ReadDataType:
SimpleVoxIO SimpleTField< T, TS > SimpleTField< float > SimpleTField< T > SimpleTField< T2 > Stack< T, TTransformType >

List of all members.

Public Member Functions

 ReadDataType ()
 Constructor.
virtual ~ReadDataType ()
 Destructor.
int TabSuffixOf (const int i)
int MaxCodeVal () const
void ByteSwap2 (char *d, const int &l)
 Swap Byte Pairs in a char array.
void ByteSwap2 (short *ds, const int &l)
 Swap Byte Pairs in a short array.
void ByteSwap4 (char *d, const int &l)
 Swap Byte Quads in a char array.
void ByteSwap4 (int *di, const int &l)
 Swap Byte Quads in an int array.
void ByteSwap8 (char *d, const int &l)
 Swap Byte Octs in a char array.
void EndianFix2 (char *d, const int &l)
 Fix Byte Order.
void EndianFix2 (short *ds, const int &l)
void EndianFix4 (char *d, const int &l)
void EndianFix4 (int *di, const int &l)
void EndianFix8 (char *d, const int &l)
void EndianB2 (char *d, const int &l)
void EndianB2 (short *ds, const int &l)
void EndianB4 (char *d, const int &l)
void EndianB4 (int *di, const int &l)
void EndianB8 (char *d, const int &l)
void EndianL2 (char *d, const int &l)
 Convert 2-byte order in char array from Little Endian Format.
void EndianL2 (short *ds, const int &l)
 Convert 2-byte order in short array from Little Endian Format.
void EndianL4 (char *d, const int &l)
 Convert 4-byte order in char array from Little Endian Format.
void EndianL4 (int *di, const int &l)
 Convert 4-byte order in int array from Little Endian Format.
void EndianL8 (char *d, const int &l)
 Convert 8-byte order in char array from Little Endian Format.
int gtcfread (char *mem, int start, int num, FILE *fp)
 Read Raw Bytes from Compressed (or Uncompressed File)
long int ReadNextCode (FILE *fp, int fflg)
 Read Next Compression Code From File -------------.
FILE * fzopen (char *n, const char *t)
 Open a Compressed (or Uncompressed) File With Given Name (and if can't then try adding .Z!)
int CheckStringInFile (char *name, int offset, const char *text)
int GetStringFloat (float &val, char *name, int offset, int length)
int GetString (char *name, char *tmp, int offset, int length)
short GetShortLE (FILE *fp, int off)
short GetShortLE (char *name, int off)
short GetShortBE (char *name, int off)
int GetLongLE (FILE *fp, int off)
 Get Little Endian int from File.
int GetLongBE (FILE *fp, int off)
 Get Big Endian int from File.
float GetFloatBE (FILE *fp, int off)
 Get Big Endian float from File.
float GetFloatLE (FILE *fp, int off)
 Get Little Endian float from File.
double GetDoubleBE (FILE *fp, int off)
 Get Big Endian double from File.
int GetLongBE (char *name, int off)
double GetDoubleBE (char *name, int off)
float GetFloatBE (char *name, int off)
float GetFloatLE (char *name, int off)
int GetLongLE (char *name, int off)
int CheckLongBE (char *name, int off, int check)
 Check if Given int value is in a file at given location.
int CheckLongLE (char *name, int off, int check)
 Check if Given int value is in a file at given location.
float GetDataGenFloat (FILE *fp, int off)
 Get a Data General Format Float Value.
float GetVaxFloat (FILE *fp, int off)
 Get a VAX float from file at given offset from start.

Static Public Attributes

static const char _versionID [] = "$Id: ReadDataType.h,v 1.10 2010/05/07 18:36:49 cs Exp $"
 Working Buffer.

Detailed Description

Read Low Level Data Types From File.

Class holding Low Level Routines to Uncompress/Read and Change Byte Order of Basic data types from files into Machine Memory Order

Handles Uncompression to memory of .Z (unix Compressed) files

Author:
Colin Studholme 1996-
Id:
ReadDataType.h,v 1.10 2010/05/07 18:36:49 cs Exp

Member Function Documentation

int ReadDataType::CheckStringInFile ( char *  name,
int  offset,
const char *  text 
) [inline]

Look for a given string at a location in a given compressed (or Uncompressed) File

FILE* ReadDataType::fzopen ( char *  n,
const char *  t 
) [inline]

Open a Compressed (or Uncompressed) File With Given Name (and if can't then try adding .Z!)

try removing '.Z' and opening without

try adding'.Z' and opening

short ReadDataType::GetShortBE ( char *  name,
int  off 
) [inline]

Read a Short Big Endian integer from File at location off into Native Order

short ReadDataType::GetShortLE ( char *  name,
int  off 
) [inline]

Read a Short Little Endian integer from File at location off into Native Order

short ReadDataType::GetShortLE ( FILE *  fp,
int  off 
) [inline]

Read a Short Little Endian integer from File at location off into Native Order

 All Classes Functions Variables Typedefs