GEOS 3.9.1
ByteOrderValues.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: io/ByteOrderValues.java rev. 1.3 (JTS-1.10)
17 *
18 **********************************************************************/
19
20#ifndef GEOS_IO_BYTEORDERVALUES_H
21#define GEOS_IO_BYTEORDERVALUES_H
22
23#include <geos/export.h>
24#include <geos/constants.h>
25
26namespace geos {
27namespace io {
28
37class GEOS_DLL ByteOrderValues {
38
39public:
40
41 enum EndianType {
42 ENDIAN_BIG = 0,
43 ENDIAN_LITTLE = 1
44 };
45
46 static int getInt(const unsigned char* buf, int byteOrder);
47 static void putInt(int intValue, unsigned char* buf, int byteOrder);
48
49 static int64 getLong(const unsigned char* buf, int byteOrder);
50 static void putLong(int64 longValue, unsigned char* buf, int byteOrder);
51
52 static double getDouble(const unsigned char* buf, int byteOrder);
53 static void putDouble(double doubleValue, unsigned char* buf, int byteOrder);
54
55};
56
57} // namespace io
58} // namespace geos
59
60#endif // #ifndef GEOS_IO_BYTEORDERVALUES_H
Methods to read and write primitive datatypes from/to byte sequences, allowing the byte order to be s...
Definition: ByteOrderValues.h:37
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26