Version: 6.3.1

src/CONVERTOR/VISU_VTKTypeList.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  VISU OBJECT : interactive object for VISU entities implementation
00021 //  File   : VISU_VTKTypeList.hxx
00022 //  Author : Oleg UVAROV
00023 //  Module : VISU
00024 //
00025 #ifndef VISU_VTKTypeList_HeaderFile
00026 #define VISU_VTKTypeList_HeaderFile
00027 
00028 #include "VISU_TypeList.hxx"
00029 
00030 #include <vtkCharArray.h>
00031 #include <vtkUnsignedCharArray.h>
00032 #include <vtkShortArray.h>
00033 #include <vtkUnsignedShortArray.h>
00034 #include <vtkIntArray.h>
00035 #include <vtkUnsignedIntArray.h>
00036 #include <vtkLongArray.h>
00037 #include <vtkUnsignedLongArray.h> 
00038 #include <vtkFloatArray.h> 
00039 #include <vtkDoubleArray.h> 
00040 
00041 
00042 //----------------------------------------------------------------------------
00043 namespace VISU
00044 {
00045   //----------------------------------------------------------------------------
00046   namespace TL
00047   {
00048     //----------------------------------------------------------------------------
00049     typedef TSequence< char, 
00050                        unsigned char, 
00051                        short, 
00052                        unsigned short, 
00053                        int, 
00054                        unsigned int, 
00055                        long, 
00056                        unsigned long, 
00057                        float, 
00058                        double >::TResult TVTKBasicTypeList;
00059 
00060 
00061     //----------------------------------------------------------------------------
00062     typedef TSequence< vtkCharArray, 
00063                        vtkUnsignedCharArray, 
00064                        vtkShortArray, 
00065                        vtkUnsignedShortArray, 
00066                        vtkIntArray, 
00067                        vtkUnsignedIntArray, 
00068                        vtkLongArray, 
00069                        vtkUnsignedLongArray, 
00070                        vtkFloatArray, 
00071                        vtkDoubleArray >::TResult TVTKArrayTypeList;
00072 
00073 
00074     //----------------------------------------------------------------------------
00075     typedef TSequence< TInt2Type< VTK_CHAR >, 
00076                        TInt2Type< VTK_UNSIGNED_CHAR >, 
00077                        TInt2Type< VTK_SHORT >, 
00078                        TInt2Type< VTK_UNSIGNED_SHORT >, 
00079                        TInt2Type< VTK_INT >, 
00080                        TInt2Type< VTK_UNSIGNED_INT >, 
00081                        TInt2Type< VTK_LONG >, 
00082                        TInt2Type< VTK_UNSIGNED_LONG >, 
00083                        TInt2Type< VTK_FLOAT >, 
00084                        TInt2Type< VTK_DOUBLE > >::TResult TVTKBasicEnumList;
00085     
00086     
00087     //----------------------------------------------------------------------------
00088     template< unsigned int type_enum >
00089     struct TEnum2VTKBasicType
00090     {
00091       typedef typename TTypeAt< TVTKBasicTypeList, TIndexOf< TVTKBasicEnumList, TInt2Type< type_enum > >::value >::TResult TResult;
00092     };
00093 
00094     
00095     //----------------------------------------------------------------------------
00096     template< unsigned int type_enum >
00097     struct TEnum2VTKArrayType
00098     {
00099       typedef typename TTypeAt< TVTKArrayTypeList, TIndexOf< TVTKBasicEnumList, TInt2Type< type_enum > >::value >::TResult TResult;
00100     };
00101     
00102 
00103     //----------------------------------------------------------------------------
00104     template< class T >
00105     struct TVTKBasicType2Enum
00106     {
00107       typedef typename TTypeAt< TVTKBasicEnumList, TIndexOf< TVTKBasicTypeList, T >::value >::TResult TResult;
00108     };
00109     
00110 
00111     //----------------------------------------------------------------------------
00112   }
00113 
00114 
00115   //----------------------------------------------------------------------------
00116 }
00117 
00118 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS