WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Swap.h
1#ifndef _WINC_SWAP
2#define _WINC_SWAP
3
4#include <WXP/File.h>
5
6namespace WXP {
7 class Swap {
8 unsigned long swaptest;
9 int type;
10
11 public:
12 Swap( int flag );
13 Swap();
14 int init( int flag );
15 int swap8( unsigned char *ptr );
16 int swap4( unsigned char *ptr );
17 int swap4( unsigned char *ptr, int num );
18 int swap2( unsigned char *ptr );
19 int swap2( unsigned char *ptr, int num );
20 int readDouble( File &ifile, double &data );
21 int readFloat( File &ifile, float &data );
22 int readUInt4( File &ifile, unsigned int &data );
23 int readInt4( File &ifile, int &data );
24 int readUInt2( File &ifile, unsigned short &data );
25 int readInt2( File &ifile, short &data );
26 int writeFloat( File &ofile, float data );
27 int writeInt4( File &ofile, int data );
28 int writeInt2( File &ofile, short data );
29
30 static const int NEVER = -1;
31 static const int ALWAYS = 0;
32 static const int DataStand = 1;
33 static const int DataRev = 2;
34 static const int BigEndian = 1;
35 static const int LittleEndian = 2;
36 };
37}
38#endif
This class accesses files.
Definition: File.h:15
This class performs byte swapping.
Definition: Swap.h:7
int init(int flag)
Definition: Swap.cc:39
All WXP classes fall under the WXP namespace.
Definition: Angle.h:4