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

Endian.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:33 $
00028 //                                                                            
00029 //=============================================================================
00030 
00031 
00032 //=============================================================================
00033 //
00034 //  Helper Functions for binary reading / writing
00035 //
00036 //=============================================================================
00037 
00038 
00039 #ifndef OPENMESH_UTILS_ENDIAN_HH
00040 #define OPENMESH_UTILS_ENDIAN_HH
00041 
00042 
00043 //== INCLUDES =================================================================
00044 
00045 
00046 #include <OpenMesh/Core/System/config.hh>
00047 #include <iostream>
00048 
00049 
00050 //== NAMESPACES ===============================================================
00051 
00052 
00053 namespace OpenMesh {
00054 
00055 
00056 //=============================================================================
00057 
00058 
00061 class Endian
00062 {
00063 public:
00064    
00065   enum Type {
00066     LSB = 1, 
00067     MSB      
00068   };
00069   
00071   static Type local() { return local_; }
00072 
00074   static const char * as_string(Type _t);
00075    
00076 private:
00077    static int one_;
00078    static const Type local_;
00079 };
00080 
00081 //=============================================================================
00082 } // namespace OpenMesh
00083 //=============================================================================
00084 #endif // OPENMESH_MESHREADER_HH defined
00085 //=============================================================================
00086 

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