WXP::Swap Class Reference

This class performs byte swapping. More...

#include "../include/Swap.h"

List of all members.

Public Member Functions

 Swap (int flag)
int init (int flag)
int swap8 (unsigned char *ptr)
int swap4 (unsigned char *ptr)
int swap4 (unsigned char *ptr, int num)
int swap2 (unsigned char *ptr)
int swap2 (unsigned char *ptr, int num)
int readDouble (File &ifile, double &data)
int readFloat (File &ifile, float &data)
int readUInt4 (File &ifile, unsigned int &data)
int readInt4 (File &ifile, int &data)
int readUInt2 (File &ifile, unsigned short &data)
int readInt2 (File &ifile, short &data)
int writeFloat (File &ofile, float data)
int writeInt4 (File &ofile, int data)
int writeInt2 (File &ofile, short data)

Static Public Attributes

static const int NEVER = -1
static const int ALWAYS = 0
static const int MachRev_DataStand = 1
static const int MachStand_DataRev = 2

Detailed Description

This class performs byte swapping.

flag = NEVER - never swap
flag = ALWAYS - swap no matter what
flag = MachRev_DataStand - swap if machine reverse and data standard
flag = MachStand_DataRev - swap if machine standard and data reverse

Author:
Dan Vietor

Member Function Documentation

int Swap::init ( int  flag  ) 

Initializes class values

Parameters:
flag Flag for type of swap and type of input data

Referenced by WXP::MapFile::open(), WXP::TiffFile::read(), and WXP::AreaFile::readHeader().


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

Generated on 8 Jan 2010 for WXP C++ Library by  doxygen 1.6.1