00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_IO_BYTEORDERVALUES_H
00021 #define GEOS_IO_BYTEORDERVALUES_H
00022
00023 #include <geos/export.h>
00024 #include <geos/platform.h>
00025
00026 namespace geos {
00027 namespace io {
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 class GEOS_DLL ByteOrderValues {
00038
00039 public:
00040
00041 enum EndianType
00042 {
00043 ENDIAN_BIG = 0,
00044 ENDIAN_LITTLE = 1
00045 };
00046
00047 static int getInt(const unsigned char *buf, int byteOrder);
00048 static void putInt(int intValue, unsigned char *buf, int byteOrder);
00049
00050 static int64 getLong(const unsigned char *buf, int byteOrder);
00051 static void putLong(int64 longValue, unsigned char *buf, int byteOrder);
00052
00053 static double getDouble(const unsigned char *buf, int byteOrder);
00054 static void putDouble(double doubleValue, unsigned char *buf, int byteOrder);
00055
00056 };
00057
00058 }
00059 }
00060
00061 #endif // #ifndef GEOS_IO_BYTEORDERVALUES_H