This class performs byte swapping. More...
#include "../include/Swap.h"
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 |
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
| int Swap::init | ( | int | flag | ) |
Initializes class values
| flag | Flag for type of swap and type of input data |
Referenced by WXP::MapFile::open(), WXP::TiffFile::read(), and WXP::AreaFile::readHeader().
1.6.1