• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

ByteOrderValues.h

00001 /**********************************************************************
00002  * $Id: ByteOrderValues.h 2579 2009-06-15 14:03:52Z strk $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************
00016  *
00017  * Last port: io/ByteOrderValues.java rev. 1.3 (JTS-1.10)
00018  *
00019  **********************************************************************/
00020 
00021 #ifndef GEOS_IO_BYTEORDERVALUES_H
00022 #define GEOS_IO_BYTEORDERVALUES_H
00023 
00024 #include <geos/export.h>
00025 
00026 #include <geos/platform.h>
00027 
00028 namespace geos {
00029 namespace io {
00030 
00031 /*
00032  * \class ByteOrderValues io.h geos.h
00033  * 
00034  * Methods to read and write primitive datatypes from/to byte
00035  * sequences, allowing the byte order to be specified
00036  * 
00037  * Similar to the standard Java <code>ByteBuffer</code> class.
00038  */
00039 class GEOS_DLL ByteOrderValues {
00040 
00041 public:
00042 
00043         static int ENDIAN_BIG;
00044         static int ENDIAN_LITTLE;
00045 
00046         static int getInt(const unsigned char *buf, int byteOrder);
00047         static void putInt(int intValue, unsigned char *buf, int byteOrder);
00048 
00049         static int64 getLong(const unsigned char *buf, int byteOrder);
00050         static void putLong(int64 longValue, unsigned char *buf, int byteOrder);
00051 
00052         static double getDouble(const unsigned char *buf, int byteOrder);
00053         static void putDouble(double doubleValue, unsigned char *buf, int byteOrder);
00054 
00055 };
00056 
00057 } // namespace io
00058 } // namespace geos
00059 
00060 #endif // #ifndef GEOS_IO_BYTEORDERVALUES_H
00061 
00062 /**********************************************************************
00063  * $Log$
00064  * Revision 1.1  2006/03/20 18:18:14  strk
00065  * io.h header split
00066  *
00067  **********************************************************************/

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1