Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

ByteOrderValues.h

00001 /**********************************************************************
00002  * $Id: ByteOrderValues.h 2556 2009-06-06 22:22:28Z 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 #ifndef GEOS_IO_BYTEORDERVALUES_H
00018 #define GEOS_IO_BYTEORDERVALUES_H
00019 
00020 #include <geos/export.h>
00021 
00022 #include <geos/platform.h>
00023 
00024 namespace geos {
00025 namespace io {
00026 
00027 /*
00028  * \class ByteOrderValues io.h geos.h
00029  * 
00030  * Methods to read and write primitive datatypes from/to byte
00031  * sequences, allowing the byte order to be specified
00032  * 
00033  * Similar to the standard Java <code>ByteBuffer</code> class.
00034  */
00035 class GEOS_DLL ByteOrderValues {
00036 
00037 public:
00038 
00039         static int ENDIAN_BIG;
00040         static int ENDIAN_LITTLE;
00041 
00042         static int getInt(const unsigned char *buf, int byteOrder);
00043         static void putInt(int intValue, unsigned char *buf, int byteOrder);
00044 
00045         static int64 getLong(const unsigned char *buf, int byteOrder);
00046         static void putLong(int64 longValue, unsigned char *buf, int byteOrder);
00047 
00048         static double getDouble(const unsigned char *buf, int byteOrder);
00049         static void putDouble(double doubleValue, unsigned char *buf, int byteOrder);
00050 
00051 };
00052 
00053 } // namespace io
00054 } // namespace geos
00055 
00056 #endif // #ifndef GEOS_IO_BYTEORDERVALUES_H
00057 
00058 /**********************************************************************
00059  * $Log$
00060  * Revision 1.1  2006/03/20 18:18:14  strk
00061  * io.h header split
00062  *
00063  **********************************************************************/

Generated on Thu Jun 11 06:17:00 2009 for GEOS by  doxygen 1.4.4