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

BinaryHelper.hh

00001 //=============================================================================
00002 //                                                                            
00003 //                               OpenMesh                                     
00004 //      Copyright (C) 2001-2005 by Computer Graphics Group, RWTH Aachen       
00005 //                           www.openmesh.org                                 
00006 //                                                                            
00007 //-----------------------------------------------------------------------------
00008 //                                                                            
00009 //                                License                                     
00010 //                                                                            
00011 //   This library is free software; you can redistribute it and/or modify it 
00012 //   under the terms of the GNU Library General Public License as published  
00013 //   by the Free Software Foundation, version 2.                             
00014 //                                                                             
00015 //   This library is distributed in the hope that it will be useful, but       
00016 //   WITHOUT ANY WARRANTY; without even the implied warranty of                
00017 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         
00018 //   Library General Public License for more details.                          
00019 //                                                                            
00020 //   You should have received a copy of the GNU Library General Public         
00021 //   License along with this library; if not, write to the Free Software       
00022 //   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 
00023 //                                                                            
00024 //-----------------------------------------------------------------------------
00025 //                                                                            
00026 //   $Revision: 1.1.1.1 $
00027 //   $Date: 2004/09/06 12:35:05 $
00028 //                                                                            
00029 //=============================================================================
00030 
00031 
00032 //=============================================================================
00033 //
00034 //  Helper Functions for binary reading / writing
00035 //
00036 //=============================================================================
00037 
00038 #ifndef OPENMESH_BINARY_HELPER_HH
00039 #define OPENMESH_BINARY_HELPER_HH
00040 
00041 
00042 //== INCLUDES =================================================================
00043 
00044 #include <OpenMesh/Core/System/config.hh>
00045 // -------------------- STL
00046 #if defined( OM_CC_MIPS )
00047 #  include <stdio.h>
00048 #else
00049 #  include <cstdio>
00050 #endif
00051 #include <iostream>
00052 // -------------------- OpenMesh
00053 
00054 
00055 //== NAMESPACES ===============================================================
00056 
00057 namespace OpenMesh {
00058 namespace IO {
00059 
00060 
00061 //=============================================================================
00062 
00063 
00068 
00069 //-----------------------------------------------------------------------------
00070 
00071 
00074 short int read_short(FILE* _in, bool _swap=false);
00075 
00078 int read_int(FILE* _in, bool _swap=false);
00079 
00082 float read_float(FILE* _in, bool _swap=false);
00083 
00086 double read_double(FILE* _in, bool _swap=false);
00087 
00088 
00091 void write_short(short int _i, FILE* _out, bool _swap=false);
00092 
00095 void write_int(int _i, FILE* _out, bool _swap=false);
00096 
00099 void write_float(float _f, FILE* _out, bool _swap=false);
00100 
00103 void write_double(double _d, FILE* _out, bool _swap=false);
00104 
00105    
00107 
00108 
00109 //=============================================================================
00110 } // namespace IO
00111 } // namespace OpenMesh
00112 //=============================================================================
00113 #endif // OPENMESH_MESHREADER_HH defined
00114 //=============================================================================
00115 

acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .