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

vector_traits.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:39 $
00028 //                                                                            
00029 //=============================================================================
00030 
00031 
00032 //=============================================================================
00033 //
00034 //  Helper Functions for binary reading / writing
00035 //
00036 //=============================================================================
00037 
00038 
00039 #ifndef OPENMESH_VECTOR_TRAITS_HH
00040 #define OPENMESH_VECTOR_TRAITS_HH
00041 
00042 
00043 //== INCLUDES =================================================================
00044 
00045 #include <OpenMesh/Core/System/config.hh>
00046 #include <OpenMesh/Core/Utils/GenProg.hh>
00047 #if defined(OM_CC_MIPS)
00048 #  include <stdlib.h>
00049 #else
00050 #  include <cstdlib>
00051 #endif
00052 
00053 //== NAMESPACES ===============================================================
00054 
00055 
00056 namespace OpenMesh {
00057 
00058 
00059 //=============================================================================
00060 
00061 
00066 
00067 //-----------------------------------------------------------------------------
00068 
00074 template <typename T>
00075 struct vector_traits
00076 {
00078   typedef typename T::vector_type vector_type;
00079 
00081   typedef typename T::value_type  value_type;
00082 
00084   static const size_t size_ = T::size_;
00085 
00087   static size_t size() { return size_; }
00088 };
00089 
00091 
00092 
00093 //=============================================================================
00094 } // namespace OpenMesh
00095 //=============================================================================
00096 #endif // OPENMESH_MESHREADER_HH defined
00097 //=============================================================================

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