Salome HOME
Merge branch 'origin/abn/openfile_fix'
authorvsr <vsr@opencascade.com>
Mon, 24 Feb 2014 10:03:09 +0000 (14:03 +0400)
committervsr <vsr@opencascade.com>
Mon, 24 Feb 2014 10:03:09 +0000 (14:03 +0400)
251 files changed:
CMakeLists.txt
SalomePARAVISConfig.cmake.in
src/PVGUI/CMakeLists.txt
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_Module.h
src/PVGUI/PVGUI_Module_actions.cxx
src/PVGUI/PVGUI_Module_widgets.cxx
src/PVGUI/resources/PARAVIS_msg_en.ts
src/PVGUI/resources/PARAVIS_msg_fr.ts
src/PVGUI/resources/PARAVIS_msg_ja.ts
src/PV_SWIG/VTKWrapping/presentations.py
src/Plugins/CMakeLists.txt
src/Plugins/ExtraxtFieldFilter/CMakeLists.txt [deleted file]
src/Plugins/ExtraxtFieldFilter/ExtractFieldFilter.xml [deleted file]
src/Plugins/ExtraxtFieldFilter/ExtractFieldGUI.xml [deleted file]
src/Plugins/ExtraxtFieldFilter/pqExtractField.qrc [deleted file]
src/Plugins/ExtraxtFieldFilter/resources/extract_field.png [deleted file]
src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.cxx [deleted file]
src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.h [deleted file]
src/Plugins/IntegrationPoints/CMakeLists.txt [deleted file]
src/Plugins/IntegrationPoints/ELNOFilter.xml [deleted file]
src/Plugins/IntegrationPoints/ELNOFilterClient.xml [deleted file]
src/Plugins/IntegrationPoints/vtkELNOFilter.cxx [deleted file]
src/Plugins/IntegrationPoints/vtkELNOFilter.h [deleted file]
src/Plugins/IntegrationPoints/vtkELNOMeshFilter.cxx [deleted file]
src/Plugins/IntegrationPoints/vtkELNOMeshFilter.h [deleted file]
src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.cxx [deleted file]
src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.h [deleted file]
src/Plugins/MEDReader/CMake/CTestCustom.ctest.in [new file with mode: 0644]
src/Plugins/MEDReader/CMake/FindMED.cmake [new file with mode: 0644]
src/Plugins/MEDReader/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/Doc/ELNO.txt [new file with mode: 0644]
src/Plugins/MEDReader/Doc/HowTo0.py [new file with mode: 0644]
src/Plugins/MEDReader/IO/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDTimeReq.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDTimeReq.hxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDUtilities.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/MEDUtilities.hxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelRead.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelWrite.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedPolyhedron.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReader.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/Testing/Cxx/TestReading0.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/config.h.cmake [new file with mode: 0644]
src/Plugins/MEDReader/IO/module.cmake [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOFilter.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOFilter.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkExtractCellType.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkExtractCellType.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkExtractGroup.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkExtractGroup.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkGenerateVectors.h [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkMEDReader.cxx [new file with mode: 0644]
src/Plugins/MEDReader/IO/vtkMEDReader.h [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellData16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellDataForWholeMesh16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqPointData16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqReloadFile16.png [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderClient2.xml [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractCellTypePanel.ui [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/MEDReaderPanel.ui [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/Resources/pqMEDReader.qrc [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.h [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.cxx [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.h [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.h [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.cxx [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.h [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx [new file with mode: 0644]
src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h [new file with mode: 0644]
src/Plugins/MEDReader/TODO.txt [new file with mode: 0644]
src/Plugins/MEDReader/Test/CMakeLists.txt [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader0.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader1.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader2.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader3.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader4.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader5.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader6.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader7.py [new file with mode: 0644]
src/Plugins/MEDReader/Test/testMEDReader8.py [new file with mode: 0644]
src/Plugins/MEDReader/plugin.cmake [new file with mode: 0644]
src/Plugins/MedReader/CMake/CTestCustom.ctest.in [deleted file]
src/Plugins/MedReader/CMake/FindMED.cmake [deleted file]
src/Plugins/MedReader/CMakeLists.txt [deleted file]
src/Plugins/MedReader/IO/CMakeLists.txt [deleted file]
src/Plugins/MedReader/IO/Testing/CMakeLists.txt [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/CMakeLists.txt [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelRead.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelWrite.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedPolyhedron.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedReader.cxx [deleted file]
src/Plugins/MedReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx [deleted file]
src/Plugins/MedReader/IO/config.h.cmake [deleted file]
src/Plugins/MedReader/IO/module.cmake [deleted file]
src/Plugins/MedReader/IO/vtkExtractGroup.cxx [deleted file]
src/Plugins/MedReader/IO/vtkExtractGroup.h [deleted file]
src/Plugins/MedReader/IO/vtkGenerateStructElement.cxx [deleted file]
src/Plugins/MedReader/IO/vtkGenerateStructElement.h [deleted file]
src/Plugins/MedReader/IO/vtkMed.h [deleted file]
src/Plugins/MedReader/IO/vtkMedCartesianGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedCartesianGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedConstantAttribute.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedConstantAttribute.h [deleted file]
src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedDriver.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedDriver.h [deleted file]
src/Plugins/MedReader/IO/vtkMedDriver30.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedDriver30.h [deleted file]
src/Plugins/MedReader/IO/vtkMedEntityArray.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedEntityArray.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFactory.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFactory.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFamily.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFamily.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.h [deleted file]
src/Plugins/MedReader/IO/vtkMedField.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedField.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldOnProfile.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldOnProfile.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldOverEntity.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldOverEntity.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldStep.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFieldStep.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFile.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFile.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFilter.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFilter.h [deleted file]
src/Plugins/MedReader/IO/vtkMedFraction.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedFraction.h [deleted file]
src/Plugins/MedReader/IO/vtkMedGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedGroup.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedGroup.h [deleted file]
src/Plugins/MedReader/IO/vtkMedIntArray.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedIntArray.h [deleted file]
src/Plugins/MedReader/IO/vtkMedIntArrayInternal.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedIntArrayInternal.h [deleted file]
src/Plugins/MedReader/IO/vtkMedInterpolation.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedInterpolation.h [deleted file]
src/Plugins/MedReader/IO/vtkMedLink.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedLink.h [deleted file]
src/Plugins/MedReader/IO/vtkMedLocalization.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedLocalization.h [deleted file]
src/Plugins/MedReader/IO/vtkMedMesh.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedMesh.h [deleted file]
src/Plugins/MedReader/IO/vtkMedPolarGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedPolarGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedProfile.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedProfile.h [deleted file]
src/Plugins/MedReader/IO/vtkMedReader.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedReader.h [deleted file]
src/Plugins/MedReader/IO/vtkMedRegularGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedRegularGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedSelection.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedSelection.h [deleted file]
src/Plugins/MedReader/IO/vtkMedSetGet.h [deleted file]
src/Plugins/MedReader/IO/vtkMedStructElement.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedStructElement.h [deleted file]
src/Plugins/MedReader/IO/vtkMedSupportMesh.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedSupportMesh.h [deleted file]
src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.h [deleted file]
src/Plugins/MedReader/IO/vtkMedUtilities.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedUtilities.h [deleted file]
src/Plugins/MedReader/IO/vtkMedVariableAttribute.cxx [deleted file]
src/Plugins/MedReader/IO/vtkMedVariableAttribute.h [deleted file]
src/Plugins/MedReader/ParaViewPlugin/CMakeLists.txt [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqCellData16.png [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqPointData16.png [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderClient.xml [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderServer.xml [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/UI/MedReaderPanel.ui [deleted file]
src/Plugins/MedReader/ParaViewPlugin/Resources/pqMedReader.qrc [deleted file]
src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.cxx [deleted file]
src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.h [deleted file]
src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.cxx [deleted file]
src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.h [deleted file]
src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.cxx [deleted file]
src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.h [deleted file]
src/Plugins/MedReader/plugin.cmake [deleted file]
src/Plugins/ParaMEDCorba/CMakeLists.txt
src/VTKWrapping/ParaView/lex.yy.c
src/VTKWrapping/ParaView/vtkParse.tab.c
src/VTKWrapping/ParaView/vtkParseData.c
src/VTKWrapping/ParaView/vtkParseData.h
src/VTKWrapping/ParaView/vtkParseExtras.c
src/VTKWrapping/ParaView/vtkParseHierarchy.c
src/VTKWrapping/ParaView/vtkParseInternal.h [deleted file]
src/VTKWrapping/ParaView/vtkParseMain.c
src/VTKWrapping/ParaView/vtkParsePreprocess.c
src/VTKWrapping/ParaView/vtkParsePreprocess.h
src/VTKWrapping/ParaView/vtkParseString.c
src/VTKWrapping/ParaView/vtkParseString.h
src/VTKWrapping/ParaView/vtkWrap.c
src/VTKWrapping/ParaView/vtkWrap.h
src/VTKWrapping/ParaView/vtkWrapText.c
src/VTKWrapping/readme.txt
test/VisuPrs/2D_viewer/CMakeLists.txt
test/VisuPrs/3D_viewer/CMakeLists.txt
test/VisuPrs/Animation/A0.py
test/VisuPrs/Animation/CMakeLists.txt
test/VisuPrs/CMakeLists.txt
test/VisuPrs/CutLines/CMakeLists.txt
test/VisuPrs/CutPlanes/CMakeLists.txt
test/VisuPrs/DeformedShape/CMakeLists.txt
test/VisuPrs/GaussPoints/CMakeLists.txt
test/VisuPrs/ImportMedField/CMakeLists.txt
test/VisuPrs/IsoSurfaces/CMakeLists.txt
test/VisuPrs/MeshPresentation/CMakeLists.txt
test/VisuPrs/Plot3D/CMakeLists.txt
test/VisuPrs/SWIG_scripts/CMakeLists.txt
test/VisuPrs/ScalarMap/CMakeLists.txt
test/VisuPrs/ScalarMap_On_DeformedShape/CMakeLists.txt
test/VisuPrs/StreamLines/CMakeLists.txt
test/VisuPrs/Tables/CMakeLists.txt
test/VisuPrs/Vectors/CMakeLists.txt
test/VisuPrs/bugs/CMakeLists.txt
test/VisuPrs/dump_study/CMakeLists.txt
test/VisuPrs/imps/CMakeLists.txt
test/VisuPrs/united/CMakeLists.txt

index d2916e296106f0d09ac65f737110f02ad84f2d52..ea0e90df1086c191044e8335e95e7dd93e451357 100644 (file)
@@ -34,7 +34,7 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
 SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
+SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
 SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
@@ -73,6 +73,7 @@ ENDIF()
 # ============
 OPTION(SALOME_BUILD_DOC "Generate SALOME GUI documentation" ON)
 OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
+OPTION(SALOME_PARAVIS_ALL_TEST "Add all tests for Salome PARAVIS module" OFF)
 OPTION(SALOME_PARAVIS_MINIMAL_CORBA "Build PARAVIS with a minimal CORBA interface" OFF)
 OPTION(SALOME_PARAVIS_BUILD_PLUGINS "Build PARAVIS plugins (MEDReader, etc ...)" ON)
 
@@ -148,6 +149,10 @@ IF(SALOME_PARAVIS_BUILD_PLUGINS)
   ELSE()
     MESSAGE(FATAL_ERROR "We absolutely need the Salome MED module to build plugins, please define MED_ROOT_DIR")
   ENDIF()
+  IF(SALOME_MED_STANDALONE)
+    MESSAGE(FATAL_ERROR "We absolutely need a Salome MED with KERNEL, please set SALOME_MED_STANDALONE=OFF in MED module
+                         or SALOME_PARAVIS_BUILD_PLUGINS=OFF in PARAVIS module")
+  ENDIF(SALOME_MED_STANDALONE)
   FIND_PACKAGE(SalomeMEDFile)
   SALOME_LOG_OPTIONAL_PACKAGE(MEDFile SALOME_PARAVIS_BUILD_PLUGINS)
 ENDIF()
@@ -248,14 +253,11 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
 # Create the configuration files:
 #   - in the build tree:
 
-#      Ensure the variables are always defined for the configure:
-SET(SIP_ROOT_DIR "${SIP_ROOT_DIR}")
-SET(QT4_ROOT_DIR "${QT4_ROOT_DIR}")
-SET(PYQT4_ROOT_DIR "${PYQT4_ROOT_DIR}")
-SET(CAS_ROOT_DIR "${CAS_ROOT_DIR}")
-SET(OPENGL_ROOT_DIR "${OPENGL_ROOT_DIR}")
-SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
-SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}")
+# Ensure the variables are always defined for the configure:
+SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}")
+SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}")
+SET(MED_ROOT_DIR "${MED_ROOT_DIR}")
+SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}")
  
 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
 
@@ -266,8 +268,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
     ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
     PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
-       KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR 
-       OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
+    KERNEL_ROOT_DIR GUI_ROOT_DIR MED_ROOT_DIR MEDFILE_ROOT_DIR)
 
 #   - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
 #       Get the relative path of the include directory so 
@@ -277,8 +278,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
 #    ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
 #    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
 #    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX 
-#       KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR 
-#       OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
+#    KERNEL_ROOT_DIR GUI_ROOT_DIR MED_ROOT_DIR MEDFILE_ROOT_DIR)
 
 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
     VERSION ${${PROJECT_NAME_UC}_VERSION}
index 05195b0525a3fea6385c88eeff4408df4929f292..e7c9304659531bd348a839aeadab9ac43b3ce352 100644 (file)
@@ -44,7 +44,7 @@ SET_AND_CHECK(PARAVIS_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")
 # Include directories
 SET_AND_CHECK(PARAVIS_INCLUDE_DIRS "${PARAVIS_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@")
 SET(PARAVIS_INCLUDE_DIRS "${PARAVIS_INCLUDE_DIRS};@_SalomePARAVIS_EXTRA_HEADERS@")
-SET(PARAVIS_DEFINITIONS "@KERNEL_DEFINITIONS@")
+SET(PARAVIS_DEFINITIONS "@GUI_DEFINITIONS@")
 
 # Package specific environment variables
 @_SalomePARAVIS_EXTRA_ENV_FULL@
@@ -64,9 +64,12 @@ SET(SALOME_USE_PLOT2DVIEWER @SALOME_USE_PLOT2DVIEWER@)
 
 # Level 1 prerequisites:
 SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_KERNEL_ROOT_DIR@")
-SET_AND_CHECK(SIP_ROOT_DIR_EXP "@PACKAGE_SIP_ROOT_DIR@")
-SET_AND_CHECK(QT4_ROOT_DIR_EXP "@PACKAGE_QT4_ROOT_DIR@")
-SET_AND_CHECK(PYQT4_ROOT_DIR_EXP "@PACKAGE_PYQT4_ROOT_DIR@")
+SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_GUI_ROOT_DIR@")
+IF(SALOME_PARAVIS_BUILD_PLUGINS)
+  SET_AND_CHECK(MED_ROOT_DIR_EXP "@PACKAGE_MED_ROOT_DIR@")
+  LIST(APPEND PARAVIS_DEFINITIONS "@MED_DEFINITIONS@")
+ENDIF()
+SET_AND_CHECK(MEDFILE_ROOT_DIR_EXP "@PACKAGE_MEDFILE_ROOT_DIR@")
 
 # Optional level 1 prerequisites:
 
@@ -118,9 +121,18 @@ SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
 SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
 SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
 
-# Include KERNEL targets if they were not already loaded:
-IF(NOT (TARGET SALOMEBasics)) 
-  INCLUDE("${KERNEL_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE}/SalomeKERNELTargets.cmake")
+# Include GUI targets if they were not already loaded:
+IF(NOT (TARGET Event)) 
+  INCLUDE("${GUI_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeGUITargets.cmake")
+ENDIF()
+IF(SALOME_PARAVIS_BUILD_PLUGINS)
+  # Include MED targets if they were not already loaded:
+  IF(NOT (TARGET SalomeIDLMED)) 
+    INCLUDE("${MED_ROOT_DIR_EXP}/${SALOME_INSTALL_CMAKE_LOCAL}/SalomeMEDTargets.cmake")
+  ENDIF()
 ENDIF()
 
 # Exposed PARAVIS targets:
+SET(PARAVIS_SalomeIDLPARAVIS SalomeIDLPARAVIS)
+SET(PARAVIS_PARAVIS PARAVIS)
+SET(PARAVIS_PARAVISEngine PARAVISEngine)
index 5f95142beb90e748f68297624e13d1ec2c6da074..60ac2364e957b43346f4db80dee95db5e1cad5e9 100644 (file)
@@ -71,7 +71,7 @@ SET(_moc_HEADERS
 SET(_other_HEADERS
   PVGUI_OutputWindowAdapter.h
   PVGUI_Tools.h
-  PVGUI_MatplotlibMathTextUtilities.h
+  #PVGUI_MatplotlibMathTextUtilities.h
   PV_I.h
   PARAVIS_Gen_i.hh
   PV_Events.h
@@ -137,7 +137,7 @@ SET(_other_SOURCES
   PVGUI_OutputWindowAdapter.cxx
   PVGUI_Tools.cxx
   PVGUI_ParaViewSettingsPane.cxx
-  PVGUI_MatplotlibMathTextUtilities.cxx
+  #PVGUI_MatplotlibMathTextUtilities.cxx
   PARAVIS_Gen_i.cc
   PV_Tools.cxx
   )
index 884032f7f49f8d8d1a67084fefee69e154ede3b5..aca93f415606a0d63cebb2e8a99cef0e692de722 100644 (file)
@@ -65,6 +65,7 @@
 #include <SalomeApp_Study.h>
 #include <SALOME_ListIO.hxx>
 #include <SALOMEDS_Tool.hxx>
+#include <PyInterp_Interp.h>
 #include <PyInterp_Dispatcher.h>
 #include <PyConsole_Console.h>
 
 #include <pqHelpReaction.h>
 #include <vtkOutputWindow.h>
 #include <pqPluginManager.h>
-//#include <vtkPVPluginInformation.h>
 #include "pqInterfaceTracker.h"
 #include <pqSettings.h>
 #include <pqPythonDialog.h>
 #include <pqPythonManager.h>
 #include <pqPythonShell.h>
-//#include <pqBrandPluginsLoader.h>
 #include <pqLoadDataReaction.h>
 #include <vtkEventQtSlotConnect.h>
 #include <pqPythonScriptEditor.h>
-#include <pqStandardSummaryPanelImplementation.h>
 #include <pqCollaborationBehavior.h>
 #include <pqDataRepresentation.h>
 #include <pqPipelineRepresentation.h>
 #include <pqColorToolbar.h>
 #include <pqScalarBarVisibilityReaction.h>
 #include <pqStandardPropertyWidgetInterface.h>
-#include <pqMultiServerBehavior.h>
 #include <pqViewStreamingBehavior.h>
 
 #include <PARAVIS_version.h>
 
 #include <vtkPVConfig.h>
 
-#include <PVGUI_MatplotlibMathTextUtilities.h>
 
 #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog)
 
-/*
- * Make sure all the kits register their classes with vtkInstantiator.
- * Since ParaView uses Tcl wrapping, all of VTK is already compiled in
- * anyway.  The instantiators will add no more code for the linker to
- * collect.
- */
-
-//#include <vtkCommonInstantiator.h>
-//#include <vtkFilteringInstantiator.h>
-//#include <vtkGenericFilteringInstantiator.h>
-//#include <vtkIOInstantiator.h>
-//#include <vtkImagingInstantiator.h>
-//#include <vtkInfovisInstantiator.h>
-//#include <vtkGraphicsInstantiator.h>
-
-//#include <vtkRenderingInstantiator.h>
-//#include <vtkVolumeRenderingInstantiator.h>
-//#include <vtkHybridInstantiator.h>
-//#include <vtkParallelInstantiator.h>
-
 #include <pqAlwaysConnectedBehavior.h>
 #include <pqApplicationCore.h>
 #include <pqAutoLoadPluginXMLBehavior.h>
@@ -370,16 +346,14 @@ PVGUI_Module::~PVGUI_Module()
 {
 }
 
-
-
 /*!
   \brief Initialize module. Creates menus, prepares context menu, etc.
   \param app SALOME GUI application instance
 */
 void PVGUI_Module::initialize( CAM_Application* app )
 {
-  //VTN: Disable conflict with python initialization for MatPlot.
-  PVGUI_MatplotlibMathTextUtilities::Disable();
+  // [ABN]: patched in ParaView's sources.
+  // PVGUI_MatplotlibMathTextUtilities::Disable();
 
   SalomeApp_Module::initialize( app );
 
@@ -431,7 +405,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
 
     // * adds support for standard paraview views.
     pgm->addInterface(new pqStandardViewModules(pgm));
-    pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm));
+    //pgm->addInterface(new pqStandardSummaryPanelImplementation(pgm));
     pgm->addInterface(new pqStandardPropertyWidgetInterface(pgm));
 
     // Load plugins distributed with application.
@@ -443,6 +417,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     new pqViewFrameActionsBehavior(this);
     new pqSpreadSheetVisibilityBehavior(this);
     new pqPipelineContextMenuBehavior(this);
+    new pqObjectPickingBehavior(this); // NEW in 4.1
     new pqDefaultViewBehavior(this);
     new pqAlwaysConnectedBehavior(this);
     new pqPVNewSourceBehavior(this);
@@ -458,7 +433,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     new pqPersistentMainWindowStateBehavior(aDesktop);
     new pqObjectPickingBehavior(aDesktop);
     new pqCollaborationBehavior(this);
-    new pqMultiServerBehavior(this);
+    //new pqMultiServerBehavior(this);
     new pqViewStreamingBehavior(this);
 
     // Setup quick-launch shortcuts.
@@ -471,8 +446,8 @@ void PVGUI_Module::initialize( CAM_Application* app )
     QList<QDockWidget*>::iterator i;
     for (i = currentDocks.begin(); i != currentDocks.end(); ++i) {
       if(!activeDocks.contains(*i)) {
-       myDockWidgets[*i] = false; // hidden by default
-       (*i)->hide();
+        myDockWidgets[*i] = false; // hidden by default
+        (*i)->hide();
       }
     }
 
@@ -481,7 +456,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
     QList<QMenu*>::iterator im;
     for (im = currentMenus.begin(); im != currentMenus.end(); ++im) {
       if(!activeMenus.contains(*im)) {
-       myMenus.append(*im);
+          myMenus.append(*im);
       }
     }
 
@@ -516,7 +491,7 @@ void PVGUI_Module::initialize( CAM_Application* app )
  
   // we need to start trace after connection is done
   connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(finishedAddingServer(pqServer*)), 
-         this, SLOT(onFinishedAddingServer(pqServer*)));
+          this, SLOT(onFinishedAddingServer(pqServer*)));
 
   connect(pqApplicationCore::instance()->getObjectBuilder(), SIGNAL(dataRepresentationCreated(pqDataRepresentation*)), 
           this, SLOT(onDataRepresentationCreated(pqDataRepresentation*)));
@@ -524,9 +499,9 @@ void PVGUI_Module::initialize( CAM_Application* app )
 
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
   bool isStop = aResourceMgr->booleanValue( "PARAVIS", "stop_trace", false );
-  // start timer to activate trace in a proper moment
-  if(!isStop) 
-    startTimer( 1000 );
+  // start a timer to schedule the trace start asap:
+  if(!isStop)
+    startTimer( 0 );
 
   this->VTKConnect = vtkEventQtSlotConnect::New();
   
@@ -536,17 +511,17 @@ void PVGUI_Module::initialize( CAM_Application* app )
     if(pvs) {
       vtkPVProgressHandler* ph = pvs->GetProgressHandler();
       if(ph) {
-       this->VTKConnect->Connect(ph, vtkCommand::StartEvent,
-                                 this, SLOT(onStartProgress()));
-       this->VTKConnect->Connect(ph, vtkCommand::EndEvent,
-                                 this, SLOT(onEndProgress()));
+          this->VTKConnect->Connect(ph, vtkCommand::StartEvent,
+                                    this, SLOT(onStartProgress()));
+          this->VTKConnect->Connect(ph, vtkCommand::EndEvent,
+                                    this, SLOT(onEndProgress()));
       }
     }
   }
   
   connect(&pqActiveObjects::instance(),
-         SIGNAL(representationChanged(pqRepresentation*)),
-         this, SLOT(onRepresentationChanged(pqRepresentation*)));
+          SIGNAL(representationChanged(pqRepresentation*)),
+          this, SLOT(onRepresentationChanged(pqRepresentation*)));
 }
 
 void PVGUI_Module::onStartProgress()
@@ -638,27 +613,30 @@ void PVGUI_Module::onVariableChanged(pqVariableType t, const QString) {
 
 void PVGUI_Module::execPythonCommand(const QString& cmd, bool inSalomeConsole)
 {
-  if ( PyInterp_Dispatcher::Get()->IsBusy() ) return;
   if ( inSalomeConsole ) {
+    if ( PyInterp_Dispatcher::Get()->IsBusy() ) return;
     SalomeApp_Application* app =
       dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication());
     PyConsole_Console* pyConsole = app->pythonConsole();
     if (pyConsole)
       pyConsole->exec(cmd);
   }
-  else {
-    pqPythonManager* manager = qobject_cast<pqPythonManager*>
+  else
+    {
+      pqPythonManager* manager = qobject_cast<pqPythonManager*>
       ( pqApplicationCore::instance()->manager( "PYTHON_MANAGER" ) );
-    if ( manager )  {
-      pqPythonDialog* pyDiag = manager->pythonShellDialog();
-      if ( pyDiag ) {
-       pqPythonShell* shell = pyDiag->shell();
-       if ( shell ) {
-         shell->executeScript(cmd);
-       }
-      }
+      if ( manager )
+        {
+          pqPythonDialog* pyDiag = manager->pythonShellDialog();
+          if ( pyDiag )
+            {
+              pqPythonShell* shell = pyDiag->shell();
+              if ( shell ) {
+                  shell->executeScript(cmd);
+              }
+            }
+        }
     }
-  }
 }
 
 /*!
@@ -667,7 +645,18 @@ void PVGUI_Module::execPythonCommand(const QString& cmd, bool inSalomeConsole)
 void PVGUI_Module::timerEvent(QTimerEvent* te )
 {
 #ifndef WNT
-  execPythonCommand("from paraview import smtrace\nsmtrace.start_trace()\n", false);
+  if ( PyInterp_Dispatcher::Get()->IsBusy() )
+    {
+      // Reschedule for later
+      MESSAGE("interpreter busy -> rescheduling trace start.");
+      startTimer(500);
+    }
+  else
+    {
+      MESSAGE("about to start trace....");
+      execPythonCommand("from paraview import smtrace;smtrace.start_trace()", false);
+      MESSAGE("trace STARTED....");
+    }
   killTimer( te->timerId() );
 #endif
 }
@@ -893,7 +882,7 @@ bool PVGUI_Module::activateModule( SUIT_Study* study )
     for (int i = 0; i < anActns.size(); ++i) {
       QAction* a = anActns.at(i);
       if(a)
-       a->setVisible(true);
+        a->setVisible(true);
     }
   }
 
@@ -926,7 +915,7 @@ bool PVGUI_Module::deactivateModule( SUIT_Study* study )
     for (int i = 0; i < anActns.size(); ++i) {
       QAction* a = anActns.at(i);
       if(a)
-       a->setVisible(false);
+        a->setVisible(false);
     }
   }
 
@@ -1068,6 +1057,29 @@ void PVGUI_Module::executeScript(const char *script)
 #endif
 }
 
+///**
+// *  Debug function printing out the given interpreter's execution context
+// */
+//void printInterpContext(PyInterp_Interp * interp )
+//{
+//  // Extract __smtraceString from interpreter's context
+//  const PyObject* ctxt = interp->getExecutionContext();
+//
+//  PyObject* lst = PyDict_Keys((PyObject *)ctxt);
+//  Py_ssize_t siz = PyList_GET_SIZE(lst);
+//  for (Py_ssize_t i = 0; i < siz; i++)
+//    {
+//      PyObject * elem = PyList_GetItem(lst, i);
+//      if (PyString_Check(elem))
+//        {
+//          std::cout << "At pos:" << i << ", " << PyString_AsString(elem) << std::endl;
+//        }
+//      else
+//        std::cout << "At pos:" << i << ", not a string!" << std::endl;
+//    }
+//  Py_XDECREF(lst);
+//}
+
 /*!
   \brief Returns trace string
 */
@@ -1077,24 +1089,22 @@ QString PVGUI_Module::getTraceString()
 {
   QString traceString;
 #ifndef WNT
-  pqPythonManager* manager = qobject_cast<pqPythonManager*>(
-                             pqApplicationCore::instance()->manager("PYTHON_MANAGER"));
-  if (manager)  {
-    pqPythonDialog* pyDiag = manager->pythonShellDialog();
-    if (pyDiag) {
-      pyDiag->runString("from paraview import smtrace\n"
-                        "__smtraceString = smtrace.get_trace_string()\n");
-      pyDiag->shell()->makeCurrent();
-      PyObject* main_module = PyImport_AddModule((char*)"__main__");
-      PyObject* global_dict = PyModule_GetDict(main_module);
-      PyObject* string_object = PyDict_GetItemString(global_dict, "__smtraceString");
-      char* string_ptr = string_object ? PyString_AsString(string_object) : 0;
-      if (string_ptr)  {
+  {
+    PyLockWrapper lck; // Acquire GIL
+
+    const char * code = "from paraview import smtrace;"
+                        "__smtraceString = smtrace.get_trace_string()";
+    PyRun_SimpleString(code);
+    // Now get the value of __smtraceString
+    PyObject* main_module = PyImport_AddModule((char*)"__main__");
+    PyObject* global_dict = PyModule_GetDict(main_module);
+    PyObject* string_object = PyDict_GetItemString(global_dict, "__smtraceString");
+    char* string_ptr = string_object ? PyString_AsString(string_object) : 0;
+    if (string_ptr)  {
         traceString = string_ptr;
-      }
-      pyDiag->shell()->releaseControl();
     }
-  }
+  } // release GIL
+
   if ((!traceString.isNull()) && traceString.length() != 0) {
     int aPos = traceString.indexOf(MYReplaceStr);
     while (aPos != -1) {
@@ -1264,7 +1274,7 @@ void PVGUI_Module::createPreferences()
 
   //rnv: imp 21712: [CEA 581] Preference to display legend by default 
   int aDispColoreLegend = addPreference( tr( "PREF_SHOW_COLOR_LEGEND" ), aParaVisSettingsTab,
-                                        LightApp_Preferences::Bool, "PARAVIS", "show_color_legend");
+                                        LightApp_Preferences::Bool, "PARAVIS", "show_color_legend");
 }
 
 /*!
@@ -1311,27 +1321,27 @@ void PVGUI_Module::contextMenuPopup(const QString& theClient, QMenu* theMenu, QS
     else {
       // Try to get state object
       _PTR(SObject) stateSObj = 
-       studyDS->FindObjectID(entry.toLatin1().constData());
+          studyDS->FindObjectID(entry.toLatin1().constData());
       if (!stateSObj) {
-       return;
+          return;
       }
       
       // Check local id
       _PTR(GenericAttribute) anAttr;
       if (!stateSObj->FindAttribute(anAttr, "AttributeLocalID")) {
-       return;
+          return;
       }
 
       _PTR(AttributeLocalID) anID(anAttr);
       
       if (anID->Value() == PVSTATEID) {
-       // Paraview state object
-       theMenu->addSeparator();
-       theMenu->addAction(action(AddStatePopupId));
-       theMenu->addAction(action(CleanAndAddStatePopupId));
-       theMenu->addSeparator();
-       theMenu->addAction(action(ParaVisRenameId));
-       theMenu->addAction(action(ParaVisDeleteId));
+        // Paraview state object
+        theMenu->addSeparator();
+        theMenu->addAction(action(AddStatePopupId));
+        theMenu->addAction(action(CleanAndAddStatePopupId));
+        theMenu->addSeparator();
+        theMenu->addAction(action(ParaVisRenameId));
+        theMenu->addAction(action(ParaVisDeleteId));
       }
     }
   }
@@ -1620,8 +1630,8 @@ void PVGUI_Module::loadSelectedState(bool toClear)
   } 
   else {
     SUIT_MessageBox::critical(getApp()->desktop(),
-                             tr("ERR_ERROR"),
-                             tr("ERR_STATE_CANNOT_BE_RESTORED"));
+                              tr("ERR_ERROR"),
+                              tr("ERR_STATE_CANNOT_BE_RESTORED"));
   }
 }
 
@@ -1637,7 +1647,7 @@ void PVGUI_Module::onRepresentationChanged(pqRepresentation*) {
   for (int i = 0; i < aWidget.size() ; i++ ) {
     if( aWidget[i] ) {
       connect( aWidget[i], SIGNAL ( variableChanged ( pqVariableType, const QString ) ), 
-              this, SLOT(onVariableChanged( pqVariableType, const QString) ), Qt::UniqueConnection );
+              this, SLOT(onVariableChanged( pqVariableType, const QString) ), Qt::UniqueConnection );
     }    
   }
 }
@@ -1669,5 +1679,4 @@ extern "C" {
   PVGUI_EXPORT char* getModuleVersion() {
     return (char*)PARAVIS_VERSION_STR;
   }
-         
 }
index cf760389b9a19a71246f7817d7f34918f12b4551..b56fc1188c0953871605fc3287da2dd8f743accc 100644 (file)
@@ -47,6 +47,7 @@ class pqPVApplicationCore;
 class pqDataRepresentation;
 class pqRepresentation;
 
+class PyConsole_Interp;
 
 class PVGUI_Module : public SalomeApp_Module
 {
@@ -54,85 +55,85 @@ class PVGUI_Module : public SalomeApp_Module
    
   //! Menu actions
   enum { // Menu "File"
-         OpenFileId,
-
-        LoadStateId,
-        SaveStateId,
-
-        SaveDataId,
-        SaveScreenshotId,
-        ExportId,
-
-        SaveAnimationId,
-        SaveGeometryId,
-
-        ConnectId,
-        DisconnectId,
-
-        // Menu "Edit"
-        UndoId,
-        RedoId,
-
-        CameraUndoId,
-        CameraRedoId,
-
-   FindDataId,   
-        ChangeInputId,
-   IgnoreTimeId, 
-        DeleteId,
-        DeleteAllId,
-
-        SettingsId,
-        ViewSettingsId,
-
-        // Menu "View"
-   FullScreenId, 
-
-        // Menu "Animation"
-        FirstFrameId,
-        PreviousFrameId,
-        PlayId,
-        NextFrameId,
-        LastFrameId,
-        LoopId,
-
-        // Menu "Tools" 
-        CreateCustomFilterId,
-        ManageCustomFiltersId,
-        CreateLookmarkId,
-        ManageLinksId,
-        AddCameraLinkId,
-        ManagePluginsExtensionsId,
-        DumpWidgetNamesId,
-        RecordTestId,
-        RecordTestScreenshotId,
-        PlayTestId,
-        MaxWindowSizeId,
-        CustomWindowSizeId,
-        TimerLogId,
-        OutputWindowId,
-        PythonShellId,
-        ShowTraceId,
-        RestartTraceId,
-
-        // Menu "Help" 
-        AboutParaViewId,
-        ParaViewHelpId,
-        EnableTooltipsId,
-
-        // Menu "Window" - "New Window"
-        ParaViewNewWindowId,
-
-        // "Save state" ParaVis module root object popup
-        SaveStatePopupId,
-
-        // "Add state" and "Reload state" popups
-        AddStatePopupId,
-        CleanAndAddStatePopupId,
-
-        // "Rename" and "Delete" popups (Object Browser)
-        ParaVisRenameId,
-        ParaVisDeleteId
+     OpenFileId,
+
+     LoadStateId,
+     SaveStateId,
+
+     SaveDataId,
+     SaveScreenshotId,
+     ExportId,
+
+     SaveAnimationId,
+     SaveGeometryId,
+
+     ConnectId,
+     DisconnectId,
+
+     // Menu "Edit"
+     UndoId,
+     RedoId,
+
+     CameraUndoId,
+     CameraRedoId,
+
+     FindDataId,
+     ChangeInputId,
+     IgnoreTimeId,
+     DeleteId,
+     DeleteAllId,
+
+     SettingsId,
+     ViewSettingsId,
+
+     // Menu "View"
+     FullScreenId,
+
+     // Menu "Animation"
+     FirstFrameId,
+     PreviousFrameId,
+     PlayId,
+     NextFrameId,
+     LastFrameId,
+     LoopId,
+
+     // Menu "Tools"
+     CreateCustomFilterId,
+     ManageCustomFiltersId,
+     CreateLookmarkId,
+     ManageLinksId,
+     AddCameraLinkId,
+     ManagePluginsExtensionsId,
+     DumpWidgetNamesId,
+     RecordTestId,
+     RecordTestScreenshotId,
+     PlayTestId,
+     MaxWindowSizeId,
+     CustomWindowSizeId,
+     TimerLogId,
+     OutputWindowId,
+     PythonShellId,
+     ShowTraceId,
+     RestartTraceId,
+
+     // Menu "Help"
+     AboutParaViewId,
+     ParaViewHelpId,
+     EnableTooltipsId,
+
+     // Menu "Window" - "New Window"
+     ParaViewNewWindowId,
+
+     // "Save state" ParaVis module root object popup
+     SaveStatePopupId,
+
+     // "Add state" and "Reload state" popups
+     AddStatePopupId,
+     CleanAndAddStatePopupId,
+
+     // "Rename" and "Delete" popups (Object Browser)
+     ParaVisRenameId,
+     ParaVisDeleteId
   };
 
 public:
@@ -217,8 +218,8 @@ private:
   //! restore visibility of the common dockable windows (OB, PyConsole, ... etc.)
   void restoreCommonWindowsState();
 
-  //! run Python command
-  void execPythonCommand(const QString& cmd, bool inSalomeConsole = false);
+  //! run Python command (either in SALOME's Python interpreter, or in ParaView's Python's interpreter)
+  void execPythonCommand(const QString& cmd, bool inSalomeConsole=false);
 
 private slots:
 
index ff751c69aec2d09dd4a2aedec5a31ac548b80236..beee3a52b6fa571018eb8763c66e736db8a137d0 100644 (file)
@@ -39,7 +39,7 @@
 #include <QFile>
 
 #include <pqApplicationCore.h>
-#include <pqColorScaleToolbar.h>
+// #include <pqColorScaleToolbar.h>
 #include <pqProgressManager.h>
 #include <pqRubberBandHelper.h>
 #include <pqScalarBarVisibilityAdaptor.h>
index b15c923cf336e51a77d67f9701239ec8c428bbec..617680f41d466b59e7c75066ecdda1e8778b02d5 100644 (file)
 #include <pqApplicationCore.h>
 #include <pqComparativeVisPanel.h>
 #include <pqPipelineBrowserWidget.h>
-//#include <pqProxyTabWidget.h>
 #include <pqProxyInformationWidget.h>
 #include <pqSettings.h>
 #include <pqDataInformationWidget.h>
 #include <pqPVAnimationWidget.h>
-#include <pqSelectionInspectorWidget.h>
+#include <pqFindDataSelectionDisplayFrame.h>
+#include <pqMultiBlockInspectorPanel.h>
 #include <pqProgressWidget.h>
 #include <pqProgressManager.h>
 #include <pqObjectInspectorWidget.h>
@@ -77,6 +77,7 @@
 #include <pqParaViewMenuBuilders.h>
 #include <pqCollaborationPanel.h>
 #include <pqMemoryInspectorPanel.h>
+#include <pqColorMapEditor.h>
 
 class ResizeHelper : public pqPVAnimationWidget
 {
@@ -211,14 +212,22 @@ void PVGUI_Module::setupDockWidgets()
 
   desk->tabifyDockWidget(animationViewDock,  statisticsViewDock);
 
-  // Selection view
-  QDockWidget* selectionInspectorDock = new QDockWidget( tr( "TTL_SELECTION_INSPECTOR" ), desk );
-  selectionInspectorDock->setObjectName("selectionInspectorDock");
-  selectionInspectorDock->setAllowedAreas( Qt::AllDockWidgetAreas );
-  desk->addDockWidget( Qt::LeftDockWidgetArea, selectionInspectorDock );
-  pqSelectionInspectorPanel* aSelInspector = new pqSelectionInspectorWidget(selectionInspectorDock);
-  selectionInspectorDock->setWidget(aSelInspector);
-  myDockWidgets[selectionInspectorDock] = false; // hidden by default
+  // Selection inspector
+  QDockWidget* selectionDisplayDock = new QDockWidget( tr( "TTL_SELECTION_INSPECTOR" ), desk );
+  selectionDisplayDock->setObjectName("selectionInspectorDock");
+  selectionDisplayDock->setAllowedAreas( Qt::AllDockWidgetAreas );
+  desk->addDockWidget( Qt::LeftDockWidgetArea, selectionDisplayDock );
+  pqFindDataSelectionDisplayFrame* aSelInspector = new pqFindDataSelectionDisplayFrame(selectionDisplayDock);
+  selectionDisplayDock->setWidget(aSelInspector);
+  myDockWidgets[selectionDisplayDock] = false; // hidden by default
+
+  // Multi-block inspector
+  QDockWidget* multiBlockInspectorPanelDock  = new QDockWidget( tr( "TTL_MUTLI_BLOCK_INSPECTOR" ), desk );
+  multiBlockInspectorPanelDock->setObjectName("multiBlockInspectorPanelDock");
+  desk->addDockWidget( Qt::LeftDockWidgetArea, multiBlockInspectorPanelDock );
+  pqMultiBlockInspectorPanel* mbi_panel = new pqMultiBlockInspectorPanel( multiBlockInspectorPanelDock );
+  multiBlockInspectorPanelDock->setWidget(mbi_panel);
+  myDockWidgets[multiBlockInspectorPanelDock] = false; // hidden by default
 
   // Comparative View
   QDockWidget* comparativePanelDock  = new QDockWidget( tr( "TTL_COMPARATIVE_VIEW_INSPECTOR" ), desk );
@@ -236,6 +245,15 @@ void PVGUI_Module::setupDockWidgets()
   collaborationPanelDock->setWidget(collaborationPanel);
   desk->addDockWidget(Qt::RightDockWidgetArea, collaborationPanelDock);
   myDockWidgets[collaborationPanelDock] = false; // hidden by default
+
+  // Color map editor
+  QDockWidget* colorMapEditorDock  = new QDockWidget( tr( "TTL_COLOR_MAP_EDITOR" ), desk );
+  colorMapEditorDock->setObjectName("colorMapEditorDock");
+  desk->addDockWidget( Qt::LeftDockWidgetArea, colorMapEditorDock );
+  pqColorMapEditor* cmed_panel = new pqColorMapEditor( colorMapEditorDock );
+  colorMapEditorDock->setWidget(cmed_panel);
+  myDockWidgets[colorMapEditorDock] = false; // hidden by default
+
   
   // Memory inspector dock
   QDockWidget* memoryInspectorDock = new QDockWidget(tr( "TTL_MEMORY_INSPECTOR" ), desk);
@@ -280,9 +298,11 @@ void PVGUI_Module::setupDockWidgets()
   statisticsViewDock->hide();
   comparativePanelDock->hide();
   animationViewDock->hide();
-  selectionInspectorDock->hide();
+  multiBlockInspectorPanelDock->hide();
+  selectionDisplayDock->hide();
   collaborationPanelDock->hide();
   memoryInspectorDock->hide();
+  colorMapEditorDock->hide();
 }
 
 /*!
index 83fe4e6119e538cff3feff860ea0f0d1dfaf6b41..086956c6b5d47b78146f97591712c6aad49fa008 100644 (file)
         <source>TTL_OBJECT_INSPECTOR</source>
         <translation>Properties</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Multi-block Inspector</translation>
+    </message>
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Color Map Editor</translation>
+    </message>           
     <message>
         <source>TTL_DISPLAY</source>
         <translation>Display</translation>
     </message>
     <message>
         <source>TTL_STATISTICS_VIEW</source>
-        <translation>Statistics View</translation>
+        <translation>Statistics Inspector</translation>
     </message>
     <message>
         <source>TTL_ANIMATION_INSPECTOR</source>
     </message>
     <message>
         <source>TTL_SELECTION_INSPECTOR</source>
-        <translation>Selection Inspector</translation>
+        <translation>Selection Display Inspector</translation>
     </message>
-     <message>
+    <message>
         <source>TTL_COLLABORATIVE_DOCK</source>
         <translation>Collaboration Panel</translation>
     </message>
-     <message>
+    <message>
         <source>TTL_MEMORY_INSPECTOR</source>
         <translation>Memory Inspector</translation>
     </message>
-   <message>
+    <message>
         <source>TOP_OPEN_FILE</source>
         <translation>Open Paraview File</translation>
     </message>
index 93d657b57f5d75f304af56a13d3a52ae1028f891..6ade59b1cd67dcad652e782159832f6266ff0957 100644 (file)
     <name>PVGUI_Module</name>
     <message>
         <source>PREF_SHOW_COLOR_LEGEND</source>
-        <translation type="unfinished">Show Color Legend</translation>
+        <translation>Afficher la légende couleur</translation>
     </message>
     <message>
         <source>TTL_PIPELINE_BROWSER</source>
-        <translation>Navigateur des conduites</translation>
+        <translation>Navigateur du pipeline</translation>
     </message>
     <message>
         <source>TTL_OBJECT_INSPECTOR</source>
         <translation>Inspecteur d&apos;objets</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Navigateur multi-blocs</translation>
+    </message>
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Editeur de carte de couleurs</translation>
+    </message>             
     <message>
         <source>TTL_DISPLAY</source>
         <translation>Affichage</translation>
     </message>
     <message>
         <source>TTL_STATISTICS_VIEW</source>
-        <translation>Vue Statistique</translation>
+        <translation>Navigateur de statistiques</translation>
     </message>
     <message>
         <source>TTL_ANIMATION_INSPECTOR</source>
index 0474842cc3d938d7914fb6be13bfe2d17331119e..fcf678c7af3dd63f72ebae0e67cc92d1b85293a7 100644 (file)
       <source>TTL_OBJECT_INSPECTOR</source>
       <translation>オブジェクト ã‚¤ãƒ³ã‚¹ãƒšã‚¯ã‚¿ãƒ¼</translation>
     </message>
+    <message>
+        <source>TTL_MUTLI_BLOCK_INSPECTOR</source>
+        <translation>Multi-block inspector</translation>
+    </message> 
+    <message>
+        <source>TTL_COLOR_MAP_EDITOR</source>
+        <translation>Color Map Editor</translation>
+    </message>      
     <message>
       <source>TTL_DISPLAY</source>
       <translation>表示</translation>
index 05b78de4aa5e7f4f6b8ef6384a387bb7467a9c0f..fb5c7584d40c3215eedf8d1cd28c0ee8f84e8916 100644 (file)
@@ -783,61 +783,6 @@ def select_cells_with_data(proxy, on_points=None, on_cells=None):
     proxy.Entity = cell_types_on
     proxy.UpdatePipeline()
 
-
-def extract_groups_for_field(proxy, field_name, field_entity, force=False):
-    """Exctract only groups which have the field.
-
-    Arguments:
-      proxy: the pipeline object, containig data
-      field_name: the field name
-      field_entity: the field entity
-      force: if True - ExtractGroup object will be created in any case
-
-    Returns:
-      ExtractGroup object: if not all groups have the field or
-      the force argument is true
-      The initial proxy: if no groups had been filtered.
-
-    """
-    source = proxy
-
-    # Remember the state
-    initial_groups = list(proxy.Groups)
-
-    # Get data information for the field entity
-    entity_data_info = None
-    field_data = proxy.GetFieldDataInformation()
-
-    if field_name in field_data.keys():
-        entity_data_info = field_data
-    elif field_entity == EntityType.CELL:
-        entity_data_info = proxy.GetCellDataInformation()
-    elif field_entity == EntityType.NODE:
-        entity_data_info = proxy.GetPointDataInformation()
-
-    # Collect groups for extraction
-    groups_to_extract = []
-
-    for group in initial_groups:
-        proxy.Groups = [group]
-        proxy.UpdatePipeline()
-        if field_name in entity_data_info.keys():
-            groups_to_extract.append(group)
-
-    # Restore state
-    proxy.Groups = initial_groups
-    proxy.UpdatePipeline()
-
-    # Extract groups if necessary
-    if force or (len(groups_to_extract) < len(initial_groups)):
-        extract_group = pv.ExtractGroup(proxy)
-        extract_group.Groups = groups_to_extract
-        extract_group.UpdatePipeline()
-        source = extract_group
-
-    return source
-
-
 def if_possible(proxy, field_name, entity, prs_type):
     """Check if the presentation creation is possible on the given field."""
     result = True
@@ -1074,12 +1019,8 @@ def ScalarMapOnField(proxy, entity, field_name, timestamp_nb,
     pv.GetRenderView().ViewTime = time_value
     pv.UpdatePipeline(time_value, proxy)
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity,
-                                         force=True)
-
     # Get Scalar Map representation object
-    scalarmap = pv.GetRepresentation(new_proxy)
+    scalarmap = pv.GetRepresentation(proxy)
 
     # Get lookup table
     lookup_table = get_lookup_table(field_name, nb_components, vector_mode)
@@ -1423,8 +1364,7 @@ def VectorsOnField(proxy, entity, field_name, timestamp_nb,
     pv.UpdatePipeline(time_value, proxy)
 
     # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-    source = new_proxy
+    source = proxy
 
     # Cell centers
     if is_data_on_cells(proxy, field_name):
@@ -1467,7 +1407,7 @@ def VectorsOnField(proxy, entity, field_name, timestamp_nb,
         glyph.SetScaleFactor = scale_factor
     else:
         def_scale = get_default_scale(PrsTypeEnum.DEFORMEDSHAPE,
-                                      new_proxy, entity, field_name)
+                                      proxy, entity, field_name)
         glyph.SetScaleFactor = def_scale
 
     glyph.UpdatePipeline()
@@ -1542,11 +1482,8 @@ def DeformedShapeOnField(proxy, entity, field_name,
     pv.GetRenderView().ViewTime = time_value
     pv.UpdatePipeline(time_value, proxy)
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-
     # Do merge
-    source = pv.MergeBlocks(new_proxy)
+    source = pv.MergeBlocks(proxy)
 
     # Cell data to point data
     if is_data_on_cells(proxy, field_name):
@@ -1660,11 +1597,8 @@ def DeformedShapeAndScalarMapOnField(proxy, entity, field_name,
         scalar_field_entity = entity
         scalar_field = field_name
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-
     # Do merge
-    source = pv.MergeBlocks(new_proxy)
+    source = pv.MergeBlocks(proxy)
 
     # Cell data to point data
     if is_data_on_cells(proxy, field_name):
@@ -1686,7 +1620,7 @@ def DeformedShapeAndScalarMapOnField(proxy, entity, field_name,
         warp_vector.ScaleFactor = scale_factor
     else:
         def_scale = get_default_scale(PrsTypeEnum.DEFORMEDSHAPE,
-                                      new_proxy, entity, field_name)
+                                      proxy, entity, field_name)
         warp_vector.ScaleFactor = def_scale
 
     # Get Defromed Shape And Scalar Map representation object
@@ -1767,11 +1701,8 @@ def Plot3DOnField(proxy, entity, field_name, timestamp_nb,
     pv.GetRenderView().ViewTime = time_value
     pv.UpdatePipeline(time_value, proxy)
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-
     # Do merge
-    merge_blocks = pv.MergeBlocks(new_proxy)
+    merge_blocks = pv.MergeBlocks(proxy)
     merge_blocks.UpdatePipeline()
 
     poly_data = None
@@ -1927,11 +1858,8 @@ def IsoSurfacesOnField(proxy, entity, field_name, timestamp_nb,
     pv.GetRenderView().ViewTime = time_value
     pv.UpdatePipeline(time_value, proxy)
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-
     # Do merge
-    source = pv.MergeBlocks(new_proxy)
+    source = pv.MergeBlocks(proxy)
 
     # Transform cell data into point data if necessary
     if is_data_on_cells(proxy, field_name):
@@ -2049,8 +1977,7 @@ def GaussPointsOnField(proxy, entity, field_name,
     pv.GetRenderView().ViewTime = time_value
     proxy.UpdatePipeline(time=time_value)
 
-    # Extract only groups with data for the field
-    source = extract_groups_for_field(proxy, field_name, entity)
+    source = proxy
 
     # Quadrature point arrays
     qp_arrays = proxy.QuadraturePointArrays.Available
@@ -2348,11 +2275,8 @@ def StreamLinesOnField(proxy, entity, field_name, timestamp_nb,
     pv.GetRenderView().ViewTime = time_value
     pv.UpdatePipeline(time_value, proxy)
 
-    # Extract only groups with data for the field
-    new_proxy = extract_groups_for_field(proxy, field_name, entity)
-
     # Do merge
-    source = pv.MergeBlocks(new_proxy)
+    source = pv.MergeBlocks(proxy)
 
     # Cell data to point data
     if is_data_on_cells(proxy, field_name):
@@ -2387,7 +2311,7 @@ def StreamLinesOnField(proxy, entity, field_name, timestamp_nb,
     lookup_table = get_lookup_table(field_name, nb_components, vector_mode)
 
     # Set field range if necessary
-    data_range = get_data_range(new_proxy, entity,
+    data_range = get_data_range(proxy, entity,
                                 field_name, vector_mode)
     lookup_table.LockScalarRange = 1
     lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
index 9a4bd3bab2727398ecc6f987e0f6050a4dec965b..b792349206a0b3c236b8c2532958cbfa0ea7291a 100755 (executable)
@@ -29,14 +29,12 @@ ENDIF()
 SET(_subdirs
   #Filter 
   #ToolBar 
-  MedReader 
+  MEDReader 
   ParaMEDCorba 
   TableReader 
   NavigationMode 
-  IntegrationPoints
   ElevationSurface
   ScaleVector
-  ExtraxtFieldFilter
   )
 
 FOREACH(_dir ${_subdirs})
diff --git a/src/Plugins/ExtraxtFieldFilter/CMakeLists.txt b/src/Plugins/ExtraxtFieldFilter/CMakeLists.txt
deleted file mode 100755 (executable)
index 79b10e6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# create a paraview plugin containing server manager xml and the server
-# manager classes to build
-# this plugin can be loaded on the server side
-
-
-cmake_minimum_required(VERSION 2.8)
-
-FIND_PACKAGE(ParaView REQUIRED)
-INCLUDE(${PARAVIEW_USE_FILE})
-
-ADD_PARAVIEW_PLUGIN(ExtractFieldFilter "1.0"
-    SERVER_MANAGER_XML ExtractFieldFilter.xml 
-    SERVER_MANAGER_SOURCES vtkExtractFieldFilter.cxx
-    GUI_RESOURCES pqExtractField.qrc
-    GUI_RESOURCE_FILES ExtractFieldGUI.xml
-    )
-
-INSTALL(
-       TARGETS ExtractFieldFilter 
-       DESTINATION lib/paraview
-)
diff --git a/src/Plugins/ExtraxtFieldFilter/ExtractFieldFilter.xml b/src/Plugins/ExtraxtFieldFilter/ExtractFieldFilter.xml
deleted file mode 100755 (executable)
index b326583..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<ServerManagerConfiguration>
-  <ProxyGroup name="filters">
-   <SourceProxy name="ExtractFieldFilter" class="vtkExtractFieldFilter" label="Extract Field">
-     <Documentation
-        long_help="The filter extracts data sets from multiblock data set input which are used as a support for the selected field."
-        short_help="Extracting of mesh support for selected field">
-     </Documentation>
-     
-     <InputProperty
-        name="Input"
-        command="SetInputConnection">
-           <ProxyGroupDomain name="groups">
-             <Group name="sources"/>
-             <Group name="filters"/>
-           </ProxyGroupDomain>
-           <DataTypeDomain name="input_type">
-             <DataType value="vtkMultiBlockDataSet"/>
-           </DataTypeDomain>
-           
-        <InputArrayDomain name="input_array">
-        </InputArrayDomain>
-     </InputProperty>
-     
-     <StringVectorProperty command="SetInputArrayToProcess"
-                            element_types="0 0 0 0 2"
-                            label="Field name"
-                            name="SelectInputScalars"
-                            number_of_elements="5">
-                            
-        <ArrayListDomain attribute_type="Scalars"
-                         name="array_list">
-          <RequiredProperties>
-            <Property function="Input"
-                      name="Input" />
-          </RequiredProperties>
-        </ArrayListDomain>
-        
-        <FieldDataDomain name="field_list">
-          <RequiredProperties>
-            <Property function="Input"
-                      name="Input" />
-          </RequiredProperties>
-        </FieldDataDomain>
-        
-        <Documentation>
-        This property lists the names of fields which can be used for extraction of mesh support.
-        </Documentation>
-      </StringVectorProperty>
-      
-   </SourceProxy>
- </ProxyGroup>
-</ServerManagerConfiguration>
diff --git a/src/Plugins/ExtraxtFieldFilter/ExtractFieldGUI.xml b/src/Plugins/ExtraxtFieldFilter/ExtractFieldGUI.xml
deleted file mode 100644 (file)
index 9166177..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-<ParaViewFilters>
-    <Category name="DataAnalysis" menu_label="&amp;Data Analysis">
-      <!-- adds a new category and then adds our filter to it -->
-      <Proxy group="filters" name="ExtractFieldFilter" icon=":/ExtractFieldIcons/resources/extract_field.png" />
-    </Category>
-</ParaViewFilters>
\ No newline at end of file
diff --git a/src/Plugins/ExtraxtFieldFilter/pqExtractField.qrc b/src/Plugins/ExtraxtFieldFilter/pqExtractField.qrc
deleted file mode 100644 (file)
index 7f06fb1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/ExtractFieldIcons" >
-      <file>resources/extract_field.png</file>
-    </qresource>
-</RCC>
\ No newline at end of file
diff --git a/src/Plugins/ExtraxtFieldFilter/resources/extract_field.png b/src/Plugins/ExtraxtFieldFilter/resources/extract_field.png
deleted file mode 100644 (file)
index a8a50e8..0000000
Binary files a/src/Plugins/ExtraxtFieldFilter/resources/extract_field.png and /dev/null differ
diff --git a/src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.cxx b/src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.cxx
deleted file mode 100644 (file)
index fcec145..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkExtractFieldFilter.h"
-
-#include <vtkInformation.h>
-#include <vtkInformationVector.h>
-#include <vtkObjectFactory.h>
-#include <vtkMultiBlockDataSet.h>
-#include <vtkDataObjectTreeIterator.h>
-#include <vtkFieldData.h>
-#include <vtkStringArray.h>
-#include <vtkDataSet.h>
-#include <vtkPointData.h>
-#include <vtkCellData.h>
-#include <vtkDataArray.h>
-
-#include <string.h>
-
-using namespace std;
-
-vtkStandardNewMacro(vtkExtractFieldFilter);
-
-vtkExtractFieldFilter::vtkExtractFieldFilter()
-:vtkMultiBlockDataSetAlgorithm()
-{
-       this->FieldName = NULL;
-}
-
-
-vtkExtractFieldFilter::~vtkExtractFieldFilter()
-{
-}
-
-//----------------------------------------------------------------------------
-int vtkExtractFieldFilter::RequestData(vtkInformation* vtkNotUsed(request),
-                                                                          vtkInformationVector** theInputVector,
-                                                                          vtkInformationVector* theOutputVector)
-{
-       // get the info objects
-       vtkMultiBlockDataSet* aInput = vtkMultiBlockDataSet::GetData(theInputVector[0], 0);
-       vtkMultiBlockDataSet* aOutput = vtkMultiBlockDataSet::GetData(theOutputVector, 0);
-
-       aOutput->CopyStructure(aInput);
-
-       // Copy selected blocks over to the output.
-       vtkDataObjectTreeIterator* aIter = aInput->NewTreeIterator();
-       aIter->VisitOnlyLeavesOff();
-       for (aIter->InitTraversal(); !aIter->IsDoneWithTraversal(); aIter->GoToNextItem()) {
-               this->CopySubTree(aIter, aOutput, aInput);
-       }
-       aIter->Delete();
-       return 1;
-}
-
-
-//----------------------------------------------------------------------------
-void vtkExtractFieldFilter::CopySubTree(vtkDataObjectTreeIterator* theLoc,
-                                                                               vtkMultiBlockDataSet* theOutput,
-                                                                               vtkMultiBlockDataSet* theInput)
-{
-       vtkDataObject* aInputNode = theInput->GetDataSet(theLoc);
-       if (!aInputNode->IsA("vtkCompositeDataSet")) {
-               if (IsToCopy(aInputNode)) {
-                       vtkDataObject* aClone = aInputNode->NewInstance();
-                       aClone->ShallowCopy(aInputNode);
-                       theOutput->SetDataSet(theLoc, aClone);
-                       aClone->Delete();
-               }
-       } else {
-               vtkCompositeDataSet* aCInput = vtkCompositeDataSet::SafeDownCast(aInputNode);
-               vtkCompositeDataSet* aCOutput = vtkCompositeDataSet::SafeDownCast(theOutput->GetDataSet(theLoc));
-               vtkCompositeDataIterator* aIter = aCInput->NewIterator();
-               vtkDataObjectTreeIterator* aTreeIter = vtkDataObjectTreeIterator::SafeDownCast(aIter);
-               if (aTreeIter) {
-                       aTreeIter->VisitOnlyLeavesOff();
-               }
-               for (aIter->InitTraversal(); !aIter->IsDoneWithTraversal(); aIter->GoToNextItem()) {
-                       vtkDataObject* aCurNode = aIter->GetCurrentDataObject();
-                       if (IsToCopy(aInputNode)) {
-                               vtkDataObject* aClone = aCurNode->NewInstance();
-                               aClone->ShallowCopy(aCurNode);
-                               aCOutput->SetDataSet(aIter, aClone);
-                               aClone->Delete();
-                       }
-               }
-               aIter->Delete();
-       }
-
-}
-
-
-//----------------------------------------------------------------------------
-void vtkExtractFieldFilter::GetListOfFields(vtkDataObject* theObject, std::list<std::string>& theList) const
-{
-       theList.clear();
-
-       if (theObject->IsA("vtkDataSet")) {
-               vtkDataSet* aDataSet = vtkDataSet::SafeDownCast(theObject);
-               vtkPointData* aPntData = aDataSet->GetPointData();
-               int aNbArrays = aPntData->GetNumberOfArrays();
-               for (int i = 0; i < aNbArrays; i++) {
-                       const char* aName = aPntData->GetArrayName(i);
-                       theList.push_back(aName);
-               }
-               vtkCellData* aCellData = aDataSet->GetCellData();
-               aNbArrays = aCellData->GetNumberOfArrays();
-               for (int i = 0; i < aNbArrays; i++) {
-                       const char* aName = aCellData->GetArrayName(i);
-                       theList.push_back(aName);
-               }
-       }
-
-}
-
-
-//----------------------------------------------------------------------------
-bool vtkExtractFieldFilter::IsToCopy(vtkDataObject* theObject) const
-{
-       if (this->FieldName == NULL)
-               return true;
-
-       std::list<std::string> aList;
-       GetListOfFields(theObject, aList);
-
-       std::list<std::string>::const_iterator aIt;
-       std::string aTestStr = this->FieldName;
-       for (aIt = aList.begin(); aIt != aList.end(); ++aIt)
-               if (aTestStr.compare(*aIt) == 0)
-                       return true;
-
-       return false;
-}
-
-
-
-//----------------------------------------------------------------------------
-void vtkExtractFieldFilter::SetInputArrayToProcess(int idx, int port, int connection,
-                                                                                                  int fieldAssociation, const char* name)
-{
-       this->SetFieldName(name);
-}
-
-
-//----------------------------------------------------------------------------
-void vtkExtractFieldFilter::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os,indent);
-  os << indent << "Field name: " << FieldName << endl;
-}
-
diff --git a/src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.h b/src/Plugins/ExtraxtFieldFilter/vtkExtractFieldFilter.h
deleted file mode 100644 (file)
index 4a93ccb..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkExtractFieldFilter_h
-#define __vtkExtractFieldFilter_h
-
-#include <vtkMultiBlockDataSetAlgorithm.h>
-#include <list>
-#include <string>
-
-class vtkDataObjectTreeIterator;
-
-
-/**
- * Implements a class of a filter which extract a support mesh of a data field.
- * It processes MultiBlockDataSet data structure extracting blocks which contain
- * a field with FieldName.
- * If field name is not defined then the filter just copies input data to output data
-*/
-class vtkExtractFieldFilter : public vtkMultiBlockDataSetAlgorithm
-{
-public:
-       /// Returns pointer on a new instance of the class
-       static vtkExtractFieldFilter* New();
-
-       vtkTypeMacro(vtkExtractFieldFilter, vtkMultiBlockDataSetAlgorithm);
-
-       /// Prints current state of the objects
-       virtual void PrintSelf(ostream& os, vtkIndent indent);
-
-       /// This method is used for definition of a field name for filtering from GUI
-       virtual void SetInputArrayToProcess(int idx, int port, int connection,
-                                                                               int fieldAssociation, const char* name);
-
-       /// Set and Get methods for FieldName
-       vtkSetStringMacro(FieldName);
-       vtkGetStringMacro(FieldName);
-
-protected:
-       /// Constructor
-       vtkExtractFieldFilter();
-
-       /// Destructor
-       virtual ~vtkExtractFieldFilter();
-
-       /// A method which is called on filtering data
-       virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
-
-       /// Copies a sub-tree defined by a Data Set Block
-       void CopySubTree(vtkDataObjectTreeIterator* theLoc, vtkMultiBlockDataSet* theOutput, vtkMultiBlockDataSet* theInput);
-
-       /// Returns a list of strings with names of fields defined in the given Data Object
-       void GetListOfFields(vtkDataObject* theObject, std::list<std::string>& theList) const;
-
-       /// Returns True if the given Data Object has to be copied into output
-       bool IsToCopy(vtkDataObject* theObject) const;
-
-private:
-       /// Methods for copy of the filter: Not implemented
-       vtkExtractFieldFilter(const vtkExtractFieldFilter&); // Not implemented
-       void operator=(const vtkExtractFieldFilter&); // Not implemented
-
-       char* FieldName;
-};
-
-#endif
diff --git a/src/Plugins/IntegrationPoints/CMakeLists.txt b/src/Plugins/IntegrationPoints/CMakeLists.txt
deleted file mode 100644 (file)
index 0391f94..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-PROJECT(ELNOFilter)
-cmake_minimum_required(VERSION 2.6)
-
-cmake_policy(SET CMP0003 NEW)
-
-
-FIND_PACKAGE(ParaView REQUIRED)
-INCLUDE(${PARAVIEW_USE_FILE})
-
-SET(SRCS
-    vtkELNOFilter.cxx 
-    vtkELNOMeshFilter.cxx
-    vtkELNOSurfaceFilter.cxx
-    )
-
-ADD_PARAVIEW_PLUGIN(ELNOFilter "1.0"
-       SERVER_MANAGER_XML ELNOFilter.xml
-       GUI_RESOURCE_FILES ELNOFilterClient.xml
-       SERVER_MANAGER_SOURCES ${SRCS})
-
-install(TARGETS ${PROJECT_NAME} 
-   RUNTIME DESTINATION lib/paraview
-   LIBRARY DESTINATION lib/paraview
-   ARCHIVE DESTINATION lib/paraview
-   )
-
diff --git a/src/Plugins/IntegrationPoints/ELNOFilter.xml b/src/Plugins/IntegrationPoints/ELNOFilter.xml
deleted file mode 100644 (file)
index 4d2322c..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-<ServerManagerConfiguration>
-  <!-- Begin ELNOFilter -->
-  <ProxyGroup
-    name="filters">
-    <SourceProxy
-      name="ELNOPoints"
-      class="vtkELNOFilter"
-      label="ELNO Points">
-
-      <Documentation
-        long_help="Create a point set with data at ELNO points. Cells are shrinked by a given factor towards the cell center."
-        short_help="Create a point set with data at ELNO points. Cells are shrinked by a given factor towards the cell center.">
-        "Create a point set with data at quadrature points."
-      </Documentation>
-
-      <OutputPort
-        name="ELNO Points"
-        index="0" />
-
-      <InputProperty
-        name="Input"
-        command="SetInputConnection">
-        <ProxyGroupDomain
-          name="groups">
-          <Group
-            name="sources" />
-          <Group
-            name="filters" />
-        </ProxyGroupDomain>
-        <DataTypeDomain
-          name="input_type">
-          <DataType
-            value="vtkUnstructuredGrid" />
-        </DataTypeDomain>
-        <InputArrayDomain
-          name="input_array"
-          attribute_type="cell" />
-      </InputProperty>
-
-      <!-- Source Array -->
-      <StringVectorProperty
-        name="SelectSourceArray"
-        command="SetInputArrayToProcess"
-        number_of_elements="5"
-        element_types="0 0 0 0 2"
-        animateable="0">
-        <Documentation>
-          Specifies the offset array from which we generate ELNO points.
-        </Documentation>
-
-        <ArrayListDomain
-          name="array_list"
-          key_locations="vtkMedUtilities"
-          key_names="ELNO"
-          key_strategies="need_key"
-          input_domain_name="input_array">
-          <RequiredProperties>
-            <Property
-              name="Input"
-              function="Input" />
-          </RequiredProperties>
-        </ArrayListDomain>
-      </StringVectorProperty>
-
-      <DoubleVectorProperty
-        name="ShrinkFactor"
-        command="SetShrinkFactor"
-        label="Shrink Factor"
-        number_of_elements="1"
-        default_values="0.5">
-        <DoubleRangeDomain
-          name="range"
-          min="0"
-          max="1" />
-      </DoubleVectorProperty>
-
-      <Hints>
-        <Property name="SelectSourceArray" show="0"/>
-      </Hints>
-
-    </SourceProxy>
-
-    <SourceProxy
-      name="GaussPoints"
-      class="vtkQuadraturePointsGenerator"
-      label="Gauss Points">
-
-      <Documentation
-        long_help="Create a point set with data at Gauss points."
-        short_help="Create a point set with data at Gauss points.">
-        "Create a point set with data at quadrature points."
-      </Documentation>
-
-      <OutputPort
-        name="Gauss Points"
-        index="0" />
-
-      <InputProperty
-        name="Input"
-        command="SetInputConnection">
-        <ProxyGroupDomain
-          name="groups">
-          <Group
-            name="sources" />
-          <Group
-            name="filters" />
-        </ProxyGroupDomain>
-        <DataTypeDomain
-          name="input_type">
-          <DataType
-            value="vtkUnstructuredGrid" />
-        </DataTypeDomain>
-        <InputArrayDomain
-          name="input_array"
-          attribute_type="cell" />
-      </InputProperty>
-
-      <!-- Source Array -->
-      <StringVectorProperty
-        name="SelectSourceArray"
-        command="SetInputArrayToProcess"
-        number_of_elements="5"
-        element_types="0 0 0 0 2"
-        animateable="0">
-        <Documentation>
-          Specifies the offset array from which we generate Gauss points.
-        </Documentation>
-
-        <ArrayListDomain
-          name="array_list"
-          key_locations="vtkMedUtilities"
-          key_names="ELGA"
-          key_strategies="need_key">
-          <RequiredProperties>
-            <Property
-              name="Input"
-              function="Input" />
-          </RequiredProperties>
-        </ArrayListDomain>
-      </StringVectorProperty>
-
-      <Hints>
-        <Property name="SelectSourceArray" show="0"/>
-      </Hints>
-
-    </SourceProxy>
-
-    <SourceProxy
-      name="ELNOMesh"
-      class="vtkELNOMeshFilter"
-      label="ELNO Mesh">
-
-      <Documentation
-        long_help="Create a Mesh with ELNO values mapped at each vertex."
-        short_help="Create a Mesh with ELNO values mapped at each vertex.">
-        "Create a Mesh with ELNO values mapped at each
-        vertex."
-    </Documentation>
-
-      <OutputPort
-        name="ELNO Mesh"
-        index="0" />
-
-      <InputProperty
-        name="Input"
-        command="SetInputConnection">
-        <ProxyGroupDomain
-          name="groups">
-          <Group
-            name="sources" />
-          <Group
-            name="filters" />
-        </ProxyGroupDomain>
-        <DataTypeDomain
-          name="input_type">
-          <DataType
-            value="vtkUnstructuredGrid" />
-        </DataTypeDomain>
-        <InputArrayDomain
-          name="input_array"
-          attribute_type="cell" />
-      </InputProperty>
-
-      <!-- Source Array -->
-      <StringVectorProperty
-        name="SelectSourceArray"
-        command="SetInputArrayToProcess"
-        number_of_elements="5"
-        element_types="0 0 0 0 2"
-        animateable="0">
-        <Documentation>
-          Specifies the offset array from which we generate ELNO points.
-        </Documentation>
-
-        <ArrayListDomain
-          name="array_list"
-          key_locations="vtkMedUtilities"
-          key_names="ELNO"
-          key_strategies="need_key">
-          <RequiredProperties>
-            <Property
-              name="Input"
-              function="Input" />
-          </RequiredProperties>
-        </ArrayListDomain>
-      </StringVectorProperty>
-
-      <Hints>
-        <Property name="SelectSourceArray" show="0"/>
-      </Hints>
-
-    </SourceProxy>
-
-    <SourceProxy
-      name="ELNOSurface"
-      class="vtkELNOSurfaceFilter"
-      label="ELNO Surface">
-
-      <Documentation
-        long_help="Extract the surface of a dataset with ELNO values."
-        short_help="Extract the surface of a dataset with ELNO values.">
-        "Extract the surface of a dataset with ELNO values."
-      </Documentation>
-
-      <OutputPort
-        name="ELNO Surface"
-        index="0" />
-
-      <InputProperty
-        name="Input"
-        command="SetInputConnection">
-        <ProxyGroupDomain
-          name="groups">
-          <Group
-            name="sources" />
-          <Group
-            name="filters" />
-        </ProxyGroupDomain>
-        <DataTypeDomain
-          name="input_type">
-          <DataType
-            value="vtkUnstructuredGrid" />
-        </DataTypeDomain>
-        <InputArrayDomain
-          name="input_array"
-          attribute_type="cell" />
-      </InputProperty>
-
-      <!-- Source Array -->
-      <StringVectorProperty
-        name="SelectSourceArray"
-        command="SetInputArrayToProcess"
-        number_of_elements="5"
-        element_types="0 0 0 0 2"
-        animateable="0">
-        <Documentation>
-          Specifies the offset array from which we generate ELNO points.
-        </Documentation>
-
-        <ArrayListDomain
-          name="array_list"
-          key_locations="vtkMedUtilities"
-          key_names="ELNO"
-          key_strategies="need_key">
-          <RequiredProperties>
-            <Property
-              name="Input"
-              function="Input" />
-          </RequiredProperties>
-        </ArrayListDomain>
-      </StringVectorProperty>
-
-      <Hints>
-        <Property name="SelectSourceArray" show="0"/>
-      </Hints>
-
-    </SourceProxy>
-
-  </ProxyGroup>
-  <!-- End ELNOFilter -->
-</ServerManagerConfiguration>
diff --git a/src/Plugins/IntegrationPoints/ELNOFilterClient.xml b/src/Plugins/IntegrationPoints/ELNOFilterClient.xml
deleted file mode 100644 (file)
index 1376440..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<ParaViewFilters>
-  <Category name="Integration Points" menu_label="&amp;Integration Points" preserve_order="1">
-    <Filter name="ELNOPoints"/>
-    <Filter name="ELNOMesh"/>
-    <Filter name="ELNOSurface"/>
-    <Filter name="GaussPoints" />
-  </Category>
-</ParaViewFilters>
diff --git a/src/Plugins/IntegrationPoints/vtkELNOFilter.cxx b/src/Plugins/IntegrationPoints/vtkELNOFilter.cxx
deleted file mode 100644 (file)
index 640c1be..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkELNOFilter.h"
-#include "vtkInformation.h"
-#include "vtkInformationVector.h"
-#include "vtkObjectFactory.h"
-#include "vtkPolyDataAlgorithm.h"
-#include "vtkPolyData.h"
-#include "vtkIdTypeArray.h"
-#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
-#include "vtkQuadratureSchemeDefinition.h"
-#include "vtkUnstructuredGrid.h"
-
-//vtkCxxRevisionMacro(vtkELNOFilter, "$Revision$");
-vtkStandardNewMacro(vtkELNOFilter);
-
-vtkELNOFilter::vtkELNOFilter()
-{
-  this->ShrinkFactor = 0.5;
-}
-
-vtkELNOFilter::~vtkELNOFilter()
-{
-}
-
-int vtkELNOFilter::RequestData(vtkInformation *request,
-    vtkInformationVector **input, vtkInformationVector *output)
-{
-  vtkUnstructuredGrid *usgIn = vtkUnstructuredGrid::SafeDownCast(
-      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkPolyData *pdOut = vtkPolyData::SafeDownCast(
-      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkDataArray* array = this->GetInputArrayToProcess(0, input);
-  vtkIdTypeArray* offsets = vtkIdTypeArray::SafeDownCast(
-      this->GetInputArrayToProcess(0, input));
-
-  if(usgIn == NULL || offsets == NULL || pdOut == NULL)
-    {
-    vtkDebugMacro("vtkELNOFilter no correctly configured : offsets = " << offsets);
-    return 1;
-    }
-
-  vtkInformation *info = offsets->GetInformation();
-  vtkInformationQuadratureSchemeDefinitionVectorKey *key =
-      vtkQuadratureSchemeDefinition::DICTIONARY();
-  if(!key->Has(info))
-    {
-    vtkDebugMacro("Dictionary is not present in array " << offsets->GetName() << " " << offsets << " Aborting." );
-    return 1;
-    }
-
-  int res = this->Superclass::RequestData(request, input, output);
-  if(res == 0)
-    {
-    return 0;
-    }
-
-  int dictSize = key->Size(info);
-  vtkQuadratureSchemeDefinition **dict =
-      new vtkQuadratureSchemeDefinition *[dictSize];
-  key->GetRange(info, dict, 0, 0, dictSize);
-
-  vtkIdType ncell = usgIn->GetNumberOfCells();
-  vtkPoints *points = pdOut->GetPoints();
-  vtkIdType start = 0;
-  for(vtkIdType cellId = 0; cellId < ncell; cellId++)
-    {
-    vtkIdType offset = offsets->GetValue(cellId);
-    int cellType = usgIn->GetCellType(cellId);
-    // a simple check to see if a scheme really exists for this cell type.
-    // should not happen if the cell type has not been modified.
-    if(dict[cellType] == NULL)
-      continue;
-    int np = dict[cellType]->GetNumberOfQuadraturePoints();
-    double center[3] = {0, 0, 0};
-    for(int id = start; id < start + np; id++)
-      {
-      double *position = points->GetPoint(id);
-      center[0] += position[0];
-      center[1] += position[1];
-      center[2] += position[2];
-      }
-    center[0] /= np;
-    center[1] /= np;
-    center[2] /= np;
-    for(int id = start; id < start + np; id++)
-      {
-      double *position = points->GetPoint(id);
-      double newpos[3];
-      newpos[0] = position[0] * this->ShrinkFactor + center[0] * (1
-          - this->ShrinkFactor);
-      newpos[1] = position[1] * this->ShrinkFactor + center[1] * (1
-          - this->ShrinkFactor);
-      newpos[2] = position[2] * this->ShrinkFactor + center[2] * (1
-          - this->ShrinkFactor);
-      points->SetPoint(id, newpos);
-      }
-    start += np;
-    }
-
-  return 1;
-}
-
-void vtkELNOFilter::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-
-  os << indent << "ShrinkFactor : " << this->ShrinkFactor << endl;
-}
diff --git a/src/Plugins/IntegrationPoints/vtkELNOFilter.h b/src/Plugins/IntegrationPoints/vtkELNOFilter.h
deleted file mode 100644 (file)
index 37e538f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _vtkELNOFilter_h
-#define _vtkELNOFilter_h
-
-#include "vtkQuadraturePointsGenerator.h"
-
-class VTK_EXPORT vtkELNOFilter: public vtkQuadraturePointsGenerator
-{
-public:
-  static vtkELNOFilter *New();
-  vtkTypeMacro(vtkELNOFilter,vtkQuadraturePointsGenerator);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description :
-  // This is the factor applied to shrink the cell before extracting
-  // the ELNO points.
-  // A value of 0 shrinks the cells to their center, and a value of 1
-  // do not shrink the cell at all.
-  // default value 0.5
-  vtkSetMacro(ShrinkFactor,double);
-  vtkGetMacro(ShrinkFactor,double);
-
-protected:
-  vtkELNOFilter();
-  ~vtkELNOFilter();
-
-  int RequestData(vtkInformation *, vtkInformationVector **,
-      vtkInformationVector *);
-
-  double ShrinkFactor;
-
-private:
-  vtkELNOFilter(const vtkELNOFilter&);
-  void operator =(const vtkELNOFilter&);
-};
-#endif
diff --git a/src/Plugins/IntegrationPoints/vtkELNOMeshFilter.cxx b/src/Plugins/IntegrationPoints/vtkELNOMeshFilter.cxx
deleted file mode 100644 (file)
index b4bec6d..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkELNOMeshFilter.h"
-#include "vtkInformation.h"
-#include "vtkInformationVector.h"
-#include "vtkObjectFactory.h"
-#include "vtkPolyDataAlgorithm.h"
-#include "vtkPolyData.h"
-#include "vtkIdTypeArray.h"
-#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
-#include "vtkQuadratureSchemeDefinition.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkShrinkFilter.h"
-#include "vtkSmartPointer.h"
-#include "vtkPointData.h"
-#include "vtkCellData.h"
-#include "vtkIdList.h"
-
-//vtkCxxRevisionMacro(vtkELNOMeshFilter, "$Revision$")
-//;
-vtkStandardNewMacro(vtkELNOMeshFilter)
-;
-
-vtkELNOMeshFilter::vtkELNOMeshFilter()
-{
-}
-
-vtkELNOMeshFilter::~vtkELNOMeshFilter()
-{
-}
-
-int vtkELNOMeshFilter::RequestData(vtkInformation *request,
-    vtkInformationVector **input, vtkInformationVector *output)
-{
-  vtkUnstructuredGrid *usgIn = vtkUnstructuredGrid::SafeDownCast(
-      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkUnstructuredGrid *usgOut = vtkUnstructuredGrid::SafeDownCast(
-      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkIdTypeArray* usg_offsets = vtkIdTypeArray::SafeDownCast(
-      this->GetInputArrayToProcess(0, input));
-
-  if(usgIn == NULL || usg_offsets == NULL || usgOut == NULL)
-    {
-    vtkDebugMacro("vtkELNOMeshFilter no correctly configured : offsets = " << usg_offsets);
-    return 1;
-    }
-
-  vtkIdTypeArray* a = vtkIdTypeArray::SafeDownCast(
-      usgIn->GetCellData()->GetArray(usg_offsets->GetName()));
-
-  vtkInformationVector *inArrayVec =
-      this->Information->Get(INPUT_ARRAYS_TO_PROCESS());
-
-  // first shrink the input
-  vtkUnstructuredGrid* usgInClone = usgIn->NewInstance();
-
-  usgInClone->ShallowCopy(usgIn);
-
-  vtkSmartPointer<vtkShrinkFilter> shrink =
-      vtkSmartPointer<vtkShrinkFilter>::New();
-  shrink->SetInputData(usgInClone);
-  shrink->SetShrinkFactor(0.9999);
-  shrink->Update();
-  vtkUnstructuredGrid* shrinked = shrink->GetOutput();
-
-  usgInClone->Delete();
-
-  usgOut->ShallowCopy(shrinked);
-
-  vtkIdTypeArray* offsets = vtkIdTypeArray::SafeDownCast(
-      shrinked->GetCellData()->GetArray(usg_offsets->GetName()));
-
-  // now copy ELNO data. Start by verifying if it is possible to
-  // shallow copy the array.
-  vtkInformation *info = offsets->GetInformation();
-  vtkInformationQuadratureSchemeDefinitionVectorKey *key =
-      vtkQuadratureSchemeDefinition::DICTIONARY();
-  if(!key->Has(info))
-    {
-    vtkDebugMacro("Dictionary is not present in array " << offsets->GetName() << " " << offsets << " Aborting." );
-    return 0;
-    }
-  int dictSize = key->Size(info);
-  vtkQuadratureSchemeDefinition **dict =
-      new vtkQuadratureSchemeDefinition *[dictSize];
-  key->GetRange(info, dict, 0, 0, dictSize);
-
-  vtkIdType nVerts = shrinked->GetNumberOfPoints();
-  vtkIdType ncell = usgIn->GetNumberOfCells();
-  // first loop through all cells to check if a shallow copy is possible
-  bool shallowok = true;
-  vtkIdType previous = 0;
-
-  for(vtkIdType cellId = 0; cellId < ncell; cellId++)
-    {
-    vtkIdType offset = offsets->GetValue(cellId);
-    if(offset != previous)
-      {
-      shallowok = false;
-      break;
-      }
-    int cellType = usgIn->GetCellType(cellId);
-
-    if(dict[cellType] == NULL)
-      {
-      previous = offset;
-      }
-    else
-      {
-      previous = offset + dict[cellType]->GetNumberOfQuadraturePoints();
-      }
-    }
-  if(previous != nVerts)
-    {
-    shallowok = false;
-    }
-
-  vtkFieldData* fielddata = usgIn->GetFieldData();
-  for(int index = 0; index < fielddata->GetNumberOfArrays(); index++)
-    {
-    vtkDataArray* data = fielddata->GetArray(index);
-    if(data == NULL)
-      continue;
-
-    vtkInformation* info = data->GetInformation();
-    const char* arrayOffsetName = info->Get(
-        vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME());
-
-    if(arrayOffsetName == NULL ||
-       strcmp(arrayOffsetName, offsets->GetName()) != 0)
-      {
-      shrinked->GetFieldData()->AddArray(data);
-      continue;
-      }
-
-    if(shallowok)
-      {
-      usgOut->GetPointData()->AddArray(data);
-      }
-    else
-      {
-      vtkDataArray* newArray = data->NewInstance();
-      newArray->SetName(data->GetName());
-      usgOut->GetPointData()->AddArray(newArray);
-      newArray->SetNumberOfComponents(data->GetNumberOfComponents());
-      newArray->SetNumberOfTuples(usgOut->GetNumberOfPoints());
-      newArray->CopyComponentNames(data);
-      newArray->Delete();
-      vtkIdList *ids = vtkIdList::New();
-
-      for(vtkIdType cellId = 0; cellId < ncell; cellId++)
-        {
-        vtkIdType offset = offsets->GetValue(cellId);
-        int cellType = shrinked->GetCellType(cellId);
-        shrinked->GetCellPoints(cellId, ids);
-        for(int id = 0; id < dict[cellType]->GetNumberOfQuadraturePoints(); id++)
-          {
-          const double * w = dict[cellType]->GetShapeFunctionWeights(id);
-          int j;
-          for(j = 0; j < dict[cellType]->GetNumberOfNodes(); j++)
-            {
-            if(w[j] == 1.0)
-              break;
-            }
-          if(j == dict[cellType]->GetNumberOfNodes())
-            {
-            j = id;
-            }
-          newArray->SetTuple(ids->GetId(id), offset + j, data);
-          }
-        }
-      ids->FastDelete();
-      }
-    }
-
-  delete[] dict;
-
-  return 1;
-}
-
-void vtkELNOMeshFilter::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/IntegrationPoints/vtkELNOMeshFilter.h b/src/Plugins/IntegrationPoints/vtkELNOMeshFilter.h
deleted file mode 100644 (file)
index 405d52f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _vtkELNOMeshFilter_h
-#define _vtkELNOMeshFilter_h
-
-#include "vtkUnstructuredGridAlgorithm.h"
-
-class VTK_EXPORT vtkELNOMeshFilter: public vtkUnstructuredGridAlgorithm
-{
-public:
-  static vtkELNOMeshFilter *New();
-  vtkTypeMacro(vtkELNOMeshFilter,vtkUnstructuredGridAlgorithm);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-protected:
-  vtkELNOMeshFilter();
-  ~vtkELNOMeshFilter();
-
-  int RequestData(vtkInformation *, vtkInformationVector **,
-      vtkInformationVector *);
-
-private:
-  vtkELNOMeshFilter(const vtkELNOMeshFilter&);
-  void operator =(const vtkELNOMeshFilter&);
-};
-#endif
diff --git a/src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.cxx b/src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.cxx
deleted file mode 100644 (file)
index 0403969..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkELNOSurfaceFilter.h"
-#include "vtkInformation.h"
-#include "vtkInformationVector.h"
-#include "vtkObjectFactory.h"
-#include "vtkPolyDataAlgorithm.h"
-#include "vtkPolyData.h"
-#include "vtkIdTypeArray.h"
-#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
-#include "vtkQuadratureSchemeDefinition.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkPVGeometryFilter.h"
-#include "vtkShrinkFilter.h"
-#include "vtkSmartPointer.h"
-#include "vtkPointData.h"
-#include "vtkCellData.h"
-#include "vtkIdList.h"
-
-//vtkCxxRevisionMacro(vtkELNOSurfaceFilter, "$Revision$")
-//;
-vtkStandardNewMacro(vtkELNOSurfaceFilter)
-;
-
-vtkELNOSurfaceFilter::vtkELNOSurfaceFilter()
-{
-}
-
-vtkELNOSurfaceFilter::~vtkELNOSurfaceFilter()
-{
-}
-
-int vtkELNOSurfaceFilter::RequestData(vtkInformation *request,
-    vtkInformationVector **input, vtkInformationVector *output)
-{
-  vtkUnstructuredGrid *usgIn=vtkUnstructuredGrid::SafeDownCast(
-      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkUnstructuredGrid *usgOut=vtkUnstructuredGrid::SafeDownCast(
-      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkIdTypeArray* usg_offsets=vtkIdTypeArray::SafeDownCast(
-      this->GetInputArrayToProcess(0, input));
-
-  if(usgIn==NULL||usg_offsets==NULL||usgOut==NULL)
-    {
-    vtkDebugMacro("vtkELNOSurfaceFilter no correctly configured : offsets = " << usg_offsets);
-    return 1;
-    }
-
-  // first shrink the input
-  vtkUnstructuredGrid* usgInClone=usgIn->NewInstance();
-
-  usgInClone->ShallowCopy(usgIn);
-
-  vtkSmartPointer<vtkPVGeometryFilter> geomFilter=vtkSmartPointer<
-      vtkPVGeometryFilter>::New();
-  geomFilter->SetInputData(usgInClone);
-  geomFilter->SetPassThroughCellIds(1);
-  geomFilter->SetPassThroughPointIds(1);
-  geomFilter->SetUseOutline(0);
-  geomFilter->Update();
-
-  vtkPolyData* surface=vtkPolyData::SafeDownCast(geomFilter->GetOutput());
-  vtkIdTypeArray* originalCellIds=vtkIdTypeArray::SafeDownCast(
-      surface->GetCellData()->GetArray("vtkOriginalCellIds"));
-  vtkIdTypeArray* originalPointIds=vtkIdTypeArray::SafeDownCast(
-      surface->GetPointData()->GetArray("vtkOriginalPointIds"));
-
-  if( originalCellIds == NULL )
-  {
-    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalCellIds' array");
-    return 0;
-  }
-
-  if(originalPointIds==NULL)
-  {
-    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalPointIds' array");
-    return 0;
-  }
-
-  vtkSmartPointer<vtkShrinkFilter> shrink=
-      vtkSmartPointer<vtkShrinkFilter>::New();
-  shrink->SetInputConnection(geomFilter->GetOutputPort(0));
-  shrink->SetShrinkFactor(0.9999);
-  shrink->Update();
-
-  vtkUnstructuredGrid* shrinked=shrink->GetOutput();
-
-  usgInClone->Delete();
-
-  usgOut->ShallowCopy(shrinked);
-
-  vtkIdTypeArray* offsets=vtkIdTypeArray::SafeDownCast(
-      shrinked->GetCellData()->GetArray(usg_offsets->GetName()));
-
-  // now copy ELNO data. Start by verifying if it is possible to
-  // shallow copy the array.
-  vtkInformation *info=offsets->GetInformation();
-  vtkInformationQuadratureSchemeDefinitionVectorKey *key=
-      vtkQuadratureSchemeDefinition::DICTIONARY();
-  if(!key->Has(info))
-    {
-    vtkDebugMacro("Dictionary is not present in array " << offsets->GetName()
-                  << " " << offsets << " Aborting." );
-    return 0;
-    }
-  int dictSize=key->Size(info);
-  vtkQuadratureSchemeDefinition **dict=
-      new vtkQuadratureSchemeDefinition *[dictSize];
-  key->GetRange(info, dict, 0, 0, dictSize);
-
-  vtkIdType ncell=shrinked->GetNumberOfCells();
-
-  vtkFieldData* fielddata=usgIn->GetFieldData();
-  vtkIdList *ids=vtkIdList::New();
-  vtkIdList *surfaceIds=vtkIdList::New();
-  vtkIdList *originalIds=vtkIdList::New();
-  for(int index=0; index<fielddata->GetNumberOfArrays(); index++)
-    {
-    vtkDataArray* data=fielddata->GetArray(index);
-    if(data==NULL)
-      continue;
-
-    vtkInformation* info=data->GetInformation();
-    const char* arrayOffsetName=info->Get(
-        vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME());
-
-    if(arrayOffsetName == NULL ||
-       strcmp(arrayOffsetName, offsets->GetName())!=0)
-      {
-      usgOut->GetFieldData()->AddArray(data);
-
-      continue;
-      }
-
-    vtkDataArray* newArray=data->NewInstance();
-    newArray->SetName(data->GetName());
-    usgOut->GetPointData()->AddArray(newArray);
-    newArray->SetNumberOfComponents(data->GetNumberOfComponents());
-    newArray->SetNumberOfTuples(usgOut->GetNumberOfPoints());
-    newArray->CopyComponentNames(data);
-    newArray->Delete();
-
-    for(vtkIdType cellId=0; cellId<ncell; cellId++)
-      {
-      vtkIdType offset=offsets->GetValue(cellId);
-
-      vtkIdType originalCellId=originalCellIds->GetValue(cellId);
-      int originalCellType=usgIn->GetCellType(originalCellId);
-
-      shrinked->GetCellPoints(cellId, ids);
-      surface->GetCellPoints(cellId, surfaceIds);
-
-      for(int id=0; id<ids->GetNumberOfIds(); id++)
-        {
-        vtkIdType surfaceId=surfaceIds->GetId(id);
-        vtkIdType shrinkedId=ids->GetId(id);
-        vtkIdType originalPointId = originalPointIds->GetValue(surfaceId);
-
-        usgIn->GetCellPoints(originalCellId, originalIds);
-        int originalLocalId=-1;
-        for(int li=0; li<originalIds->GetNumberOfIds(); li++)
-          {
-          if(originalPointId==originalIds->GetId(li))
-            {
-            originalLocalId=li;
-            break;
-            }
-          }
-        if(originalLocalId==-1)
-          {
-          originalLocalId=0;
-          vtkErrorMacro("cannot find original id");
-          }
-
-        const double * w=dict[originalCellType]->GetShapeFunctionWeights(
-            originalLocalId);
-        int j;
-        for(j=0; j<dict[originalCellType]->GetNumberOfNodes(); j++)
-          {
-          if(w[j]==1.0)
-            break;
-          }
-        if(j==dict[originalCellType]->GetNumberOfNodes())
-          {
-          vtkErrorMacro("cannot find elno weigth.");
-          j=id;
-          }
-        newArray->SetTuple(shrinkedId, offset+j, data);
-        }
-      }
-    }
-
-  ids->FastDelete();
-  surfaceIds->FastDelete();
-  originalIds->FastDelete();
-  delete[] dict;
-
-  return 1;
-}
-
-void vtkELNOSurfaceFilter::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.h b/src/Plugins/IntegrationPoints/vtkELNOSurfaceFilter.h
deleted file mode 100644 (file)
index 3299ef6..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _vtkELNOSurfaceFilter_h
-#define _vtkELNOSurfaceFilter_h
-
-#include "vtkUnstructuredGridAlgorithm.h"
-
-class VTK_EXPORT vtkELNOSurfaceFilter: public vtkUnstructuredGridAlgorithm
-{
-public:
-  static vtkELNOSurfaceFilter *New();
-  vtkTypeMacro(vtkELNOSurfaceFilter,vtkUnstructuredGridAlgorithm);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-protected:
-  vtkELNOSurfaceFilter();
-  ~vtkELNOSurfaceFilter();
-
-  int RequestData(vtkInformation *, vtkInformationVector **,
-      vtkInformationVector *);
-
-private:
-  vtkELNOSurfaceFilter(const vtkELNOSurfaceFilter&);
-  void operator =(const vtkELNOSurfaceFilter&);
-};
-#endif
diff --git a/src/Plugins/MEDReader/CMake/CTestCustom.ctest.in b/src/Plugins/MEDReader/CMake/CTestCustom.ctest.in
new file mode 100644 (file)
index 0000000..cdf7bc5
--- /dev/null
@@ -0,0 +1,103 @@
+# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(CTEST_CUSTOM_WARNING_MATCH
+  ${CTEST_CUSTOM_WARNING_MATCH}
+  "{standard input}:[0-9][0-9]*: Warning: "
+  )
+
+# Removing this because it somehow matches normal build output lines
+# on several platforms.  Perhaps there is a bug in the custom match
+# support.
+#
+#  SET(CTEST_CUSTOM_ERROR_MATCH
+#    ${CTEST_CUSTOM_ERROR_MATCH}
+#    "\\", line [0-9]+, in "
+#    )
+
+IF("@CMAKE_SYSTEM@" MATCHES "OSF")
+  SET(CTEST_CUSTOM_WARNING_EXCEPTION
+    ${CTEST_CUSTOM_WARNING_EXCEPTION}
+    "vtkKWApplication"
+    "vtkKWObject"
+    )
+ENDIF("@CMAKE_SYSTEM@" MATCHES "OSF")
+
+SET(CTEST_CUSTOM_WARNING_EXCEPTION
+  ${CTEST_CUSTOM_WARNING_EXCEPTION}
+  "Utilities/vtktiff/"
+  "xtree.[0-9]+. : warning C4702: unreachable code"
+  "warning LNK4221"
+  "variable .var_args[2]*. is used before its value is set"
+  "jobserver unavailable"
+  "warning: \\(Long double usage is reported only once for each file"
+  "warning: To disable this warning use"
+  "warning: .+ might be clobbered by .longjmp. or .vfork."
+  "(ranlib|libtool):.*file: .+ has no symbols"
+  "could not be inlined"
+  "ld: warning prebinding disabled because \\((__TEXT|__DATA|__LINKEDIT) segment \\(address = 0x[a-f0-9]+ size = 0x[a-f0-9]+\\) of (.*) overlaps with (__LINKEDIT|__TEXT|__DATA) segment \\(address = 0x[a-f0-9]+ size = 0x[a-f0-9]+\\) of (.*)"
+  "ld: warning prebinding disabled because dependent library: (.*).dylib is not prebound"
+
+  # MPI uses c++ but may have been built with a different c++ compiler.
+  # It seems to work anyway so let's ignore it to make it easier to
+  # test more compilers.
+  "ld: warning: libstdc.*, needed by .*, may conflict with libstdc.*"
+
+  # Does *anyone* have an STL implementation that compiles without warnings...?
+  "cc-1116 CC: WARNING File = /usr/include/CC/stl_alloc.h, Line = 175"
+
+  # vtkfreetype needs to be updated to get rid of warnings that occur during
+  # 64-bit compiles... for now, mask them out of dashboard results:
+  "vtkfreetype.*warning C4"
+  "vtkfreetype.*warning: dereferencing type-punned pointer"
+
+  # vtknetcdf occasionally has warnings for things that are not a problem.
+  "vtknetcdf.*warning: dereferencing type-punned pointer"
+
+  # Some VTK dashboards include building bits of Qt which produce lots of
+  # the following warnings when built with the MS compilers. Qt guys should
+  # fix their code. Until they do, keep the Qt chatter off the VTK dashboard
+  # results:
+  "include.Qt(Core|Gui).*warning C4127: conditional expression is constant"
+  
+  # Specifically for HP compiler, mask out
+  "Utilities.(vtkjpeg|vtksqlite).*warning.*more strictly aligned type"
+  "Filtering.vtkImageMultiple(Input|InputOutput)Filter.cxx.*warning.*more strictly aligned type"
+  "IO.vtkJPEGReader.cxx.*warning.*more strictly aligned type"
+  )
+
+IF(APPLE)
+SET(CTEST_CUSTOM_WARNING_EXCEPTION
+  ${CTEST_CUSTOM_WARNING_EXCEPTION}
+  "warning -.: directory name .* does not exist"
+  "OpenTransport.*warning.*is deprecated"
+
+  # Somebody will have to get rid of these calls eventually (bug 4001) to
+  # eliminate these warnings. For now, mask them out of dashboard results:
+  "vtkCarbonRenderWindow.cxx.*warning: .(New|Diff|Equal|Dispose)Rgn. is deprecated"
+  )
+ENDIF(APPLE)
+
+SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
+  ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
+  "vtk.*TCLInit.cxx"
+  "vtk[^\\.]+(Java|Python|Tcl).cxx"
+  "Utilities.kwsys"
+  "Utilities.vtksys"
+  )
diff --git a/src/Plugins/MEDReader/CMake/FindMED.cmake b/src/Plugins/MEDReader/CMake/FindMED.cmake
new file mode 100644 (file)
index 0000000..aaae14c
--- /dev/null
@@ -0,0 +1,96 @@
+# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# - Find MED library
+# Find the MED includes and library
+# This module defines
+#  MED3HOME, a directory where MED was installed. This directory is used to help find trhe other values.
+#  MED_INCLUDE_DIR, where to find med.h
+#  MED_INCLUDE_DIRS, where to find med.h file, concatenated with other include dirs from HDF5 and MPI (if parallel)
+#  MED_LIBRARIES, libraries to link against to use MED. (including HDF5 and MPI if parallel)
+#  MED_FOUND, If false, do not try to use MED.
+# also defined, but not for general use are
+#  MED_LIBRARY, the med library.
+#  MEDC_LIBRARY, the medC library
+
+SET(MED3HOME $ENV{MED3HOME} CACHE PATH "Path to the med install dir")
+
+IF(NOT MED3HOME)
+  FIND_PROGRAM(MDUMP mdump)
+  IF(MDUMP)
+    SET(MED3HOME ${MDUMP})
+    GET_FILENAME_COMPONENT(MED3HOME ${MED3HOME} PATH)
+    GET_FILENAME_COMPONENT(MED3HOME ${MED3HOME} PATH)
+  ENDIF(MDUMP)
+ENDIF(NOT MED3HOME)
+
+FIND_PATH(MED_INCLUDE_DIR med.h
+  HINTS
+  ${MED3HOME}/include
+  PATHS
+  /usr/local/include
+  /usr/include
+)
+
+FIND_LIBRARY(MED_LIBRARY med
+  HINTS
+  ${MED_INCLUDE_DIR}/../lib
+  ${MED3HOME}/lib
+  PATHS
+  /usr/local/lib
+  /usr/lib
+)
+
+get_filename_component(MED_LIBRARY_DIR ${MED_LIBRARY} PATH)
+
+FIND_LIBRARY(MEDC_LIBRARY medC
+  HINTS
+  ${MED_LIBRARY_DIR}
+  ${MED3HOME}/lib
+  PATHS
+  /usr/local/lib
+  /usr/lib
+)
+
+IF(MED_INCLUDE_DIR)
+  IF(MED_LIBRARY)
+    IF(MEDC_LIBRARY)
+      SET(MED_LIBRARIES ${MED_LIBRARY} ${MEDC_LIBRARY} )
+      SET( MED_FOUND "YES" )
+    ENDIF(MEDC_LIBRARY)
+  ENDIF(MED_LIBRARY)
+ENDIF(MED_INCLUDE_DIR)
+
+IF(${MED_FOUND})
+  IF(WINDOWS)
+    SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBS})
+    SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIR})
+  ELSE(WINDOWS)
+    FIND_PACKAGE(SalomeHDF5 REQUIRED)
+    SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBRARIES})
+    SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS})
+    IF(${HDF5_IS_PARALLEL})
+      FIND_PACKAGE(SalomeMPI REQUIRED)
+      SET(MED_LIBRARIES ${MED_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
+      SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIRS} ${MPI_INCLUDE_PATH})
+    ENDIF(${HDF5_IS_PARALLEL})
+  ENDIF(WINDOWS)
+ENDIF(${MED_FOUND})
+
+SET(MED_INCLUDE_DIR ${MED_INCLUDE_DIRS})
diff --git a/src/Plugins/MEDReader/CMakeLists.txt b/src/Plugins/MEDReader/CMakeLists.txt
new file mode 100644 (file)
index 0000000..299f1cd
--- /dev/null
@@ -0,0 +1,105 @@
+# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# Patch for ParaView
+# cp ParaView-3.98.1/VTK/CMake/*.cmake ParaView-3.98.1_INSTALL/lib/cmake/paraview-3.98
+
+# Env for MEDReader
+#setenv PV_PLUGIN_PATH ".../MEDReader_INSTALL/lib/paraview"
+#setenv LD_LIBRARY_PATH ...MEDReader_INSTALL/lib/salome:${LD_LIBRARY_PATH}
+
+# Typical cmake command
+# env MED_ROOT_DIR=... cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=PATH_TO/MEDReader_INSTALL ../MEDReader_SRC -DMEDFILE_ROOT_DIR=/where/is/med-3.0.7_install
+
+PROJECT(MEDReader)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+IF(COMMAND cmake_policy)
+  cmake_policy(SET CMP0003 NEW)
+ENDIF(COMMAND cmake_policy)
+
+SET(MED_READER_MAJOR_VERSION 0)
+SET(MED_READER_MINOR_VERSION 0)
+SET(MED_READER_BUILD_VERSION 0)
+SET(MED_READER_VERSION "${MED_READER_MAJOR_VERSION}.${MED_READER_MINOR_VERSION}.${MED_READER_BUILD_VERSION}")
+
+#
+# Load the ParaView/VTK packages
+#
+SET(MEDReader_BUILD_ParaView_Plugin ON CACHE BOOL "Build the ParaView plugin")
+
+IF(MEDReader_BUILD_ParaView_Plugin)
+    FIND_PACKAGE(ParaView REQUIRED)
+    IF(NOT ParaView_FOUND)
+        MESSAGE(FATAL_ERROR "Please locate ParaView." )
+    ENDIF(NOT ParaView_FOUND)
+    INCLUDE(${PARAVIEW_USE_FILE})
+    # Load information about VTK/ParaView modules loaded/available.
+    PV_SETUP_MODULE_ENVIRONMENT("vtkMEDReader")
+ELSE(MEDReader_BUILD_ParaView_Plugin)
+    FIND_PACKAGE(VTK REQUIRED)
+    if(NOT VTK_FOUND)
+        MESSAGE(FATAL_ERROR "Please locate VTK." )
+    ENDIF(NOT VTK_FOUND)
+    INCLUDE(${VTK_USE_FILE})
+ENDIF(MEDReader_BUILD_ParaView_Plugin)
+# Standard CMake option for building libraries shared or static by default.
+OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS})
+#
+# Find dependant Library
+#
+SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR")
+SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "MED_ROOT_DIR")
+#LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local_without_kernel/cmake_files")
+LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
+LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local/cmake_files")
+INCLUDE(SalomeMacros)
+INCLUDE(SalomeSetupPlatform)
+INCLUDE(SalomeMEDConfig)
+FIND_PACKAGE(SalomePython REQUIRED)
+FIND_PACKAGE(SalomeHDF5 REQUIRED)
+FIND_PACKAGE(SalomeMEDFile REQUIRED)
+
+#
+# process all vtk-modules defined in this plugin. This generates the necessary
+# wrappings for all these modules as well.
+#
+SET(VTK_INSTALL_RUNTIME_DIR lib/salome)
+SET(VTK_INSTALL_LIBRARY_DIR lib/salome)
+SET(VTK_INSTALL_ARCHIVE_DIR lib/salome)
+INCLUDE_DIRECTORIES(${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS})
+PV_PROCESS_MODULES()
+
+#
+# Build the parallel vtkPMEDReader
+#
+SET(MEDReader_BUILD_PARALLEL ${VTK_USE_PARALLEL} CACHE BOOL "Build the Med Reader with parallel support.")
+
+#
+# Build the ParaView Plugin
+#
+IF(MEDReader_BUILD_ParaView_Plugin)
+  ADD_SUBDIRECTORY(ParaViewPlugin)
+ENDIF(MEDReader_BUILD_ParaView_Plugin)
+
+IF(SALOME_BUILD_TESTS)
+  ENABLE_TESTING()
+  ADD_SUBDIRECTORY(Test)
+ENDIF()
diff --git a/src/Plugins/MEDReader/Doc/ELNO.txt b/src/Plugins/MEDReader/Doc/ELNO.txt
new file mode 100644 (file)
index 0000000..456a2ea
--- /dev/null
@@ -0,0 +1,3 @@
+1-    ELNO Points: creates points on the vertices of the cells, with a shrink factor which allows you to make the distinction between the vertices of the adjacent cells
+2-    ELNO Surface: this filters starts by extracting the surface of the object, then project the ELNO field on it, slightly separating the cells one from the others (10-5 shrink factor compared to cell initial size)
+3-    ELNO Mesh: all the cells of the initial mesh are separated one from the others to be able to project the ELNO fields on them. Beware not to use this filter on big calculation cases as the memory used and the graphical performances are degraded. This filter allows to make operations such as Cut Planes keeping the ELNO fields correct. 
diff --git a/src/Plugins/MEDReader/Doc/HowTo0.py b/src/Plugins/MEDReader/Doc/HowTo0.py
new file mode 100644 (file)
index 0000000..b5213bf
--- /dev/null
@@ -0,0 +1,16 @@
+from paraview.simple import *
+
+myMedReader=MEDReader(FileName="/home/H87074/WORK/TESTS_AMA/TESTS0/ssll117a/ssll117a.med")
+
+# list of all keys
+
+keys=myMedReader.GetProperty("FieldsTreeInfo")[::2]
+
+# list all the names of arrays that can be seen (including their spatial discretization)
+
+arr_name_with_dis=[elt.split("/")[-1] for elt in keys]
+
+# list all the names of arrays (Equal to those in the MED File)
+
+arr_name=[elt.split(myMedReader.GetProperty("Separator").GetData())[0] for elt in arr_name_with_dis]
+
diff --git a/src/Plugins/MEDReader/IO/CMakeLists.txt b/src/Plugins/MEDReader/IO/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2ae70bf
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE_DIRECTORIES(
+  ${MEDFILE_INCLUDE_DIRS}
+  ${HDF5_INCLUDE_DIRS}
+  ${MED_ROOT_DIR}/include/salome
+  )
+
+SET(MEDReader_CLASSES vtkMEDReader vtkExtractGroup vtkELNOMeshFilter vtkELNOSurfaceFilter vtkELNOFilter vtkExtractCellType)
+
+SET(MEDReader_SRCS)
+SET(MEDReader_HDRS)
+
+FOREACH(class ${MEDReader_CLASSES})
+    SET(MEDReader_SRCS ${MEDReader_SRCS} ${class}.cxx)
+    SET(MEDReader_HDRS ${MEDReader_HDRS} ${class}.h)
+ENDFOREACH(class)
+
+ADD_LIBRARY(MEDLoaderForPV SHARED MEDFileFieldRepresentationTree.cxx MEDTimeReq.cxx MEDUtilities.cxx vtkGenerateVectors.cxx)
+TARGET_LINK_LIBRARIES(MEDLoaderForPV ${MED_medloader} ${MEDFILE_C_LIBRARIES})
+
+VTK_MODULE_LIBRARY(vtkMEDReader ${MEDReader_SRCS})
+TARGET_LINK_LIBRARIES(vtkMEDReader MEDLoaderForPV ${MEDFILE_C_LIBRARIES}) 
+
+INSTALL(
+  TARGETS vtkMEDReader MEDLoaderForPV
+  RUNTIME DESTINATION lib/salome
+  LIBRARY DESTINATION lib/salome
+  ARCHIVE DESTINATION lib/salome
+  )
+
+INSTALL(FILES ${MEDReader_HDRS} DESTINATION include)
diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
new file mode 100644 (file)
index 0000000..089d54a
--- /dev/null
@@ -0,0 +1,1481 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "MEDTimeReq.hxx"
+#include "MEDUtilities.hxx"
+
+#include "MEDFileFieldRepresentationTree.hxx"
+#include "MEDCouplingFieldDiscretization.hxx"
+#include "MEDCouplingFieldDouble.hxx"
+#include "InterpKernelGaussCoords.hxx"
+#include "MEDFileData.hxx"
+#include "SauvReader.hxx"
+
+#include "vtkXMLUnstructuredGridWriter.h"//
+
+#include "vtkUnstructuredGrid.h"
+#include "vtkRectilinearGrid.h"
+#include "vtkStructuredGrid.h"
+#include "vtkUnsignedCharArray.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+#include "vtkInformationIntegerKey.h"
+#include "vtkInformation.h"
+#include "vtkIdTypeArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkIntArray.h"
+#include "vtkCellArray.h"
+#include "vtkPointData.h"
+#include "vtkFieldData.h"
+#include "vtkCellData.h"
+
+#include "vtksys/stl/string"
+#include "vtksys/ios/fstream"
+#include "vtksys/stl/algorithm"
+#include "vtkMutableDirectedGraph.h"
+
+using namespace ParaMEDMEM;
+
+const char MEDFileFieldRepresentationLeavesArrays::ZE_SEP[]="@@][@@";
+
+const char MEDFileFieldRepresentationLeavesArrays::TS_STR[]="TS";
+
+const char MEDFileFieldRepresentationLeavesArrays::COM_SUP_STR[]="ComSup";
+
+const char MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME[]="FamilyIdCell";
+
+const char MEDFileFieldRepresentationLeavesArrays::NUM_ID_CELL_NAME[]="NumIdCell";
+
+const char MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME[]="FamilyIdNode";
+
+const char MEDFileFieldRepresentationLeavesArrays::NUM_ID_NODE_NAME[]="NumIdNode";
+
+const char MEDFileFieldRepresentationTree::ROOT_OF_GRPS_IN_TREE[]="zeGrps";
+
+const char MEDFileFieldRepresentationTree::ROOT_OF_FAM_IDS_IN_TREE[]="zeFamIds";
+
+const char MEDFileFieldRepresentationTree::COMPO_STR_TO_LOCATE_MESH_DA[]="-@?|*_";
+
+vtkIdTypeArray *ELGACmp::findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const
+{
+  vtkIdTypeArray *try0(isExisting(locsReallyUsed,vtkd));
+  if(try0)
+    {
+      isNew=false;
+      return try0;
+    }
+  else
+    {
+      isNew=true;
+      return createNew(globs,locsReallyUsed,vtkd,ds);
+    }
+}
+
+vtkIdTypeArray *ELGACmp::isExisting(const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd) const
+{
+  std::vector< std::vector<std::string> >::iterator it(std::find(_loc_names.begin(),_loc_names.end(),locsReallyUsed));
+  if(it==_loc_names.end())
+    return 0;
+  std::size_t pos(std::distance(_loc_names.begin(),it));
+  vtkIdTypeArray *ret(_elgas[pos]);
+  vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
+  for(std::vector<std::pair< vtkQuadratureSchemeDefinition *, unsigned char > >::const_iterator it=_defs[pos].begin();it!=_defs[pos].end();it++)
+    {
+      key->Set(vtkd->GetInformation(),(*it).first,(*it).second);
+    }
+  vtkd->GetInformation()->Set(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME(),ret->GetName());
+  return ret;
+}
+
+vtkIdTypeArray *ELGACmp::createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const
+{
+  static const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
+  std::vector< std::vector<std::string> > locNames(_loc_names);
+  std::vector<vtkIdTypeArray *> elgas(_elgas);
+  std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > defs;
+  //
+  std::vector< std::vector<std::string> >::const_iterator it(std::find(locNames.begin(),locNames.end(),locsReallyUsed));
+  if(it!=locNames.end())
+    throw INTERP_KERNEL::Exception("ELGACmp::createNew : Method is expected to be called after isExisting call ! Entry already exists !");
+  locNames.push_back(locsReallyUsed);
+  vtkIdTypeArray *elga(vtkIdTypeArray::New());
+  elga->SetNumberOfComponents(1);
+  vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
+  std::map<unsigned char,int> m;
+  for(std::vector<std::string>::const_iterator it=locsReallyUsed.begin();it!=locsReallyUsed.end();it++)
+    {
+      vtkQuadratureSchemeDefinition *def(vtkQuadratureSchemeDefinition::New());
+      const MEDFileFieldLoc& loc(globs->getLocalization((*it).c_str()));
+      INTERP_KERNEL::NormalizedCellType ct(loc.getGeoType());
+      const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(ct));
+      int nbGaussPt(loc.getNbOfGaussPtPerCell()),nbPtsPerCell((int)cm.getNumberOfNodes()),dimLoc(loc.getDimension());
+      // WARNING : these 2 lines are a workaround, due to users that write a ref element with dimension not equal to dimension of the geometric element.
+      std::vector<double> gsCoods2(INTERP_KERNEL::GaussInfo::NormalizeCoordinatesIfNecessary(ct,dimLoc,loc.getGaussCoords()));
+      std::vector<double> refCoods2(INTERP_KERNEL::GaussInfo::NormalizeCoordinatesIfNecessary(ct,dimLoc,loc.getRefCoords()));
+      double *shape(new double[nbPtsPerCell*nbGaussPt]);
+      INTERP_KERNEL::GaussInfo calculator(ct,gsCoods2,nbGaussPt,refCoods2,nbPtsPerCell);
+      calculator.initLocalInfo();
+      const std::vector<double>& wgths(loc.getGaussWeights());
+      for(int i=0;i<nbGaussPt;i++)
+        {
+          const double *pt0(calculator.getFunctionValues(i));
+          std::copy(pt0,pt0+nbPtsPerCell,shape+nbPtsPerCell*i);
+        }
+      unsigned char vtkType(MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE[ct]);
+      m[vtkType]=nbGaussPt;
+      def->Initialize(vtkType,nbPtsPerCell,nbGaussPt,shape,const_cast<double *>(&wgths[0]));
+      delete [] shape;
+      key->Set(elga->GetInformation(),def,vtkType);
+      key->Set(vtkd->GetInformation(),def,vtkType);
+      defs.push_back(std::pair< vtkQuadratureSchemeDefinition *, unsigned char >(def,vtkType));
+    }
+  //
+  vtkIdType ncell(ds->GetNumberOfCells());
+  int *pt(new int[ncell]),offset(0);
+  for(vtkIdType cellId=0;cellId<ncell;cellId++)
+    {
+      vtkCell *cell(ds->GetCell(cellId));
+      int delta(m[cell->GetCellType()]);
+      pt[cellId]=offset;
+      offset+=delta;
+    }
+  elga->GetInformation()->Set(MEDUtilities::ELGA(),1);
+  elga->SetArray(pt,ncell,0,VTK_DATA_ARRAY_DELETE);
+  std::ostringstream oss; oss << "ELGA" << "@" << _loc_names.size();
+  std::string ossStr(oss.str());
+  elga->SetName(ossStr.c_str());
+  elga->GetInformation()->Set(vtkAbstractArray::GUI_HIDE(),1);
+  vtkd->GetInformation()->Set(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME(),elga->GetName());
+  elgas.push_back(elga);
+  //
+  _loc_names=locNames;
+  _elgas=elgas;
+  _defs.push_back(defs);
+}
+
+void ELGACmp::appendELGAIfAny(vtkDataSet *ds) const
+{
+  for(std::vector<vtkIdTypeArray *>::const_iterator it=_elgas.begin();it!=_elgas.end();it++)
+    ds->GetCellData()->AddArray(*it);
+}
+
+ELGACmp::~ELGACmp()
+{
+  for(std::vector<vtkIdTypeArray *>::const_iterator it=_elgas.begin();it!=_elgas.end();it++)
+    (*it)->Delete();
+  for(std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > >::const_iterator it0=_defs.begin();it0!=_defs.end();it0++)
+    for(std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      (*it1).first->Delete();
+}
+
+//=
+
+MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays():_id(-1)
+{
+}
+
+MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>& arr):ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>(arr),_activated(false),_id(-1)
+{
+  std::vector< std::vector<ParaMEDMEM::TypeOfField> > typs((operator->())->getTypesOfFieldAvailable());
+  if(typs.size()<1)
+    throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field time spitting has failed ! A CRASH will occur soon !");
+  if(typs[0].size()!=1)
+    throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field spitting by spatial discretization has failed ! A CRASH will occur soon !");
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDiscretization> fd(MEDCouplingFieldDiscretization::New(typs[0][0]));
+  std::ostringstream oss2; oss2 << (operator->())->getName() << ZE_SEP << fd->getRepr();
+  _ze_name=oss2.str();
+}
+
+MEDFileFieldRepresentationLeavesArrays& MEDFileFieldRepresentationLeavesArrays::operator=(const MEDFileFieldRepresentationLeavesArrays& other)
+{
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>::operator=(other);
+  _id=-1;
+  _activated=false;
+  _ze_name=other._ze_name;
+  _ze_full_name.clear();
+  return *this;
+}
+
+void MEDFileFieldRepresentationLeavesArrays::setId(int& id) const
+{
+  _id=id++;
+}
+
+int MEDFileFieldRepresentationLeavesArrays::getId() const
+{
+  return _id;
+}
+
+std::string MEDFileFieldRepresentationLeavesArrays::getZeName() const
+{
+  return _ze_full_name;
+}
+
+void MEDFileFieldRepresentationLeavesArrays::feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& comSupStr, std::vector<std::string>& names) const
+{
+  vtkIdType refId(sil->AddChild(root,edge));
+  names.push_back(_ze_name);
+  std::ostringstream oss3; oss3 << tsName << "/" << meshName << "/" << comSupStr << "/" << _ze_name;
+  _ze_full_name=oss3.str();
+  //
+  if(MEDFileFieldRepresentationTree::IsFieldMeshRegardingInfo(((operator->())->getInfo())))
+    {
+      sil->AddChild(refId,edge);
+      names.push_back(std::string());
+    }
+}
+
+bool MEDFileFieldRepresentationLeavesArrays::getStatus() const
+{
+  return _activated;
+}
+
+bool MEDFileFieldRepresentationLeavesArrays::setStatus(bool status) const
+{
+  bool ret(_activated!=status);
+  _activated=status;
+  return ret;
+}
+
+void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  static const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
+  tr->setNumberOfTS((operator->())->getNumberOfTS());
+  tr->initIterator();
+  for(int timeStepId=0;timeStepId<tr->size();timeStepId++,++(*tr))
+    {
+      MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TS> f1ts((operator->())->getTimeStepAtPos(tr->getCurrent()));
+      MEDFileAnyTypeField1TS *f1tsPtr(f1ts);
+      MEDFileField1TS *f1tsPtrDbl(dynamic_cast<MEDFileField1TS *>(f1tsPtr));
+      MEDFileIntField1TS *f1tsPtrInt(dynamic_cast<MEDFileIntField1TS *>(f1tsPtr));
+      DataArray *crudeArr(0),*postProcessedArr(0);
+      if(f1tsPtrDbl)
+        crudeArr=f1tsPtrDbl->getUndergroundDataArray();
+      else if(f1tsPtrInt)
+        crudeArr=f1tsPtrInt->getUndergroundDataArray();
+      else
+        throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeavesArrays::appendFields : only FLOAT64 and INT32 fields are dealt for the moment !");
+      MEDFileField1TSStructItem fsst(MEDFileField1TSStructItem::BuildItemFrom(f1ts,mst));
+      f1ts->loadArraysIfNecessary();
+      MEDCouplingAutoRefCountObjectPtr<DataArray> v(mml->buildDataArray(fsst,globs,crudeArr));
+      postProcessedArr=v;
+      //
+      std::vector<TypeOfField> discs(f1ts->getTypesOfFieldAvailable());
+      if(discs.size()!=1)
+        throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeavesArrays::appendFields : internal error ! Number of spatial discretizations must be equal to one !");
+      vtkFieldData *att(0);
+      switch(discs[0])
+        {
+        case ON_CELLS:
+          {
+            att=ds->GetCellData();
+            break;
+          }
+        case ON_NODES:
+          {
+            att=ds->GetPointData();
+            break;
+          }
+        case ON_GAUSS_NE:
+          {
+            att=ds->GetFieldData();
+            break;
+          }
+        case ON_GAUSS_PT:
+          {
+            att=ds->GetFieldData();
+            break;
+          }
+        default:
+          throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeavesArrays::appendFields : only CELL and NODE, GAUSS_NE and GAUSS fields are available for the moment !");
+        }
+      if(f1tsPtrDbl)
+        {
+          DataArray *vPtr(v); DataArrayDouble *vd(static_cast<DataArrayDouble *>(vPtr));
+          vtkDoubleArray *vtkd(vtkDoubleArray::New());
+          vtkd->SetNumberOfComponents(vd->getNumberOfComponents());
+          for(int i=0;i<vd->getNumberOfComponents();i++)
+            vtkd->SetComponentName(i,vd->getInfoOnComponent(i).c_str());
+          if(postProcessedArr!=crudeArr)
+            {
+              vtkd->SetArray(vd->getPointer(),vd->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); vd->accessToMemArray().setSpecificDeallocator(0);
+            }
+          else
+            {
+              vtkd->SetArray(vd->getPointer(),vd->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+            }
+          std::string name(tr->buildName(f1ts->getName()));
+          vtkd->SetName(name.c_str());
+          att->AddArray(vtkd);
+          vtkd->Delete();
+          if(discs[0]==ON_GAUSS_PT)
+            {
+              bool tmp;
+              _elga_cmp.findOrCreate(globs,f1ts->getLocsReallyUsed(),vtkd,ds,tmp);
+            }
+          if(discs[0]==ON_GAUSS_NE)
+            {
+              vtkIdTypeArray *elno(vtkIdTypeArray::New());
+              elno->SetNumberOfComponents(1);
+              vtkIdType ncell(ds->GetNumberOfCells());
+              int *pt(new int[ncell]),offset(0);
+              std::set<int> cellTypes;
+              for(vtkIdType cellId=0;cellId<ncell;cellId++)
+                {
+                  vtkCell *cell(ds->GetCell(cellId));
+                  int delta(cell->GetNumberOfPoints());
+                  cellTypes.insert(cell->GetCellType());
+                  pt[cellId]=offset;
+                  offset+=delta;
+                }
+              elno->GetInformation()->Set(MEDUtilities::ELNO(),1);
+              elno->SetArray(pt,ncell,0,VTK_DATA_ARRAY_DELETE);
+              std::string nameElno("ELNO"); nameElno+="@"; nameElno+=name;
+              elno->SetName(nameElno.c_str());
+              ds->GetCellData()->AddArray(elno);
+              vtkd->GetInformation()->Set(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME(),elno->GetName());
+              elno->GetInformation()->Set(vtkAbstractArray::GUI_HIDE(),1);
+              //
+              vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
+              for(std::set<int>::const_iterator it=cellTypes.begin();it!=cellTypes.end();it++)
+                {
+                  const unsigned char *pos(std::find(MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,*it));
+                  if(pos==MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH)
+                    continue;
+                  INTERP_KERNEL::NormalizedCellType ct((INTERP_KERNEL::NormalizedCellType)std::distance(MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos));
+                  const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(ct));
+                  int nbGaussPt(cm.getNumberOfNodes()),dim(cm.getDimension());
+                  vtkQuadratureSchemeDefinition *def(vtkQuadratureSchemeDefinition::New());
+                  double *shape(new double[nbGaussPt*nbGaussPt]);
+                  std::size_t dummy;
+                  const double *gsCoords(MEDCouplingFieldDiscretizationGaussNE::GetLocsFromGeometricType(ct,dummy));
+                  const double *refCoords(MEDCouplingFieldDiscretizationGaussNE::GetRefCoordsFromGeometricType(ct,dummy));
+                  const double *weights(MEDCouplingFieldDiscretizationGaussNE::GetWeightArrayFromGeometricType(ct,dummy));
+                  std::vector<double> gsCoords2(gsCoords,gsCoords+nbGaussPt*dim),refCoords2(refCoords,refCoords+nbGaussPt*dim);
+                  INTERP_KERNEL::GaussInfo calculator(ct,gsCoords2,nbGaussPt,refCoords2,nbGaussPt);
+                  calculator.initLocalInfo();
+                  for(int i=0;i<nbGaussPt;i++)
+                    {
+                      const double *pt0(calculator.getFunctionValues(i));
+                      std::copy(pt0,pt0+nbGaussPt,shape+nbGaussPt*i);
+                    }
+                  def->Initialize(*it,nbGaussPt,nbGaussPt,shape,const_cast<double *>(weights));
+                  delete [] shape;
+                  key->Set(elno->GetInformation(),def,*it);
+                  key->Set(vtkd->GetInformation(),def,*it);
+                  def->Delete();
+                }
+              //
+              elno->Delete();
+            }
+        }
+      else if(f1tsPtrInt)
+        {
+          DataArray *vPtr(v); DataArrayInt *vi(static_cast<DataArrayInt *>(vPtr));
+          vtkIntArray *vtkd(vtkIntArray::New());
+          vtkd->SetNumberOfComponents(vi->getNumberOfComponents());
+          for(int i=0;i<vi->getNumberOfComponents();i++)
+            vtkd->SetComponentName(i,vi->getVarOnComponent(i).c_str());
+          if(postProcessedArr!=crudeArr)
+            {
+              vtkd->SetArray(vi->getPointer(),vi->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); vi->accessToMemArray().setSpecificDeallocator(0);
+            }
+          else
+            {
+              vtkd->SetArray(vi->getPointer(),vi->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+            }
+          std::string name(tr->buildName(f1ts->getName()));
+          vtkd->SetName(name.c_str());
+          att->AddArray(vtkd);
+          vtkd->Delete();
+        }
+      else
+        throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeavesArrays::appendFields : only FLOAT64 and INT32 fields are dealt for the moment ! Internal Error !");
+    }
+}
+
+void MEDFileFieldRepresentationLeavesArrays::appendELGAIfAny(vtkDataSet *ds) const
+{
+  _elga_cmp.appendELGAIfAny(ds);
+}
+
+////////////////////
+
+MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves():_cached_ds(0)
+{
+}
+
+MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS> >& arr,
+                                                                   const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator>& fsp):_arrays(arr.size()),_fsp(fsp),_cached_ds(0)
+{
+  for(std::size_t i=0;i<arr.size();i++)
+    _arrays[i]=MEDFileFieldRepresentationLeavesArrays(arr[i]);
+}
+
+MEDFileFieldRepresentationLeaves::~MEDFileFieldRepresentationLeaves()
+{
+  if(_cached_ds)
+    _cached_ds->Delete();
+}
+
+bool MEDFileFieldRepresentationLeaves::empty() const
+{
+  const MEDFileFastCellSupportComparator *fcscp(_fsp);
+  return fcscp==0 || _arrays.empty();
+}
+
+void MEDFileFieldRepresentationLeaves::setId(int& id) const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    (*it).setId(id);
+}
+
+std::string MEDFileFieldRepresentationLeaves::getMeshName() const
+{
+  return _arrays[0]->getMeshName();
+}
+
+int MEDFileFieldRepresentationLeaves::getNumberOfArrays() const
+{
+  return (int)_arrays.size();
+}
+
+int MEDFileFieldRepresentationLeaves::getNumberOfTS() const
+{
+  return _arrays[0]->getNumberOfTS();
+}
+
+/*!
+ * \param [in] ms is the meshes pointer. It can be used only for information of geometric types. No special processing will be requested on ms.
+ */
+void MEDFileFieldRepresentationLeaves::feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& comSupStr, std::vector<std::string>& names) const
+{
+  vtkIdType root2(sil->AddChild(root,edge));
+  names.push_back(std::string("Arrs"));
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    (*it).feedSIL(sil,root2,edge,tsName,meshName,comSupStr,names);
+  //
+  vtkIdType root3(sil->AddChild(root,edge));
+  names.push_back(std::string("InfoOnGeoType"));
+  const ParaMEDMEM::MEDFileMesh *m(0);
+  if(ms)
+    m=ms->getMeshWithName(meshName);
+  const ParaMEDMEM::MEDFileFastCellSupportComparator *fsp(_fsp);
+  if(!fsp || fsp->getNumberOfTS()==0)
+    return ;
+  std::vector< INTERP_KERNEL::NormalizedCellType > gts(fsp->getGeoTypesAt(0,m));
+  for(std::vector< INTERP_KERNEL::NormalizedCellType >::const_iterator it2=gts.begin();it2!=gts.end();it2++)
+    {
+      const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(*it2));
+      std::string cmStr(cm.getRepr()); cmStr=cmStr.substr(5);//skip "NORM_"
+      sil->AddChild(root3,edge);
+      names.push_back(cmStr);
+    }
+}
+
+bool MEDFileFieldRepresentationLeaves::containId(int id) const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    if((*it).getId()==id)
+      return true;
+  return false;
+}
+
+bool MEDFileFieldRepresentationLeaves::containZeName(const char *name, int& id) const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    if((*it).getZeName()==name)
+      {
+        id=(*it).getId();
+        return true;
+      }
+  return false;
+}
+
+bool MEDFileFieldRepresentationLeaves::isActivated() const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    if((*it).getStatus())
+      return true;
+  return false;
+}
+
+void MEDFileFieldRepresentationLeaves::printMySelf(std::ostream& os) const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it0=_arrays.begin();it0!=_arrays.end();it0++)
+    {
+      os << "         - " << (*it0).getZeName() << " (";
+      if((*it0).getStatus())
+        os << "X";
+      else
+        os << " ";
+      os << ")" << std::endl;
+    }
+}
+
+void MEDFileFieldRepresentationLeaves::activateAllArrays() const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    (*it).setStatus(true);
+}
+
+const MEDFileFieldRepresentationLeavesArrays& MEDFileFieldRepresentationLeaves::getLeafArr(int id) const
+{
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    if((*it).getId()==id)
+      return *it;
+  throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::getLeafArr ! No such id !");
+}
+
+std::vector<double> MEDFileFieldRepresentationLeaves::getTimeSteps(const TimeKeeper& tk) const
+{
+  if(_arrays.size()<1)
+    throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::getTimeSteps : the array size must be at least of size one !");
+  std::vector<double> ret;
+  std::vector< std::pair<int,int> > dtits(_arrays[0]->getTimeSteps(ret));
+  return tk.getTimeStepsRegardingPolicy(dtits,ret);
+}
+
+std::vector< std::pair<int,int> > MEDFileFieldRepresentationLeaves::getTimeStepsInCoarseMEDFileFormat(std::vector<double>& ts) const
+{
+  if(!_arrays.empty())
+    return _arrays[0]->getTimeSteps(ts);
+  else
+    {
+      ts.clear();
+      return std::vector< std::pair<int,int> >();
+    }
+}
+
+std::string MEDFileFieldRepresentationLeaves::getHumanReadableOverviewOfTS() const
+{
+  std::ostringstream oss;
+  oss << _arrays[0]->getNumberOfTS() << " time steps [" << _arrays[0]->getDtUnit() << "]\n(";
+  std::vector<double> ret1;
+  std::vector< std::pair<int,int> > ret2(getTimeStepsInCoarseMEDFileFormat(ret1));
+  std::size_t sz(ret1.size());
+  for(std::size_t i=0;i<sz;i++)
+    {
+      oss << ret1[i] << " (" << ret2[i].first << "," << ret2[i].second << ")";
+      if(i!=sz-1)
+        oss << ", ";
+      std::string tmp(oss.str());
+      if(tmp.size()>200 && i!=sz-1)
+        {
+          oss << "...";
+          break;
+        }
+    }
+  oss << ")";
+  return oss.str();
+}
+
+void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const
+{
+  if(_arrays.size()<1)
+    throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::appendFields : internal error !");
+  MEDCouplingAutoRefCountObjectPtr<MEDFileMeshStruct> mst(MEDFileMeshStruct::New(meshes->getMeshWithName(_arrays[0]->getMeshName().c_str())));
+  for(std::vector<MEDFileFieldRepresentationLeavesArrays>::const_iterator it=_arrays.begin();it!=_arrays.end();it++)
+    if((*it).getStatus())
+      {
+        (*it).appendFields(tr,globs,mml,mst,ds);
+        (*it).appendELGAIfAny(ds);
+      }
+}
+
+vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationUnstructured(MEDUMeshMultiLev *mm) const
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  DataArrayDouble *coordsMC(0);
+  DataArrayByte *typesMC(0);
+  DataArrayInt *cellLocationsMC(0),*cellsMC(0),*faceLocationsMC(0),*facesMC(0);
+  bool statusOfCoords(mm->buildVTUArrays(coordsMC,typesMC,cellLocationsMC,cellsMC,faceLocationsMC,facesMC));
+  MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsSafe(coordsMC);
+  MEDCouplingAutoRefCountObjectPtr<DataArrayByte> typesSafe(typesMC);
+  MEDCouplingAutoRefCountObjectPtr<DataArrayInt> cellLocationsSafe(cellLocationsMC),cellsSafe(cellsMC),faceLocationsSafe(faceLocationsMC),facesSafe(facesMC);
+  //
+  int nbOfCells(typesSafe->getNbOfElems());
+  vtkUnstructuredGrid *ret(vtkUnstructuredGrid::New());
+  vtkUnsignedCharArray *cellTypes(vtkUnsignedCharArray::New());
+  cellTypes->SetArray(reinterpret_cast<unsigned char *>(typesSafe->getPointer()),nbOfCells,0,VTK_DATA_ARRAY_FREE); typesSafe->accessToMemArray().setSpecificDeallocator(0);
+  vtkIdTypeArray *cellLocations(vtkIdTypeArray::New());
+  cellLocations->SetArray(cellLocationsSafe->getPointer(),nbOfCells,0,VTK_DATA_ARRAY_FREE); cellLocationsSafe->accessToMemArray().setSpecificDeallocator(0);
+  vtkCellArray *cells(vtkCellArray::New());
+  vtkIdTypeArray *cells2(vtkIdTypeArray::New());
+  cells2->SetArray(cellsSafe->getPointer(),cellsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); cellsSafe->accessToMemArray().setSpecificDeallocator(0);
+  cells->SetCells(nbOfCells,cells2);
+  cells2->Delete();
+  if(faceLocationsMC!=0 && facesMC!=0)
+    {
+      vtkIdTypeArray *faces(vtkIdTypeArray::New());
+      faces->SetArray(facesSafe->getPointer(),facesSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); facesSafe->accessToMemArray().setSpecificDeallocator(0);
+      vtkIdTypeArray *faceLocations(vtkIdTypeArray::New());
+      faceLocations->SetArray(faceLocationsSafe->getPointer(),faceLocationsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); faceLocationsSafe->accessToMemArray().setSpecificDeallocator(0);
+      ret->SetCells(cellTypes,cellLocations,cells,faceLocations,faces);
+      faceLocations->Delete();
+      faces->Delete();
+    }
+  else
+    ret->SetCells(cellTypes,cellLocations,cells);
+  cellTypes->Delete();
+  cellLocations->Delete();
+  cells->Delete();
+  vtkPoints *pts(vtkPoints::New());
+  vtkDoubleArray *pts2(vtkDoubleArray::New());
+  pts2->SetNumberOfComponents(3);
+  if(!statusOfCoords)
+    {
+      pts2->SetArray(coordsSafe->getPointer(),coordsSafe->getNbOfElems(),0,VTK_DATA_ARRAY_FREE);
+      coordsSafe->accessToMemArray().setSpecificDeallocator(0);
+    }
+  else
+    pts2->SetArray(coordsSafe->getPointer(),coordsSafe->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+  pts->SetData(pts2);
+  pts2->Delete();
+  ret->SetPoints(pts);
+  pts->Delete();
+  //
+  return ret;
+}
+
+vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  bool isInternal;
+  std::vector< DataArrayDouble * > arrs(mm->buildVTUArrays(isInternal));
+  vtkDoubleArray *vtkTmp(0);
+  vtkRectilinearGrid *ret(vtkRectilinearGrid::New());
+  std::size_t dim(arrs.size());
+  if(dim<1 || dim>3)
+    throw INTERP_KERNEL::Exception("buildVTKInstanceNoTimeInterpolationCartesian : dimension must be in [1,3] !");
+  int sizePerAxe[3]={1,1,1};
+  sizePerAxe[0]=arrs[0]->getNbOfElems();
+  if(dim>=2)
+    sizePerAxe[1]=arrs[1]->getNbOfElems();
+  if(dim==3)
+    sizePerAxe[2]=arrs[2]->getNbOfElems();
+  ret->SetDimensions(sizePerAxe[0],sizePerAxe[1],sizePerAxe[2]);
+  vtkTmp=vtkDoubleArray::New();
+  vtkTmp->SetNumberOfComponents(1);
+  if(isInternal)
+    vtkTmp->SetArray(arrs[0]->getPointer(),arrs[0]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+  else
+    { vtkTmp->SetArray(arrs[0]->getPointer(),arrs[0]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[0]->accessToMemArray().setSpecificDeallocator(0); }
+  ret->SetXCoordinates(vtkTmp);
+  vtkTmp->Delete();
+  arrs[0]->decrRef();
+  if(dim>=2)
+    {
+      vtkTmp=vtkDoubleArray::New();
+      vtkTmp->SetNumberOfComponents(1);
+      if(isInternal)
+        vtkTmp->SetArray(arrs[1]->getPointer(),arrs[1]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTmp->SetArray(arrs[1]->getPointer(),arrs[1]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[1]->accessToMemArray().setSpecificDeallocator(0); }
+      ret->SetYCoordinates(vtkTmp);
+      vtkTmp->Delete();
+      arrs[1]->decrRef();
+    }
+  if(dim==3)
+    {
+      vtkTmp=vtkDoubleArray::New();
+      vtkTmp->SetNumberOfComponents(1);
+      if(isInternal)
+        vtkTmp->SetArray(arrs[2]->getPointer(),arrs[2]->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTmp->SetArray(arrs[2]->getPointer(),arrs[2]->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); arrs[2]->accessToMemArray().setSpecificDeallocator(0); }
+      ret->SetZCoordinates(vtkTmp);
+      vtkTmp->Delete();
+      arrs[2]->decrRef();
+    }
+  return ret;
+}
+
+vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  int meshStr[3]={1,1,1};
+  DataArrayDouble *coords(0);
+  std::vector<int> nodeStrct;
+  bool isInternal;
+  mm->buildVTUArrays(coords,nodeStrct,isInternal);
+  std::size_t dim(nodeStrct.size());
+  if(dim<1 || dim>3)
+    throw INTERP_KERNEL::Exception("buildVTKInstanceNoTimeInterpolationCurveLinear : dimension must be in [1,3] !");
+  meshStr[0]=nodeStrct[0];
+  if(dim>=2)
+    meshStr[1]=nodeStrct[1];
+  if(dim==3)
+    meshStr[2]=nodeStrct[2];
+  vtkStructuredGrid *ret(vtkStructuredGrid::New());
+  ret->SetDimensions(meshStr[0],meshStr[1],meshStr[2]);
+  vtkDoubleArray *da(vtkDoubleArray::New());
+  da->SetNumberOfComponents(3);
+  if(coords->getNumberOfComponents()==3)
+    {
+      if(isInternal)
+        da->SetArray(coords->getPointer(),coords->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);//VTK has not the ownership of double * because MEDLoader main struct has it !
+      else
+        { da->SetArray(coords->getPointer(),coords->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); coords->accessToMemArray().setSpecificDeallocator(0); }
+    }
+  else
+    {
+      MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords2(coords->changeNbOfComponents(3,0.));
+      da->SetArray(coords2->getPointer(),coords2->getNbOfElems(),0,VTK_DATA_ARRAY_FREE);//let VTK deal with double *
+      coords2->accessToMemArray().setSpecificDeallocator(0);
+    }
+  coords->decrRef();
+  vtkPoints *points=vtkPoints::New();
+  ret->SetPoints(points);
+  points->SetData(da);
+  points->Delete();
+  da->Delete();
+  return ret;
+}
+vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  vtkDataSet *ret(0);
+  //_fsp->isDataSetSupportEqualToThePreviousOne(i,globs);
+  MEDCouplingAutoRefCountObjectPtr<MEDMeshMultiLev> mml(_fsp->buildFromScratchDataSetSupport(0,globs));//0=timestep Id. Make the hypothesis that support does not change 
+  MEDCouplingAutoRefCountObjectPtr<MEDMeshMultiLev> mml2(mml->prepare());
+  MEDMeshMultiLev *ptMML2(mml2);
+  if(!_cached_ds)
+    {
+      MEDUMeshMultiLev *ptUMML2(dynamic_cast<MEDUMeshMultiLev *>(ptMML2));
+      MEDCMeshMultiLev *ptCMML2(dynamic_cast<MEDCMeshMultiLev *>(ptMML2));
+      MEDCurveLinearMeshMultiLev *ptCLMML2(dynamic_cast<MEDCurveLinearMeshMultiLev *>(ptMML2));
+      
+      if(ptUMML2)
+        {
+          ret=buildVTKInstanceNoTimeInterpolationUnstructured(ptUMML2);
+        }
+      else if(ptCMML2)
+        {
+          ret=buildVTKInstanceNoTimeInterpolationCartesian(ptCMML2);
+        }
+      else if(ptCLMML2)
+        {
+          ret=buildVTKInstanceNoTimeInterpolationCurveLinear(ptCLMML2);
+        }
+      else
+        throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation : unrecognized mesh ! Supported for the moment unstructured, cartesian, curvelinear !");
+      _cached_ds=ret->NewInstance();
+      _cached_ds->ShallowCopy(ret);
+    }
+  else
+    {
+      ret=_cached_ds->NewInstance();
+      ret->ShallowCopy(_cached_ds);
+    }
+  //
+  appendFields(tr,globs,mml,meshes,ret);
+  // The arrays links to mesh
+  DataArrayInt *famCells(0),*numCells(0);
+  bool noCpyFamCells(false),noCpyNumCells(false);
+  ptMML2->retrieveFamilyIdsOnCells(famCells,noCpyFamCells);
+  if(famCells)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME);
+      if(noCpyFamCells)
+        vtkTab->SetArray(famCells->getPointer(),famCells->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTab->SetArray(famCells->getPointer(),famCells->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); famCells->accessToMemArray().setSpecificDeallocator(0); }
+      ret->GetCellData()->AddArray(vtkTab);
+      vtkTab->Delete();
+      famCells->decrRef();
+    }
+  ptMML2->retrieveNumberIdsOnCells(numCells,noCpyNumCells);
+  if(numCells)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::NUM_ID_CELL_NAME);
+      if(noCpyNumCells)
+        vtkTab->SetArray(numCells->getPointer(),numCells->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTab->SetArray(numCells->getPointer(),numCells->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); numCells->accessToMemArray().setSpecificDeallocator(0); }
+      ret->GetCellData()->AddArray(vtkTab);
+      vtkTab->Delete();
+      numCells->decrRef();
+    }
+  // The arrays links to mesh
+  DataArrayInt *famNodes(0),*numNodes(0);
+  bool noCpyFamNodes(false),noCpyNumNodes(false);
+  ptMML2->retrieveFamilyIdsOnNodes(famNodes,noCpyFamNodes);
+  if(famNodes)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME);
+      if(noCpyFamNodes)
+        vtkTab->SetArray(famNodes->getPointer(),famNodes->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTab->SetArray(famNodes->getPointer(),famNodes->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); famNodes->accessToMemArray().setSpecificDeallocator(0); }
+      ret->GetPointData()->AddArray(vtkTab);
+      vtkTab->Delete();
+      famNodes->decrRef();
+    }
+  ptMML2->retrieveNumberIdsOnNodes(numNodes,noCpyNumNodes);
+  if(numNodes)
+    {
+      vtkIntArray *vtkTab(vtkIntArray::New());
+      vtkTab->SetNumberOfComponents(1);
+      vtkTab->SetName(MEDFileFieldRepresentationLeavesArrays::NUM_ID_NODE_NAME);
+      if(noCpyNumNodes)
+        vtkTab->SetArray(numNodes->getPointer(),numNodes->getNbOfElems(),1,VTK_DATA_ARRAY_FREE);
+      else
+        { vtkTab->SetArray(numNodes->getPointer(),numNodes->getNbOfElems(),0,VTK_DATA_ARRAY_FREE); numNodes->accessToMemArray().setSpecificDeallocator(0); }
+      ret->GetPointData()->AddArray(vtkTab);
+      vtkTab->Delete();
+      numNodes->decrRef();
+    }
+  return ret;
+}
+
+//////////////////////
+
+MEDFileFieldRepresentationTree::MEDFileFieldRepresentationTree()
+{
+}
+
+int MEDFileFieldRepresentationTree::getNumberOfLeavesArrays() const
+{
+  int ret(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        ret+=(*it2).getNumberOfArrays();
+  return ret;
+}
+
+void MEDFileFieldRepresentationTree::assignIds() const
+{
+  int zeId(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        (*it2).setId(zeId);
+}
+void MEDFileFieldRepresentationTree::activateTheFirst() const
+{
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        {
+          (*it2).activateAllArrays();
+          return ;
+        }
+}
+
+void MEDFileFieldRepresentationTree::feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const
+{
+  std::size_t it0Cnt(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++,it0Cnt++)
+    {
+      vtkIdType InfoOnTSId(sil->AddChild(root,edge));
+      names.push_back((*it0)[0][0].getHumanReadableOverviewOfTS());
+      //
+      vtkIdType NbOfTSId(sil->AddChild(InfoOnTSId,edge));
+      std::vector<double> ts;
+      std::vector< std::pair<int,int> > dtits((*it0)[0][0].getTimeStepsInCoarseMEDFileFormat(ts));
+      std::size_t nbOfTS(dtits.size());
+      std::ostringstream oss3; oss3 << nbOfTS;
+      names.push_back(oss3.str());
+      for(std::size_t i=0;i<nbOfTS;i++)
+        {
+          std::ostringstream oss4; oss4 << dtits[i].first;
+          vtkIdType DtId(sil->AddChild(NbOfTSId,edge));
+          names.push_back(oss4.str());
+          std::ostringstream oss5; oss5 << dtits[i].second;
+          vtkIdType ItId(sil->AddChild(DtId,edge));
+          names.push_back(oss5.str());
+          std::ostringstream oss6; oss6 << ts[i];
+          sil->AddChild(ItId,edge);
+          names.push_back(oss6.str());
+        }
+      //
+      std::ostringstream oss; oss << MEDFileFieldRepresentationLeavesArrays::TS_STR << it0Cnt;
+      std::string tsName(oss.str());
+      vtkIdType typeId0(sil->AddChild(root,edge));
+      names.push_back(tsName);
+      for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+        {
+          std::string meshName((*it1)[0].getMeshName());
+          vtkIdType typeId1(sil->AddChild(typeId0,edge));
+          names.push_back(meshName);
+          std::size_t it2Cnt(0);
+          for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++,it2Cnt++)
+            {
+              std::ostringstream oss2; oss2 << MEDFileFieldRepresentationLeavesArrays::COM_SUP_STR << it2Cnt;
+              std::string comSupStr(oss2.str());
+              vtkIdType typeId2(sil->AddChild(typeId1,edge));
+              names.push_back(comSupStr);
+              (*it2).feedSIL(_ms,sil,typeId2,edge,tsName,meshName,comSupStr,names);
+            } 
+        }
+    }
+}
+
+std::string MEDFileFieldRepresentationTree::feedSILForFamsAndGrps(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const
+{
+  int dummy0(0),dummy1(0),dummy2(0);
+  const MEDFileFieldRepresentationLeaves& leaf(getTheSingleActivated(dummy0,dummy1,dummy2));
+  std::string ret(leaf.getMeshName());
+  int i(0);
+  MEDFileMesh *m(0);
+  for(;i<_ms->getNumberOfMeshes();i++)
+    {
+      m=_ms->getMeshAtPos(i);
+      if(m->getName()==ret)
+        break;
+    }
+  if(i==_ms->getNumberOfMeshes())
+    throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::feedSILForFamsAndGrps : internal error #0 !");
+  vtkIdType typeId0(sil->AddChild(root,edge));
+  names.push_back(m->getName());
+  //
+  vtkIdType typeId1(sil->AddChild(typeId0,edge));
+  names.push_back(std::string(ROOT_OF_GRPS_IN_TREE));
+  std::vector<std::string> grps(m->getGroupsNames());
+  for(std::vector<std::string>::const_iterator it0=grps.begin();it0!=grps.end();it0++)
+    {
+      vtkIdType typeId2(sil->AddChild(typeId1,edge));
+      names.push_back(*it0);
+      std::vector<std::string> famsOnGrp(m->getFamiliesOnGroup((*it0).c_str()));
+      for(std::vector<std::string>::const_iterator it1=famsOnGrp.begin();it1!=famsOnGrp.end();it1++)
+        {
+          sil->AddChild(typeId2,edge);
+          names.push_back((*it1).c_str());
+        }
+    }
+  //
+  vtkIdType typeId11(sil->AddChild(typeId0,edge));
+  names.push_back(std::string(ROOT_OF_FAM_IDS_IN_TREE));
+  std::vector<std::string> fams(m->getFamiliesNames());
+  for(std::vector<std::string>::const_iterator it00=fams.begin();it00!=fams.end();it00++)
+    {
+      sil->AddChild(typeId11,edge);
+      int famId(m->getFamilyId((*it00).c_str()));
+      std::ostringstream oss; oss << (*it00) << MEDFileFieldRepresentationLeavesArrays::ZE_SEP << famId;
+      names.push_back(oss.str());
+    }
+  return ret;
+}
+
+const MEDFileFieldRepresentationLeavesArrays& MEDFileFieldRepresentationTree::getLeafArr(int id) const
+{
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        if((*it2).containId(id))
+          return (*it2).getLeafArr(id);
+  throw INTERP_KERNEL::Exception("Internal error in MEDFileFieldRepresentationTree::getLeafArr !");
+}
+
+std::string MEDFileFieldRepresentationTree::getNameOf(int id) const
+{
+  const MEDFileFieldRepresentationLeavesArrays& elt(getLeafArr(id));
+  return elt.getZeName();
+}
+
+bool MEDFileFieldRepresentationTree::getStatusOf(int id) const
+{
+  const MEDFileFieldRepresentationLeavesArrays& elt(getLeafArr(id));
+  return elt.getStatus();
+}
+
+int MEDFileFieldRepresentationTree::getIdHavingZeName(const char *name) const
+{
+  int ret(-1);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        if((*it2).containZeName(name,ret))
+          return ret;
+  throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::getIdHavingZeName : No such a name !");
+}
+
+bool MEDFileFieldRepresentationTree::changeStatusOfAndUpdateToHaveCoherentVTKDataSet(int id, bool status) const
+{
+  const MEDFileFieldRepresentationLeavesArrays& elt(getLeafArr(id));
+  bool ret(elt.setStatus(status));//to be implemented
+  return ret;
+}
+
+int MEDFileFieldRepresentationTree::getMaxNumberOfTimeSteps() const
+{
+  int ret(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        ret=std::max(ret,(*it2).getNumberOfTS());
+  return ret;
+}
+
+/*!
+ * 
+ */
+void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileName, bool isMEDOrSauv)
+{
+  if(isMEDOrSauv)
+    {
+      _ms=MEDFileMeshes::New(fileName);
+      _fields=MEDFileFields::New(fileName,false);//false is important to not read the values
+    }
+  else
+    {
+      MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::SauvReader> sr(ParaMEDMEM::SauvReader::New(fileName));
+      MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileData> mfd(sr->loadInMEDFileDS());
+      _ms=mfd->getMeshes(); _ms->incrRef();
+      int nbMeshes(_ms->getNumberOfMeshes());
+      for(int i=0;i<nbMeshes;i++)
+        {
+          ParaMEDMEM::MEDFileMesh *tmp(_ms->getMeshAtPos(i));
+          ParaMEDMEM::MEDFileUMesh *tmp2(dynamic_cast<ParaMEDMEM::MEDFileUMesh *>(tmp));
+          if(tmp2)
+            tmp2->forceComputationOfParts();
+        }
+      _fields=mfd->getFields();
+      if((ParaMEDMEM::MEDFileFields *)_fields)
+        _fields->incrRef();
+    }
+  if(!((ParaMEDMEM::MEDFileFields *)_fields))
+    {
+      _fields=BuildFieldFromMeshes(_ms);
+    }
+  else
+    {
+      AppendFieldFromMeshes(_ms,_fields);
+    }
+  std::vector<std::string> meshNames(_ms->getMeshesNames());
+  std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFields> > fields_per_mesh(meshNames.size());
+  for(std::size_t i=0;i<meshNames.size();i++)
+    {
+      fields_per_mesh[i]=_fields->partOfThisLyingOnSpecifiedMeshName(meshNames[i].c_str());
+    }
+  std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS > > allFMTSLeavesToDisplaySafe;
+  std::size_t k(0);
+  for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFields> >::const_iterator fields=fields_per_mesh.begin();fields!=fields_per_mesh.end();fields++)
+    {
+      for(int j=0;j<(*fields)->getNumberOfFields();j++)
+        {
+          MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> fmts((*fields)->getFieldAtPos((int)j));
+          std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > tmp(fmts->splitDiscretizations());
+          allFMTSLeavesToDisplaySafe.insert(allFMTSLeavesToDisplaySafe.end(),tmp.begin(),tmp.end());
+        }
+    }
+  std::vector< MEDFileAnyTypeFieldMultiTS *> allFMTSLeavesToDisplay(allFMTSLeavesToDisplaySafe.size());
+  for(std::size_t i=0;i<allFMTSLeavesToDisplaySafe.size();i++)
+    {
+      allFMTSLeavesToDisplay[i]=allFMTSLeavesToDisplaySafe[i];
+    }
+  std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > allFMTSLeavesPerTimeSeries(MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries(allFMTSLeavesToDisplay));
+  // memory safety part
+  std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > allFMTSLeavesPerTimeSeriesSafe(allFMTSLeavesPerTimeSeries.size());
+  for(std::size_t j=0;j<allFMTSLeavesPerTimeSeries.size();j++)
+    {
+      allFMTSLeavesPerTimeSeriesSafe[j].resize(allFMTSLeavesPerTimeSeries[j].size());
+      for(std::size_t k=0;k<allFMTSLeavesPerTimeSeries[j].size();k++)
+        {
+          allFMTSLeavesPerTimeSeries[j][k]->incrRef();//because MEDFileAnyTypeFieldMultiTS::SplitIntoCommonTimeSeries do not increments the counter
+          allFMTSLeavesPerTimeSeriesSafe[j][k]=allFMTSLeavesPerTimeSeries[j][k];
+        }
+    }
+  // end of memory safety part
+  // 1st : timesteps, 2nd : meshName, 3rd : common support
+  this->_data_structure.resize(allFMTSLeavesPerTimeSeriesSafe.size());
+  for(std::size_t i=0;i<allFMTSLeavesPerTimeSeriesSafe.size();i++)
+    {
+      vtksys_stl::vector< vtksys_stl::string > meshNamesLoc;
+      std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > splitByMeshName;
+      for(std::size_t j=0;j<allFMTSLeavesPerTimeSeriesSafe[i].size();j++)
+        {
+          std::string meshName(allFMTSLeavesPerTimeSeriesSafe[i][j]->getMeshName());
+          vtksys_stl::vector< vtksys_stl::string >::iterator it(std::find(meshNamesLoc.begin(),meshNamesLoc.end(),meshName));
+          if(it==meshNamesLoc.end())
+            {
+              meshNamesLoc.push_back(meshName);
+              splitByMeshName.resize(splitByMeshName.size()+1);
+              splitByMeshName.back().push_back(allFMTSLeavesPerTimeSeriesSafe[i][j]);
+            }
+          else
+            splitByMeshName[std::distance(meshNamesLoc.begin(),it)].push_back(allFMTSLeavesPerTimeSeriesSafe[i][j]);
+        }
+      _data_structure[i].resize(meshNamesLoc.size());
+      for(std::size_t j=0;j<splitByMeshName.size();j++)
+        {
+          std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFastCellSupportComparator> > fsp;
+          std::vector< MEDFileAnyTypeFieldMultiTS *> sbmn(splitByMeshName[j].size());
+          for(std::size_t k=0;k<splitByMeshName[j].size();k++)
+            sbmn[k]=splitByMeshName[j][k];
+          //getMeshWithName does not return a newly allocated object ! It is a true get* method !
+          std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > commonSupSplit(MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport(sbmn,_ms->getMeshWithName(meshNamesLoc[j].c_str()),fsp));
+          std::vector< std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTS> > > commonSupSplitSafe(commonSupSplit.size());
+          this->_data_structure[i][j].resize(commonSupSplit.size());
+          for(std::size_t k=0;k<commonSupSplit.size();k++)
+            {
+              commonSupSplitSafe[k].resize(commonSupSplit[k].size());
+              for(std::size_t l=0;l<commonSupSplit[k].size();l++)
+                {
+                  commonSupSplit[k][l]->incrRef();//because MEDFileAnyTypeFieldMultiTS::SplitPerCommonSupport does not increment pointers !
+                  commonSupSplitSafe[k][l]=commonSupSplit[k][l];
+                }
+            }
+          for(std::size_t k=0;k<commonSupSplit.size();k++)
+            this->_data_structure[i][j][k]=MEDFileFieldRepresentationLeaves(commonSupSplitSafe[k],fsp[k]);
+        }
+    }
+  this->removeEmptyLeaves();
+  this->assignIds();
+}
+
+void MEDFileFieldRepresentationTree::removeEmptyLeaves()
+{
+  std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > > newSD;
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    {
+      std::vector< std::vector< MEDFileFieldRepresentationLeaves > > newSD0;
+      for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+        {
+          std::vector< MEDFileFieldRepresentationLeaves > newSD1;
+          for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+            if(!(*it2).empty())
+              newSD1.push_back(*it2);
+          if(!newSD1.empty())
+            newSD0.push_back(newSD1);
+        }
+      if(!newSD0.empty())
+        newSD.push_back(newSD0);
+    }
+}
+
+bool MEDFileFieldRepresentationTree::IsFieldMeshRegardingInfo(const std::vector<std::string>& compInfos)
+{
+  if(compInfos.size()!=1)
+    return false;
+  return compInfos[0]==COMPO_STR_TO_LOCATE_MESH_DA;
+}
+
+std::string MEDFileFieldRepresentationTree::getDftMeshName() const
+{
+  return _data_structure[0][0][0].getMeshName();
+}
+
+std::vector<double> MEDFileFieldRepresentationTree::getTimeSteps(int& lev0, const TimeKeeper& tk) const
+{
+  int lev1,lev2;
+  const MEDFileFieldRepresentationLeaves& leaf(getTheSingleActivated(lev0,lev1,lev2));
+  return leaf.getTimeSteps(tk);
+}
+
+vtkDataSet *MEDFileFieldRepresentationTree::buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk) const
+{
+  int lev0,lev1,lev2;
+  const MEDFileFieldRepresentationLeaves& leaf(getTheSingleActivated(lev0,lev1,lev2));
+  meshName=leaf.getMeshName();
+  std::vector<double> ts(leaf.getTimeSteps(tk));
+  std::size_t zeTimeId(0);
+  if(ts.size()!=1)
+    {
+      std::vector<double> ts2(ts.size());
+      std::transform(ts.begin(),ts.end(),ts2.begin(),std::bind2nd(std::plus<double>(),-timeReq));
+      std::transform(ts2.begin(),ts2.end(),ts2.begin(),std::ptr_fun<double,double>(fabs));
+      zeTimeId=std::distance(ts2.begin(),std::find_if(ts2.begin(),ts2.end(),std::bind2nd(std::less<double>(),1e-14)));
+    }
+  //2nd chance
+  if(zeTimeId==(int)ts.size())
+    zeTimeId=std::distance(ts.begin(),std::find(ts.begin(),ts.end(),timeReq));
+  if(zeTimeId==(int)ts.size())
+    {//OK the time requested does not fit time series given to ParaView. It is typically the case if more than one MEDReader instance are created or TimeInspector in real time mode.
+      //In this case the default behaviour is taken. Keep the highest time step in this lower than timeReq.
+      int pos(-1);
+      double valAttachedToPos(-std::numeric_limits<double>::max());
+      for(std::size_t i=0;i<ts.size();i++)
+        {
+          if(ts[i]<timeReq)
+            {
+              if(ts[i]>valAttachedToPos)
+                {
+                  pos=i;
+                  valAttachedToPos=ts[i];
+                }
+            }
+        }
+      if(pos==-1)
+        {// timeReq is lower than all time steps (ts). So let's keep the lowest time step greater than timeReq.
+          valAttachedToPos=std::numeric_limits<double>::max();
+          for(std::size_t i=0;i<ts.size();i++)
+            {
+              if(ts[i]<valAttachedToPos)
+                {
+                  pos=i;
+                  valAttachedToPos=ts[i];
+                }
+            }
+        }
+      zeTimeId=pos;
+      std::ostringstream oss; oss.precision(15); oss << "request for time " << timeReq << " but not in ";
+      std::copy(ts.begin(),ts.end(),std::ostream_iterator<double>(oss,","));
+      oss << " ! Keep time " << valAttachedToPos << " at pos #" << zeTimeId;
+      std::cerr << oss.str() << std::endl;
+    }
+  MEDTimeReq *tr(0);
+  if(!isStdOrMode)
+    tr=new MEDStdTimeReq((int)zeTimeId);
+  else
+    tr=new MEDModeTimeReq(tk.getTheVectOfBool());
+  vtkDataSet *ret(leaf.buildVTKInstanceNoTimeInterpolation(tr,_fields,_ms));
+  delete tr;
+  return ret;
+}
+
+const MEDFileFieldRepresentationLeaves& MEDFileFieldRepresentationTree::getTheSingleActivated(int& lev0, int& lev1, int& lev2) const
+{
+  int nbOfActivated(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++)
+        if((*it2).isActivated())
+          nbOfActivated++;
+  if(nbOfActivated!=1)
+    {
+      std::ostringstream oss; oss << "MEDFileFieldRepresentationTree::getTheSingleActivated : Only one leaf must be activated ! Having " << nbOfActivated << " !";
+      throw INTERP_KERNEL::Exception(oss.str().c_str());
+    }
+  int i0(0),i1(0),i2(0);
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++,i0++)
+    for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++,i1++)
+      for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++,i2++)
+        if((*it2).isActivated())
+          {
+            lev0=i0; lev1=i1; lev2=i2;
+            return *it2;
+          }
+  throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::getTheSingleActivated : Internal error !");
+}
+
+void MEDFileFieldRepresentationTree::printMySelf(std::ostream& os) const
+{
+  int i(0);
+  os << "#############################################" << std::endl;
+  for(std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > >::const_iterator it0=_data_structure.begin();it0!=_data_structure.end();it0++,i++)
+    {
+      int j(0);
+      os << "TS" << i << std::endl;
+      for(std::vector< std::vector< MEDFileFieldRepresentationLeaves > >::const_iterator it1=(*it0).begin();it1!=(*it0).end();it1++,j++)
+        {
+          int k(0);
+          for(std::vector< MEDFileFieldRepresentationLeaves >::const_iterator it2=(*it1).begin();it2!=(*it1).end();it2++,k++)
+            {
+              if(k==0)
+                os << "   " << (*it2).getMeshName() << std::endl;
+              os << "      Comp" << k  << std::endl;
+              (*it2).printMySelf(os);
+            }
+        }
+    }
+    os << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" << std::endl;
+}
+
+void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret)
+{
+  for(int i=0;i<ms->getNumberOfMeshes();i++)
+    {
+      MEDFileMesh *mm(ms->getMeshAtPos(i));
+      MEDFileUMesh *mmu(dynamic_cast<MEDFileUMesh *>(mm));
+      if(!mmu)
+        continue;
+      std::vector<int> levs(mm->getNonEmptyLevels());
+      ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileField1TS> f1tsMultiLev(ParaMEDMEM::MEDFileField1TS::New());
+      for(std::vector<int>::const_iterator it=levs.begin();it!=levs.end();it++)
+        {
+          std::vector<INTERP_KERNEL::NormalizedCellType> gts(mmu->getGeoTypesAtLevel(*it));
+          for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator gt=gts.begin();gt!=gts.end();gt++)
+            {
+              ParaMEDMEM::MEDCouplingMesh *m(mmu->getDirectUndergroundSingleGeoTypeMesh(*gt));
+              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS));
+              f->setMesh(m);
+              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected());
+             arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
+              arr->iota();
+              f->setArray(arr);
+              f->setName(mm->getName());
+              f1tsMultiLev->setFieldNoProfileSBT(f);
+            }
+        }
+      if(levs.empty())
+        {
+          std::vector<int> levsExt(mm->getNonEmptyLevelsExt());
+          if(levsExt.size()==levs.size()+1)
+            {
+              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingMesh> m(mm->getGenMeshAtLevel(1));
+              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDCouplingFieldDouble> f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES));
+              f->setMesh(m);
+              ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::DataArrayDouble> arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes());
+             arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA));
+              arr->iota(); f->setArray(arr);
+              f->setName(mm->getName());
+              f1tsMultiLev->setFieldNoProfileSBT(f);
+            }
+          else
+            continue;
+        }
+      //
+      ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFieldMultiTS> fmtsMultiLev(ParaMEDMEM::MEDFileFieldMultiTS::New());
+      fmtsMultiLev->pushBackTimeStep(f1tsMultiLev);
+      ret->pushField(fmtsMultiLev);
+    }
+}
+
+ParaMEDMEM::MEDFileFields *MEDFileFieldRepresentationTree::BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms)
+{
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> ret(ParaMEDMEM::MEDFileFields::New());
+  AppendFieldFromMeshes(ms,ret);
+  return ret.retn();
+}
+
+///////////
+
+TimeKeeper::TimeKeeper(int policy):_policy(policy)
+{
+}
+
+std::vector<double> TimeKeeper::getTimeStepsRegardingPolicy(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const
+{
+  switch(_policy)
+    {
+    case 0:
+      return getTimeStepsRegardingPolicy0(tsPairs,ts);
+    case 1:
+      return getTimeStepsRegardingPolicy0(tsPairs,ts);
+    default:
+      throw INTERP_KERNEL::Exception("TimeKeeper::getTimeStepsRegardingPolicy : only policy 0 and 1 supported presently !");
+    }
+}
+
+/*!
+ * policy = 0 :
+ * if all of ts are in -1e299,1e299 and different each other pairs are ignored ts taken directly.
+ * if all of ts are in -1e299,1e299 but some are not different each other ts are ignored pairs used
+ * if some of ts are out of -1e299,1e299 ts are ignored pairs used
+ */
+std::vector<double> TimeKeeper::getTimeStepsRegardingPolicy0(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const
+{
+  std::size_t sz(ts.size());
+  bool isInHumanRange(true);
+  std::set<double> s;
+  for(std::size_t i=0;i<sz;i++)
+    {
+      s.insert(ts[i]);
+      if(ts[i]<=-1e299 || ts[i]>=1e299)
+        isInHumanRange=false;
+    }
+  if(!isInHumanRange)
+    return processedUsingPairOfIds(tsPairs);
+  if(s.size()!=sz)
+    return processedUsingPairOfIds(tsPairs);
+  _postprocessed_time=ts;
+  return getPostProcessedTime();
+}
+
+/*!
+ * policy = 1 :
+ * idem than 0, except that ts is preaccumulated before invoking policy 0.
+ */
+std::vector<double> TimeKeeper::getTimeStepsRegardingPolicy1(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const
+{
+  std::size_t sz(ts.size());
+  std::vector<double> ts2(sz);
+  double acc(0.);
+  for(std::size_t i=0;i<sz;i++)
+    {
+      ts2[i]=acc;
+      acc+=ts[i];
+    }
+  return getTimeStepsRegardingPolicy0(tsPairs,ts2);
+}
+
+int TimeKeeper::getTimeStepIdFrom(double timeReq) const
+{
+  std::size_t pos(std::distance(_postprocessed_time.begin(),std::find(_postprocessed_time.begin(),_postprocessed_time.end(),timeReq)));
+  return (int)pos;
+}
+
+void TimeKeeper::printSelf(std::ostream& oss) const
+{
+  std::size_t sz(_activated_ts.size());
+  for(std::size_t i=0;i<sz;i++)
+    {
+      oss << "(" << i << "," << _activated_ts[i].first << "), ";
+    }
+}
+
+std::vector<bool> TimeKeeper::getTheVectOfBool() const
+{
+  std::size_t sz(_activated_ts.size());
+  std::vector<bool> ret(sz);
+  for(std::size_t i=0;i<sz;i++)
+    {
+      ret[i]=_activated_ts[i].first;
+    }
+  return ret;
+}
+
+std::vector<double> TimeKeeper::processedUsingPairOfIds(const std::vector< std::pair<int,int> >& tsPairs) const
+{
+  std::size_t sz(tsPairs.size());
+  std::set<int> s0,s1;
+  for(std::size_t i=0;i<sz;i++)
+    { s0.insert(tsPairs[i].first); s1.insert(tsPairs[i].second); }
+  if(s0.size()==sz)
+    {
+      _postprocessed_time.resize(sz);
+      for(std::size_t i=0;i<sz;i++)
+        _postprocessed_time[i]=(double)tsPairs[i].first;
+      return getPostProcessedTime();
+    }
+  if(s1.size()==sz)
+    {
+      _postprocessed_time.resize(sz);
+      for(std::size_t i=0;i<sz;i++)
+        _postprocessed_time[i]=(double)tsPairs[i].second;
+      return getPostProcessedTime();
+    }
+  //TimeKeeper::processedUsingPairOfIds : you are not a lucky guy ! All your time steps info in MEDFile are not discriminant taken one by one !
+  _postprocessed_time.resize(sz);
+  for(std::size_t i=0;i<sz;i++)
+    _postprocessed_time[i]=(double)i;
+  return getPostProcessedTime();
+}
+
+void TimeKeeper::setMaxNumberOfTimeSteps(int maxNumberOfTS)
+{
+  _activated_ts.resize(maxNumberOfTS);
+  for(int i=0;i<maxNumberOfTS;i++)
+    {
+      std::ostringstream oss; oss << "000" << i;
+      _activated_ts[i]=std::pair<bool,std::string>(true,oss.str());
+    }
+}
diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx
new file mode 100644 (file)
index 0000000..0d208c2
--- /dev/null
@@ -0,0 +1,189 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef __MEDFILEFIELDREPRESENTATIONTREE_HXX__
+#define __MEDFILEFIELDREPRESENTATIONTREE_HXX__
+
+#include "MEDFileMesh.hxx"
+#include "MEDFileField.hxx"
+
+#include "vtkType.h"
+
+#include <vector>
+
+class vtkQuadratureSchemeDefinition;
+class vtkMutableDirectedGraph;
+class vtkUnstructuredGrid;
+class vtkRectilinearGrid;
+class vtkStructuredGrid;
+class vtkVariantArray;
+class vtkIdTypeArray;
+class vtkDoubleArray;
+class vtkDataSet;
+
+class TimeKeeper;
+class MEDTimeReq;
+
+class ELGACmp
+{
+public:
+  vtkIdTypeArray *findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const;
+  void appendELGAIfAny(vtkDataSet *ds) const;
+  ~ELGACmp();
+private:
+  vtkIdTypeArray *isExisting(const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd) const;
+  vtkIdTypeArray *createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector<std::string>& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const;
+private:
+  //! size of _loc_names is equal to _elgas.
+  mutable std::vector< std::vector<std::string> > _loc_names;
+  //! size of _elgas is equal to _loc_names. All instances in _elgas are \b not null.
+  mutable std::vector<vtkIdTypeArray *> _elgas;
+  //! same size than _loc_names and _elgas.
+  mutable std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > > _defs;
+};
+
+class MEDFileFieldRepresentationLeavesArrays : public ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>
+{
+public:
+  MEDFileFieldRepresentationLeavesArrays();
+  MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS>& arr);
+  MEDFileFieldRepresentationLeavesArrays& operator=(const MEDFileFieldRepresentationLeavesArrays& other);
+  int getId() const;
+  void setId(int& id) const;
+  void feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& comSupStr, std::vector<std::string>& names) const;
+  bool getStatus() const;
+  bool setStatus(bool status) const;
+  std::string getZeName() const;
+  void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const;
+  void appendELGAIfAny(vtkDataSet *ds) const;
+public:
+  static const char ZE_SEP[];
+  static const char TS_STR[];
+  static const char COM_SUP_STR[];
+  static const char FAMILY_ID_CELL_NAME[];
+  static const char NUM_ID_CELL_NAME[];
+  static const char FAMILY_ID_NODE_NAME[];
+  static const char NUM_ID_NODE_NAME[];
+private:
+  mutable bool _activated;
+  mutable int _id;
+  mutable std::string _ze_name;
+  mutable std::string _ze_full_name;
+  ELGACmp _elga_cmp;
+};
+
+class MEDFileFieldRepresentationLeaves
+{
+public:
+  MEDFileFieldRepresentationLeaves();
+  MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileAnyTypeFieldMultiTS> >& arr,
+                                   const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator>& fsp);
+  ~MEDFileFieldRepresentationLeaves();
+  bool empty() const;
+  void setId(int& id) const;
+  std::string getMeshName() const;
+  int getNumberOfArrays() const;
+  int getNumberOfTS() const;
+  void feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, const std::string& tsName, const std::string& meshName, const std::string& compSupStr, std::vector<std::string>& names) const;
+  bool containId(int id) const;
+  bool containZeName(const char *name, int& id) const;
+  bool isActivated() const;
+  void printMySelf(std::ostream& os) const;
+  void activateAllArrays() const;
+  const MEDFileFieldRepresentationLeavesArrays& getLeafArr(int id) const;
+  std::vector<double> getTimeSteps(const TimeKeeper& tk) const;
+  std::vector< std::pair<int,int> > getTimeStepsInCoarseMEDFileFormat(std::vector<double>& ts) const;
+  std::string getHumanReadableOverviewOfTS() const;
+  vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const;
+private:
+  vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(ParaMEDMEM::MEDUMeshMultiLev *mm) const;
+  vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const;
+  vtkStructuredGrid *buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const;
+  void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const;
+private:
+  std::vector<MEDFileFieldRepresentationLeavesArrays> _arrays;
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFastCellSupportComparator> _fsp;
+  mutable vtkDataSet *_cached_ds;
+};
+
+class MEDFileFieldRepresentationTree
+{
+public:
+  MEDFileFieldRepresentationTree();
+  int getNumberOfLeavesArrays() const;
+  void assignIds() const;
+  void activateTheFirst() const;
+  void feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
+  std::string feedSILForFamsAndGrps(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
+  std::string getNameOf(int id) const;
+  bool getStatusOf(int id) const;
+  int getIdHavingZeName(const char *name) const;
+  bool changeStatusOfAndUpdateToHaveCoherentVTKDataSet(int id, bool status) const;
+  int getMaxNumberOfTimeSteps() const;
+  //
+  std::string getDftMeshName() const;
+  std::vector<double> getTimeSteps(int& lev0, const TimeKeeper& tk) const;
+  vtkDataSet *buildVTKInstance(bool isStdOrMode, double timeReq, std::string& meshName, const TimeKeeper& tk) const;
+  void printMySelf(std::ostream& os) const;
+  //non const methods
+  void loadMainStructureOfFile(const char *fileName, bool isMEDOrSauv);
+  void removeEmptyLeaves();
+  // static methods
+  static bool IsFieldMeshRegardingInfo(const std::vector<std::string>& compInfos);
+public:
+  static const char ROOT_OF_GRPS_IN_TREE[];
+  static const char ROOT_OF_FAM_IDS_IN_TREE[];
+  static const char COMPO_STR_TO_LOCATE_MESH_DA[];
+private:
+  const MEDFileFieldRepresentationLeavesArrays& getLeafArr(int id) const;
+  const MEDFileFieldRepresentationLeaves& getTheSingleActivated(int& lev0, int& lev1, int& lev2) const;
+  static ParaMEDMEM::MEDFileFields *BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms);
+  static void AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret);
+private:
+  // 1st : timesteps, 2nd : meshName, 3rd : common support
+  std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > > _data_structure;
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileMeshes> _ms;
+  ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr<ParaMEDMEM::MEDFileFields> _fields;
+};
+
+class TimeKeeper
+{
+public:
+  TimeKeeper(int policy);
+  int getPolicy() const { return _policy; }
+  void setPolicy(int policy) { _policy=policy; }
+  std::vector<double> getTimeStepsRegardingPolicy(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const;
+  int getTimeStepIdFrom(double timeReq) const;
+  std::vector<double> getPostProcessedTime() const { return _postprocessed_time; }
+  void printSelf(std::ostream& oss) const;
+  std::vector<bool> getTheVectOfBool() const;
+  std::vector< std::pair<bool,std::string> >& getTimesFlagArray() { return _activated_ts; }
+  void setMaxNumberOfTimeSteps(int maxNumberOfTS);
+private:
+  std::vector<double> getTimeStepsRegardingPolicy0(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const;
+  std::vector<double> getTimeStepsRegardingPolicy1(const std::vector< std::pair<int,int> >& tsPairs, const std::vector<double>& ts) const;
+  std::vector<double> processedUsingPairOfIds(const std::vector< std::pair<int,int> >& tsPairs) const;
+private:
+  int _policy;
+  mutable std::vector<double> _postprocessed_time;
+  std::vector< std::pair<bool,std::string> > _activated_ts;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/MEDTimeReq.cxx b/src/Plugins/MEDReader/IO/MEDTimeReq.cxx
new file mode 100644 (file)
index 0000000..e2b0d93
--- /dev/null
@@ -0,0 +1,133 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "MEDTimeReq.hxx"
+
+#include <sstream>
+
+MEDTimeReq::~MEDTimeReq()
+{
+}
+
+///////////
+
+MEDStdTimeReq::~MEDStdTimeReq()
+{
+}
+
+MEDStdTimeReq::MEDStdTimeReq(int timeReq):_time_req(timeReq)
+{
+}
+
+/*!
+ * Does nothing ! It is not a bug
+ */
+void MEDStdTimeReq::setNumberOfTS(int nbOfTS) const
+{
+}
+
+int MEDStdTimeReq::size() const
+{
+  return 1;
+}
+
+int MEDStdTimeReq::getCurrent() const
+{
+  return _time_req;
+}
+
+/*!
+ * Does nothing ! It is not a bug
+ */
+void MEDStdTimeReq::initIterator() const
+{
+}
+
+std::string MEDStdTimeReq::buildName(const std::string& name) const
+{
+  return std::string(name);
+}
+
+/*!
+ * Does nothing ! It is not a bug
+ */
+void MEDStdTimeReq::operator++() const
+{
+}
+
+///////////
+
+MEDModeTimeReq::MEDModeTimeReq(const std::vector<bool>& v):_v(v),_it(0),_sz(0)
+{
+}
+
+MEDModeTimeReq::~MEDModeTimeReq()
+{
+}
+
+int MEDModeTimeReq::size() const
+{
+  int ret(0);
+  for(int i=0;i<_sz;i++)
+    {
+      if(_v[i])
+        ret++;
+    }
+  return ret;
+}
+
+int MEDModeTimeReq::getCurrent() const
+{
+  return _it;
+}
+
+void MEDModeTimeReq::setNumberOfTS(int nbOfTS) const
+{
+  _sz=nbOfTS;
+}
+
+void MEDModeTimeReq::initIterator() const
+{
+  for(_it=0;_it<_sz;_it++)
+    if(_v[_it])
+      return;
+}
+
+std::string MEDModeTimeReq::buildName(const std::string& name) const
+{
+  std::ostringstream oss,oss2,oss3;
+  oss << name << " [";
+  //
+  oss3 << _sz-1;
+  std::size_t len(oss3.str().length());
+  oss2.width(len);
+  oss2.fill('0'); oss2 << _it;
+  //
+  oss << oss2.str() << "]"; 
+  return oss.str();
+}
+
+void MEDModeTimeReq::operator++() const
+{
+  _it++;
+  for(;_it<_sz;_it++)
+    if(_v[_it])
+      return;
+}
diff --git a/src/Plugins/MEDReader/IO/MEDTimeReq.hxx b/src/Plugins/MEDReader/IO/MEDTimeReq.hxx
new file mode 100644 (file)
index 0000000..f419241
--- /dev/null
@@ -0,0 +1,72 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef __MEDTIMEREQ_HXX__
+#define __MEDTIMEREQ_HXX__
+
+#include <string>
+#include <vector>
+
+class MEDTimeReq
+{
+public:
+  virtual int size() const = 0;
+  virtual void setNumberOfTS(int nbOfTS) const = 0;
+  virtual std::string buildName(const std::string& name) const = 0;
+  virtual void initIterator() const = 0;
+  virtual int getCurrent() const = 0;
+  virtual void operator++() const = 0;
+  virtual ~MEDTimeReq();
+};
+
+class MEDStdTimeReq : public MEDTimeReq
+{
+public:
+  MEDStdTimeReq(int timeReq);
+  int size() const;
+  int getCurrent() const;
+  void initIterator() const;
+  void setNumberOfTS(int nbOfTS) const;
+  std::string buildName(const std::string& name) const;
+  void operator++() const;
+public:
+  ~MEDStdTimeReq();
+private:
+  int _time_req;
+};
+
+class MEDModeTimeReq : public MEDTimeReq
+{
+public:
+  MEDModeTimeReq(const std::vector<bool>& v);
+  ~MEDModeTimeReq();
+  int size() const;
+  int getCurrent() const;
+  void initIterator() const;
+  void setNumberOfTS(int nbOfTS) const;
+  std::string buildName(const std::string& name) const;
+  void operator++() const;
+private:
+  std::vector<bool> _v;
+  mutable int _it;
+  mutable int _sz;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/MEDUtilities.cxx b/src/Plugins/MEDReader/IO/MEDUtilities.cxx
new file mode 100644 (file)
index 0000000..4ace147
--- /dev/null
@@ -0,0 +1,27 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "MEDUtilities.hxx"
+
+#include "vtkInformationIntegerKey.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+
+vtkInformationKeyMacro(MEDUtilities,ELGA,Integer);
+vtkInformationKeyMacro(MEDUtilities,ELNO,Integer);
diff --git a/src/Plugins/MEDReader/IO/MEDUtilities.hxx b/src/Plugins/MEDReader/IO/MEDUtilities.hxx
new file mode 100644 (file)
index 0000000..b9be2e3
--- /dev/null
@@ -0,0 +1,33 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef __MEDUTILITIES_HXX__
+#define __MEDUTILITIES_HXX__
+
+class vtkInformationIntegerKey;
+
+class MEDUtilities
+{
+public:
+  static vtkInformationIntegerKey *ELGA();
+  static vtkInformationIntegerKey *ELNO();
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/Testing/CMakeLists.txt b/src/Plugins/MEDReader/IO/Testing/CMakeLists.txt
new file mode 100644 (file)
index 0000000..be19ded
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+ADD_SUBDIRECTORY(Cxx)
\ No newline at end of file
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt b/src/Plugins/MEDReader/IO/Testing/Cxx/CMakeLists.txt
new file mode 100644 (file)
index 0000000..85e0b42
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../..)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../..)
+INCLUDE_DIRECTORIES(${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${MED_ROOT_DIR}/include/salome)
+
+SET( TestMedReader_SRCS TestMedReader.cxx )
+
+SET( TestMedPolyhedron_SRCS TestMedPolyhedron.cxx )
+
+SET( TestMedReadPolyhedron_SRCS TestMedReadPolyhedron.cxx )
+
+SET( TestMedDescendingPolyhedron_SRCS TestMedDescendingPolyhedron.cxx )
+
+SET( TestMedReadDescendingPolyhedron_SRCS TestMedReadDescendingPolyhedron.cxx )
+
+SET( TestMedWriteOcta12_SRCS TestMedWriteOcta12.cxx )
+
+SET( TestMedParallelRead_SRCS TestMedParallelRead.cxx )
+
+SET( TestMedParallelWrite_SRCS TestMedParallelWrite.cxx )
+
+ADD_EXECUTABLE(TestReading0 TestReading0.cxx)
+TARGET_LINK_LIBRARIES(TestReading0 MEDLoaderForPV vtkCommonDataModel)
+
+#ADD_EXECUTABLE(TestMedReader ${TestMedReader_SRCS})
+#ADD_EXECUTABLE(TestMedPolyhedron ${TestMedPolyhedron_SRCS})
+#ADD_EXECUTABLE(TestMedReadPolyhedron ${TestMedReadPolyhedron_SRCS})
+#ADD_EXECUTABLE(TestMedDescendingPolyhedron ${TestMedDescendingPolyhedron_SRCS})
+#ADD_EXECUTABLE(TestMedReadDescendingPolyhedron ${TestMedReadDescendingPolyhedron_SRCS})
+#ADD_EXECUTABLE(TestMedWriteOcta12 ${TestMedWriteOcta12_SRCS})
+
+IF(${HDF5_IS_PARALLEL})
+  ADD_EXECUTABLE(TestMedParallelRead ${TestMedParallelRead_SRCS})
+  ADD_EXECUTABLE(TestMedParallelWrite ${TestMedParallelWrite_SRCS})
+  TARGET_LINK_LIBRARIES(TestMedParallelRead vtkParallelCore ${MED_LIBRARIES})
+  TARGET_LINK_LIBRARIES(TestMedParallelWrite vtkParallelCore ${MED_LIBRARIES})
+ENDIF(${HDF5_IS_PARALLEL})
+
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../../module.cmake)
+
+#vtkIOMPIImage
+#TARGET_LINK_LIBRARIES(TestMedReader ${${vtk-module-test}_DEPENDS} ${MEDFILE_C_LIBRARIES})
+#TARGET_LINK_LIBRARIES(TestMedPolyhedron ${MEDFILE_C_LIBRARIES})
+#TARGET_LINK_LIBRARIES(TestMedReadPolyhedron ${MEDFILE_C_LIBRARIES})
+#TARGET_LINK_LIBRARIES(TestMedDescendingPolyhedron ${MEDFILE_C_LIBRARIES})
+#TARGET_LINK_LIBRARIES(TestMedReadDescendingPolyhedron ${MEDFILE_C_LIBRARIES})
+#TARGET_LINK_LIBRARIES(TestMedWriteOcta12 ${MEDFILE_C_LIBRARIES})
+
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx
new file mode 100644 (file)
index 0000000..0809a77
--- /dev/null
@@ -0,0 +1,189 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedDescendingPolyhedron.cxx
+ *
+ *  Created on: 3 mars 2011
+ *      Author: alejandro
+ */
+
+#include <med.h>
+#define MESGERR 1
+#include <med_utils.h>
+
+#include <string.h>
+
+int main (int argc, char **argv) {
+  med_idt fid;
+  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
+  const med_int spacedim = 3;
+  const med_int meshdim = 3;
+  /*                                         12345678901234561234567890123456 */
+  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
+  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
+  const med_int nnodes = 12;
+  const med_float coordinates[3 * 12] =
+          { 1.618,  1.,     0.,
+           -1.618,  1.,     0.,
+            1.618, -1.,     0.,
+           -1.618, -1.,     0.,
+            1.,     0.,     1.618,
+            1.,     0.,    -1.618,
+           -1.,     0.,     1.618,
+           -1.,     0.,    -1.618,
+            0.,  1.618,     1.,
+            0., -1.618,     1.,
+            0.,  1.618,    -1.,
+            0., -1.618,    -1.  };
+  const med_int nodeIndexSize = 20;
+  const med_int nodeindex[20] = {
+          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
+          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
+          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
+          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3 };
+  const med_int faceIndexSize = 2;
+  /* connectivity : 1 icosahedron */
+  const med_int faceindex[2] = { 1, 21 };
+
+  const med_int connectivity[20] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,
+                                    11,12,13,14,15,16,17,18,19,20 };
+
+  const med_int ntria3 = 20;
+  const med_int triaConnectivity[60] = { 1,  9,  5,
+                                     1,  6, 11,
+                                     3,  5, 10,
+                                     3, 12,  6,
+                                     2,  7,  9,
+                                     2, 11,  8,
+                                     4, 10,  7,
+                                     4,  8, 12,
+                                     1, 11,  9,
+                                     2,  9, 11,
+                                     3, 10, 12,
+                                     4, 10, 12,
+                                     5,  3,  1,
+                                     6,  1,  3,
+                                     7,  2,  4,
+                                     8,  4,  2,
+                                     9,  7,  5,
+                                    10,  5,  7,
+                                    11,  6,  8,
+                                    12,  8,  6  };
+
+  /* open MED file */
+  fid = MEDfileOpen("UsesCase_MEDmesh_17.med",
+        MED_ACC_CREAT);
+  if (fid < 0) {
+    MESSAGE("ERROR : file creation ...");
+    return -1;
+  }
+
+  /* write a comment in the file */
+  if (MEDfileCommentWr(fid,
+           "A 3D unstructured mesh : 1 icosahedron") < 0) {
+    MESSAGE("ERROR : write file description ...");
+    return -1;
+  }
+
+  /* mesh creation : a 3D unstructured mesh */
+  if (MEDmeshCr(fid,
+    meshname,
+    spacedim,
+    meshdim,
+    MED_UNSTRUCTURED_MESH,
+    "A 3D mesh with 1 icosahedron in DESCENDING connectivity",
+    "",
+    MED_SORT_DTIT,
+    MED_CARTESIAN,
+    axisname,
+    unitname) < 0) {
+    MESSAGE("ERROR : mesh creation ...");
+    return -1;
+  }
+
+  /* nodes coordinates in a cartesian axis in full interlace mode
+     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
+  */
+  if (MEDmeshNodeCoordinateWr(fid,
+            meshname,
+            MED_NO_DT,
+            MED_NO_IT,
+            MED_UNDEF_DT,
+            MED_FULL_INTERLACE,
+            nnodes,
+            coordinates) < 0) {
+    MESSAGE("ERROR : nodes coordinates ...");
+    return -1;
+  }
+
+  // cells connectiviy is defined in nodal mode
+  // it is later in the polyhedron thet the connectivity is descending
+  if (MEDmeshElementConnectivityWr(fid,
+           meshname,
+           MED_NO_DT,
+           MED_NO_IT,
+           0.0,
+           MED_DESCENDING_FACE,
+           MED_TRIA3,
+           MED_NODAL,
+           MED_FULL_INTERLACE,
+           ntria3,
+           triaConnectivity) < 0) {
+    MESSAGE("ERROR : triangular cells connectivity ...");
+    return -1;
+  }
+
+  // cells connectiviy is defined in descending mode
+  // 1 icosahedron
+  if (MEDmeshPolyhedronWr(fid,
+              meshname,
+              MED_NO_DT,
+              MED_NO_IT,
+              MED_UNDEF_DT,
+              MED_CELL,
+              MED_DESCENDING,
+              faceIndexSize,
+              faceindex,
+              nodeIndexSize,
+              nodeindex,
+              connectivity) < 0) {
+    MESSAGE("ERROR : polyhedron connectivity ...");
+    return -1;
+  }
+
+  /* create family 0 : by default, all mesh entities family number is 0 */
+  if (MEDfamilyCr(fid,
+      meshname,
+      "",
+      0,
+      0,
+      "") < 0) {
+    MESSAGE("ERROR : quadrangular cells connectivity ...");
+    return -1;
+  }
+
+  /* close MED file */
+  if (MEDfileClose(fid)  < 0) {
+    MESSAGE("ERROR : close file ...");
+    return -1;
+  }
+
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelRead.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelRead.cxx
new file mode 100644 (file)
index 0000000..dc4f91e
--- /dev/null
@@ -0,0 +1,110 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedParallelRead.cxx
+ *
+ *  Created on: 20 avr. 2011
+ *      Author: alejandro
+ */
+
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+
+#define MED_HAVE_MPI
+
+#include <vtkMed.h>
+#define MESGERR 1
+#include "med_utils.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
+int main (int argc, char **argv)
+{
+  med_err _ret=0;
+  med_idt _fid;
+
+  int mpi_size, mpi_rank;
+  MPI_Comm comm = MPI_COMM_WORLD;
+  MPI_Info info = MPI_INFO_NULL;
+
+  med_int    _nbofentitiesfiltered=0;
+  med_int    *_filterarray=NULL;
+
+  MPI_Init(&argc, &argv);
+  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+  med_size            _nbblocksperproc    = 0;
+  int           _nbofentities             = 0;
+  int           _nbofvaluesperentity      = 0;
+  int           _nbofconstituentpervalue  = 0;
+
+  printf("mpi_size = %03d\n", mpi_size);
+
+  if (mpi_rank == 0 ) {
+
+    struct tm *_tm ;
+    time_t _tt=time(0);
+    _tm = localtime(&_tt);
+
+    srandom((*_tm).tm_sec * (*_tm).tm_min );
+    _nbblocksperproc         = 1 + (int) (mpi_size * (random() / (RAND_MAX + 1.0)));
+    _nbofentities            = 1 + (int) (1000.0 * (random() / (RAND_MAX + 1.0)));
+    _nbofvaluesperentity     = 1 + (int) (11.0 * (random() / (RAND_MAX + 1.0)));
+    _nbofconstituentpervalue = 1 + (int) (7.0 * (random() / (RAND_MAX + 1.0)));
+  }
+
+  MPI_Bcast(&_nbblocksperproc         , 1, MPI_LONG, 0, MPI_COMM_WORLD);
+  MPI_Bcast(&_nbofentities            , 1, MPI_LONG, 0, MPI_COMM_WORLD);
+  MPI_Bcast(&_nbofvaluesperentity     , 1, MPI_LONG, 0, MPI_COMM_WORLD);
+  MPI_Bcast(&_nbofconstituentpervalue , 1, MPI_LONG, 0, MPI_COMM_WORLD);
+
+  printf( "NENT-%03d_NVAL-%03d_NCST-%03d_NBL-%03llu\n",_nbofentities,_nbofvaluesperentity,
+          _nbofconstituentpervalue,_nbblocksperproc);
+
+  char         _filename   [255]="";
+  sprintf(_filename,"/home/alejandro/work/Data-test-Med/tmp/depl.resu.med");
+  /*     SSCRUTE(_filename); */
+
+  /* Ouverture du fichier en mode parallel */
+  if ((_fid = MEDparFileOpen(_filename, MED_ACC_RDONLY ,comm, info)) < 0){
+    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_FILE,_filename);
+  }
+
+  if ( MEDfileClose( _fid ) < 0) {
+      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,""); _ret = -1;
+    }
+
+  /* MPI_Finalize must be called AFTER MEDclose which may use MPI calls */
+  MPI_Finalize();
+
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelWrite.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedParallelWrite.cxx
new file mode 100644 (file)
index 0000000..1d72220
--- /dev/null
@@ -0,0 +1,343 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedParallelWrite.cxx
+ *
+ *  Created on: 11 mai 2011
+ *      Author: alejandro
+ */
+
+#define MED_HAVE_MPI
+
+#include <vtkMed.h>
+#define MESGERR 1
+#include "med_utils.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+int main (int argc, char **argv)
+{
+  const char meshname[MED_NAME_SIZE+1] = "2D unstructured mesh";
+  const med_int spacedim = 2;
+  const med_int meshdim = 2;
+  /*                                         12345678901234561234567890123456 */
+  const char axisname[2*MED_SNAME_SIZE+1] = "x               y               ";
+  const char unitname[2*MED_SNAME_SIZE+1] = "cm              cm              ";
+  med_float coordinates[2222];
+  const med_int nnodes = 1111;
+
+  med_int* quadconnectivity;
+  const med_int nquad4 = 1000;
+
+  med_err _ret=-1;
+
+  int mpi_size, mpi_rank;
+  MPI_Comm comm = MPI_COMM_WORLD;
+  MPI_Info info = MPI_INFO_NULL;
+
+  MPI_Init(&argc, &argv);
+  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+  med_idt  fid;
+  char    filename[255]="UsesCase_MEDmesh_parallel.med";
+  /*     SSCRUTE(_filename); */
+
+  if (mpi_rank == 0 ) {
+    printf("mpi_size = %03d\n", mpi_size);
+
+    /* Ouverture du fichier en mode non-parallel */
+    if ((fid = MEDfileOpen(filename, MED_ACC_CREAT)) < 0){
+      MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
+    }
+
+    /* write a comment in the file */
+    if (MEDfileCommentWr(fid,"A 2D unstructured mesh : 15 nodes, 12 cells") < 0) {
+      MESSAGE("ERROR : write file description ...");
+    }
+
+    /* mesh creation : a 2D unstructured mesh */
+    if (MEDmeshCr(fid, meshname, spacedim, meshdim, MED_UNSTRUCTURED_MESH,
+      "A 2D unstructured mesh","",MED_SORT_DTIT,MED_CARTESIAN, axisname, unitname) < 0) {
+      MESSAGE("ERROR : mesh creation ...");
+    }
+
+    /*
+     * Building the coordinates of a rectangle of 101 points in the Y-axis,
+     * and 11 in the X-axis
+     */
+    for (int j=0; j<11; j++ )
+      for (int i=0; i<101; i++ )
+      {
+      coordinates[j*202+i*2]   = j+1;
+      coordinates[j*202+i*2+1] = i+1;
+      }
+
+    /* nodes coordinates in a Cartesian axis in full interlace mode
+        (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
+     */
+    if (MEDmeshNodeCoordinateWr(fid, meshname, MED_NO_DT, MED_NO_IT, 0.0,
+              MED_FULL_INTERLACE, nnodes, coordinates) < 0) {
+      MESSAGE("ERROR : nodes coordinates ...");
+    }
+
+    if ( MEDfileClose( fid ) < 0) {
+      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,"");;
+    }
+
+    MPI_Barrier(comm);
+  } /* End of process ZERO */
+  else
+    {
+    MPI_Barrier(comm);
+    }
+
+  /* Ouverture du fichier en mode parallel */
+  if ((fid = MEDparFileOpen(filename, MED_ACC_RDWR ,comm, info)) < 0){
+    MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
+  }
+
+  med_int     nbofentity = nquad4;
+  med_int     nbofvaluesperentity = 1;
+  med_int     nbofconstituentpervalue = 4;
+  med_int     constituentselect = MED_ALL_CONSTITUENT;
+  med_switch_mode   switchmode = MED_FULL_INTERLACE;
+  med_storage_mode    storagemode = MED_COMPACT_STMODE;
+  const char *const   profilename = MED_NO_PROFILE;
+
+  /*
+   * Calculating block sizes
+   */
+
+  int block_size = (100/mpi_size)*10;
+  med_size    start  = block_size * mpi_rank + 1;
+  med_size    stride = block_size;
+  med_size    count  = 1;
+  med_size    blocksize = block_size;
+  med_size    lastblocksize = (100 % mpi_size)*10;
+  if ((mpi_size == mpi_rank+1) && (lastblocksize != 0))
+    {
+    blocksize += lastblocksize;
+    stride    += lastblocksize;
+    }
+  lastblocksize = 0;
+
+  printf("%03d: block_size = %03d\n", mpi_rank, block_size);
+  printf("%03d: start = %03d\n", mpi_rank, start);
+  printf("%03d: stride = %03d\n", mpi_rank, stride);
+  printf("%03d: count = %03d\n", mpi_rank, count);
+  printf("%03d: blocksize = %03d\n", mpi_rank, blocksize);
+  printf("%03d: lastblocksize = %03d\n", mpi_rank, lastblocksize);
+  med_filter filter = MED_FILTER_INIT;
+
+  if ( MEDfilterBlockOfEntityCr( fid,
+      nbofentity,
+      nbofvaluesperentity,
+      nbofconstituentpervalue,
+      constituentselect,
+      switchmode,
+      storagemode,
+      profilename,
+      start,
+      stride,
+      count,
+      blocksize,
+      lastblocksize,
+      &filter ) < 0 )
+    {
+    MESSAGE("ERROR : filter creation ...");
+    }
+
+  // Attention: there is blocksize and block_size and it does not
+  // represent the same quantity, in case we are in the last
+  // block they are different, if not it is the same
+  quadconnectivity = new med_int[blocksize*4];
+  int shift = mpi_rank*block_size;
+  printf("%03d: mpi_rank*block_size = %03d\n", mpi_rank, shift);
+  printf("%03d: block_size = %03d\n", mpi_rank, block_size);
+  int base = shift + shift / 101;
+  int c = 0;
+  for (int i=0; i<blocksize*4; i+=4 )
+    {
+    base++;
+    if ((base%101) == 0)
+      base++;
+
+    quadconnectivity[i]   = base;
+    quadconnectivity[i+1] = base+1;
+    quadconnectivity[i+2] = base+102;
+    quadconnectivity[i+3] = base+101;
+    c++;
+    }
+  printf("%03d: number of written quads = %03d\n", mpi_rank, c);
+
+  if (MEDmeshElementConnectivityAdvancedWr(fid, meshname, MED_NO_DT,
+           MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
+           MED_NODAL, &filter, quadconnectivity) < 0) {
+    MESSAGE("ERROR : quadrangular cells connectivity ...");
+  }
+
+    if ( MEDfilterClose( &filter ) < 0) {
+      MESSAGE("ERROR : filter closing ...");
+    }
+
+    if ( MEDfileClose( fid ) < 0) {
+      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,""); _ret = -1;
+    }
+
+    /* Barrier before writing family ZERO */
+    MPI_Barrier(comm);
+
+    if (mpi_rank == 0 ) {
+
+      if ((fid = MEDfileOpen(filename, MED_ACC_RDWR)) < 0){
+        MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
+      }
+
+      /* create family 0 : by default, all mesh entities family number is 0 */
+      if (MEDfamilyCr(fid, meshname,MED_NO_NAME, 0, 0, MED_NO_GROUP) < 0) {
+        MESSAGE("ERROR : family 0 creation ...");
+      }
+
+      const char familyname_root[MED_NAME_SIZE+1] = "PROCESSOR ";
+      char familyname[MED_NAME_SIZE+1] = " ";
+      for (int i=1; i<mpi_size+1; i++)
+        {
+        snprintf(familyname, sizeof familyname, "%s%d", familyname_root, i);
+        if (MEDfamilyCr(fid, meshname,familyname, -i, 0, MED_NO_GROUP) < 0) {
+          MESSAGE("ERROR : family creation ...");
+          }
+        printf("%03d: %s\n", mpi_rank, familyname);
+        }
+
+      med_int familynumbers[nquad4];
+      int l = 1;
+      for (int i=0; i<nquad4; i++)
+        {
+        if ((i > block_size * l - 1) && (l < mpi_size))
+          {
+          l++;
+          }
+        familynumbers[i] = -l;
+        }
+
+      if (MEDmeshEntityFamilyNumberWr(fid, meshname, MED_NO_DT, MED_NO_IT,
+                           MED_CELL, MED_QUAD4, nquad4, familynumbers) < 0) {
+        MESSAGE("ERROR : nodes family numbers ...");
+      }
+
+      /* Write a Profile */
+      const char profileName[MED_NAME_SIZE+1] = "QUAD4_PROFILE";
+      const med_int profilesize = 9;
+      med_int profilearray[9] = {1, 3, 5, 7, 9, 11, 13, 15, 17};
+      if (MEDprofileWr(fid, profileName, profilesize, profilearray ) < 0) {
+        MESSAGE("ERROR : nodes family numbers ...");
+      }
+
+      /* write localization for integration points */
+      const char localizationName[MED_NAME_SIZE+1] = "QUAD4_INTEGRATION_POINTS_4";
+      const med_float elementcoordinate[6] = {0.0, 0.0,  1.0, 0.0,  0.0,1.0};
+      const med_float iPointCoordinate[8] = {1.0/5, 1.0/5,  3.0/5, 1.0/5,  1.0/5, 3.0/5,  1.0/3, 1.0/3};
+      const med_float weight[4] = {1.0/8, 1.0/8, 1.0/8, 1.0/8};
+      med_int spacedim = 2;
+      med_int nipoint = 4;
+      if (MEDlocalizationWr(fid, localizationName, MED_QUAD4, spacedim,
+          elementcoordinate, MED_FULL_INTERLACE,
+          nipoint, iPointCoordinate, weight,
+          MED_NO_INTERPOLATION, MED_NO_MESH_SUPPORT) < 0) {
+        MESSAGE("ERROR : create family of integration points ...");
+      }
+
+      /* Writing a scalar Field on the Quads right here */
+      const char fieldname[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD";
+      const med_int ncomponent = 1;
+      const char componentname[MED_SNAME_SIZE+1] = "TEMPERATURE";
+      const char componentunit[MED_SNAME_SIZE+1] = "C";
+
+      if (MEDfieldCr(fid, fieldname, MED_FLOAT64,
+                     ncomponent, componentname, componentunit,"",
+                     meshname) < 0) {
+        MESSAGE("ERROR : create field");
+      }
+
+      /* write values at cell (QUADS) centers */
+      med_float quad4values[nquad4];
+      for (int i=0; i<nquad4; i++)
+        quad4values[i] = i%100 + 1;
+
+      med_float quad4values4[nquad4 * 4];
+      long int counter = 0;
+      for (int i=0; i<nquad4; i++)
+        {
+        quad4values[i] = i%100 + 1;
+        for (int j=0; j<4; j++)
+          {
+          quad4values4[counter] = quad4values[i];
+          counter++;
+          }
+        }
+      if (MEDfieldValueWr(fid, fieldname, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL,
+                         MED_QUAD4, MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
+                         nquad4, (unsigned char*) quad4values) < 0) {
+        MESSAGE("ERROR : write field values on MED_QUAD4");
+      }
+
+      const char fieldname2[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD_PGAUSS";
+      if (MEDfieldCr(fid, fieldname2, MED_FLOAT64,
+                     ncomponent, componentname, componentunit,"",
+                     meshname) < 0) {
+        MESSAGE("ERROR : create field");
+      }
+
+      if (MEDfieldValueWithProfileWr(
+             fid, fieldname2, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
+             MED_GLOBAL_PFLMODE, MED_NO_PROFILE, localizationName,
+           MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
+           nquad4, (unsigned char*) quad4values4) < 0) {
+        MESSAGE("ERROR : write field values on MED_QUAD4");
+      }
+
+      const char fieldname3[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD_ELNO";
+      if (MEDfieldCr(fid, fieldname3, MED_FLOAT64,
+                     ncomponent, componentname, componentunit,"",
+                     meshname) < 0) {
+        MESSAGE("ERROR : create field");
+      }
+
+      if (MEDfieldValueWithProfileWr(
+             fid, fieldname3, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
+             MED_GLOBAL_PFLMODE, MED_NO_PROFILE, MED_GAUSS_ELNO,
+           MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
+           nquad4, (unsigned char*) quad4values4) < 0) {
+        MESSAGE("ERROR : write field values on MED_QUAD4");
+      }
+
+      if ( MEDfileClose( fid ) < 0) {
+        MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,"");;
+      }
+
+      printf("File UsesCase_MEDmesh_parallel.med has been generated.\n");
+    } /* End of process ZERO */
+
+  /* MPI_Finalize must be called AFTER MEDclose which may use MPI calls */
+  MPI_Finalize();
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedPolyhedron.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedPolyhedron.cxx
new file mode 100644 (file)
index 0000000..7f1a149
--- /dev/null
@@ -0,0 +1,165 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedPolyhedron.cxx
+ *
+ *  Created on: 15 févr. 2011
+ *      Author: alejandro
+ */
+
+#include <med.h>
+#define MESGERR 1
+#include <med_utils.h>
+
+#include <string.h>
+
+int main (int argc, char **argv) {
+  med_idt fid;
+  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
+  const med_int spacedim = 3;
+  const med_int meshdim = 3;
+  /*                                         12345678901234561234567890123456 */
+  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
+  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
+  const med_int nnodes = 12;
+  const med_float coordinates[3 * 12] =
+          { 1.618,  1.,     0.,
+           -1.618,  1.,     0.,
+            1.618, -1.,     0.,
+           -1.618, -1.,     0.,
+            1.,     0.,     1.618,
+            1.,     0.,    -1.618,
+           -1.,     0.,     1.618,
+           -1.,     0.,    -1.618,
+            0.,  1.618,     1.,
+            0., -1.618,     1.,
+            0.,  0,    0.,
+//            0.,  1.618,    -1.,
+            0., -1.618,    -1.  };
+  const med_int faceIndexSize = 2;
+  const med_int faceindex[2] = {1,22};
+  const med_int nodeIndexSize = 21;
+  /* connectivity : 1 icosahedron */
+  const med_int nodeindex[21] = { 1, 4, 7,10,13,16,19,22,25,28,
+                                 31,34,37,40,43,46,49,52,55,58,61 };
+  const med_int connectivity[60] = { 1,  9,  5,
+                                     1,  6, 11,
+                                     3,  5, 10,
+                                     3, 12,  6,
+                                     2,  7,  9,
+                                     2, 11,  8,
+                                     4, 10,  7,
+                                     4,  8, 12,
+                                     1, 11,  9,
+                                     2,  9, 11,
+                                     3, 10, 12,
+                                     4, 10, 12,
+                                     5,  3,  1,
+                                     6,  1,  3,
+                                     7,  2,  4,
+                                     8,  4,  2,
+                                     9,  7,  5,
+                                    10,  5,  7,
+                                    11,  6,  8,
+                                    12,  8,  6  };
+
+  /* open MED file */
+  fid = MEDfileOpen("UsesCase_MEDmesh_15.med",
+        MED_ACC_CREAT);
+  if (fid < 0) {
+    MESSAGE("ERROR : file creation ...");
+    return -1;
+  }
+
+  /* write a comment in the file */
+  if (MEDfileCommentWr(fid,
+           "A 3D unstructured mesh : 1 icosahedron") < 0) {
+    MESSAGE("ERROR : write file description ...");
+    return -1;
+  }
+
+  /* mesh creation : a 3D unstructured mesh */
+  if (MEDmeshCr(fid,
+    meshname,
+    spacedim,
+    meshdim,
+    MED_UNSTRUCTURED_MESH,
+    "A 3D mesh with 1 icosahedron",
+    "",
+    MED_SORT_DTIT,
+    MED_CARTESIAN,
+    axisname,
+    unitname) < 0) {
+    MESSAGE("ERROR : mesh creation ...");
+    return -1;
+  }
+
+  /* nodes coordinates in a cartesian axis in full interlace mode
+     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
+  */
+  if (MEDmeshNodeCoordinateWr(fid,
+            meshname,
+            MED_NO_DT,
+            MED_NO_IT,
+            MED_UNDEF_DT,
+            MED_FULL_INTERLACE,
+            nnodes,
+            coordinates) < 0) {
+    MESSAGE("ERROR : nodes coordinates ...");
+    return -1;
+  }
+
+  /* cells connectiviy is defined in nodal mode */
+  /* 1 icosahedron */
+  if (MEDmeshPolyhedronWr(fid,
+              meshname,
+              MED_NO_DT,
+              MED_NO_IT,
+              MED_UNDEF_DT,
+              MED_CELL,
+              MED_NODAL,
+              faceIndexSize,
+              faceindex,
+              nodeIndexSize,
+              nodeindex,
+              connectivity) < 0) {
+    MESSAGE("ERROR : polyhedron connectivity ...");
+    return -1;
+  }
+
+  /* create family 0 : by default, all mesh entities family number is 0 */
+  if (MEDfamilyCr(fid,
+      meshname,
+      "",
+      0,
+      0,
+      "") < 0) {
+    MESSAGE("ERROR : quadrangular cells connectivity ...");
+    return -1;
+  }
+
+  /* close MED file */
+  if (MEDfileClose(fid)  < 0) {
+    MESSAGE("ERROR : close file ...");
+    return -1;
+  }
+
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx
new file mode 100644 (file)
index 0000000..33ff52f
--- /dev/null
@@ -0,0 +1,234 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedReadDescendingPolyhedron.cxx
+ *
+ *  Created on: 3 mars 2011
+ *      Author: alejandro
+ */
+
+#include <med.h>
+#define MESGERR 1
+#include <med_utils.h>
+
+#include <string.h>
+
+int main (int argc, char **argv) {
+  med_idt fid;
+  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
+  char meshdescription[MED_COMMENT_SIZE+1];
+  med_int meshdim;
+  med_int spacedim;
+  med_sorting_type sortingtype;
+  med_int nstep;
+  med_mesh_type meshtype;
+  med_axis_type axistype;
+  char axisname[3*MED_SNAME_SIZE+1];
+  char unitname[3*MED_SNAME_SIZE+1];
+  char dtunit[MED_SNAME_SIZE+1];
+  med_float *coordinates = NULL;
+  med_int nnodes = 0;
+  med_int npoly = 0;
+  med_int indexsize;
+  med_int faceIndexSize;
+  med_int *index = NULL;
+  med_int *faceindex = NULL;
+  med_int *connectivity = NULL;
+  med_int connectivitysize;
+  med_int *triaconnectivity = NULL;
+  med_int ntria3 = 0;
+  med_bool coordinatechangement;
+  med_bool geotransformation;
+  int i;
+  int k,ind1,ind2;
+  int j,jind1,jind2;
+
+  /* open MED file with READ ONLY access mode */
+  fid = MEDfileOpen("./UsesCase_MEDmesh_17.med",MED_ACC_RDONLY);
+  if (fid < 0) {
+    MESSAGE("ERROR : open file in READ ONLY ACCESS mode ...");
+    return -1;
+  }
+
+  /*
+   * ... we know that the MED file has only one mesh,
+   * a real code working would check ...
+   */
+
+  /* read mesh informations : mesh dimension, space dimension ... */
+  if (MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
+      dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
+    MESSAGE("ERROR : mesh info ...");
+    return -1;
+  }
+
+  /* read how many nodes in the mesh */
+  if ((nnodes = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_NODE, MED_POINT1,
+             MED_COORDINATE, MED_NO_CMODE,&coordinatechangement,
+             &geotransformation)) < 0) {
+    MESSAGE("ERROR : number of nodes ...");
+    return -1;
+  }
+
+  /* read how many triangular cells in the mesh */
+  if ((ntria3 = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_DESCENDING_FACE,MED_TRIA3,
+             MED_CONNECTIVITY, MED_NODAL,&coordinatechangement,
+             &geotransformation)) < 0) {
+    MESSAGE("ERROR : number of MED_TRIA3 ...");
+    return -1;
+  }
+  ISCRUTE(ntria3);
+
+  /* read cells connectivity in the mesh */
+  if ((triaconnectivity = (med_int *) malloc(sizeof(med_int)*ntria3*3)) == NULL) {
+    MESSAGE("ERROR : memory allocation ...");
+    return -1;
+  }
+  if (MEDmeshElementConnectivityRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_DESCENDING_FACE,
+           MED_TRIA3, MED_NODAL, MED_FULL_INTERLACE, triaconnectivity) < 0) {
+    MESSAGE("ERROR : MED_TRIA3 connectivity ...");
+    return -1;
+  }
+  for (i=0;i<ntria3*3;i++)
+    printf("%d - ",*(triaconnectivity+i));
+  printf("\n");
+  /*
+   * ... we know that we only have MED_POLYHEDRON cells in the mesh,
+   * a real code working would check all MED geometry cell types ...
+   */
+
+  /* How many polygon in the mesh in nodal connectivity mode */
+  /* For the polygons, we get the size of array index */
+  if ((faceIndexSize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+          MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_DESCENDING,
+          &coordinatechangement,
+          &geotransformation)) < 0) {
+    MESSAGE("ERROR : read number of polyedron ...");
+    return -1;
+  }
+  npoly = faceIndexSize - 1;
+  ISCRUTE(npoly);
+
+  if ((indexsize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+          MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_DESCENDING,
+          &coordinatechangement,
+          &geotransformation)) < 0) {
+    MESSAGE("ERROR : read number of polyedron ...");
+    return -1;
+  }
+  ISCRUTE(indexsize);
+
+  /* how many nodes for the polyhedron connectivity ? */
+  if ((connectivitysize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+           MED_CELL,MED_POLYHEDRON,MED_CONNECTIVITY,MED_DESCENDING,
+           &coordinatechangement,
+           &geotransformation)) < 0) {
+    MESSAGE("ERROR : read connevity size ...");
+    return -1;
+    }
+  ISCRUTE(connectivitysize);
+
+  /* read mesh nodes coordinates */
+  if ((coordinates = (med_float*) malloc(sizeof(med_float)*nnodes*spacedim)) == NULL) {
+    MESSAGE("ERROR : memory allocation ...");
+    return -1;
+  }
+
+  if (MEDmeshNodeCoordinateRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
+            coordinates) < 0) {
+    MESSAGE("ERROR : nodes coordinates ...");
+    return -1;
+  }
+  for (i=0;i<nnodes*spacedim;i++)
+    printf("%f - ",*(coordinates+i));
+  printf("\n");
+
+  /* read polygons connectivity */
+  if ((index = (med_int *) malloc(sizeof(med_int)*indexsize)) == NULL) {
+     MESSAGE("ERROR : memory allocation ...");
+     return -1;
+   }
+
+  if ((faceindex = (med_int *) malloc(sizeof(med_int)*faceIndexSize)) == NULL) {
+     MESSAGE("ERROR : memory allocation ...");
+     return -1;
+   }
+
+  if ((connectivity = (med_int *) malloc(sizeof(med_int)*connectivitysize)) == NULL) {
+    MESSAGE("ERROR : memory allocation ...");
+    return -1;
+  }
+
+  if (MEDmeshPolyhedronRd(fid,meshname,MED_NO_DT,MED_NO_IT,MED_CELL,MED_DESCENDING,
+        faceindex, index, connectivity) < 0) {
+    MESSAGE("ERROR : read polygon connectivity ...");
+    return -1;
+  }
+
+  for (i=0;i<npoly;i++)
+    {
+    printf(">> MED_POLYHEDRON "IFORMAT" : \n",i+1);
+    printf("---- Face Index         ----- : [ ");
+    ind1 = *(index+i)-1;
+    ind2 = *(index+i+1)-1;
+    for (k=ind1;k<ind2;k++)
+      printf(IFORMAT" ",*(faceindex+k));
+    printf(" ] \n");
+    printf("---- Connectivity       ----- : [ ");
+    for (k=0;k<connectivitysize;k++)
+      {
+      for (j=0;j<3;j++)
+        {
+        printf(IFORMAT" ",triaconnectivity[connectivity[k]+j]);
+        }
+      printf("\n");
+      }
+    printf(" ] \n");
+    }
+
+  /*
+   * ... we know that the family number of nodes and elements is 0, a real working would check ...
+   */
+
+  /* close MED file */
+  if (MEDfileClose(fid) < 0) {
+    MESSAGE("ERROR : close file");
+    return -1;
+  }
+
+  /* memory deallocation */
+  printf("Before free(coordinates)\n");
+  if (coordinates)
+    free(coordinates);
+
+  printf("Before free(connectivity)\n");
+  if (connectivity)
+    free(connectivity);
+
+  printf("Before free(triaconnectivity)\n");
+  if (triaconnectivity)
+    free(triaconnectivity);
+
+  printf("Before free(index)\n");
+  if (index)
+    free(index);
+
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx
new file mode 100644 (file)
index 0000000..6d00488
--- /dev/null
@@ -0,0 +1,191 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ *  How to create an unstructured mesh with polygons
+ *
+ *  Use case 16 : read a 2D unstructured mesh with 2 polyhedrons
+ */
+
+#include <med.h>
+#define MESGERR 1
+#include <med_utils.h>
+
+#include <string.h>
+
+int main (int argc, char **argv) {
+  med_idt fid;
+  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
+  char meshdescription[MED_COMMENT_SIZE+1];
+  med_int meshdim;
+  med_int spacedim;
+  med_sorting_type sortingtype;
+  med_int nstep;
+  med_mesh_type meshtype;
+  med_axis_type axistype;
+  char axisname[3*MED_SNAME_SIZE+1];
+  char unitname[3*MED_SNAME_SIZE+1];
+  char dtunit[MED_SNAME_SIZE+1];
+  med_float *coordinates = NULL;
+  med_int nnodes = 0;
+  med_int npoly = 0;
+  med_int indexsize;
+  med_int faceIndexSize;
+  med_int *index = NULL;
+  med_int *faceindex = NULL;
+  med_int *connectivity = NULL;
+  med_int connectivitysize;
+  med_bool coordinatechangement;
+  med_bool geotransformation;
+  int i;
+  int k,ind1,ind2;
+  int j, jind1,jind2;
+
+  /* open MED file with READ ONLY access mode */
+  fid = MEDfileOpen("./UsesCase_MEDmesh_15.med",MED_ACC_RDONLY);
+  if (fid < 0) {
+    MESSAGE("ERROR : open file in READ ONLY ACCESS mode ...");
+    return -1;
+  }
+
+  /*
+   * ... we know that the MED file has only one mesh,
+   * a real code working would check ...
+   */
+
+  /* read mesh informations : mesh dimension, space dimension ... */
+  if (MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
+      dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
+    MESSAGE("ERROR : mesh info ...");
+    return -1;
+  }
+
+  /* read how many nodes in the mesh */
+  if ((nnodes = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_NODE, MED_POINT1,
+             MED_COORDINATE, MED_NO_CMODE,&coordinatechangement,
+             &geotransformation)) < 0) {
+    MESSAGE("ERROR : number of nodes ...");
+    return -1;
+  }
+
+  /*
+   * ... we know that we only have MED_POLYHEDRON cells in the mesh,
+   * a real code working would check all MED geometry cell types ...
+   */
+
+  /* How many polygon in the mesh in nodal connectivity mode */
+  /* For the polygons, we get the size of array index */
+  if ((indexsize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+          MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_NODAL,
+          &coordinatechangement,
+          &geotransformation)) < 0) {
+    MESSAGE("ERROR : read number of polyedron ...");
+    return -1;
+  }
+  npoly = indexsize-1;
+  ISCRUTE(npoly);
+
+  if ((faceIndexSize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+          MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_NODAL,
+          &coordinatechangement,
+          &geotransformation)) < 0) {
+    MESSAGE("ERROR : read number of polyedron ...");
+    return -1;
+  }
+  ISCRUTE(faceIndexSize);
+
+  /* how many nodes for the polyhedron connectivity ? */
+  if ((connectivitysize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
+           MED_CELL,MED_POLYHEDRON,MED_CONNECTIVITY,MED_NODAL,
+           &coordinatechangement,
+           &geotransformation)) < 0) {
+    MESSAGE("ERROR : read connevity size ...");
+    return -1;
+    }
+  ISCRUTE(connectivitysize);
+
+  /* read mesh nodes coordinates */
+  if ((coordinates = (med_float*) malloc(sizeof(med_float)*nnodes*spacedim)) == NULL) {
+    MESSAGE("ERROR : memory allocation ...");
+    return -1;
+  }
+
+  if (MEDmeshNodeCoordinateRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
+            coordinates) < 0) {
+    MESSAGE("ERROR : nodes coordinates ...");
+    return -1;
+  }
+  for (i=0;i<nnodes*spacedim;i++)
+    printf("%f - ",*(coordinates+i));
+  printf("\n");
+
+  /* read polygons connectivity */
+  index = (med_int *) malloc(sizeof(med_int)*indexsize);
+  faceindex = (med_int *) malloc(sizeof(med_int)*faceIndexSize);
+  connectivity = (med_int *) malloc(sizeof(med_int)*connectivitysize);
+
+  if (MEDmeshPolyhedronRd(fid,meshname,MED_NO_DT,MED_NO_IT,MED_CELL,MED_NODAL,
+        index,faceindex,connectivity) < 0) {
+    MESSAGE("ERROR : read polygon connectivity ...");
+    return -1;
+  }
+
+  for (i=0;i<npoly;i++)
+    {
+    printf(">> MED_POLYHEDRON "IFORMAT" : \n",i+1);
+    printf("---- Face Index         ----- : [ ");
+    ind1 = *(index+i)-1;
+    ind2 = *(index+i+1)-1;
+    for (k=ind1;k<ind2;k++)
+      printf(IFORMAT" ",*(faceindex+k));
+    printf(" ] \n");
+    printf("---- Connectivity       ----- : [ ");
+    for (k=ind1;k<ind2;k++)
+      {
+      jind1 = *(faceindex+k)-1;
+      jind2 = *(faceindex+k+1)-1;
+      for (j=jind1;j<jind2;j++)
+        printf(IFORMAT" ",*(connectivity+j));
+      printf(" \n");
+      }
+    printf(" ] \n");
+    }
+
+  /*
+   * ... we know that the family number of nodes and elements is 0, a real working would check ...
+   */
+
+  /* close MED file */
+  if (MEDfileClose(fid) < 0) {
+    MESSAGE("ERROR : close file");
+    return -1;
+  }
+
+  /* memory deallocation */
+  if (coordinates)
+    free(coordinates);
+
+  if (index)
+    free(index);
+
+  if (connectivity)
+    free(connectivity);
+
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReader.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedReader.cxx
new file mode 100644 (file)
index 0000000..6012fa0
--- /dev/null
@@ -0,0 +1,79 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "vtkActor.h"
+#include "vtkCamera.h"
+#include "vtkProperty.h"
+#include "vtkCompositePolyDataMapper.h"
+#include "vtkRenderer.h"
+#include "vtkRenderWindow.h"
+#include "vtkRenderWindowInteractor.h"
+#include "vtkCylinderSource.h"
+#include "vtkMEDReader.h"
+#include "vtkDataObject.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkPolyDataNormals.h"
+
+#include "vtkTestUtilities.h"
+#include "vtkRegressionTestImage.h"
+
+int main(int argc, char *argv[])
+{
+  vtkMEDReader* reader = vtkMEDReader::New();
+  reader->SetFileName(argv[1]);
+  reader->Update();
+
+  vtkCompositePolyDataMapper *mapper = vtkCompositePolyDataMapper::New();
+  mapper->SetInputConnection(reader->GetOutputPort());
+
+  vtkActor *actor = vtkActor::New();
+  actor->SetMapper(mapper);
+
+  vtkRenderer *renderer = vtkRenderer::New();
+  renderer->AddActor(actor);
+  renderer->SetBackground(0.5, 0.5, 0.5);
+
+  vtkRenderWindow *renWin = vtkRenderWindow::New();
+  renWin->AddRenderer(renderer);
+
+  vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New();
+  interactor->SetRenderWindow(renWin);
+
+  renWin->SetSize(400,400);
+  renWin->Render();
+  interactor->Initialize();
+  renderer->ResetCamera();
+  renWin->Render();
+  renderer->ResetCamera();
+
+  int retVal = vtkRegressionTestImageThreshold(renWin,18);
+  if( retVal == vtkRegressionTester::DO_INTERACTOR)
+    {
+    interactor->Start();
+    }
+
+  reader->Delete();
+  mapper->Delete();
+  actor->Delete();
+  renderer->Delete();
+  renWin->Delete();
+  interactor->Delete();
+
+  return !retVal;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx
new file mode 100644 (file)
index 0000000..3a7a138
--- /dev/null
@@ -0,0 +1,149 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/*
+ * TestMedWriteOcta12.cxx
+ *
+ *  Created on: 17 mars 2011
+ *      Author: alejandro
+ */
+
+#include <med.h>
+#define MESGERR 1
+#include <med_utils.h>
+
+#include <string.h>
+
+int main (int argc, char **argv) {
+  med_idt fid;
+  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
+  const med_int spacedim = 3;
+  const med_int meshdim = 3;
+  /*                                         12345678901234561234567890123456 */
+  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
+  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
+  const med_int nnodes = 20;
+  const med_float coordinates[3 * 20] =
+          { 0.,   0.,   1.,
+            1.,   0.,   1.,
+            1.5,  1.,   1.,
+            1.,   2.,   1.,
+            0.,   2.,   1.,
+           -0.5,  1.,   1.,
+            0.,   0.,   0.,
+            1.,   0.,   0.,
+            1.5,  1.,   0.,
+            1.,   2.,   0.,
+            0.,   2.,   0.,
+           -0.5,  1.,   0.,
+            2.5,  1.,   1.,
+            3.,   2.,   1.,
+            2.5,  2.5,  1.,
+            1.5,  2.5,  1.,
+            2.5,  1.,   0.,
+            3.,   2.,   0.,
+            2.5,  2.5,  0.,
+            1.5,  2.5,  0.  };
+
+  const med_int nOcta = 2;
+  const med_int octa12Connectivity[12*2] =
+     { 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
+      13, 14, 15, 16,  4,  3, 17, 18, 19, 20, 10,  9 };
+
+  /* open MED file */
+  fid = MEDfileOpen("UsesCase_MEDmesh_19.med",
+        MED_ACC_CREAT);
+  if (fid < 0) {
+    MESSAGE("ERROR : file creation ...");
+    return -1;
+  }
+
+  /* write a comment in the file */
+  if (MEDfileCommentWr(fid,
+           "A 3D unstructured mesh : 2 Hexagonal Prisms") < 0) {
+    MESSAGE("ERROR : write file description ...");
+    return -1;
+  }
+
+  /* mesh creation : a 3D unstructured mesh */
+  if (MEDmeshCr(fid,
+    meshname,
+    spacedim,
+    meshdim,
+    MED_UNSTRUCTURED_MESH,
+    "A 3D mesh with 1 hexagonal in NODAL connectivity",
+    "",
+    MED_SORT_DTIT,
+    MED_CARTESIAN,
+    axisname,
+    unitname) < 0) {
+    MESSAGE("ERROR : mesh creation ...");
+    return -1;
+  }
+
+  /* nodes coordinates in a cartesian axis in full interlace mode
+     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
+  */
+  if (MEDmeshNodeCoordinateWr(fid,
+            meshname,
+            MED_NO_DT,
+            MED_NO_IT,
+            MED_UNDEF_DT,
+            MED_FULL_INTERLACE,
+            nnodes,
+            coordinates) < 0) {
+    MESSAGE("ERROR : nodes coordinates ...");
+    return -1;
+  }
+
+  // cells connectiviy is defined in nodal mode
+  if (MEDmeshElementConnectivityWr(fid,
+           meshname,
+           MED_NO_DT,
+           MED_NO_IT,
+           0.0,
+           MED_CELL,
+           MED_OCTA12,
+           MED_NODAL,
+           MED_FULL_INTERLACE,
+           nOcta,
+           octa12Connectivity) < 0) {
+    MESSAGE("ERROR : triangular cells connectivity ...");
+    return -1;
+  }
+
+  /* create family 0 : by default, all mesh entities family number is 0 */
+  if (MEDfamilyCr(fid,
+      meshname,
+      "",
+      0,
+      0,
+      "") < 0) {
+    MESSAGE("ERROR : quadrangular cells connectivity ...");
+    return -1;
+  }
+
+  /* close MED file */
+  if (MEDfileClose(fid)  < 0) {
+    MESSAGE("ERROR : close file ...");
+    return -1;
+  }
+
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/Testing/Cxx/TestReading0.cxx b/src/Plugins/MEDReader/IO/Testing/Cxx/TestReading0.cxx
new file mode 100644 (file)
index 0000000..1b951ac
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+int main(int argc, char *argv[])
+{
+  return 0;
+}
diff --git a/src/Plugins/MEDReader/IO/config.h.cmake b/src/Plugins/MEDReader/IO/config.h.cmake
new file mode 100644 (file)
index 0000000..1e22fe7
--- /dev/null
@@ -0,0 +1,25 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+ #ifndef __CONFIG_H__
+ #define __CONFIG_H__
+ #cmakedefine MedReader_BUILD_PARALLEL
+     
+ #endif // __CONFIG_H__
diff --git a/src/Plugins/MEDReader/IO/module.cmake b/src/Plugins/MEDReader/IO/module.cmake
new file mode 100644 (file)
index 0000000..645d5d4
--- /dev/null
@@ -0,0 +1,12 @@
+SET(VTK_LIBS vtkCommonExecutionModel vtkParallelCore)
+
+vtk_module(vtkMEDReader
+  DEPENDS
+    ${VTK_LIBS}
+  TEST_DEPENDS
+    vtkRenderingCore
+    vtkTestingRendering
+    vtkInteractionStyle
+    vtkRenderingFreeTypeOpenGL
+  EXCLUDE_FROM_WRAP_HIERARCHY
+)
diff --git a/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOFilter.cxx
new file mode 100644 (file)
index 0000000..535adb4
--- /dev/null
@@ -0,0 +1,128 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "vtkELNOFilter.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkObjectFactory.h"
+#include "vtkPolyDataAlgorithm.h"
+#include "vtkPolyData.h"
+#include "vtkIdTypeArray.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "vtkUnstructuredGrid.h"
+
+//vtkCxxRevisionMacro(vtkELNOFilter, "$Revision: 1.2.2.2 $");
+vtkStandardNewMacro(vtkELNOFilter);
+
+vtkELNOFilter::vtkELNOFilter()
+{
+  this->ShrinkFactor = 0.5;
+}
+
+vtkELNOFilter::~vtkELNOFilter()
+{
+}
+
+int vtkELNOFilter::RequestData(vtkInformation *request,
+    vtkInformationVector **input, vtkInformationVector *output)
+{
+  vtkUnstructuredGrid *usgIn = vtkUnstructuredGrid::SafeDownCast(
+      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkPolyData *pdOut = vtkPolyData::SafeDownCast(
+      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkDataArray* array = this->GetInputArrayToProcess(0, input);
+  vtkIdTypeArray* offsets = vtkIdTypeArray::SafeDownCast(
+      this->GetInputArrayToProcess(0, input));
+
+  if(usgIn == NULL || offsets == NULL || pdOut == NULL)
+    {
+    vtkDebugMacro("vtkELNOFilter no correctly configured : offsets = " << offsets);
+    return 1;
+    }
+
+  vtkInformation *info = offsets->GetInformation();
+  vtkInformationQuadratureSchemeDefinitionVectorKey *key =
+      vtkQuadratureSchemeDefinition::DICTIONARY();
+  if(!key->Has(info))
+    {
+    vtkDebugMacro("Dictionary is not present in array " << offsets->GetName() << " " << offsets << " Aborting." );
+    return 1;
+    }
+
+  int res = this->Superclass::RequestData(request, input, output);
+  if(res == 0)
+    {
+    return 0;
+    }
+
+  int dictSize = key->Size(info);
+  vtkQuadratureSchemeDefinition **dict =
+      new vtkQuadratureSchemeDefinition *[dictSize];
+  key->GetRange(info, dict, 0, 0, dictSize);
+
+  vtkIdType ncell = usgIn->GetNumberOfCells();
+  vtkPoints *points = pdOut->GetPoints();
+  vtkIdType start = 0;
+  for(vtkIdType cellId = 0; cellId < ncell; cellId++)
+    {
+    vtkIdType offset = offsets->GetValue(cellId);
+    int cellType = usgIn->GetCellType(cellId);
+    // a simple check to see if a scheme really exists for this cell type.
+    // should not happen if the cell type has not been modified.
+    if(dict[cellType] == NULL)
+      continue;
+    int np = dict[cellType]->GetNumberOfQuadraturePoints();
+    double center[3] = {0, 0, 0};
+    for(int id = start; id < start + np; id++)
+      {
+      double *position = points->GetPoint(id);
+      center[0] += position[0];
+      center[1] += position[1];
+      center[2] += position[2];
+      }
+    center[0] /= np;
+    center[1] /= np;
+    center[2] /= np;
+    for(int id = start; id < start + np; id++)
+      {
+      double *position = points->GetPoint(id);
+      double newpos[3];
+      newpos[0] = position[0] * this->ShrinkFactor + center[0] * (1
+          - this->ShrinkFactor);
+      newpos[1] = position[1] * this->ShrinkFactor + center[1] * (1
+          - this->ShrinkFactor);
+      newpos[2] = position[2] * this->ShrinkFactor + center[2] * (1
+          - this->ShrinkFactor);
+      points->SetPoint(id, newpos);
+      }
+    start += np;
+    }
+
+  return 1;
+}
+
+void vtkELNOFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+
+  os << indent << "ShrinkFactor : " << this->ShrinkFactor << endl;
+}
diff --git a/src/Plugins/MEDReader/IO/vtkELNOFilter.h b/src/Plugins/MEDReader/IO/vtkELNOFilter.h
new file mode 100644 (file)
index 0000000..54a5e75
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _vtkELNOFilter_h
+#define _vtkELNOFilter_h
+
+#include "vtkQuadraturePointsGenerator.h"
+
+class VTK_EXPORT vtkELNOFilter: public vtkQuadraturePointsGenerator
+{
+public:
+  static vtkELNOFilter *New();
+  vtkTypeMacro(vtkELNOFilter,vtkQuadraturePointsGenerator);
+  void PrintSelf(ostream& os, vtkIndent indent);
+
+  // Description :
+  // This is the factor applied to shrink the cell before extracting
+  // the ELNO points.
+  // A value of 0 shrinks the cells to their center, and a value of 1
+  // do not shrink the cell at all.
+  // default value 0.5
+  vtkSetMacro(ShrinkFactor,double);
+  vtkGetMacro(ShrinkFactor,double);
+
+protected:
+  vtkELNOFilter();
+  ~vtkELNOFilter();
+
+  int RequestData(vtkInformation *, vtkInformationVector **,
+      vtkInformationVector *);
+
+  double ShrinkFactor;
+
+private:
+  vtkELNOFilter(const vtkELNOFilter&);
+  void operator =(const vtkELNOFilter&);
+};
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx
new file mode 100644 (file)
index 0000000..c0bfddd
--- /dev/null
@@ -0,0 +1,186 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "vtkELNOMeshFilter.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkInformationIntegerKey.h"
+#include "vtkObjectFactory.h"
+#include "vtkPolyDataAlgorithm.h"
+#include "vtkPolyData.h"
+#include "vtkIdTypeArray.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+#include "vtkUnstructuredGrid.h"
+#include "vtkShrinkFilter.h"
+#include "vtkSmartPointer.h"
+#include "vtkPointData.h"
+#include "vtkCellData.h"
+#include "vtkIdList.h"
+#include "vtkCell.h"
+
+#include "MEDUtilities.hxx"
+
+#include <map>
+
+vtkStandardNewMacro(vtkELNOMeshFilter);
+
+vtkELNOMeshFilter::vtkELNOMeshFilter()
+{
+}
+
+vtkELNOMeshFilter::~vtkELNOMeshFilter()
+{
+}
+
+int vtkELNOMeshFilter::RequestData(vtkInformation *request,
+    vtkInformationVector **input, vtkInformationVector *output)
+{
+  vtkUnstructuredGrid *usgIn = vtkUnstructuredGrid::SafeDownCast(
+      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkUnstructuredGrid *usgOut = vtkUnstructuredGrid::SafeDownCast(
+      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  if(usgIn == NULL || usgOut == NULL)
+    {
+      vtkDebugMacro("vtkELNOMeshFilter not correctly configured : Invalid input or output !");
+      return 0;
+    }
+
+  // creates offsets array
+
+  // first shrink the input
+  vtkUnstructuredGrid* usgInClone = usgIn->NewInstance();
+  usgInClone->ShallowCopy(usgIn);
+  vtkSmartPointer<vtkShrinkFilter> shrink(vtkSmartPointer<vtkShrinkFilter>::New());
+  shrink->SetInputData(usgInClone);
+  shrink->SetShrinkFactor(0.9999);
+  shrink->Update();
+  vtkUnstructuredGrid *shrinked(shrink->GetOutput());
+  usgInClone->Delete();
+  usgOut->ShallowCopy(shrinked);
+  // OK for the output 
+
+  // now copy ELNO data. Start by verifying if it is possible to
+  // shallow copy the array.
+  vtkInformation *info(usgIn->GetInformation());
+  //
+  vtkIdType nVerts(shrinked->GetNumberOfPoints()),ncell(usgIn->GetNumberOfCells());
+  // first loop through all cells to check if a shallow copy is possible
+  bool shallowok(true);// Anthony : checks that shrink works well. Really necessary ?
+  vtkIdType previous(0),offset(0);
+  
+  for(vtkIdType cellId = 0; cellId < ncell; cellId++)
+    {
+      if(offset != previous)
+        {
+          shallowok = false;
+          break;
+        }
+      vtkCell *cell(usgIn->GetCell(cellId));
+      vtkIdType nbptsInCell(cell->GetNumberOfPoints());
+      previous = offset + nbptsInCell;
+      //
+      offset += nbptsInCell ;
+    }
+  //
+  if(shallowok)
+    shallowok = (previous == nVerts);
+  
+  vtkFieldData *fielddata(usgIn->GetFieldData());
+  for(int index = 0; index < fielddata->GetNumberOfArrays(); index++)
+    {
+      vtkDataArray *data(fielddata->GetArray(index));
+      vtkQuadratureSchemeDefinition **dict(0);
+      vtkInformationQuadratureSchemeDefinitionVectorKey *key(vtkQuadratureSchemeDefinition::DICTIONARY());
+      if(key->Has(data->GetInformation()))
+        {
+          int dictSize(key->Size(data->GetInformation()));
+          dict=new vtkQuadratureSchemeDefinition *[dictSize];
+          key->GetRange(data->GetInformation(),dict,0,0,dictSize);
+        }
+      if(data == NULL)
+        continue;
+      
+      vtkInformation *info(data->GetInformation());
+      const char *arrayOffsetName = info->Get(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME());
+
+      bool isELGA(false);
+
+      if(arrayOffsetName)
+        {
+          vtkFieldData *cellData(usgIn->GetCellData());
+          vtkDataArray *offData(cellData->GetArray(arrayOffsetName));
+          isELGA=offData->GetInformation()->Get(MEDUtilities::ELGA())==1;
+        }
+
+      if(arrayOffsetName == NULL || isELGA)
+        {
+          if(shallowok && data->GetNumberOfTuples()==nVerts )// Anthony : is it not a little confusing to assign a FieldData on Points because the number of tuples fits the number of nodes of shrinked mesh ?
+            usgOut->GetPointData()->AddArray(data);
+          else
+            shrinked->GetFieldData()->AddArray(data);
+          continue;
+        }
+      else
+        {
+          vtkDataArray* newArray = data->NewInstance();
+          newArray->SetName(data->GetName());
+          usgOut->GetPointData()->AddArray(newArray);
+          newArray->SetNumberOfComponents(data->GetNumberOfComponents());
+          newArray->SetNumberOfTuples(usgOut->GetNumberOfPoints());
+          newArray->CopyComponentNames(data);
+          newArray->Delete();
+          vtkIdList *ids(vtkIdList::New());
+          vtkIdType offset(0);
+          for(vtkIdType cellId = 0; cellId < ncell; cellId++)
+            {
+              int cellType = shrinked->GetCellType(cellId);
+              shrinked->GetCellPoints(cellId, ids);
+              for(int id = 0; id < dict[cellType]->GetNumberOfQuadraturePoints(); id++)
+                {
+                  const double * w = dict[cellType]->GetShapeFunctionWeights(id);
+                  int j;
+                  for(j = 0; j < dict[cellType]->GetNumberOfNodes(); j++)
+                    {
+                      if(w[j] == 1.0)
+                        break;
+                    }
+                  if(j == dict[cellType]->GetNumberOfNodes())
+                    {
+                      j = id;
+                    }
+                  newArray->SetTuple(ids->GetId(id), offset + j, data);
+                }
+              vtkCell *cell(usgIn->GetCell(cellId));
+              vtkIdType nbptsInCell(cell->GetNumberOfPoints());
+              offset+=nbptsInCell;
+            }
+          ids->FastDelete();
+        }
+      delete [] dict;
+    }
+  return 1;
+}
+
+void vtkELNOMeshFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h
new file mode 100644 (file)
index 0000000..611972e
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _vtkELNOMeshFilter_h
+#define _vtkELNOMeshFilter_h
+
+#include "vtkUnstructuredGridAlgorithm.h"
+
+class VTK_EXPORT vtkELNOMeshFilter: public vtkUnstructuredGridAlgorithm
+{
+public:
+  static vtkELNOMeshFilter *New();
+  vtkTypeMacro(vtkELNOMeshFilter,vtkUnstructuredGridAlgorithm);
+  void PrintSelf(ostream& os, vtkIndent indent);
+
+protected:
+  vtkELNOMeshFilter();
+  ~vtkELNOMeshFilter();
+
+  int RequestData(vtkInformation *, vtkInformationVector **,
+      vtkInformationVector *);
+
+private:
+  vtkELNOMeshFilter(const vtkELNOMeshFilter&);
+  void operator =(const vtkELNOMeshFilter&);
+};
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.cxx
new file mode 100644 (file)
index 0000000..31fdbce
--- /dev/null
@@ -0,0 +1,223 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "vtkELNOSurfaceFilter.h"
+#include "vtkInformation.h"
+#include "vtkInformationVector.h"
+#include "vtkObjectFactory.h"
+#include "vtkPolyDataAlgorithm.h"
+#include "vtkPolyData.h"
+#include "vtkIdTypeArray.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "vtkUnstructuredGrid.h"
+#include "vtkPVGeometryFilter.h"
+#include "vtkShrinkFilter.h"
+#include "vtkSmartPointer.h"
+#include "vtkPointData.h"
+#include "vtkCellData.h"
+#include "vtkIdList.h"
+
+//vtkCxxRevisionMacro(vtkELNOSurfaceFilter, "$Revision$")
+//;
+vtkStandardNewMacro(vtkELNOSurfaceFilter)
+;
+
+vtkELNOSurfaceFilter::vtkELNOSurfaceFilter()
+{
+}
+
+vtkELNOSurfaceFilter::~vtkELNOSurfaceFilter()
+{
+}
+
+int vtkELNOSurfaceFilter::RequestData(vtkInformation *request,
+    vtkInformationVector **input, vtkInformationVector *output)
+{
+  vtkUnstructuredGrid *usgIn=vtkUnstructuredGrid::SafeDownCast(
+      input[0]->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkUnstructuredGrid *usgOut=vtkUnstructuredGrid::SafeDownCast(
+      output->GetInformationObject(0)->Get(vtkDataObject::DATA_OBJECT()));
+
+  vtkIdTypeArray* usg_offsets=vtkIdTypeArray::SafeDownCast(
+      this->GetInputArrayToProcess(0, input));
+
+  if(usgIn==NULL||usg_offsets==NULL||usgOut==NULL)
+    {
+    vtkDebugMacro("vtkELNOSurfaceFilter no correctly configured : offsets = " << usg_offsets);
+    return 1;
+    }
+
+  // first shrink the input
+  vtkUnstructuredGrid* usgInClone=usgIn->NewInstance();
+
+  usgInClone->ShallowCopy(usgIn);
+
+  vtkSmartPointer<vtkPVGeometryFilter> geomFilter=vtkSmartPointer<
+      vtkPVGeometryFilter>::New();
+  geomFilter->SetInputData(usgInClone);
+  geomFilter->SetPassThroughCellIds(1);
+  geomFilter->SetPassThroughPointIds(1);
+  geomFilter->SetUseOutline(0);
+  geomFilter->Update();
+
+  vtkPolyData* surface=vtkPolyData::SafeDownCast(geomFilter->GetOutput());
+  vtkIdTypeArray* originalCellIds=vtkIdTypeArray::SafeDownCast(
+      surface->GetCellData()->GetArray("vtkOriginalCellIds"));
+  vtkIdTypeArray* originalPointIds=vtkIdTypeArray::SafeDownCast(
+      surface->GetPointData()->GetArray("vtkOriginalPointIds"));
+
+  if( originalCellIds == NULL )
+  {
+    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalCellIds' array");
+    return 0;
+  }
+
+  if(originalPointIds==NULL)
+  {
+    vtkErrorMacro("vtkPVGeometryFilter return NULL 'vtkOriginalPointIds' array");
+    return 0;
+  }
+
+  vtkSmartPointer<vtkShrinkFilter> shrink=
+      vtkSmartPointer<vtkShrinkFilter>::New();
+  shrink->SetInputConnection(geomFilter->GetOutputPort(0));
+  shrink->SetShrinkFactor(0.9999);
+  shrink->Update();
+
+  vtkUnstructuredGrid* shrinked=shrink->GetOutput();
+
+  usgInClone->Delete();
+
+  usgOut->ShallowCopy(shrinked);
+
+  vtkIdTypeArray* offsets=vtkIdTypeArray::SafeDownCast(
+      shrinked->GetCellData()->GetArray(usg_offsets->GetName()));
+
+  // now copy ELNO data. Start by verifying if it is possible to
+  // shallow copy the array.
+  vtkInformation *info=offsets->GetInformation();
+  vtkInformationQuadratureSchemeDefinitionVectorKey *key=
+      vtkQuadratureSchemeDefinition::DICTIONARY();
+  if(!key->Has(info))
+    {
+    vtkDebugMacro("Dictionary is not present in array " << offsets->GetName()
+                  << " " << offsets << " Aborting." );
+    return 0;
+    }
+  int dictSize=key->Size(info);
+  vtkQuadratureSchemeDefinition **dict=
+      new vtkQuadratureSchemeDefinition *[dictSize];
+  key->GetRange(info, dict, 0, 0, dictSize);
+
+  vtkIdType ncell=shrinked->GetNumberOfCells();
+
+  vtkFieldData* fielddata=usgIn->GetFieldData();
+  vtkIdList *ids=vtkIdList::New();
+  vtkIdList *surfaceIds=vtkIdList::New();
+  vtkIdList *originalIds=vtkIdList::New();
+  for(int index=0; index<fielddata->GetNumberOfArrays(); index++)
+    {
+    vtkDataArray* data=fielddata->GetArray(index);
+    if(data==NULL)
+      continue;
+
+    vtkInformation* info=data->GetInformation();
+    const char* arrayOffsetName=info->Get(
+        vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME());
+
+    if(arrayOffsetName == NULL ||
+       strcmp(arrayOffsetName, offsets->GetName())!=0)
+      {
+      usgOut->GetFieldData()->AddArray(data);
+
+      continue;
+      }
+
+    vtkDataArray* newArray=data->NewInstance();
+    newArray->SetName(data->GetName());
+    usgOut->GetPointData()->AddArray(newArray);
+    newArray->SetNumberOfComponents(data->GetNumberOfComponents());
+    newArray->SetNumberOfTuples(usgOut->GetNumberOfPoints());
+    newArray->CopyComponentNames(data);
+    newArray->Delete();
+
+    for(vtkIdType cellId=0; cellId<ncell; cellId++)
+      {
+      vtkIdType offset=offsets->GetValue(cellId);
+
+      vtkIdType originalCellId=originalCellIds->GetValue(cellId);
+      int originalCellType=usgIn->GetCellType(originalCellId);
+
+      shrinked->GetCellPoints(cellId, ids);
+      surface->GetCellPoints(cellId, surfaceIds);
+
+      for(int id=0; id<ids->GetNumberOfIds(); id++)
+        {
+        vtkIdType surfaceId=surfaceIds->GetId(id);
+        vtkIdType shrinkedId=ids->GetId(id);
+        vtkIdType originalPointId = originalPointIds->GetValue(surfaceId);
+
+        usgIn->GetCellPoints(originalCellId, originalIds);
+        int originalLocalId=-1;
+        for(int li=0; li<originalIds->GetNumberOfIds(); li++)
+          {
+          if(originalPointId==originalIds->GetId(li))
+            {
+            originalLocalId=li;
+            break;
+            }
+          }
+        if(originalLocalId==-1)
+          {
+          originalLocalId=0;
+          vtkErrorMacro("cannot find original id");
+          }
+
+        const double * w=dict[originalCellType]->GetShapeFunctionWeights(
+            originalLocalId);
+        int j;
+        for(j=0; j<dict[originalCellType]->GetNumberOfNodes(); j++)
+          {
+          if(w[j]==1.0)
+            break;
+          }
+        if(j==dict[originalCellType]->GetNumberOfNodes())
+          {
+            //vtkErrorMacro("cannot find elno weigth.");
+          j=id;
+          }
+        newArray->SetTuple(shrinkedId, offset+j, data);
+        }
+      }
+    }
+
+  ids->FastDelete();
+  surfaceIds->FastDelete();
+  originalIds->FastDelete();
+  delete[] dict;
+
+  return 1;
+}
+
+void vtkELNOSurfaceFilter::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
diff --git a/src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.h b/src/Plugins/MEDReader/IO/vtkELNOSurfaceFilter.h
new file mode 100644 (file)
index 0000000..add03c9
--- /dev/null
@@ -0,0 +1,43 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef _vtkELNOSurfaceFilter_h
+#define _vtkELNOSurfaceFilter_h
+
+#include "vtkUnstructuredGridAlgorithm.h"
+
+class VTK_EXPORT vtkELNOSurfaceFilter: public vtkUnstructuredGridAlgorithm
+{
+public:
+  static vtkELNOSurfaceFilter *New();
+  vtkTypeMacro(vtkELNOSurfaceFilter,vtkUnstructuredGridAlgorithm);
+  void PrintSelf(ostream& os, vtkIndent indent);
+
+protected:
+  vtkELNOSurfaceFilter();
+  ~vtkELNOSurfaceFilter();
+
+  int RequestData(vtkInformation *, vtkInformationVector **,
+      vtkInformationVector *);
+
+private:
+  vtkELNOSurfaceFilter(const vtkELNOSurfaceFilter&);
+  void operator =(const vtkELNOSurfaceFilter&);
+};
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx b/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx
new file mode 100644 (file)
index 0000000..ff5fde3
--- /dev/null
@@ -0,0 +1,463 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "vtkExtractCellType.h"
+#include "MEDFileFieldRepresentationTree.hxx"
+#include "MEDFileFieldOverView.hxx"
+
+#include "vtkAdjacentVertexIterator.h"
+#include "vtkIntArray.h"
+#include "vtkCellData.h"
+#include "vtkPointData.h"
+
+#include "vtkStreamingDemandDrivenPipeline.h"
+#include "vtkUnstructuredGrid.h"
+#include  "vtkMultiBlockDataSet.h"
+
+#include "vtkInformationStringKey.h"
+#include "vtkAlgorithmOutput.h"
+#include "vtkObjectFactory.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkMultiBlockDataSet.h"
+#include "vtkDataSet.h"
+#include "vtkInformationVector.h"
+#include "vtkInformation.h"
+#include "vtkDataArraySelection.h"
+#include "vtkTimeStamp.h"
+#include "vtkInEdgeIterator.h"
+#include "vtkInformationDataObjectKey.h"
+#include "vtkExecutive.h"
+#include "vtkVariantArray.h"
+#include "vtkStringArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkCharArray.h"
+#include "vtkUnsignedCharArray.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkDemandDrivenPipeline.h"
+#include "vtkDataObjectTreeIterator.h"
+#include "vtkThreshold.h"
+
+#include <map>
+#include <deque>
+
+vtkStandardNewMacro(vtkExtractCellType);
+
+vtkCxxSetObjectMacro(vtkExtractCellType, SIL, vtkMutableDirectedGraph);
+
+///////////////////
+
+class ExtractCellTypeStatus
+{
+public:
+  ExtractCellTypeStatus():_status(false),_vtkt(-1),_mct(INTERP_KERNEL::NORM_ERROR) { }
+  ExtractCellTypeStatus(int vtkt, INTERP_KERNEL::NormalizedCellType mct);
+  bool isSame(int vtkt, INTERP_KERNEL::NormalizedCellType mct) const { return _vtkt==vtkt && _mct==mct; }
+  bool getStatus() const { return _status; }
+  void setStatus(bool status) const { _status=status; }
+  void cpyStatusFrom(const ExtractCellTypeStatus& other) { _status=other._status; }
+  std::string getKey() const { return _type_str; }
+  const char *getKeyOfEntry() const { return _type_str.c_str(); }
+  int getVTKCellType() const { return _vtkt; }
+  void printMySelf(std::ostream& os) const;
+  bool isSameAs(const ExtractCellTypeStatus& other) const;
+  void feedSIL(vtkMutableDirectedGraph *sil, vtkIdType root, vtkVariantArray *childEdge, std::vector<std::string>& names) const;
+protected:
+  mutable bool _status;
+  int _vtkt;
+  INTERP_KERNEL::NormalizedCellType _mct;
+  std::string _type_str;
+};
+
+class vtkExtractCellType::vtkExtractCellTypeInternal
+{
+public:
+  vtkExtractCellTypeInternal():_ref_mtime(0) { }
+  int getNumberOfEntries() const;
+  const char *getKeyOfEntry(int i) const;
+  bool getStatusOfEntryStr(const char *entry) const;
+  void setStatusOfEntryStr(const char *entry, bool status) const;
+  void feedSIL(vtkMutableDirectedGraph *sil) const;
+  std::vector<int> getIdsToKeep() const;
+  void printMySelf(std::ostream& os) const;
+  bool setRefTime(vtkObject *input) const;
+  // non const methods
+  void loadFrom(const std::map<int,INTERP_KERNEL::NormalizedCellType>& m);
+private:
+  const ExtractCellTypeStatus& getEntry(const char *entry) const;
+  bool checkSame(const std::map<int,INTERP_KERNEL::NormalizedCellType>& m) const;
+private:
+  std::vector<ExtractCellTypeStatus> _types;
+  mutable unsigned long _ref_mtime;
+};
+
+bool vtkExtractCellType::vtkExtractCellTypeInternal::setRefTime(vtkObject *input) const
+{
+  unsigned long mtime(input->GetMTime());
+  if(mtime>_ref_mtime)
+    {
+      _ref_mtime=mtime;
+      return true;
+    }
+  else
+    return false;
+}
+
+std::vector<int> vtkExtractCellType::vtkExtractCellTypeInternal::getIdsToKeep() const
+{
+  std::vector<int> ret;
+  for(std::vector<ExtractCellTypeStatus>::const_iterator it=_types.begin();it!=_types.end();it++)
+    {
+      if((*it).getStatus())
+        ret.push_back((*it).getVTKCellType());
+    }
+  return ret;
+}
+
+void vtkExtractCellType::vtkExtractCellTypeInternal::feedSIL(vtkMutableDirectedGraph *sil) const
+{
+  vtkSmartPointer<vtkVariantArray> childEdge(vtkSmartPointer<vtkVariantArray>::New());
+  childEdge->InsertNextValue(0);
+  vtkSmartPointer<vtkVariantArray> crossEdge(vtkSmartPointer<vtkVariantArray>::New());
+  crossEdge->InsertNextValue(1);
+  // CrossEdge is an edge linking hierarchies.
+  vtkUnsignedCharArray* crossEdgesArray=vtkUnsignedCharArray::New();
+  crossEdgesArray->SetName("CrossEdges");
+  sil->GetEdgeData()->AddArray(crossEdgesArray);
+  crossEdgesArray->Delete();
+  std::vector<std::string> names;
+  // Add global fields root
+  vtkIdType root(sil->AddVertex());
+  names.push_back("CellTypesTree");
+  //
+  for(std::vector<ExtractCellTypeStatus>::const_iterator it=_types.begin();it!=_types.end();it++)
+    {
+      (*it).feedSIL(sil,root,childEdge,names);
+    }
+  // This array is used to assign names to nodes.
+  vtkStringArray *namesArray(vtkStringArray::New());
+  namesArray->SetName("Names");
+  namesArray->SetNumberOfTuples(sil->GetNumberOfVertices());
+  sil->GetVertexData()->AddArray(namesArray);
+  namesArray->Delete();
+  std::vector<std::string>::const_iterator iter;
+  vtkIdType cc;
+  for(cc=0, iter=names.begin(); iter!=names.end(); ++iter, ++cc)
+    namesArray->SetValue(cc,(*iter).c_str());
+}
+
+void vtkExtractCellType::vtkExtractCellTypeInternal::loadFrom(const std::map<int,INTERP_KERNEL::NormalizedCellType>& m)
+{
+  if(checkSame(m))
+    return;
+  //
+  std::size_t sz(m.size()),ii(0);
+  _types.resize(sz);
+  for(std::map<int,INTERP_KERNEL::NormalizedCellType>::const_iterator it=m.begin();it!=m.end();it++,ii++)
+    {
+      ExtractCellTypeStatus elt((*it).first,(*it).second);
+      _types[ii]=elt;
+    }
+}
+
+int vtkExtractCellType::vtkExtractCellTypeInternal::getNumberOfEntries() const
+{
+  return (int) _types.size();
+}
+
+const char *vtkExtractCellType::vtkExtractCellTypeInternal::getKeyOfEntry(int i) const
+{
+  return _types[i].getKeyOfEntry();
+}
+
+bool vtkExtractCellType::vtkExtractCellTypeInternal::checkSame(const std::map<int,INTERP_KERNEL::NormalizedCellType>& m) const
+{
+  std::size_t sz(m.size());
+  if(sz!=_types.size())
+    return false;
+  bool ret(true);
+  std::map<int,INTERP_KERNEL::NormalizedCellType>::const_iterator it(m.begin());
+  for(std::size_t i=0;i<sz && ret;i++,it++)
+    ret=_types[i].isSame((*it).first,(*it).second);
+  return ret;
+}
+
+const ExtractCellTypeStatus& vtkExtractCellType::vtkExtractCellTypeInternal::getEntry(const char *entry) const
+{
+  std::string entryCpp(entry);
+  for(std::vector<ExtractCellTypeStatus>::const_iterator it0=_types.begin();it0!=_types.end();it0++)
+    if(entryCpp==(*it0).getKey())
+      return *it0;
+  std::ostringstream oss; oss << "vtkExtractCellTypeInternal::getEntry : no such entry \"" << entry << "\"!";
+  throw INTERP_KERNEL::Exception(oss.str().c_str());
+}
+
+bool vtkExtractCellType::vtkExtractCellTypeInternal::getStatusOfEntryStr(const char *entry) const
+{
+  const ExtractCellTypeStatus& elt(getEntry(entry));
+  return elt.getStatus();
+}
+
+void vtkExtractCellType::vtkExtractCellTypeInternal::setStatusOfEntryStr(const char *entry, bool status) const
+{
+  const ExtractCellTypeStatus& elt(getEntry(entry));
+  elt.setStatus(status);
+}
+
+void vtkExtractCellType::vtkExtractCellTypeInternal::printMySelf(std::ostream& os) const
+{
+  for(std::vector<ExtractCellTypeStatus>::const_iterator it0=_types.begin();it0!=_types.end();it0++)
+    (*it0).printMySelf(os);
+}
+
+ExtractCellTypeStatus::ExtractCellTypeStatus(int vtkt, INTERP_KERNEL::NormalizedCellType mct):_status(false),_vtkt(vtkt),_mct(mct)
+{
+  std::string name(INTERP_KERNEL::CellModel::GetCellModel(mct).getRepr());
+  _type_str=name.substr(5);//skip "NORM_"
+}
+
+void ExtractCellTypeStatus::printMySelf(std::ostream& os) const
+{
+  os << "      -" << _type_str << "(";
+  if(_status)
+    os << "X";
+  else
+    os << " ";
+  os << ")" << std::endl;
+}
+
+bool ExtractCellTypeStatus::isSameAs(const ExtractCellTypeStatus& other) const
+{
+  return _vtkt==other._vtkt && _mct==other._mct;
+}
+
+void ExtractCellTypeStatus::feedSIL(vtkMutableDirectedGraph *sil, vtkIdType root, vtkVariantArray *childEdge, std::vector<std::string>& names) const
+{
+  vtkIdType InfoGeoType(sil->AddChild(root,childEdge));
+  names.push_back(_type_str);
+  vtkIdType InfoVTKID(sil->AddChild(InfoGeoType,childEdge));
+  std::ostringstream oss; oss << _vtkt;
+  names.push_back(oss.str());
+}
+
+////////////////////
+
+vtkExtractCellType::vtkExtractCellType():SIL(NULL),Internal(new vtkExtractCellTypeInternal),InsideOut(0)
+{
+}
+
+vtkExtractCellType::~vtkExtractCellType()
+{
+  delete this->Internal;
+}
+
+void vtkExtractCellType::SetInsideOut(int val)
+{
+  if(this->InsideOut!=val)
+    {
+      this->InsideOut=val;
+      this->Modified();
+    }
+}
+
+int vtkExtractCellType::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  try
+    {
+      //std::cerr << "########################################## vtkExtractCellType::RequestInformation ##########################################" << std::endl;
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      vtkInformation *inputInfo(inputVector[0]->GetInformationObject(0));
+      vtkDataSet *input(0);
+      {
+       vtkDataObject *inp(inputInfo->Get(vtkDataObject::DATA_OBJECT()));
+       if(vtkDataSet::SafeDownCast(inp))
+         input=vtkDataSet::SafeDownCast(inp);
+       else
+         {
+           vtkMultiBlockDataSet *inputTmp(vtkMultiBlockDataSet::SafeDownCast(inp));
+           if(inputTmp)
+             {
+               if(inputTmp->GetNumberOfBlocks()!=1)
+                 {
+                   vtkDebugMacro("vtkExtractCellType::RequestInformation : input vtkMultiBlockDataSet must contain exactly 1 block !");
+                   return 0;
+                 }
+               vtkDataSet *blk0(vtkDataSet::SafeDownCast(inputTmp->GetBlock(0)));
+               if(!blk0)
+                 {
+                   vtkDebugMacro("vtkExtractCellType::RequestInformation : the single block in input vtkMultiBlockDataSet must be a vtkDataSet instance !");
+                   return 0;
+                 }
+               input=blk0;
+             }
+           else
+             {
+               vtkDebugMacro("vtkExtractCellType::RequestInformation : supported input are vtkDataSet or vtkMultiBlockDataSet !");
+               return 0;
+             }
+         }
+      }
+      if(this->Internal->setRefTime(input))
+       {
+         vtkIdType nbOfCells(input->GetNumberOfCells());
+         std::map<int,INTERP_KERNEL::NormalizedCellType> m;
+         for(vtkIdType cellId=0;cellId<nbOfCells;cellId++)
+           {
+             int vtkCt(input->GetCellType(cellId));
+             const std::map<int,INTERP_KERNEL::NormalizedCellType>::const_iterator it(m.find(vtkCt));
+             if(it==m.end())
+               {
+                 const unsigned char *pos(std::find(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,vtkCt));
+                 if(pos==ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH)
+                   {
+                     vtkDebugMacro("vtkExtractCellType::RequestInformation : cell #" << cellId << " has unrecognized type !");
+                     return 0;
+                   }
+                 m[vtkCt]=(INTERP_KERNEL::NormalizedCellType)std::distance(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos);
+            }
+           }
+         this->Internal->loadFrom(m);
+         if(this->SIL)
+           this->SIL->Delete();
+         this->SIL=vtkMutableDirectedGraph::New();
+         this->Internal->feedSIL(this->SIL);
+         //
+         outInfo->Set(vtkDataObject::SIL(),this->SIL);
+       }
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkExtractCellType::RequestInformation : " << e.what() << std::endl;
+      return 0;
+    }
+  return 1;
+}
+
+vtkDataSet *FilterFamilies(vtkDataSet *input, const std::vector<int>& idsToKeep, bool insideOut)
+{
+  static const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
+  static const char ZE_SELECTION_ARR_NAME[]="@@ZeSelection@@";
+  vtkDataSet *output(input->NewInstance());
+  output->ShallowCopy(input);
+  vtkSmartPointer<vtkThreshold> thres(vtkSmartPointer<vtkThreshold>::New());
+  thres->SetInputData(output);
+  vtkDataSetAttributes *dscIn(input->GetCellData()),*dscIn2(input->GetPointData());
+  vtkDataSetAttributes *dscOut(output->GetCellData()),*dscOut2(output->GetPointData());
+  //
+  double vMin(insideOut==0?1.:0.),vMax(insideOut==0?2.:1.);
+  thres->ThresholdBetween(vMin,vMax);
+  // OK for the output 
+  vtkIdType nbOfCells(input->GetNumberOfCells());
+  vtkCharArray *zeSelection(vtkCharArray::New());
+  zeSelection->SetName(ZE_SELECTION_ARR_NAME);
+  zeSelection->SetNumberOfComponents(1);
+  char *pt(new char[nbOfCells]);
+  zeSelection->SetArray(pt,nbOfCells,0,VTK_DATA_ARRAY_DELETE);
+  std::fill(pt,pt+nbOfCells,0);
+  std::vector<bool> pt2(nbOfCells,false);
+  for(std::vector<int>::const_iterator it=idsToKeep.begin();it!=idsToKeep.end();it++)
+    {
+      for(vtkIdType ii=0;ii<nbOfCells;ii++)
+        {
+          if(input->GetCellType(ii)==*it)
+            pt2[ii]=true;
+        }
+    }
+  for(int ii=0;ii<nbOfCells;ii++)
+    if(pt2[ii])
+      pt[ii]=2;
+  int idx(output->GetCellData()->AddArray(zeSelection));
+  output->GetCellData()->SetActiveAttribute(idx,vtkDataSetAttributes::SCALARS);
+  output->GetCellData()->CopyScalarsOff();
+  zeSelection->Delete();
+  //
+  thres->SetInputArrayToProcess(idx,0,0,"vtkDataObject::FIELD_ASSOCIATION_CELLS",ZE_SELECTION_ARR_NAME);
+  thres->Update();
+  vtkUnstructuredGrid *zeComputedOutput(thres->GetOutput());
+  zeComputedOutput->GetCellData()->RemoveArray(idx);
+  output->Delete();
+  zeComputedOutput->Register(0);
+  return zeComputedOutput;
+}
+
+int vtkExtractCellType::RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  try
+    {
+      //std::cerr << "########################################## vtkExtractCellType::RequestData        ##########################################" << std::endl;
+      vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
+      vtkDataSet *input(vtkDataSet::SafeDownCast(inputInfo->Get(vtkDataObject::DATA_OBJECT())));
+      vtkInformation *info(input->GetInformation());
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      vtkDataSet *output(vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())));
+      std::vector<int> idsToKeep(this->Internal->getIdsToKeep());
+      vtkDataSet *tryOnCell(FilterFamilies(input,idsToKeep,this->InsideOut));
+      // first shrink the input
+      output->ShallowCopy(tryOnCell);
+      tryOnCell->Delete();
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkExtractCellType::RequestData : " << e.what() << std::endl;
+      return 0;
+    }
+  return 1;
+}
+
+int vtkExtractCellType::GetSILUpdateStamp()
+{
+  return this->SILTime;
+}
+
+void vtkExtractCellType::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
+
+int vtkExtractCellType::GetNumberOfGeoTypesArrays()
+{
+  int ret(this->Internal->getNumberOfEntries());
+  //std::cerr << "vtkExtractCellType::GetNumberOfGeoTypesArrays() -> " << ret << std::endl;
+  return ret;
+}
+
+const char *vtkExtractCellType::GetGeoTypesArrayName(int index)
+{
+  const char *ret(this->Internal->getKeyOfEntry(index));
+  //std::cerr << "vtkExtractCellType::GetGeoTypesArrayName(" << index << ") -> " << ret << std::endl;
+  return ret;
+}
+
+int vtkExtractCellType::GetGeoTypesArrayStatus(const char *name)
+{
+  int ret((int)this->Internal->getStatusOfEntryStr(name));
+  //std::cerr << "vtkExtractCellType::GetGeoTypesArrayStatus(" << name << ") -> " << ret << std::endl;
+  return ret;
+}
+
+void vtkExtractCellType::SetGeoTypesStatus(const char *name, int status)
+{
+  //std::cerr << "vtkExtractCellType::SetGeoTypesStatus(" << name << "," << status << ")" << std::endl;
+  this->Internal->setStatusOfEntryStr(name,(bool)status);
+  if(std::string(name)==GetGeoTypesArrayName(GetNumberOfGeoTypesArrays()-1))
+    {
+      this->Modified();
+      //this->Internal->printMySelf(std::cerr);
+    }
+}
diff --git a/src/Plugins/MEDReader/IO/vtkExtractCellType.h b/src/Plugins/MEDReader/IO/vtkExtractCellType.h
new file mode 100644 (file)
index 0000000..f4fb8a0
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef vtkExtractCellType_h__
+#define vtkExtractCellType_h__
+
+#include "vtkDataSetAlgorithm.h"
+
+class vtkMutableDirectedGraph;
+
+class VTK_EXPORT vtkExtractCellType : public vtkDataSetAlgorithm
+{
+public:
+  static vtkExtractCellType* New();
+  vtkTypeMacro(vtkExtractCellType, vtkDataSetAlgorithm)
+  void PrintSelf(ostream& os, vtkIndent indent);
+  virtual int GetNumberOfGeoTypesArrays();
+  const char *GetGeoTypesArrayName(int index);
+  int GetGeoTypesArrayStatus(const char *name);
+  virtual void SetGeoTypesStatus(const char *name, int status);
+  void SetInsideOut(int val);
+  // Description:
+  // Every time the SIL is updated a this will return a different value.
+  virtual int GetSILUpdateStamp();
+
+protected:
+  vtkExtractCellType();
+  ~vtkExtractCellType();
+
+  int RequestInformation(vtkInformation *request,
+      vtkInformationVector **inputVector, vtkInformationVector *outputVector);
+
+  int RequestData(vtkInformation *request, vtkInformationVector **inputVector,
+      vtkInformationVector *outputVector);
+  // Description:
+  // This SIL stores the structure of the mesh/groups/cell types
+  // that can be selected.
+  virtual void SetSIL(vtkMutableDirectedGraph*);
+  vtkGetObjectMacro(SIL, vtkMutableDirectedGraph);
+protected:
+  vtkMutableDirectedGraph *SIL;
+  vtkTimeStamp SILTime;
+private:
+  vtkExtractCellType(const vtkExtractCellType&);
+  void operator=(const vtkExtractCellType&); // Not implemented.
+ private:
+  //BTX
+  //ETX
+  class vtkExtractCellTypeInternal;
+  vtkExtractCellTypeInternal *Internal;
+  int InsideOut;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx
new file mode 100644 (file)
index 0000000..c2d3b15
--- /dev/null
@@ -0,0 +1,673 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "vtkExtractGroup.h"
+#include "MEDFileFieldRepresentationTree.hxx"
+
+#include "vtkAdjacentVertexIterator.h"
+#include "vtkIntArray.h"
+#include "vtkCellData.h"
+#include "vtkPointData.h"
+
+#include "vtkStreamingDemandDrivenPipeline.h"
+#include "vtkUnstructuredGrid.h"
+#include  "vtkMultiBlockDataSet.h"
+
+#include "vtkInformationStringKey.h"
+#include "vtkAlgorithmOutput.h"
+#include "vtkObjectFactory.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkMultiBlockDataSet.h"
+#include "vtkDataSet.h"
+#include "vtkInformationVector.h"
+#include "vtkInformation.h"
+#include "vtkDataArraySelection.h"
+#include "vtkTimeStamp.h"
+#include "vtkInEdgeIterator.h"
+#include "vtkInformationDataObjectKey.h"
+#include "vtkExecutive.h"
+#include "vtkVariantArray.h"
+#include "vtkStringArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkCharArray.h"
+#include "vtkUnsignedCharArray.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkDemandDrivenPipeline.h"
+#include "vtkDataObjectTreeIterator.h"
+#include "vtkThreshold.h"
+
+#include <map>
+#include <deque>
+
+vtkStandardNewMacro(vtkExtractGroup);
+
+vtkCxxSetObjectMacro(vtkExtractGroup, SIL, vtkMutableDirectedGraph);
+
+///////////////////
+
+class ExtractGroupStatus
+{
+public:
+  ExtractGroupStatus():_status(false) { }
+  ExtractGroupStatus(const char *name);
+  bool getStatus() const { return _status; }
+  void setStatus(bool status) { _status=status; }
+  void cpyStatusFrom(const ExtractGroupStatus& other) { _status=other._status; }
+  std::string getName() const { return _name; }
+  const char *getKeyOfEntry() const { return _ze_key_name.c_str(); }
+  virtual void printMySelf(std::ostream& os) const;
+  virtual bool isSameAs(const ExtractGroupStatus& other) const;
+protected:
+bool _status;
+std::string _name;
+std::string _ze_key_name;
+};
+
+class ExtractGroupGrp : public ExtractGroupStatus
+{
+public:
+  ExtractGroupGrp(const char *name):ExtractGroupStatus(name) { std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); }
+  void setFamilies(const std::vector<std::string>& fams) { _fams=fams; }
+  const std::vector<std::string>& getFamiliesLyingOn() const { return _fams; }
+  bool isSameAs(const ExtractGroupGrp& other) const;
+public:
+  static const char START[];
+  std::vector<std::string> _fams;
+};
+
+class ExtractGroupFam : public ExtractGroupStatus
+{
+public:
+  ExtractGroupFam(const char *name);
+  void printMySelf(std::ostream& os) const;
+  void fillIdsToKeep(std::set<int>& s) const;
+  int getId() const { return _id; }
+  bool isSameAs(const ExtractGroupFam& other) const;
+public:
+  static const char START[];
+private:
+  int _id;
+};
+
+class vtkExtractGroup::vtkExtractGroupInternal
+{
+public:
+  void loadFrom(vtkMutableDirectedGraph *sil);
+  int getNumberOfEntries() const;
+  const char *getKeyOfEntry(int i) const;
+  bool getStatusOfEntryStr(const char *entry) const;
+  void setStatusOfEntryStr(const char *entry, bool status);
+  void printMySelf(std::ostream& os) const;
+  std::set<int> getIdsToKeep() const;
+  int getIdOfFamily(const std::string& famName) const;
+  static bool IsInformationOK(vtkInformation *info);
+private:
+  std::map<std::string,int> computeFamStrIdMap() const;
+  const ExtractGroupStatus& getEntry(const char *entry) const;
+  ExtractGroupStatus& getEntry(const char *entry);
+private:
+  std::vector<ExtractGroupGrp> _groups;
+  std::vector<ExtractGroupFam> _fams;
+};
+
+const char ExtractGroupGrp::START[]="GRP_";
+
+const char ExtractGroupFam::START[]="FAM_";
+
+ExtractGroupStatus::ExtractGroupStatus(const char *name):_status(false),_name(name)
+{
+}
+
+void ExtractGroupStatus::printMySelf(std::ostream& os) const
+{
+  os << "      -" << _ze_key_name << "(";
+  if(_status)
+    os << "X";
+  else
+    os << " ";
+  os << ")" << std::endl;
+}
+
+bool ExtractGroupStatus::isSameAs(const ExtractGroupStatus& other) const
+{
+  return _name==other._name && _ze_key_name==other._ze_key_name;
+}
+
+bool ExtractGroupGrp::isSameAs(const ExtractGroupGrp& other) const
+{
+  bool ret(ExtractGroupStatus::isSameAs(other));
+  if(ret)
+    return _fams==other._fams;
+  else
+    return false;
+}
+
+bool vtkExtractGroup::vtkExtractGroupInternal::IsInformationOK(vtkInformation *info)
+{
+  if(!info->Has(vtkDataObject::SIL()))
+    return false;
+  vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::SafeDownCast(info->Get(vtkDataObject::SIL())));
+  if(!sil)
+    return false;
+  int idNames(0);
+  vtkAbstractArray *verticesNames(sil->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  if(!verticesNames2)
+    return false;
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="MeshesFamsGrps")
+        return true;
+    }
+  return false;
+}
+
+void vtkExtractGroup::vtkExtractGroupInternal::loadFrom(vtkMutableDirectedGraph *sil)
+{
+  std::vector<ExtractGroupGrp> oldGrps(_groups); _groups.clear();
+  std::vector<ExtractGroupFam> oldFams(_fams); _fams.clear();
+  int idNames(0);
+  vtkAbstractArray *verticesNames(sil->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  vtkIdType id0;
+  bool found(false);
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="MeshesFamsGrps")
+        {
+          id0=i;
+          found=true;
+        }
+    }
+  if(!found)
+    throw INTERP_KERNEL::Exception("There is an internal error ! The tree on server side has not the expected look !");
+  vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
+  sil->GetAdjacentVertices(id0,it0);
+  int kk(0),ll(0);
+  while(it0->HasNext())
+    {
+      vtkIdType id1(it0->Next());
+      std::string meshName((const char *)verticesNames2->GetValue(id1));
+      vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());
+      sil->GetAdjacentVertices(id1,it1);
+      vtkIdType idZeGrps(it1->Next());//zeGroups
+      vtkAdjacentVertexIterator *itGrps(vtkAdjacentVertexIterator::New());
+      sil->GetAdjacentVertices(idZeGrps,itGrps);
+      while(itGrps->HasNext())
+        {
+          vtkIdType idg(itGrps->Next());
+          ExtractGroupGrp grp((const char *)verticesNames2->GetValue(idg));
+          vtkAdjacentVertexIterator *itGrps2(vtkAdjacentVertexIterator::New());
+          sil->GetAdjacentVertices(idg,itGrps2);
+          std::vector<std::string> famsOnGroup;
+          while(itGrps2->HasNext())
+            {
+              vtkIdType idgf(itGrps2->Next());
+              famsOnGroup.push_back(std::string((const char *)verticesNames2->GetValue(idgf)));
+            }
+          grp.setFamilies(famsOnGroup);
+          itGrps2->Delete();
+          _groups.push_back(grp);
+        }
+      itGrps->Delete();
+      vtkIdType idZeFams(it1->Next());//zeFams
+      it1->Delete();
+      vtkAdjacentVertexIterator *itFams(vtkAdjacentVertexIterator::New());
+      sil->GetAdjacentVertices(idZeFams,itFams);
+      while(itFams->HasNext())
+        {
+          vtkIdType idf(itFams->Next());
+          ExtractGroupFam fam((const char *)verticesNames2->GetValue(idf));
+          _fams.push_back(fam);
+        }
+      itFams->Delete();
+    }
+  it0->Delete(); 
+  //
+  std::size_t szg(_groups.size()),szf(_fams.size());
+  if(szg==oldGrps.size() && szf==oldFams.size())
+    {
+      bool isSame(true);
+      for(std::size_t i=0;i<szg && isSame;i++)
+        isSame=_groups[i].isSameAs(oldGrps[i]);
+      for(std::size_t i=0;i<szf && isSame;i++)
+        isSame=_fams[i].isSameAs(oldFams[i]);
+      if(isSame)
+        {
+          for(std::size_t i=0;i<szg;i++)
+            _groups[i].cpyStatusFrom(oldGrps[i]);
+          for(std::size_t i=0;i<szf;i++)
+            _fams[i].cpyStatusFrom(oldFams[i]);
+        }
+    }
+}
+
+int vtkExtractGroup::vtkExtractGroupInternal::getNumberOfEntries() const
+{
+  std::size_t sz0(_groups.size()),sz1(_fams.size());
+  return (int)(sz0+sz1);
+}
+
+const char *vtkExtractGroup::vtkExtractGroupInternal::getKeyOfEntry(int i) const
+{
+  int sz0((int)_groups.size());
+  if(i>=0 && i<sz0)
+    return _groups[i].getKeyOfEntry();
+  else
+    return _fams[i-sz0].getKeyOfEntry();
+}
+
+bool vtkExtractGroup::vtkExtractGroupInternal::getStatusOfEntryStr(const char *entry) const
+{
+  const ExtractGroupStatus& elt(getEntry(entry));
+  return elt.getStatus();
+}
+
+void vtkExtractGroup::vtkExtractGroupInternal::setStatusOfEntryStr(const char *entry, bool status)
+{
+  ExtractGroupStatus& elt(getEntry(entry));
+  elt.setStatus(status);
+}
+
+const ExtractGroupStatus& vtkExtractGroup::vtkExtractGroupInternal::getEntry(const char *entry) const
+{
+  std::string entryCpp(entry);
+  for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
+    if(entryCpp==(*it0).getKeyOfEntry())
+      return *it0;
+  for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
+    if(entryCpp==(*it0).getKeyOfEntry())
+      return *it0;
+  std::ostringstream oss; oss << "vtkExtractGroupInternal::getEntry : no such entry \"" << entry << "\"!";
+  throw INTERP_KERNEL::Exception(oss.str().c_str());
+}
+
+ExtractGroupStatus& vtkExtractGroup::vtkExtractGroupInternal::getEntry(const char *entry)
+{
+  std::string entryCpp(entry);
+  for(std::vector<ExtractGroupGrp>::iterator it0=_groups.begin();it0!=_groups.end();it0++)
+    if(entryCpp==(*it0).getKeyOfEntry())
+      return *it0;
+  for(std::vector<ExtractGroupFam>::iterator it0=_fams.begin();it0!=_fams.end();it0++)
+    if(entryCpp==(*it0).getKeyOfEntry())
+      return *it0;
+  std::ostringstream oss; oss << "vtkExtractGroupInternal::getEntry : no such entry \"" << entry << "\"!";
+  throw INTERP_KERNEL::Exception(oss.str().c_str());
+}
+
+void vtkExtractGroup::vtkExtractGroupInternal::printMySelf(std::ostream& os) const
+{
+  os << "Groups :" << std::endl;
+  for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
+    (*it0).printMySelf(os);
+  os << "Families :" << std::endl;
+  for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
+    (*it0).printMySelf(os);
+}
+
+int vtkExtractGroup::vtkExtractGroupInternal::getIdOfFamily(const std::string& famName) const
+{
+  for(std::vector<ExtractGroupFam>::const_iterator it=_fams.begin();it!=_fams.end();it++)
+    {
+      if((*it).getName()==famName)
+        return (*it).getId();
+    }
+}
+
+ExtractGroupFam::ExtractGroupFam(const char *name):ExtractGroupStatus(name),_id(0)
+{
+  std::size_t pos(_name.find(MEDFileFieldRepresentationLeavesArrays::ZE_SEP));
+  std::string name0(_name.substr(0,pos)),name1(_name.substr(pos+strlen(MEDFileFieldRepresentationLeavesArrays::ZE_SEP)));
+  std::istringstream iss(name1);
+  iss >> _id;
+  std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); _name=name0;
+}
+
+bool ExtractGroupFam::isSameAs(const ExtractGroupFam& other) const
+{
+  bool ret(ExtractGroupStatus::isSameAs(other));
+  if(ret)
+    return _id==other._id;
+  else
+    return false;
+}
+
+void ExtractGroupFam::printMySelf(std::ostream& os) const
+{
+  os << "      -" << _ze_key_name << " famName : \"" << _name << "\" id : " << _id << " (";
+  if(_status)
+    os << "X";
+  else
+    os << " ";
+  os << ")" << std::endl;
+}
+
+void ExtractGroupFam::fillIdsToKeep(std::set<int>& s) const
+{
+  s.insert(_id);
+}
+
+std::set<int> vtkExtractGroup::vtkExtractGroupInternal::getIdsToKeep() const
+{
+  std::map<std::string,int> m(this->computeFamStrIdMap());
+  std::set<int> s;
+  for(std::vector<ExtractGroupGrp>::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
+    {
+      if((*it0).getStatus())
+        {
+          const std::vector<std::string>& fams((*it0).getFamiliesLyingOn());
+          for(std::vector<std::string>::const_iterator it1=fams.begin();it1!=fams.end();it1++)
+            {
+              std::map<std::string,int>::iterator it2(m.find((*it1)));
+              if(it2!=m.end())
+                s.insert((*it2).second);
+            }
+        }
+     }
+  for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
+    if((*it0).getStatus())
+      (*it0).fillIdsToKeep(s);
+  return s;
+}
+
+std::map<std::string,int> vtkExtractGroup::vtkExtractGroupInternal::computeFamStrIdMap() const
+{
+  std::map<std::string,int> ret;
+  for(std::vector<ExtractGroupFam>::const_iterator it0=_fams.begin();it0!=_fams.end();it0++)
+    ret[(*it0).getName()]=(*it0).getId();
+  return ret;
+}
+
+////////////////////
+
+vtkExtractGroup::vtkExtractGroup():SIL(NULL),Internal(new vtkExtractGroupInternal),InsideOut(0)
+{
+}
+
+vtkExtractGroup::~vtkExtractGroup()
+{
+  delete this->Internal;
+}
+
+void vtkExtractGroup::SetInsideOut(int val)
+{
+  if(this->InsideOut!=val)
+    {
+      this->InsideOut=val;
+      this->Modified();
+    }
+}
+
+int vtkExtractGroup::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  try
+    {
+      //std::cerr << "########################################## vtkExtractGroup::RequestInformation ##########################################" << std::endl;
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      vtkInformation *inputInfo(inputVector[0]->GetInformationObject(0));//unfortunately inputInfo->Has(vtkDataObject::SIL) returns false... use executive to find it !
+      //
+      vtkExecutive *exe(GetExecutive());
+      vtkAlgorithm *alg(this);
+      vtkInformation *infoOnSIL(alg->GetOutputInformation(0));
+      while(!vtkExtractGroup::vtkExtractGroupInternal::IsInformationOK(infoOnSIL))// skipping vtkPVPostFilter
+       {
+         if(exe->GetNumberOfInputConnections(0)<1)
+           {
+             vtkErrorMacro("No SIL Data available ! The source of this filter must be MEDReader !");
+             return 0;
+           }
+         vtkExecutive *exe2(exe->GetInputExecutive(0,0));
+         //
+         alg=exe2->GetAlgorithm(); exe=exe2; infoOnSIL=alg->GetOutputInformation(0);
+       }
+      //
+      this->SetSIL(vtkMutableDirectedGraph::SafeDownCast(infoOnSIL->Get(vtkDataObject::SIL())));
+      this->Internal->loadFrom(this->SIL);
+      //this->Internal->printMySelf(std::cerr);
+      outInfo->Set(vtkDataObject::SIL(),this->SIL);
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkExtractGroup::RequestInformation : " << e.what() << std::endl;
+      return 0;
+    }
+  return 1;
+}
+
+template<class CellPointExtractor>
+vtkDataSet *FilterFamilies(vtkDataSet *input, const std::set<int>& idsToKeep, bool insideOut, const char *arrNameOfFamilyField,
+                           const char *associationForThreshold, bool& catchAll, bool& catchSmth)
+{
+  static const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_DELETE;
+  static const char ZE_SELECTION_ARR_NAME[]="@@ZeSelection@@";
+  vtkDataSet *output(input->NewInstance());
+  output->ShallowCopy(input);
+  vtkSmartPointer<vtkThreshold> thres(vtkSmartPointer<vtkThreshold>::New());
+  thres->SetInputData(output);
+  vtkDataSetAttributes *dscIn(input->GetCellData()),*dscIn2(input->GetPointData());
+  vtkDataSetAttributes *dscOut(output->GetCellData()),*dscOut2(output->GetPointData());
+  //
+  double vMin(insideOut==0?1.:0.),vMax(insideOut==0?2.:1.);
+  thres->ThresholdBetween(vMin,vMax);
+  // OK for the output 
+  //
+  CellPointExtractor cpe2(input);
+  vtkDataArray *da(cpe2.Get()->GetScalars(arrNameOfFamilyField));
+  if(!da)
+    return 0;
+  std::string daName(da->GetName());
+  vtkIntArray *dai(vtkIntArray::SafeDownCast(da));
+  if(daName!=arrNameOfFamilyField || !dai)
+    return 0;
+  //
+  int nbOfTuples(dai->GetNumberOfTuples());
+  vtkCharArray *zeSelection(vtkCharArray::New());
+  zeSelection->SetName(ZE_SELECTION_ARR_NAME);
+  zeSelection->SetNumberOfComponents(1);
+  char *pt(new char[nbOfTuples]);
+  zeSelection->SetArray(pt,nbOfTuples,0,VTK_DATA_ARRAY_DELETE);
+  const int *inPtr(dai->GetPointer(0));
+  std::fill(pt,pt+nbOfTuples,0);
+  catchAll=true; catchSmth=false;
+  std::vector<bool> pt2(nbOfTuples,false);
+  for(std::set<int>::const_iterator it=idsToKeep.begin();it!=idsToKeep.end();it++)
+    {
+      bool catchFid(false);
+      for(int i=0;i<nbOfTuples;i++)
+        if(inPtr[i]==*it)
+          { pt2[i]=true; catchFid=true; }
+      if(!catchFid)
+        catchAll=false;
+      else
+        catchSmth=true;
+    }
+  for(int ii=0;ii<nbOfTuples;ii++)
+    if(pt2[ii])
+      pt[ii]=2;
+  CellPointExtractor cpe3(output);
+  int idx(cpe3.Get()->AddArray(zeSelection));
+  cpe3.Get()->SetActiveAttribute(idx,vtkDataSetAttributes::SCALARS);
+  cpe3.Get()->CopyScalarsOff();
+  zeSelection->Delete();
+  //
+  thres->SetInputArrayToProcess(idx,0,0,associationForThreshold,ZE_SELECTION_ARR_NAME);
+  thres->Update();
+  vtkUnstructuredGrid *zeComputedOutput(thres->GetOutput());
+  CellPointExtractor cpe(zeComputedOutput);
+  cpe.Get()->RemoveArray(idx);
+  output->Delete();
+  zeComputedOutput->Register(0);
+  return zeComputedOutput;
+}
+
+class CellExtractor
+{
+public:
+  CellExtractor(vtkDataSet *ds):_ds(ds) { }
+  vtkDataSetAttributes *Get() { return _ds->GetCellData(); }
+private:
+  vtkDataSet *_ds;
+};
+
+class PointExtractor
+{
+public:
+  PointExtractor(vtkDataSet *ds):_ds(ds) { }
+  vtkDataSetAttributes *Get() { return _ds->GetPointData(); }
+private:
+  vtkDataSet *_ds;
+};
+
+int vtkExtractGroup::RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  try
+    {
+      //std::cerr << "########################################## vtkExtractGroup::RequestData        ##########################################" << std::endl;
+      vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
+      vtkDataSet *input(vtkDataSet::SafeDownCast(inputInfo->Get(vtkDataObject::DATA_OBJECT())));
+      vtkInformation *info(input->GetInformation());
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      vtkDataSet *output(vtkDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())));
+      std::set<int> idsToKeep(this->Internal->getIdsToKeep());
+      // first shrink the input
+      bool catchAll,catchSmth;
+      vtkDataSet *tryOnCell(FilterFamilies<CellExtractor>(input,idsToKeep,this->InsideOut,
+                                                         MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME,"vtkDataObject::FIELD_ASSOCIATION_CELLS",catchAll,catchSmth));
+      if(tryOnCell)
+       {
+         if(catchAll)
+           {
+             output->ShallowCopy(tryOnCell);
+             tryOnCell->Delete();//
+             return 1;
+           }
+         else
+           {
+             if(catchSmth)
+               {
+                 vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(tryOnCell,idsToKeep,this->InsideOut,
+                                                                      MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
+                 if(tryOnNode && catchSmth)
+                   {
+                     output->ShallowCopy(tryOnNode);
+                     tryOnCell->Delete();
+                     tryOnNode->Delete();//
+                     return 1;
+                   }
+                 else
+                   {
+                     if(tryOnNode)
+                       tryOnNode->Delete();
+                     output->ShallowCopy(tryOnCell);
+                     tryOnCell->Delete();
+                     return 1;
+                   }
+               }
+             else
+               {
+                 vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(input,idsToKeep,this->InsideOut,
+                                                                      MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
+                 if(tryOnNode)
+                   {
+                     tryOnCell->Delete();
+                     output->ShallowCopy(tryOnNode);
+                     tryOnNode->Delete();
+                     return 1;
+                   }
+                 else
+                   {
+                     output->ShallowCopy(tryOnCell);
+                     tryOnCell->Delete();
+                     return 0;
+                   }
+               }
+           }
+       }
+      else
+       {
+         vtkDataSet *tryOnNode(FilterFamilies<PointExtractor>(tryOnCell,idsToKeep,this->InsideOut,
+                                                              MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME,"vtkDataObject::FIELD_ASSOCIATION_POINTS",catchAll,catchSmth));
+         if(tryOnNode)
+           {
+             output->ShallowCopy(tryOnNode);
+             tryOnNode->Delete();//
+             return 1;
+           }
+         else
+           {
+             std::ostringstream oss; oss << "vtkExtractGroup::RequestData : The integer array with name \""<< MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_CELL_NAME;
+             oss << "\" or \"" << MEDFileFieldRepresentationLeavesArrays::FAMILY_ID_NODE_NAME << "\" does not exist ! The extraction of group and/or family is not possible !";
+             if(this->HasObserver("ErrorEvent") )
+               this->InvokeEvent("ErrorEvent",const_cast<char *>(oss.str().c_str()));
+             else
+               vtkOutputWindowDisplayErrorText(const_cast<char *>(oss.str().c_str()));
+             vtkObject::BreakOnError();
+             return 0;
+           }
+       }
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkExtractGroup::RequestData : " << e.what() << std::endl;
+      return 0;
+    }
+}
+
+int vtkExtractGroup::GetSILUpdateStamp()
+{
+  return this->SILTime;
+}
+
+void vtkExtractGroup::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
+
+int vtkExtractGroup::GetNumberOfGroupsFlagsArrays()
+{
+  int ret(this->Internal->getNumberOfEntries());
+  //std::cerr << "vtkExtractGroup::GetNumberOfFieldsTreeArrays() -> " << ret << std::endl;
+  return ret;
+}
+
+const char *vtkExtractGroup::GetGroupsFlagsArrayName(int index)
+{
+  const char *ret(this->Internal->getKeyOfEntry(index));
+  //std::cerr << "vtkExtractGroup::GetFieldsTreeArrayName(" << index << ") -> " << ret << std::endl;
+  return ret;
+}
+
+int vtkExtractGroup::GetGroupsFlagsArrayStatus(const char *name)
+{
+  int ret((int)this->Internal->getStatusOfEntryStr(name));
+  //std::cerr << "vtkExtractGroup::GetGroupsFlagsArrayStatus(" << name << ") -> " << ret << std::endl;
+  return ret;
+}
+
+void vtkExtractGroup::SetGroupsFlagsStatus(const char *name, int status)
+{
+  //std::cerr << "vtkExtractGroup::SetFieldsStatus(" << name << "," << status << ")" << std::endl;
+  this->Internal->setStatusOfEntryStr(name,(bool)status);
+  if(std::string(name)==GetGroupsFlagsArrayName(GetNumberOfGroupsFlagsArrays()-1))
+     this->Modified();
+  //this->Internal->printMySelf(std::cerr);
+}
diff --git a/src/Plugins/MEDReader/IO/vtkExtractGroup.h b/src/Plugins/MEDReader/IO/vtkExtractGroup.h
new file mode 100644 (file)
index 0000000..778b1d9
--- /dev/null
@@ -0,0 +1,71 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef vtkExtractGroup_h__
+#define vtkExtractGroup_h__
+
+#include "vtkDataSetAlgorithm.h"
+
+class vtkMutableDirectedGraph;
+
+class VTK_EXPORT vtkExtractGroup: public vtkDataSetAlgorithm
+{
+public:
+  static vtkExtractGroup* New();
+  vtkTypeMacro(vtkExtractGroup, vtkDataSetAlgorithm)
+  void PrintSelf(ostream& os, vtkIndent indent);
+  virtual int GetNumberOfGroupsFlagsArrays();
+  const char *GetGroupsFlagsArrayName(int index);
+  int GetGroupsFlagsArrayStatus(const char *name);
+  virtual void SetGroupsFlagsStatus(const char *name, int status);
+  void SetInsideOut(int val);
+  // Description:
+  // Every time the SIL is updated a this will return a different value.
+  virtual int GetSILUpdateStamp();
+
+protected:
+  vtkExtractGroup();
+  ~vtkExtractGroup();
+
+  int RequestInformation(vtkInformation *request,
+      vtkInformationVector **inputVector, vtkInformationVector *outputVector);
+
+  int RequestData(vtkInformation *request, vtkInformationVector **inputVector,
+      vtkInformationVector *outputVector);
+  // Description:
+  // This SIL stores the structure of the mesh/groups/cell types
+  // that can be selected.
+  virtual void SetSIL(vtkMutableDirectedGraph*);
+  vtkGetObjectMacro(SIL, vtkMutableDirectedGraph);
+protected:
+  vtkMutableDirectedGraph *SIL;
+  vtkTimeStamp SILTime;
+private:
+  vtkExtractGroup(const vtkExtractGroup&);
+  void operator=(const vtkExtractGroup&); // Not implemented.
+ private:
+  //BTX
+  //ETX
+  class vtkExtractGroupInternal;
+  vtkExtractGroupInternal *Internal;
+  int InsideOut;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx b/src/Plugins/MEDReader/IO/vtkGenerateVectors.cxx
new file mode 100644 (file)
index 0000000..c8fa9ca
--- /dev/null
@@ -0,0 +1,108 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "vtkGenerateVectors.h"
+#include "vtkDoubleArray.h"
+#include "vtkInformation.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "MEDUtilities.hxx"
+#define protected public
+#include "vtkFieldData.h"
+
+void vtkGenerateVectors::Operate(vtkFieldData *fd)
+{
+  if(!fd)
+    return ;
+  const int nbOfArrs(fd->GetNumberOfArrays());
+  for(int i=0;i<nbOfArrs;i++)
+    {
+      vtkDataArray *arr(fd->GetArray(i));
+      if(!arr)
+        continue;
+      vtkDoubleArray *arrc(vtkDoubleArray::SafeDownCast(arr));
+      if(!arrc)
+        continue;
+      int nbOfCompo(arrc->GetNumberOfComponents());
+      if(nbOfCompo<=1 || nbOfCompo==3)
+        continue;
+      if(nbOfCompo==2)
+        fd->SetArray(i,Operate2Compo(arrc));
+      else
+        fd->SetArray(i,OperateMoreThan3Compo(arrc));
+    }
+}
+
+vtkDoubleArray *vtkGenerateVectors::Operate2Compo(vtkDoubleArray *oldArr)
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  vtkDoubleArray *ret(vtkDoubleArray::New());
+  std::size_t nbOfTuples(oldArr->GetNumberOfTuples());
+  const double *inPt(oldArr->GetPointer(0));
+  double *pt((double *)malloc(nbOfTuples*3*sizeof(double)));
+  for(std::size_t i=0;i<nbOfTuples;i++)
+    {
+      pt[3*i+0]=inPt[2*i+0];
+      pt[3*i+1]=inPt[2*i+1];
+      pt[3*i+2]=0.;
+    }
+  ret->SetNumberOfComponents(3);
+  ret->SetName(oldArr->GetName());
+  ret->SetComponentName(0,oldArr->GetComponentName(0));
+  ret->SetComponentName(1,oldArr->GetComponentName(1));
+  ret->SetArray(pt,3*nbOfTuples,0,VTK_DATA_ARRAY_FREE);
+  UpdateInformationOfArray(oldArr,ret);
+  return ret;
+}
+
+vtkDoubleArray *vtkGenerateVectors::OperateMoreThan3Compo(vtkDoubleArray *oldArr)
+{
+  static const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate<double>::VTK_DATA_ARRAY_FREE;
+  vtkDoubleArray *ret(vtkDoubleArray::New());
+  int nbOfCompo(oldArr->GetNumberOfComponents());
+  std::size_t nbOfTuples(oldArr->GetNumberOfTuples());
+  const double *inPt(oldArr->GetPointer(0));
+  double *pt((double *)malloc(nbOfTuples*3*sizeof(double)));
+  for(std::size_t i=0;i<nbOfTuples;i++)
+    {
+      pt[3*i+0]=inPt[nbOfCompo*i+0];
+      pt[3*i+1]=inPt[nbOfCompo*i+1];
+      pt[3*i+2]=inPt[nbOfCompo*i+2];
+    }
+  ret->SetNumberOfComponents(3);
+  ret->SetName(oldArr->GetName());
+  ret->SetComponentName(0,oldArr->GetComponentName(0));
+  ret->SetComponentName(1,oldArr->GetComponentName(1));
+  ret->SetComponentName(2,oldArr->GetComponentName(2));
+  ret->SetArray(pt,3*nbOfTuples,0,VTK_DATA_ARRAY_FREE);
+  UpdateInformationOfArray(oldArr,ret);
+  return ret;
+}
+
+void vtkGenerateVectors::UpdateInformationOfArray(vtkDoubleArray *oldArr, vtkDoubleArray *arr)
+{
+  if(oldArr->GetInformation()->Has(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME()))
+    {
+      arr->GetInformation()->Set(vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME(),oldArr->GetInformation()->Get((vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME())));
+    }
+  if(oldArr->GetInformation()->Get(MEDUtilities::ELGA()))
+    arr->GetInformation()->Set(MEDUtilities::ELGA(),1);
+  if(oldArr->GetInformation()->Get(MEDUtilities::ELNO()))
+    arr->GetInformation()->Set(MEDUtilities::ELNO(),1);
+}
diff --git a/src/Plugins/MEDReader/IO/vtkGenerateVectors.h b/src/Plugins/MEDReader/IO/vtkGenerateVectors.h
new file mode 100644 (file)
index 0000000..c35dd0f
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef vtkGenerateVectors_h__
+#define vtkGenerateVectors_h__
+
+#include "vtkDataSetAlgorithm.h"
+
+class vtkFieldData;
+class vtkDoubleArray;
+
+class VTK_EXPORT vtkGenerateVectors
+{
+public:
+  static void Operate(vtkFieldData *fd);
+  static vtkDoubleArray *Operate2Compo(vtkDoubleArray *oldArr);
+  static vtkDoubleArray *OperateMoreThan3Compo(vtkDoubleArray *oldArr);
+protected:
+  static void UpdateInformationOfArray(vtkDoubleArray *oldArr, vtkDoubleArray *arr);
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/IO/vtkMEDReader.cxx b/src/Plugins/MEDReader/IO/vtkMEDReader.cxx
new file mode 100644 (file)
index 0000000..3579bdd
--- /dev/null
@@ -0,0 +1,393 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "vtkMEDReader.h"
+#include "vtkGenerateVectors.h"
+
+#include "vtkMultiBlockDataSet.h"
+#include "vtkInformation.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkStringArray.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkInformationStringKey.h"
+//
+#include "vtkUnsignedCharArray.h"
+#include "vtkInformationVector.h"
+#include "vtkSmartPointer.h"
+#include "vtkVariantArray.h"
+#include "vtkExecutive.h"
+#include "vtkStreamingDemandDrivenPipeline.h"
+#include "vtkMultiTimeStepAlgorithm.h"
+#include "vtkUnstructuredGrid.h"
+#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
+#include "vtkQuadratureSchemeDefinition.h"
+#include "vtkPointData.h"
+#include "vtkCellData.h"
+#include "vtkCellType.h"
+#include "vtkCellArray.h"
+#include "vtkDoubleArray.h"
+#include "vtkObjectFactory.h"
+
+#include "MEDFileFieldRepresentationTree.hxx"
+
+#include <string>
+#include <vector>
+#include <sstream>
+#include <algorithm>
+
+class vtkMEDReader::vtkMEDReaderInternal
+{
+
+public:
+  vtkMEDReaderInternal():TK(0),IsMEDOrSauv(true),IsStdOrMode(false),GenerateVect(false),SIL(0),LastLev0(-1),FirstCall0(2)
+  {
+  }
+  
+  bool PluginStart0()
+  {
+    if(FirstCall0==0)
+      return false;
+    FirstCall0--;
+    return true;
+  }
+  
+  ~vtkMEDReaderInternal()
+  {
+    if(this->SIL)
+      this->SIL->Delete();
+  }
+public:
+  MEDFileFieldRepresentationTree Tree;
+  TimeKeeper TK;
+  std::string FileName;
+  //when true the file is MED file. when false it is a Sauv file
+  bool IsMEDOrSauv;
+  //when false -> std, true -> mode. By default std (false).
+  bool IsStdOrMode;
+  //when false -> do nothing. When true cut off or extend to nbOfCompo=3 vector arrays.
+  bool GenerateVect;
+  std::string DftMeshName;
+  // Store the vtkMutableDirectedGraph that represents links between family, groups and cell types
+  vtkMutableDirectedGraph* SIL;
+  // store the lev0 id in Tree corresponding to the TIME_STEPS in the pipeline.
+  int LastLev0;
+private:
+  unsigned char FirstCall0;
+};
+
+vtkStandardNewMacro(vtkMEDReader);
+
+vtkMEDReader::vtkMEDReader():Internal(new vtkMEDReaderInternal)
+{
+  this->SetNumberOfInputPorts(0);
+  this->SetNumberOfOutputPorts(1);
+}
+
+vtkMEDReader::~vtkMEDReader()
+{
+  delete this->Internal;
+}
+
+void vtkMEDReader::Reload(int a)
+{
+  if(a==0)
+    return;
+  std::cerr << "vtkMEDReader::Reload" << a << std::endl;
+  std::string fName((const char *)this->GetFileName());
+  delete this->Internal;
+  this->Internal=new vtkMEDReaderInternal;
+  this->SetFileName(fName.c_str());
+}
+
+void vtkMEDReader::GenerateVectors(int val)
+{
+  bool val2((bool)val);
+  if(val2!=this->Internal->GenerateVect)
+    {
+      this->Internal->GenerateVect=val2;
+      this->Modified();
+    }
+}
+
+void vtkMEDReader::ChangeMode(int newMode)
+{
+  this->Internal->IsStdOrMode=newMode!=0;
+  //std::cerr << "vtkMEDReader::ChangeMode : " << this->Internal->IsStdOrMode << std::endl;
+  this->Modified();
+}
+
+const char *vtkMEDReader::GetSeparator()
+{
+  return MEDFileFieldRepresentationLeavesArrays::ZE_SEP;
+}
+
+void vtkMEDReader::SetFileName(const char *fname)
+{
+  try
+    {
+      this->Internal->FileName=fname;
+      std::size_t pos(this->Internal->FileName.find_last_of('.'));
+      if(pos!=std::string::npos)
+        {
+          std::string ext(this->Internal->FileName.substr(pos));
+          if(ext.find("sauv")!=std::string::npos)
+            this->Internal->IsMEDOrSauv=false;
+        }
+      if(this->Internal->Tree.getNumberOfLeavesArrays()==0)
+        {
+          this->Internal->Tree.loadMainStructureOfFile(this->Internal->FileName.c_str(),this->Internal->IsMEDOrSauv);
+          this->Internal->Tree.activateTheFirst();//This line manually initialize the status of server (this) with the remote client.
+          this->Internal->TK.setMaxNumberOfTimeSteps(this->Internal->Tree.getMaxNumberOfTimeSteps());
+        }
+      this->Modified();
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      delete this->Internal;
+      this->Internal=0;
+      std::ostringstream oss;
+      oss << "Exception has been thrown in vtkMEDReader::SetFileName : " << e.what() << std::endl;
+      if(this->HasObserver("ErrorEvent") )
+        this->InvokeEvent("ErrorEvent",const_cast<char *>(oss.str().c_str()));
+      else
+        vtkOutputWindowDisplayErrorText(const_cast<char *>(oss.str().c_str()));
+      vtkObject::BreakOnError();
+    }
+}
+
+char *vtkMEDReader::GetFileName()
+{
+  return const_cast<char *>(this->Internal->FileName.c_str());
+}
+
+int vtkMEDReader::RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  //std::cerr << "########################################## RequestInformation ##########################################" << std::endl;
+  if(!this->Internal)
+    return 0;
+  try
+    {
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1);
+      outInfo->Set(vtkDataObject::DATA_TYPE_NAME(),"vtkMultiBlockDataSet");
+      this->UpdateSIL(outInfo);
+      //
+      bool dummy(false);
+      this->PublishTimeStepsIfNeeded(outInfo,dummy);
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkMEDReader::RequestInformation : " << e.what() << std::endl;
+      return 0;
+    }
+  return 1;
+}
+
+int vtkMEDReader::RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
+{
+  //std::cerr << "########################################## RequestData        ##########################################";
+  if(!this->Internal)
+    return 0;
+  try
+    {
+      vtkInformation *outInfo(outputVector->GetInformationObject(0));
+      vtkMultiBlockDataSet *output(vtkMultiBlockDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())));
+      bool isUpdated(false);
+      double reqTS(0.);
+      if(outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
+        reqTS=outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
+      //std::cerr << reqTS << std::endl;
+      this->FillMultiBlockDataSetInstance(output,reqTS);
+      output->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(),reqTS);
+      this->UpdateSIL(outInfo);
+      //this->UpdateProgress((float) progress/((float) maxprogress-1));
+    }
+  catch(INTERP_KERNEL::Exception& e)
+    {
+      std::cerr << "Exception has been thrown in vtkMEDReader::RequestInformation : " << e.what() << std::endl;
+      return 0;
+    }
+  return 1;
+}
+
+void vtkMEDReader::SetFieldsStatus(const char* name, int status)
+{
+  //std::cerr << "vtkMEDReader::SetFieldsStatus(" << name << "," << status << ") called !" << std::endl;
+  this->Internal->Tree.changeStatusOfAndUpdateToHaveCoherentVTKDataSet(this->Internal->Tree.getIdHavingZeName(name),status);
+  if(std::string(name)==GetFieldsTreeArrayName(GetNumberOfFieldsTreeArrays()-1))
+    if(!this->Internal->PluginStart0())
+      this->Modified();
+}
+
+int vtkMEDReader::GetNumberOfFieldsTreeArrays()
+{
+  if(!this->Internal)
+    return 0;
+  int ret(this->Internal->Tree.getNumberOfLeavesArrays());
+  //std::cerr << "vtkMEDReader::GetNumberOfFieldsTreeArrays called ! " << ret << std::endl;
+  return ret;
+}
+
+const char *vtkMEDReader::GetFieldsTreeArrayName(int index)
+{
+  std::string ret(this->Internal->Tree.getNameOf(index));
+  //std::cerr << "vtkMEDReader::GetFieldsTreeArrayName(" << index << ") called ! " << ret << std::endl;
+  return ret.c_str();
+}
+
+int vtkMEDReader::GetFieldsTreeArrayStatus(const char *name)
+{
+  int zeId(this->Internal->Tree.getIdHavingZeName(name));
+  int ret(this->Internal->Tree.getStatusOf(zeId));
+  return ret;
+}
+
+void vtkMEDReader::SetTimesFlagsStatus(const char *name, int status)
+{
+  int pos(0);
+  std::istringstream iss(name); iss >> pos;
+  this->Internal->TK.getTimesFlagArray()[pos].first=(bool)status;
+  if(pos==this->Internal->TK.getTimesFlagArray().size()-1)
+    if(!this->Internal->PluginStart0())
+      {
+        this->Modified();
+        //this->Internal->TK.printSelf(std::cerr);
+      }
+}
+
+int vtkMEDReader::GetNumberOfTimesFlagsArrays()
+{
+  if(!this->Internal)
+    return 0;
+  return (int)this->Internal->TK.getTimesFlagArray().size();
+}
+
+const char *vtkMEDReader::GetTimesFlagsArrayName(int index)
+{
+  return this->Internal->TK.getTimesFlagArray()[index].second.c_str();
+}
+
+int vtkMEDReader::GetTimesFlagsArrayStatus(const char *name)
+{
+  int pos(0);
+  std::istringstream iss(name); iss >> pos;
+  return (int)this->Internal->TK.getTimesFlagArray()[pos].first;
+}
+
+void vtkMEDReader::UpdateSIL(vtkInformation *info)
+{
+  if(!this->Internal)
+      return ;
+  vtkMutableDirectedGraph *sil(vtkMutableDirectedGraph::New());
+  std::string meshName(this->BuildSIL(sil));
+  if(meshName!=this->Internal->DftMeshName)
+    {
+      if(this->Internal->SIL)
+        this->Internal->SIL->Delete();
+      this->Internal->SIL=sil;
+      this->Internal->DftMeshName=meshName;
+      info->Set(vtkDataObject::SIL(),this->Internal->SIL);
+      //request->AppendUnique(vtkExecutive::KEYS_TO_COPY(),vtkDataObject::SIL());
+    }
+  else
+    {
+      sil->Delete();
+    }
+}
+
+/*!
+ * The returned string is the name of the mesh activated which groups and families are in \a sil.
+ */
+std::string vtkMEDReader::BuildSIL(vtkMutableDirectedGraph* sil)
+{
+  sil->Initialize();
+  vtkSmartPointer<vtkVariantArray> childEdge(vtkSmartPointer<vtkVariantArray>::New());
+  childEdge->InsertNextValue(0);
+  vtkSmartPointer<vtkVariantArray> crossEdge(vtkSmartPointer<vtkVariantArray>::New());
+  crossEdge->InsertNextValue(1);
+  // CrossEdge is an edge linking hierarchies.
+  vtkUnsignedCharArray* crossEdgesArray=vtkUnsignedCharArray::New();
+  crossEdgesArray->SetName("CrossEdges");
+  sil->GetEdgeData()->AddArray(crossEdgesArray);
+  crossEdgesArray->Delete();
+  std::vector<std::string> names;
+  // Now build the hierarchy.
+  vtkIdType rootId=sil->AddVertex();
+  names.push_back("SIL");
+  // Add global fields root
+  vtkIdType fieldsRoot(sil->AddChild(rootId,childEdge));
+  names.push_back("FieldsStatusTree");
+  this->Internal->Tree.feedSIL(sil,fieldsRoot,childEdge,names);
+  vtkIdType meshesFamsGrpsRoot(sil->AddChild(rootId,childEdge));
+  names.push_back("MeshesFamsGrps");
+  std::string dftMeshName(this->Internal->Tree.feedSILForFamsAndGrps(sil,meshesFamsGrpsRoot,childEdge,names));
+  // This array is used to assign names to nodes.
+  vtkStringArray *namesArray(vtkStringArray::New());
+  namesArray->SetName("Names");
+  namesArray->SetNumberOfTuples(sil->GetNumberOfVertices());
+  sil->GetVertexData()->AddArray(namesArray);
+  namesArray->Delete();
+  std::vector<std::string>::const_iterator iter;
+  vtkIdType cc;
+  for(cc=0, iter=names.begin(); iter!=names.end(); ++iter, ++cc)
+    namesArray->SetValue(cc,(*iter).c_str());
+  return dftMeshName;
+}
+
+double vtkMEDReader::PublishTimeStepsIfNeeded(vtkInformation *outInfo, bool& isUpdated)
+{
+  int lev0(-1);
+  std::vector<double> tsteps;
+  if(!this->Internal->IsStdOrMode)
+    tsteps=this->Internal->Tree.getTimeSteps(lev0,this->Internal->TK);
+  else
+    { tsteps.resize(1); tsteps[0]=0.; }
+  isUpdated=false;
+  if(lev0!=this->Internal->LastLev0)
+    {
+      isUpdated=true;
+      double timeRange[2];
+      timeRange[0]=tsteps.front();
+      timeRange[1]=tsteps.back();
+      outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(),&tsteps[0],tsteps.size());
+      outInfo->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(),timeRange,2);
+      this->Internal->LastLev0=lev0;
+    }
+  return tsteps.front();
+}
+
+void vtkMEDReader::FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS)
+{
+  std::string meshName;
+  vtkDataSet *ret(this->Internal->Tree.buildVTKInstance(this->Internal->IsStdOrMode,reqTS,meshName,this->Internal->TK));
+  if(this->Internal->GenerateVect)
+    {
+      vtkGenerateVectors::Operate(ret->GetPointData());
+      vtkGenerateVectors::Operate(ret->GetCellData());
+      vtkGenerateVectors::Operate(ret->GetFieldData());
+    }
+  output->SetBlock(0,ret);
+  ret->Delete();
+}
+
+void vtkMEDReader::PrintSelf(ostream& os, vtkIndent indent)
+{
+  this->Superclass::PrintSelf(os, indent);
+}
diff --git a/src/Plugins/MEDReader/IO/vtkMEDReader.h b/src/Plugins/MEDReader/IO/vtkMEDReader.h
new file mode 100644 (file)
index 0000000..a87c6bd
--- /dev/null
@@ -0,0 +1,73 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef __vtkMEDReader_h_
+#define __vtkMEDReader_h_
+
+#include "vtkMultiBlockDataSetAlgorithm.h"
+
+class vtkMutableDirectedGraph;
+
+class VTK_EXPORT vtkMEDReader : public vtkMultiBlockDataSetAlgorithm
+{
+ private:
+  vtkMEDReader(const vtkMEDReader&); // Not implemented.
+  void operator=(const vtkMEDReader&); // Not implemented.
+ public:
+  static vtkMEDReader *New();
+  vtkTypeMacro(vtkMEDReader, vtkMultiBlockDataSetAlgorithm);
+  void PrintSelf(ostream& os, vtkIndent indent);
+  virtual void SetFileName(const char*);
+  virtual char *GetFileName();
+  virtual const char *GetFileExtensions() { return ".med .rmed .sauv .sauve"; }
+  virtual const char *GetDescriptiveName() { return "MED file (Data Exchange Model)"; }
+  //
+  virtual void SetFieldsStatus(const char *name, int status);
+  virtual int GetNumberOfFieldsTreeArrays();
+  virtual const char *GetFieldsTreeArrayName(int index);
+  virtual int GetFieldsTreeArrayStatus(const char *name);
+  //
+  virtual int GetTimesFlagsArrayStatus(const char *name);
+  virtual void SetTimesFlagsStatus(const char *name, int status);
+  virtual int GetNumberOfTimesFlagsArrays();
+  virtual const char *GetTimesFlagsArrayName(int index);
+  //! Build the graph used to pass information to the client on the supports
+  virtual std::string BuildSIL(vtkMutableDirectedGraph*);
+  virtual void Reload(int);
+  virtual void GenerateVectors(int);
+  virtual void ChangeMode(int);
+  virtual const char *GetSeparator();
+ protected:
+  vtkMEDReader();
+  virtual ~vtkMEDReader();
+  virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
+  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
+ private:
+  void UpdateSIL(vtkInformation *info);
+  virtual double PublishTimeStepsIfNeeded(vtkInformation*, bool& isUpdated);
+  virtual void FillMultiBlockDataSetInstance(vtkMultiBlockDataSet *output, double reqTS);
+ private:
+  //BTX
+  //ETX
+  class vtkMEDReaderInternal;
+  vtkMEDReaderInternal* Internal;
+};
+
+#endif //__vtkMEDReader_h_
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/CMakeLists.txt b/src/Plugins/MEDReader/ParaViewPlugin/CMakeLists.txt
new file mode 100644 (file)
index 0000000..e7fef09
--- /dev/null
@@ -0,0 +1,91 @@
+# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+INCLUDE_DIRECTORIES(
+  ${MEDReader_SOURCE_DIR}/IO
+  ${MEDReader_BINARY_DIR}/IO )
+
+IF(PARAVIEW_BUILD_QT_GUI)
+
+  QT4_WRAP_UI(CLIENT_UI_SRCS Resources/UI/MEDReaderPanel.ui Resources/UI/ExtractGroupPanel.ui Resources/UI/ExtractCellTypePanel.ui)
+  
+  # create a plugin that implements an object panel for the reader
+  SET(CLIENT_SRCS pqMEDReaderPanel.cxx pqExtractGroupPanel.cxx pqExtractCellTypePanel.cxx VectBoolSpreadSheet.cxx VectBoolWidget.cxx)
+  
+  QT4_WRAP_CPP(MOC_SRCS pqMEDReaderPanel.h pqExtractGroupPanel.h pqExtractCellTypePanel.h VectBoolSpreadSheet.h VectBoolWidget.h)
+  
+  ADD_PARAVIEW_OBJECT_PANEL(MEDREADER_IFACES MEDREADER_IFACE_SRCS
+    CLASS_NAME pqMEDReaderPanel
+    XML_NAME MEDReader
+    XML_GROUP sources
+    )
+  
+  ADD_PARAVIEW_OBJECT_PANEL(EXTRACTGROUP_IFACES EXTRACTGROUP_IFACE_SRCS
+    CLASS_NAME pqExtractGroupPanel
+    XML_NAME ExtractGroup
+    XML_GROUP filters
+    )
+
+  ADD_PARAVIEW_OBJECT_PANEL(EXTRACTCELLTYPE_IFACES EXTRACTCELLTYPE_IFACE_SRCS
+    CLASS_NAME pqExtractCellTypePanel
+    XML_NAME ExtractCellType
+    XML_GROUP filters
+    )
+  
+  # create the med reader plugin itself
+  ADD_PARAVIEW_PLUGIN(MEDReaderPlugin "4.0"
+    SERVER_MANAGER_XML Resources/MEDReaderServer.xml
+    GUI_INTERFACES ${MEDREADER_IFACES} ${EXTRACTGROUP_IFACES} ${EXTRACTCELLTYPE_IFACES}
+    GUI_RESOURCES Resources/pqMEDReader.qrc
+    GUI_SOURCES ${CLIENT_SRCS}
+    ${CLIENT_UI_SRCS}
+    ${MOC_SRCS}
+    ${MEDREADER_IFACE_SRCS} ${EXTRACTGROUP_IFACE_SRCS} ${EXTRACTCELLTYPE_IFACE_SRCS}
+    CS_KITS
+    # this is the same name as the name in module.cmake file IO
+    # directory.
+    vtkMEDReader
+    )
+  
+ELSE(PARAVIEW_BUILD_QT_GUI)
+  
+  # create the med reader plugin itself
+  ADD_PARAVIEW_PLUGIN(MEDReaderPlugin "4.0"
+    SERVER_MANAGER_SOURCES ${SM_SRCS}
+    SERVER_MANAGER_XML Resources/MEDReaderServer.xml
+    CS_KITS
+    # this is the same name as the name in module.cmake file IO
+    # directory.
+    vtkMEDReader
+    )
+  
+ENDIF(PARAVIEW_BUILD_QT_GUI)
+
+TARGET_LINK_LIBRARIES(MEDReaderPlugin vtkMEDReader vtkMEDReaderCS)
+# Install
+INSTALL(
+  TARGETS MEDReaderPlugin
+  RUNTIME DESTINATION lib/paraview
+  LIBRARY DESTINATION lib/paraview
+  ARCHIVE DESTINATION lib/paraview
+  )
+
+
+
+
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellData16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellData16.png
new file mode 100644 (file)
index 0000000..8a6f2a6
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellData16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellDataForWholeMesh16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellDataForWholeMesh16.png
new file mode 100644 (file)
index 0000000..93401f4
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqCellDataForWholeMesh16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png
new file mode 100644 (file)
index 0000000..e461810
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqPointData16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqPointData16.png
new file mode 100644 (file)
index 0000000..50367ea
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqPointData16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png
new file mode 100644 (file)
index 0000000..ff6e199
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqReloadFile16.png b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqReloadFile16.png
new file mode 100644 (file)
index 0000000..cc13970
Binary files /dev/null and b/src/Plugins/MEDReader/ParaViewPlugin/Resources/Icons/pqReloadFile16.png differ
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderClient2.xml b/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderClient2.xml
new file mode 100644 (file)
index 0000000..ba96aa7
--- /dev/null
@@ -0,0 +1,10 @@
+<ParaViewFilters>
+    <Filter name="ExtractGroup"/>
+    <Filter name="ExtractCellType"/>
+    <Category name="Integration Points" menu_label="&amp;Integration Points" preserve_order="1">
+      <Filter name="ELNOPoints"/>
+      <Filter name="ELNOMesh"/>
+      <Filter name="ELNOSurface"/>
+      <Filter name="GaussPoints"/>
+    </Category>
+</ParaViewFilters>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml b/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml
new file mode 100644 (file)
index 0000000..b650090
--- /dev/null
@@ -0,0 +1,429 @@
+<ServerManagerConfiguration>
+  <ProxyGroup name="sources">
+    <SourceProxy name="MEDReader" class="vtkMEDReader" label="MED Reader">
+
+      <Hints>
+       <ReaderFactory extensions="med rmed sauv sauve"
+                      file_description="MED Files">
+       </ReaderFactory>
+      </Hints>
+
+      <StringVectorProperty
+        name="FileName"
+        command="SetFileName"
+        number_of_elements="1"
+        animateable="0">
+        <FileListDomain name="files" />
+        <Documentation>
+          This property specifies the file name for the MED reader.
+        </Documentation>
+      </StringVectorProperty>
+      
+      <IntVectorProperty
+        name="ReloadReq"
+        command="Reload"
+        number_of_elements="1"
+        default_values="0"
+        animateable="0">
+        <SimpleIntInformationHelper />
+      </IntVectorProperty>
+
+      <IntVectorProperty
+        name="GenerateVectors"
+        command="GenerateVectors"
+        number_of_elements="1"
+        default_values="0"
+        animateable="0">
+        <SimpleIntInformationHelper />
+      </IntVectorProperty>
+
+      <IntVectorProperty
+        name="TimeOrModal"
+        command="ChangeMode"
+        number_of_elements="1"
+        default_values="0"
+        animateable="0">
+        <SimpleIntInformationHelper />
+      </IntVectorProperty>
+
+      <!-- retrieves using GetNumberOf[FieldsTree]Arrays and GetFieldsTreeArrayName the keys used by FieldsStatus -->
+      <StringVectorProperty name="FieldsTreeInfo" information_only="1">
+        <ArraySelectionInformationHelper attribute_name="FieldsTree" />
+      </StringVectorProperty>
+      
+      <StringVectorProperty
+        name="FieldsStatus"
+        command="SetFieldsStatus"
+        label="All Arrays"
+        number_of_elements="0"
+        repeat_command="1"
+        number_of_elements_per_command="2"
+        element_types="2 0"
+        information_property="FieldsTreeInfo">
+        <ArraySelectionDomain name="array_list">
+          <RequiredProperties>
+            <Property name="FieldsTreeInfo" function="ArrayList" />
+          </RequiredProperties>
+        </ArraySelectionDomain>
+        <Documentation>
+          This property lists all the fields sorted by time steps then by mesh then by common support.
+       </Documentation>
+      </StringVectorProperty>
+
+      <StringVectorProperty name="TimesFlagsInfo" information_only="1">
+       <ArraySelectionInformationHelper attribute_name="TimesFlags" />
+     </StringVectorProperty>
+     
+     <StringVectorProperty name="TimesFlagsStatus" command="SetTimesFlagsStatus"
+                           label="All TimeSteps"
+                           number_of_elements="0"
+                           repeat_command="1"
+                           number_of_elements_per_command="2"
+                           element_types="2 0"
+                           information_property="TimesFlagsInfo">
+       <ArraySelectionDomain name="array_list">
+         <RequiredProperties>
+           <Property name="TimesFlagsInfo" function="ArrayList" />
+         </RequiredProperties>
+       </ArraySelectionDomain>
+       <Documentation>
+          This property lists all groups and families to select.
+       </Documentation>
+     </StringVectorProperty>
+
+      <StringVectorProperty
+        name="Separator"
+        command="GetSeparator"
+        number_of_elements="1"
+        animateable="0"
+        information_only="1">
+        <FileListDomain name="files" />
+        <Documentation>
+          This property specifies the file name for the MED reader.
+        </Documentation>
+      </StringVectorProperty>
+
+      <DoubleVectorProperty
+        name="TimestepValues"
+        repeatable="1"
+        information_only="1">
+        <TimeStepsInformationHelper />
+        <Documentation>
+          Available timestep values.
+        </Documentation>
+      </DoubleVectorProperty>
+
+    </SourceProxy>
+  </ProxyGroup>
+
+  <ProxyGroup name="filters">
+    <SourceProxy name="ExtractGroup" class="vtkExtractGroup" label="Extract Group">
+     <InputProperty name="Input" command="SetInputConnection">
+       <ProxyGroupDomain name="groups">
+         <Group name="sources"/>
+         <Group name="filters"/>
+       </ProxyGroupDomain>
+       <DataTypeDomain name="input_type">
+         <DataType value="vtkDataSet"/>
+       </DataTypeDomain>
+       <Documentation>
+         This property specifies the input to the Level Scalars filter.
+       </Documentation>
+     </InputProperty>
+     
+     <IntVectorProperty name="SILUpdateStamp" command="GetSILUpdateStamp" information_only="1">
+       <SimpleIntInformationHelper />
+       <Documentation>
+         Information property indicating the update stamp of the SIL. Every
+         time the SIL is rebuild, this
+         time stamp is changed.
+       </Documentation>
+     </IntVectorProperty>
+     
+     <StringVectorProperty name="GroupsFlagsInfo" information_only="1">
+       <ArraySelectionInformationHelper attribute_name="GroupsFlags" />
+     </StringVectorProperty>
+     
+     <StringVectorProperty name="GroupsFlagsStatus" command="SetGroupsFlagsStatus"
+                           label="All Groups"
+                           number_of_elements="0"
+                           repeat_command="1"
+                           number_of_elements_per_command="2"
+                           element_types="2 0"
+                           information_property="GroupsFlagsInfo">
+       <ArraySelectionDomain name="array_list">
+         <RequiredProperties>
+           <Property name="GroupsFlagsInfo" function="ArrayList" />
+         </RequiredProperties>
+       </ArraySelectionDomain>
+       <Documentation>
+          This property lists all groups and families to select.
+       </Documentation>
+     </StringVectorProperty>
+
+     <IntVectorProperty command="SetInsideOut" default_values="0" name="InsideOut" number_of_elements="1">
+       <BooleanDomain name="bool"/>
+       <Documentation>Choose which part of the dataset to keep regarding the selected Groups/Families. When 0 (default) the direct selection
+       is kept. When 1 the complementary part is selected.
+       </Documentation>
+      </IntVectorProperty>
+    </SourceProxy>
+  </ProxyGroup>
+  
+  <ProxyGroup name="filters">
+    <SourceProxy name="ExtractCellType" class="vtkExtractCellType" label="Extract Cell Type">
+     <InputProperty name="Input" command="SetInputConnection">
+       <ProxyGroupDomain name="groups">
+         <Group name="sources"/>
+         <Group name="filters"/>
+       </ProxyGroupDomain>
+       <DataTypeDomain name="input_type">
+         <DataType value="vtkDataSet"/>
+       </DataTypeDomain>
+       <Documentation>
+         This property specifies the input to the Level Scalars filter.
+       </Documentation>
+     </InputProperty>
+     
+     <IntVectorProperty name="SILUpdateStamp" command="GetSILUpdateStamp" information_only="1">
+       <SimpleIntInformationHelper />
+       <Documentation>
+         Information property indicating the update stamp of the SIL. Every
+         time the SIL is rebuild, this
+         time stamp is changed.
+       </Documentation>
+     </IntVectorProperty>
+     
+     <StringVectorProperty name="GeoTypesInfo" information_only="1">
+       <ArraySelectionInformationHelper attribute_name="GeoTypes" />
+     </StringVectorProperty>
+     
+     <StringVectorProperty name="GeoTypesStatus" command="SetGeoTypesStatus"
+                           label="All GeoTypes"
+                           number_of_elements="0"
+                           repeat_command="1"
+                           number_of_elements_per_command="2"
+                           element_types="2 0"
+                           information_property="GeoTypesInfo">
+       <ArraySelectionDomain name="array_list">
+         <RequiredProperties>
+           <Property name="GeoTypesInfo" function="ArrayList" />
+         </RequiredProperties>
+       </ArraySelectionDomain>
+       <Documentation>
+          This property lists all the geometric types to select.
+       </Documentation>
+     </StringVectorProperty>
+     <IntVectorProperty command="SetInsideOut" default_values="0" name="InsideOut" number_of_elements="1">
+       <BooleanDomain name="bool"/>
+       <Documentation>Choose which part of the dataset to keep regarding the selected geometric types. When 0 (default) the direct selection
+       is kept. When 1 the complementary part is selected.
+       </Documentation>
+      </IntVectorProperty>
+    </SourceProxy>
+
+    <SourceProxy name="ELNOMesh" class="vtkELNOMeshFilter" label="ELNO Mesh">
+      <Documentation
+          long_help="Create a Mesh with ELNO values mapped at each vertex."
+          short_help="Create a Mesh with ELNO values mapped at each vertex.">
+        "Create a Mesh with ELNO values mapped at each vertex."
+      </Documentation>
+      <InputProperty name="Input" command="SetInputConnection">
+        <ProxyGroupDomain name="groups">
+          <Group name="sources" />
+          <Group name="filters" />
+        </ProxyGroupDomain>
+        <DataTypeDomain name="input_type">
+          <DataType value="vtkUnstructuredGrid" />
+        </DataTypeDomain>
+        <InputArrayDomain name="input_array" attribute_type="cell" />
+      </InputProperty>
+    </SourceProxy>
+
+    <SourceProxy name="ELNOSurface" class="vtkELNOSurfaceFilter" label="ELNO Surface">
+      <Documentation
+        long_help="Extract the surface of a dataset with ELNO values."
+        short_help="Extract the surface of a dataset with ELNO values.">
+        "Extract the surface of a dataset with ELNO values."
+      </Documentation>
+      <OutputPort name="ELNO Surface" index="0" />
+      <InputProperty name="Input" command="SetInputConnection">
+        <ProxyGroupDomain name="groups">
+          <Group name="sources" />
+          <Group name="filters" />
+        </ProxyGroupDomain>
+        <DataTypeDomain name="input_type">
+          <DataType value="vtkUnstructuredGrid" />
+        </DataTypeDomain>
+        <InputArrayDomain name="input_array" attribute_type="cell" />
+      </InputProperty>
+
+      <!-- Source Array -->
+      <StringVectorProperty
+        name="SelectSourceArray"
+        command="SetInputArrayToProcess"
+        number_of_elements="5"
+        element_types="0 0 0 0 2"
+        animateable="0">
+        <Documentation>
+          Specifies the offset array from which we generate ELNO points.
+        </Documentation>
+
+        <ArrayListDomain
+          name="array_list"
+          key_locations="MEDUtilities"
+          key_names="ELNO"
+          key_strategies="need_key">
+          <RequiredProperties>
+            <Property name="Input" function="Input" />
+          </RequiredProperties>
+        </ArrayListDomain>
+      </StringVectorProperty>
+      <Hints> 
+        <Property name="SelectSourceArray" show="0"/>
+      </Hints>
+    </SourceProxy>
+
+    <SourceProxy name="GaussPoints" class="vtkQuadraturePointsGenerator" label="Gauss Points">
+      <Documentation
+        long_help="Create a point set with data at Gauss points."
+        short_help="Create a point set with data at Gauss points.">
+        "Create a point set with data at quadrature points."
+      </Documentation>
+
+      <OutputPort
+        name="Gauss Points"
+        index="0" />
+
+      <InputProperty
+        name="Input"
+        command="SetInputConnection">
+        <ProxyGroupDomain
+          name="groups">
+          <Group
+            name="sources" />
+          <Group
+            name="filters" />
+        </ProxyGroupDomain>
+        <DataTypeDomain
+          name="input_type">
+          <DataType
+            value="vtkUnstructuredGrid" />
+        </DataTypeDomain>
+        <InputArrayDomain
+          name="input_array"
+          attribute_type="cell" />
+      </InputProperty>
+
+      <!-- Source Array -->
+      <StringVectorProperty
+        name="SelectSourceArray"
+        command="SetInputArrayToProcess"
+        number_of_elements="5"
+        element_types="0 0 0 0 2"
+        animateable="0">
+        <Documentation>
+          Specifies the offset array from which we generate Gauss points.
+        </Documentation>
+
+        <ArrayListDomain
+          name="array_list"
+          key_locations="MEDUtilities"
+          key_names="ELGA"
+          key_strategies="need_key">
+          <RequiredProperties>
+            <Property
+              name="Input"
+              function="Input" />
+          </RequiredProperties>
+        </ArrayListDomain>
+      </StringVectorProperty>
+
+      <Hints>
+        <Property name="SelectSourceArray" show="0"/>
+      </Hints>
+
+    </SourceProxy>
+    
+    <SourceProxy name="ELNOPoints" class="vtkELNOFilter" label="ELNO Points">
+      <Documentation
+        long_help="Create a point set with data at ELNO points. Cells are shrinked by a given factor towards the cell center."
+        short_help="Create a point set with data at ELNO points. Cells are shrinked by a given factor towards the cell center.">
+        "Create a point set with data at quadrature points."
+      </Documentation>
+
+      <OutputPort name="ELNO Points" index="0" />
+
+      <InputProperty name="Input" command="SetInputConnection">
+        <ProxyGroupDomain name="groups">
+          <Group name="sources" />
+          <Group name="filters" />
+        </ProxyGroupDomain>
+        <DataTypeDomain
+          name="input_type">
+          <DataType value="vtkUnstructuredGrid" />
+        </DataTypeDomain>
+        <InputArrayDomain name="input_array" attribute_type="cell" />
+      </InputProperty>
+
+      <!-- Source Array -->
+      <StringVectorProperty
+        name="SelectSourceArray"
+        command="SetInputArrayToProcess"
+        number_of_elements="5"
+        element_types="0 0 0 0 2"
+        animateable="0">
+        <Documentation>
+          Specifies the offset array from which we generate ELNO points.
+        </Documentation>
+
+        <ArrayListDomain
+          name="array_list"
+          key_locations="MEDUtilities"
+          key_names="ELNO"
+          key_strategies="need_key"
+          input_domain_name="input_array">
+          <RequiredProperties>
+            <Property name="Input" function="Input" />
+          </RequiredProperties>
+        </ArrayListDomain>
+      </StringVectorProperty>
+
+      <DoubleVectorProperty
+        name="ShrinkFactor"
+        command="SetShrinkFactor"
+        label="Shrink Factor"
+        number_of_elements="1"
+        default_values="0.5">
+        <DoubleRangeDomain name="range" min="0" max="1" />
+      </DoubleVectorProperty>
+
+      <Hints>
+        <Property name="SelectSourceArray" show="0"/>
+      </Hints>
+    </SourceProxy>
+
+
+    <SourceProxy
+      name="GenerateStructuralElement"
+      class="vtkGenerateStructElement"
+      label="Generate Structural Element">
+
+     <InputProperty
+        name="Input"
+        command="SetInputConnection">
+           <ProxyGroupDomain name="groups">
+             <Group name="sources"/>
+             <Group name="filters"/>
+           </ProxyGroupDomain>
+           <DataTypeDomain name="input_type">
+             <DataType value="vtkUnstructuredGrid"/>
+           </DataTypeDomain>
+           <Documentation>
+             This property specifies the input to the Generate Structural Element filter.
+           </Documentation>
+     </InputProperty>
+
+    </SourceProxy>
+  </ProxyGroup>
+</ServerManagerConfiguration>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractCellTypePanel.ui b/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractCellTypePanel.ui
new file mode 100644 (file)
index 0000000..85ed177
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ExtractCellTypePanel</class>
+ <widget class="QWidget" name="ExtractCellTypePanel">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>649</width>
+    <height>839</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>9</number>
+   </property>
+   <item row="0" column="0" colspan="3">
+    <widget class="QGroupBox" name="geometryGroupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>1</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Geometric types available</string>
+     </property>
+     <layout class="QVBoxLayout">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <widget class="pqTreeWidget" name="Fields">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>200</height>
+           </size>
+          </property>
+          <column>
+           <property name="text">
+            <string notr="true">1</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="ExtractComplementary">
+        <property name="text">
+         <string>Extract the complementary</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>pqTreeWidget</class>
+   <extends>QTreeWidget</extends>
+   <header>pqTreeWidget.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+ <designerdata>
+  <property name="gridDeltaX">
+   <number>10</number>
+  </property>
+  <property name="gridDeltaY">
+   <number>10</number>
+  </property>
+  <property name="gridSnapX">
+   <bool>false</bool>
+  </property>
+  <property name="gridSnapY">
+   <bool>false</bool>
+  </property>
+  <property name="gridVisible">
+   <bool>true</bool>
+  </property>
+ </designerdata>
+</ui>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui b/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui
new file mode 100644 (file)
index 0000000..b328a63
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ExtractGroupPanel</class>
+ <widget class="QWidget" name="ExtractGroupPanel">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>649</width>
+    <height>839</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>9</number>
+   </property>
+   <item row="0" column="0" colspan="3">
+    <widget class="QGroupBox" name="geometryGroupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>1</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Groups And Families</string>
+     </property>
+     <layout class="QVBoxLayout">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <widget class="pqTreeWidget" name="Fields">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>200</height>
+           </size>
+          </property>
+          <column>
+           <property name="text">
+            <string notr="true">1</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="ExtractComplementary">
+        <property name="text">
+         <string>Extract the complementary</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>pqTreeWidget</class>
+   <extends>QTreeWidget</extends>
+   <header>pqTreeWidget.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+ <designerdata>
+  <property name="gridDeltaX">
+   <number>10</number>
+  </property>
+  <property name="gridDeltaY">
+   <number>10</number>
+  </property>
+  <property name="gridSnapX">
+   <bool>false</bool>
+  </property>
+  <property name="gridSnapY">
+   <bool>false</bool>
+  </property>
+  <property name="gridVisible">
+   <bool>true</bool>
+  </property>
+ </designerdata>
+</ui>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/MEDReaderPanel.ui b/src/Plugins/MEDReader/ParaViewPlugin/Resources/UI/MEDReaderPanel.ui
new file mode 100644 (file)
index 0000000..23361f9
--- /dev/null
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MEDReaderPanel</class>
+ <widget class="QWidget" name="MEDReaderPanel">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>649</width>
+    <height>839</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout_5">
+   <property name="margin">
+    <number>9</number>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="geometryGroupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>1</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Representation</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <property name="margin">
+       <number>9</number>
+      </property>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QPushButton" name="Reload">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="toolTip">
+             <string>Reload current file</string>
+            </property>
+            <property name="autoFillBackground">
+             <bool>true</bool>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="icon">
+             <iconset resource="../pqMEDReader.qrc">
+              <normaloff>:/ParaViewResources/Icons/pqReloadFile16.png</normaloff>:/ParaViewResources/Icons/pqReloadFile16.png</iconset>
+            </property>
+            <property name="checkable">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <widget class="pqTreeWidget" name="Fields">
+          <property name="minimumSize">
+           <size>
+            <width>0</width>
+            <height>200</height>
+           </size>
+          </property>
+          <column>
+           <property name="text">
+            <string notr="true">1</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+        <item>
+         <widget class="QGroupBox" name="groupBox_2">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="maximumSize">
+           <size>
+            <width>16777215</width>
+            <height>16777215</height>
+           </size>
+          </property>
+          <property name="title">
+           <string/>
+          </property>
+          <layout class="QVBoxLayout" name="verticalLayout_2">
+           <property name="spacing">
+            <number>0</number>
+           </property>
+           <property name="margin">
+            <number>0</number>
+           </property>
+           <item>
+            <widget class="QCheckBox" name="GenerateVects">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="maximumSize">
+              <size>
+               <width>16777215</width>
+               <height>25</height>
+              </size>
+             </property>
+             <property name="text">
+              <string>GenerateVectors</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <widget class="QGroupBox" name="groupBox">
+          <property name="enabled">
+           <bool>true</bool>
+          </property>
+          <property name="title">
+           <string/>
+          </property>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <widget class="QRadioButton" name="stdMode">
+             <property name="text">
+              <string>Time</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QRadioButton" name="modeMode">
+             <property name="text">
+              <string>Mode</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <widget class="QWidget" name="timeStepsInspector" native="true">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="minimumSize">
+           <size>
+            <width>250</width>
+            <height>400</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_4"/>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>pqTreeWidget</class>
+   <extends>QTreeWidget</extends>
+   <header>pqTreeWidget.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources>
+  <include location="../pqMEDReader.qrc"/>
+ </resources>
+ <connections/>
+ <designerdata>
+  <property name="gridDeltaX">
+   <number>10</number>
+  </property>
+  <property name="gridDeltaY">
+   <number>10</number>
+  </property>
+  <property name="gridSnapX">
+   <bool>false</bool>
+  </property>
+  <property name="gridSnapY">
+   <bool>false</bool>
+  </property>
+  <property name="gridVisible">
+   <bool>true</bool>
+  </property>
+ </designerdata>
+</ui>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/pqMEDReader.qrc b/src/Plugins/MEDReader/ParaViewPlugin/Resources/pqMEDReader.qrc
new file mode 100644 (file)
index 0000000..5b3479a
--- /dev/null
@@ -0,0 +1,11 @@
+<RCC>
+    <qresource prefix="/ParaViewResources">
+        <file>Icons/pqCellData16.png</file>
+        <file>Icons/pqPointData16.png</file>
+        <file>Icons/pqQuadratureData16.png</file>
+        <file>MEDReaderClient2.xml</file>
+        <file>Icons/pqElnoData16.png</file>
+        <file>Icons/pqReloadFile16.png</file>
+       <file>Icons/pqCellDataForWholeMesh16.png</file>
+    </qresource>
+</RCC>
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.cxx
new file mode 100644 (file)
index 0000000..27b61ca
--- /dev/null
@@ -0,0 +1,298 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "VectBoolSpreadSheet.h"
+#include <QTableWidgetItem>
+#include <QHeaderView>
+#include <QTimeEdit>
+#include <QPainter>
+#include <iostream>
+
+VectBoolModel::VectBoolModel(int maxSize, int nbRows):_activated(maxSize,false),_nb_rows(nbRows)
+{
+  setCurSize(maxSize);
+}
+
+int VectBoolModel::rowCount(const QModelIndex &) const
+{
+  return _nb_rows;
+}
+
+int VectBoolModel::columnCount (const QModelIndex &) const
+{
+  int sz(curSize());
+  if(sz%_nb_rows==0)
+    return sz/_nb_rows;
+  else
+    return sz/_nb_rows+1;
+}
+
+QVariant VectBoolModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+  if(role==Qt::FontRole)
+    {
+      QFont serifFont("Arial",6, QFont::Bold);
+      return QVariant(serifFont);
+    }
+  else if(role==Qt::DisplayRole)
+    {
+      return QVariant(section);
+    }
+  else
+    return QAbstractTableModel::headerData(section,orientation,role);
+}
+
+bool VectBoolModel::setData(const QModelIndex& index, const QVariant& value, int role)
+{
+  if(role==Qt::UserRole)
+    {
+      int pos(index.column()*_nb_rows+index.row());
+      bool v(_activated[pos]);
+      _activated[pos]=!v;
+      emit nbOfTimeStepsOnChanged((int)getNbOfActivatedTimeSteps(),_dts.size());
+      return true;
+    }
+  else
+    return QAbstractTableModel::setData(index,value,role);
+}
+
+QVariant VectBoolModel::data(const QModelIndex &index, int role) const
+{
+  if(role==Qt::FontRole)
+    {
+      QFont serifFont("Arial",8);//, QFont::Bold);
+      return QVariant(serifFont);
+    }
+  else if(role==Qt::UserRole)
+    {
+      int pos(index.column()*_nb_rows+index.row());
+      return QVariant(_activated[pos]);
+    }
+  else if(role==Qt::DisplayRole)
+    {
+      int pos(index.column()*_nb_rows+index.row());
+      if(pos<curSize())
+        return QVariant(QString::number(pos));
+      else
+        return QVariant();
+    }
+  else if(role==Qt::TextAlignmentRole)
+    {
+      return QVariant(Qt::AlignHCenter | Qt::AlignVCenter);
+    }
+  else if(role==Qt::ToolTipRole)
+    {
+      QVariant v(data(index,Qt::DisplayRole));
+      QString v2(v.toString());
+      int pos(v2.toInt());
+      QString v3(_activated[pos]?QString("ON"):QString("OFF"));
+      QString v4(QString("time #%1 (it=%2 order=%3 t=%4) (%5)").arg(v2).arg(_dts[pos]).arg(_its[pos]).arg(_tts[pos]).arg(v3));
+      return QVariant(v4);
+    }
+  else if(role==Qt::BackgroundRole)
+    {
+      int pos(index.column()*_nb_rows+index.row());
+      if(pos>=curSize())
+        return QVariant();
+      if(_activated[pos])
+        {
+          QBrush b(QColor(0,255,0));
+          return QVariant(b);
+        }
+      else
+        {
+          QBrush b(QColor(255,0,0));
+          return QVariant(b);
+        }
+    }
+  else
+    return QVariant();
+}
+
+bool VectBoolModel::setCurrentItems(const QStringList& dts, const QStringList& its, const QStringList& tts)
+{
+  int oldSize(curSize());
+  if(oldSize!=dts.size())
+    {
+      emit layoutAboutToBeChanged();
+      _dts=dts; _its=its; _tts=tts;
+      emit layoutChanged();
+      return true;
+    }
+  else
+    {
+      _dts=dts; _its=its; _tts=tts;
+      return false; 
+    }
+  
+}
+
+void VectBoolModel::setNumberOfRows(int newNbOfRows)
+{
+  if(newNbOfRows!=_nb_rows)
+    {
+      emit beginResetModel();
+      _nb_rows=newNbOfRows;
+      emit endResetModel();
+    }
+}
+
+void VectBoolModel::selectUnselectAll()
+{
+  int nbOn(getNbOfActivatedTimeSteps()),sz(curSize()),signalVal(0);
+  emit layoutAboutToBeChanged();
+  if(nbOn>sz/2)
+    {
+      for(std::size_t ii=0;ii<sz;ii++)
+        _activated[ii]=false;
+      signalVal=0;
+    }
+  else
+    {
+      for(std::size_t ii=0;ii<sz;ii++)
+        _activated[ii]=true;
+      signalVal=(int)sz;
+    }
+  emit layoutChanged();
+  emit nbOfTimeStepsOnChanged(signalVal,_dts.size());
+}
+
+int VectBoolModel::getNbOfActivatedTimeSteps() const
+{
+  int sz(curSize()),nbOn(0);
+  for(std::size_t ii=0;ii<sz;ii++)
+    if(_activated[ii])
+      nbOn++;
+  return nbOn;
+}
+
+void VectBoolModel::setCurSize(int sz)
+{
+  _dts.clear(); _its.clear(); _tts.clear();
+  for(int i=0;i<sz;i++)
+    {
+      _dts.push_back(QString());
+      _its.push_back(QString());
+      _tts.push_back(QString());
+    }
+}
+
+int VectBoolModel::curSize() const
+{
+  return _dts.size();
+}
+
+///////////////
+
+VectBoolSpreadSheet::VectBoolSpreadSheet(QWidget *parent):QTableView(parent),_delegate(new OnOffDelegate)
+{
+}
+
+VectBoolSpreadSheet::~VectBoolSpreadSheet()
+{
+  delete _delegate;
+}
+
+void VectBoolSpreadSheet::init()
+{
+  this->horizontalHeader()->setMinimumSectionSize(2);
+  this->horizontalHeader()->setDefaultSectionSize(2);
+  this->verticalHeader()->setMinimumSectionSize(2);
+  this->verticalHeader()->setDefaultSectionSize(2);
+  this->setItemDelegate(_delegate);
+  this->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+  this->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
+  this->resizeColumnsToContents();
+  this->resizeRowsToContents();
+  //this->verticalHeader()->hide();
+  //this->horizontalHeader()->hide();
+}
+
+void VectBoolSpreadSheet::selectionChanged(const QItemSelection & selected, const QItemSelection & deselected)
+{
+  QAbstractItemModel * m(model());
+  foreach(const QModelIndex& ind,selected.indexes())
+    {
+      m->setData(ind,QVariant(true),Qt::UserRole);
+    }
+  QTableView::selectionChanged(selected,deselected);
+}
+
+void VectBoolSpreadSheet::nbOfRowsHasChanged(int newNbOfRows)
+{
+  VectBoolModel *zeModel(qobject_cast<VectBoolModel *>(model()));
+  if(!zeModel)
+    return ;
+  zeModel->setNumberOfRows(newNbOfRows);
+  this->verticalHeader()->setUpdatesEnabled(true);//please let this line. If not a refresh problem appear at EDF configuration.
+}
+
+void VectBoolSpreadSheet::selectUnselectAllFired()
+{
+  VectBoolModel *zeModel(qobject_cast<VectBoolModel *>(model()));
+  if(!zeModel)
+    return ;
+  zeModel->selectUnselectAll();
+}
+
+///////////////
+
+OnOffDelegate::OnOffDelegate(QObject *parent):QStyledItemDelegate(parent)
+{
+}
+
+void OnOffDelegate::paint(QPainter *painter, const QStyleOptionViewItem & option, const QModelIndex& index) const
+{
+  painter->save();
+  const QAbstractItemModel *zeModel(index.model());
+  QString cont(zeModel->data(index,Qt::DisplayRole).toString());
+  bool checked(zeModel->data(index,Qt::UserRole).toBool());
+  QFont font;
+  if(checked)
+    {
+      QFont zeFont(zeModel->data(index,Qt::FontRole).value<QFont>());
+      zeFont.setBold(true);
+      font=zeFont;
+    }
+  else
+    {
+      font=QFont("Arial",7);
+      font.setItalic(true);
+    }
+  painter->setFont(font);
+  Qt::Alignment al((Qt::Alignment)zeModel->data(index,Qt::TextAlignmentRole).toInt());
+  if(checked)
+    {//sizeHint
+      //painter->drawEllipse(option.rect);
+      //painter->setBrush(QBrush(Qt::lightGray,Qt::Dense6Pattern));
+      painter->setBrush(QBrush(QColor(230,230,255)));
+      painter->drawRect(option.rect);
+      //painter->drawLine(option.rect.topLeft(),option.rect.bottomRight());
+      //painter->drawLine(option.rect.topRight(),option.rect.bottomLeft());
+    }
+  else
+    {
+      painter->setBrush(QBrush(QColor(255,255,255)));
+      painter->drawRect(option.rect);
+      painter->setPen(Qt::lightGray);
+    }
+  painter->drawText(option.rect,cont,QTextOption(al));
+  painter->restore();
+}
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.h b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolSpreadSheet.h
new file mode 100644 (file)
index 0000000..57b7d77
--- /dev/null
@@ -0,0 +1,80 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include <QTableWidget>
+#include <QItemDelegate>
+#include <QStringListModel>
+#include <QAbstractTableModel>
+#include <QListView>
+#include <QStyledItemDelegate>
+
+class OnOffDelegate : public QStyledItemDelegate//QItemDelegate
+{
+  Q_OBJECT
+  public:
+  OnOffDelegate(QObject *parent=0);
+  void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const;
+};
+
+class VectBoolSpreadSheet : public QTableView
+{
+  Q_OBJECT
+public:
+  VectBoolSpreadSheet(QWidget *parent);
+  ~VectBoolSpreadSheet();
+  void init();
+  void selectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
+public slots:
+  void nbOfRowsHasChanged(int newNbOfRows);
+  void selectUnselectAllFired();
+private:
+  OnOffDelegate *_delegate;
+};
+
+class VectBoolModel : public QAbstractTableModel
+{
+  Q_OBJECT
+public:
+  VectBoolModel(int maxSize, int nbRows);
+  std::size_t getSize() const { return _activated.size(); }
+  bool getStatusAt(int pos) const { return _activated[pos]; }
+  void setStatusAt(int pos, bool val) { _activated[pos]=val; }
+  int rowCount( const QModelIndex & parent = QModelIndex() ) const;
+  int columnCount ( const QModelIndex & parent = QModelIndex() ) const;
+  bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
+  QVariant data(const QModelIndex &index, int role) const;
+  QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+  // non const methods.
+  bool setCurrentItems(const QStringList& dts, const QStringList& its, const QStringList& tts);
+  int getNbOfActivatedTimeSteps() const;
+public:
+  void setNumberOfRows(int newNbOfRows);
+  void selectUnselectAll();
+signals:
+  void nbOfTimeStepsOnChanged(int newNbOfTimeStepsOn, int totalNbOfTS);
+private:
+  void setCurSize(int sz);
+  int curSize() const;
+private:
+  std::vector<bool> _activated;
+  QStringList _dts,_its,_tts;
+  int _cur_size;
+  int _nb_rows;
+};
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.cxx b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.cxx
new file mode 100644 (file)
index 0000000..c9e976c
--- /dev/null
@@ -0,0 +1,195 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "VectBoolWidget.h"
+#include "VectBoolSpreadSheet.h"
+
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QGridLayout>
+#include <QPushButton>
+#include <QLabel>
+#include <QGroupBox>
+#include <QSlider>
+
+#include <cmath>
+#include <iostream>
+
+NbOfActiveTSDisplay::NbOfActiveTSDisplay(QWidget *parent):QLabel(parent),_nb_of_items_on(0),_total_nb_of_items(0)
+{
+  setFont(QFont("Arial",8,QFont::Bold));
+  setTextFormat(Qt::AutoText);
+}
+
+  void NbOfActiveTSDisplay::display(int nbOfItemsOn, int totalNbOfItems)
+{
+  _nb_of_items_on=nbOfItemsOn;
+  _total_nb_of_items=totalNbOfItems;
+  setText(QString("%1/%2").arg(_nb_of_items_on).arg(_total_nb_of_items));
+}
+
+void NbOfActiveTSDisplay::totalNbOfItemsChanged(int totalNbOfItems)
+{
+  _total_nb_of_items=totalNbOfItems;
+  setText(QString("%1/%2").arg(_nb_of_items_on).arg(_total_nb_of_items));
+}
+
+VectBoolItem::VectBoolItem(QObject *parent, int pos, VectBoolModel *model):QObject(parent),_pos(pos),_old_status(true),_model(model)
+{
+}
+
+bool VectBoolItem::isActivated() const
+{
+  return _model->getStatusAt(_pos);
+}
+
+void VectBoolItem::activated(bool val)
+{
+  //_model->setStatusAt(_pos,val);
+}
+
+void VectBoolItem::theModelHasChanged()
+{
+  bool val(isActivated());
+  if(val!=_old_status)
+    {
+      _old_status=val;
+      emit changed();
+    }
+}
+
+VectBoolWidget::VectBoolWidget(QWidget *parent, int nbOfItems):QFrame(parent)
+{
+  QSizePolicy sizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
+  sizePolicy.setHorizontalStretch(0);
+  sizePolicy.setVerticalStretch(0);
+  sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
+  this->setSizePolicy(sizePolicy);
+  this->setFrameShape(QFrame::StyledPanel);
+  this->setFrameShadow(QFrame::Raised);
+  _horizontal_layout=new QHBoxLayout(this);
+  _horizontal_layout->setSpacing(6);
+  _horizontal_layout->setContentsMargins(11,11,11,11);
+  _spreadsheet_container=new QFrame(this);
+  QSizePolicy sizePolicy1(QSizePolicy::Expanding,QSizePolicy::Expanding);
+  sizePolicy1.setHorizontalStretch(0);
+  sizePolicy1.setVerticalStretch(0);
+  sizePolicy1.setHeightForWidth(_spreadsheet_container->sizePolicy().hasHeightForWidth());
+  _spreadsheet_container->setSizePolicy(sizePolicy1);
+  _grid_layout=new QGridLayout(_spreadsheet_container);
+  _grid_layout->setSpacing(6);
+  _grid_layout->setContentsMargins(11,11,11,11);
+  _horizontal_layout->addWidget(_spreadsheet_container);
+  _group_box=new QGroupBox(this);
+  QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Expanding);
+  sizePolicy2.setHorizontalStretch(0);
+  sizePolicy2.setVerticalStretch(0);
+  sizePolicy2.setHeightForWidth(_group_box->sizePolicy().hasHeightForWidth());
+  _group_box->setSizePolicy(sizePolicy2);
+  //
+  _vertical_layout=new QVBoxLayout(_group_box);
+  _vertical_layout->setSpacing(6);
+  _vertical_layout->setContentsMargins(11,11,11,11);
+  _nb_of_time_steps_on=new NbOfActiveTSDisplay(_group_box);
+  _nb_of_time_steps_on->setMaximumSize(QSize(40,16777215));
+  _vertical_layout->addWidget(_nb_of_time_steps_on);
+  _nb_of_rows_selecter=new QSlider(_group_box);
+  QSizePolicy sizePolicy3(QSizePolicy::Expanding,QSizePolicy::Expanding);
+  sizePolicy3.setHorizontalStretch(0);
+  sizePolicy3.setVerticalStretch(0);
+  sizePolicy3.setHeightForWidth(_nb_of_rows_selecter->sizePolicy().hasHeightForWidth());
+  _nb_of_rows_selecter->setSizePolicy(sizePolicy3);
+  _nb_of_rows_selecter->setOrientation(Qt::Vertical);
+  _vertical_layout->addWidget(_nb_of_rows_selecter);
+  _sel_unsel_all=new QPushButton(_group_box);
+  _sel_unsel_all->setMaximumSize(QSize(40,16777215));
+  _sel_unsel_all->setText(QString("Sel All"));
+  QFont font("Andale Mono");
+  font.setPointSize(5);
+  _sel_unsel_all->setFont(font);
+  _vertical_layout->addWidget(_sel_unsel_all);
+  //
+  _horizontal_layout->addWidget(_group_box);
+  //
+  _vbw=new VectBoolSpreadSheet(_spreadsheet_container);
+  QSizePolicy sizePolicy4(QSizePolicy::Expanding,QSizePolicy::Expanding);
+  sizePolicy4.setHorizontalStretch(0);
+  sizePolicy4.setVerticalStretch(0);
+  sizePolicy4.setHeightForWidth(_vbw->sizePolicy().hasHeightForWidth());
+  _vbw->setSizePolicy(sizePolicy4);
+  _nb_of_rows_selecter->setSizePolicy(sizePolicy3);
+  _nb_of_rows_selecter->setMinimum(1);
+  _nb_of_rows_selecter->setMaximum(GetMaxTickValueOfSlider(nbOfItems));
+  _nb_of_rows_selecter->setTickInterval(1);
+  _nb_of_rows_selecter->setTickPosition(QSlider::TicksRight);
+  connect(_nb_of_rows_selecter,SIGNAL(valueChanged(int)),_vbw,SLOT(nbOfRowsHasChanged(int)));
+  connect(_sel_unsel_all,SIGNAL(clicked()),_vbw,SLOT(selectUnselectAllFired()));
+  _grid_layout->addWidget(_vbw);
+  _vbw->init();
+  _vbm=new VectBoolModel(nbOfItems,1);
+  _vbw->setModel(_vbm);
+  connect(this->_vbm,SIGNAL(nbOfTimeStepsOnChanged(int,int)),_nb_of_time_steps_on,SLOT(display(int,int)));
+  _vbm->selectUnselectAll();
+  _nb_of_rows_selecter->setValue(_nb_of_rows_selecter->maximum());
+  //
+  _items.resize(nbOfItems);
+  for(int i=0;i<nbOfItems;i++)
+    {
+      _items[i]=new VectBoolItem(this,i,_vbm);
+      connect(_vbm,SIGNAL(nbOfTimeStepsOnChanged(int,int)),_items[i],SLOT(theModelHasChanged()));
+    }
+}
+
+void VectBoolWidget::setItems(const QStringList& dts, const QStringList& its, const QStringList& tts)
+{
+  int curNbOfItems(dts.size());
+  if(curNbOfItems>getNumberOfBoolItems())
+    {
+      std::cerr << "ERROR ! Internal Error in VectBoolWidget::setItems ! Current number of items is bigger than the current one !" << std::endl;
+      return ;
+    }
+  if(_vbm->setCurrentItems(dts,its,tts))
+    {
+      _nb_of_rows_selecter->setMaximum(GetMaxTickValueOfSlider(curNbOfItems));
+      _nb_of_rows_selecter->setValue(_nb_of_rows_selecter->maximum());
+      _nb_of_time_steps_on->display(_vbm->getNbOfActivatedTimeSteps(),dts.size());
+    }
+}
+
+int VectBoolWidget::getNumberOfBoolItems() const
+{
+  return (int)_vbm->getSize();
+}
+
+int VectBoolWidget::GetMaxTickValueOfSlider(int val)
+{
+  double valf((double)val);
+  double ret(sqrt(valf));
+  int reti((int)ret);
+  if(reti*reti==val)
+    return reti;
+  else
+    return reti+1;
+}
+
+VectBoolWidget::~VectBoolWidget()
+{
+  delete _vbm;
+}
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.h b/src/Plugins/MEDReader/ParaViewPlugin/VectBoolWidget.h
new file mode 100644 (file)
index 0000000..74b8a47
--- /dev/null
@@ -0,0 +1,91 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef __VECTBOOLWIDGET_H__
+#define __VECTBOOLWIDGET_H__
+
+#include <QFrame>
+#include <QLabel>
+
+class QSlider;
+class QGroupBox;
+class QHBoxLayout;
+class QVBoxLayout;
+class QGridLayout;
+class QPushButton;
+class VectBoolModel;
+class VectBoolSpreadSheet;
+
+class NbOfActiveTSDisplay : public QLabel
+{
+Q_OBJECT
+public:
+  NbOfActiveTSDisplay(QWidget *parent=0);
+public slots:
+  void display(int nbOfItemsOn, int totalNbOfItems);
+  void totalNbOfItemsChanged(int totalNbOfItems);
+private:
+  int _nb_of_items_on;
+  int _total_nb_of_items;
+};
+
+class VectBoolItem : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(bool activated READ isActivated WRITE activated)
+public:
+  VectBoolItem(QObject *parent, int pos, VectBoolModel *model);
+  bool isActivated() const;
+  void activated(bool val);
+public slots:
+  void theModelHasChanged();
+signals:
+  void changed();
+private:
+  int _pos;
+  mutable bool _old_status;
+  VectBoolModel *_model;
+};
+
+class VectBoolWidget : public QFrame
+{
+public:
+  VectBoolWidget(QWidget *parent, int nbOfItems);
+  ~VectBoolWidget();
+  int getNumberOfBoolItems() const;
+  void setItems(const QStringList& dts, const QStringList& its, const QStringList& tts);
+  const QVector<VectBoolItem *>& getItems() const { return _items; }
+private:
+  static int GetMaxTickValueOfSlider(int val);
+private:
+  QVector<VectBoolItem *> _items;
+  QHBoxLayout *_horizontal_layout;
+  QFrame *_spreadsheet_container;
+  QGridLayout *_grid_layout;
+  QGroupBox *_group_box;
+  QVBoxLayout *_vertical_layout;
+  NbOfActiveTSDisplay *_nb_of_time_steps_on;
+  QSlider *_nb_of_rows_selecter;
+  QPushButton *_sel_unsel_all;
+  VectBoolSpreadSheet *_vbw;
+  VectBoolModel *_vbm;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.cxx
new file mode 100644 (file)
index 0000000..07fe5fb
--- /dev/null
@@ -0,0 +1,162 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "pqExtractCellTypePanel.h"
+#include "ui_ExtractCellTypePanel.h"
+
+#include "vtkProcessModule.h"
+#include "vtkMultiBlockDataSet.h"
+#include "vtkInformation.h"
+#include "vtkIntArray.h"
+#include "vtkSMDoubleVectorProperty.h"
+#include "vtkSMIntVectorProperty.h"
+#include "vtkSMStringVectorProperty.h"
+#include "vtkSMProxy.h"
+#include "vtkEventQtSlotConnect.h"
+#include "vtkPVSILInformation.h"
+#include "vtkGraph.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkAdjacentVertexIterator.h"
+#include "vtkSMPropertyHelper.h"
+#include "vtkStringArray.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkExtractCellType.h"
+
+#include "pqTreeWidgetItemObject.h"
+#include "pqSMAdaptor.h"
+#include "pqProxy.h"
+#include "pqPropertyManager.h"
+#include "pqSILModel.h"
+#include "pqProxySILModel.h"
+#include "pqTreeViewSelectionHelper.h"
+#include "pqTreeWidgetSelectionHelper.h"
+#include "pqPropertyLinks.h"
+
+#include <QHeaderView>
+
+static const char ZE_SEP[]="@@][@@";
+
+class pqExtractCellTypePanel::pqUI: public QObject, public Ui::ExtractCellTypePanel
+{
+public:
+  pqUI(pqExtractCellTypePanel* p):QObject(p)
+  {
+    this->VTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
+    this->SILUpdateStamp = -1;
+  }
+
+  ~pqUI() { }
+
+  pqSILModel SILModel;
+  vtkSmartPointer<vtkEventQtSlotConnect> VTKConnect;
+  pqPropertyLinks Links;
+  QMap<QTreeWidgetItem*, QString> TreeItemToPropMap;
+  int SILUpdateStamp;
+};
+
+pqExtractCellTypePanel::pqExtractCellTypePanel(pqProxy* object_proxy, QWidget* p):Superclass(object_proxy, p)
+{
+  this->UI=new pqUI(this);
+  this->UI->setupUi(this);
+  pqProxySILModel*proxyModel2 = new pqProxySILModel("GeoTypesStatusTree", &this->UI->SILModel);
+  proxyModel2->setSourceModel(&this->UI->SILModel);
+  this->UI->Fields->setHeaderHidden(true);
+  this->updateSIL();
+  this->linkServerManagerProperties();
+  ////////////////////
+  vtkSMProperty *SMProperty(this->proxy()->GetProperty("GeoTypesStatus"));
+  ////////////////////
+  vtkSMProxy* reader = this->referenceProxy()->getProxy();
+  vtkPVSILInformation* info=vtkPVSILInformation::New();
+  reader->GatherInformation(info);
+  vtkGraph *g(info->GetSIL());
+  vtkMutableDirectedGraph *g2(vtkMutableDirectedGraph::SafeDownCast(g));
+  int idNames(0);
+  vtkAbstractArray *verticesNames(g2->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  vtkIdType id0;
+  bool found(false);
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="CellTypesTree")
+        {
+          id0=i;
+          found=true;
+        }
+    }
+  if(!found)
+    std::cerr << "There is an internal error ! The tree on server side has not the expected look !" << std::endl;
+  vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
+  g2->GetAdjacentVertices(id0,it0);
+  int kk(0),ll(0);
+  while(it0->HasNext())
+    {
+      vtkIdType id1(it0->Next());
+      QString geoTypeName(QString::fromStdString((const char *)verticesNames2->GetValue(id1)));
+      vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());
+      g2->GetAdjacentVertices(id1,it1);
+      QList<QString> strs0; strs0.append(QString("%1").arg(geoTypeName));
+      pqTreeWidgetItemObject *item0(new pqTreeWidgetItemObject(this->UI->Fields,strs0));
+      vtkAdjacentVertexIterator *itGrps(vtkAdjacentVertexIterator::New());
+      g2->GetAdjacentVertices(id1,itGrps);
+      vtkIdType idg(itGrps->Next());
+      QString name0(QString::fromStdString((const char *)verticesNames2->GetValue(idg)));
+      QString toolTipName0(QString("%1 (vtkId=%2)").arg(geoTypeName).arg(name0));
+      item0->setData(0,Qt::UserRole,geoTypeName);
+      item0->setData(0,Qt::ToolTipRole,toolTipName0);
+      item0->setData(0,Qt::CheckStateRole,0);
+      this->propertyManager()->registerLink(item0,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll++);
+    }
+  it0->Delete(); 
+  this->UI->Fields->header()->setStretchLastSection(true);
+  this->UI->Fields->expandAll();
+  info->Delete();
+  ////////////////////
+  vtkSMProperty *SMPropertyExtractComp(this->proxy()->GetProperty("InsideOut"));
+  this->propertyManager()->registerLink(this->UI->ExtractComplementary,"checked",SIGNAL(stateChanged(int)),this->proxy(),SMPropertyExtractComp);
+  ////////////////////
+  this->UI->VTKConnect->Connect(this->proxy(),vtkCommand::UpdateInformationEvent,this,SLOT(updateSIL()));
+}
+
+pqExtractCellTypePanel::~pqExtractCellTypePanel()
+{
+}
+
+void pqExtractCellTypePanel::linkServerManagerProperties()
+{
+  this->Superclass::linkServerManagerProperties();
+}
+
+void pqExtractCellTypePanel::updateSIL()
+{
+  vtkSMProxy* reader = this->referenceProxy()->getProxy();
+  reader->UpdatePropertyInformation(reader->GetProperty("SILUpdateStamp"));
+  int stamp = vtkSMPropertyHelper(reader, "SILUpdateStamp").GetAsInt();
+  if (stamp != this->UI->SILUpdateStamp)
+    {
+      this->UI->SILUpdateStamp = stamp;
+      vtkPVSILInformation* info = vtkPVSILInformation::New();
+      reader->GatherInformation(info);
+      this->UI->SILModel.update(info->GetSIL());
+      this->UI->Fields->expandAll();
+      info->Delete();
+    }
+}
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.h b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractCellTypePanel.h
new file mode 100644 (file)
index 0000000..568ca8f
--- /dev/null
@@ -0,0 +1,50 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef _pqExtractCellTypePanel_h
+#define _pqExtractCellTypePanel_h
+
+#include "pqNamedObjectPanel.h"
+
+#include <map>
+
+class pqTreeWidgetItemObject;
+
+class vtkSMProperty;
+class vtkMutableDirectedGraph;
+
+class pqExtractCellTypePanel : public pqNamedObjectPanel
+{
+Q_OBJECT
+  typedef pqNamedObjectPanel Superclass;
+public:
+  pqExtractCellTypePanel(pqProxy* proxy, QWidget* p = NULL);
+  ~pqExtractCellTypePanel();
+protected slots:
+  void updateSIL();
+protected:
+  /// populate widgets with properties from the server manager
+  virtual void linkServerManagerProperties();
+  class pqUI;
+  pqUI* UI;
+  std::vector<pqTreeWidgetItemObject *> _all_lev4;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.cxx b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.cxx
new file mode 100644 (file)
index 0000000..db1c26e
--- /dev/null
@@ -0,0 +1,365 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "pqExtractGroupPanel.h"
+#include "ui_ExtractGroupPanel.h"
+
+#include "vtkProcessModule.h"
+#include "vtkMultiBlockDataSet.h"
+#include "vtkInformation.h"
+#include "vtkIntArray.h"
+#include "vtkSMDoubleVectorProperty.h"
+#include "vtkSMIntVectorProperty.h"
+#include "vtkSMStringVectorProperty.h"
+#include "vtkSMProxy.h"
+#include "vtkEventQtSlotConnect.h"
+#include "vtkPVSILInformation.h"
+#include "vtkGraph.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkAdjacentVertexIterator.h"
+#include "vtkSMPropertyHelper.h"
+#include "vtkStringArray.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkExtractGroup.h"
+
+#include "pqTreeWidgetItemObject.h"
+#include "pqSMAdaptor.h"
+#include "pqProxy.h"
+#include "pqPropertyManager.h"
+#include "pqSILModel.h"
+#include "pqProxySILModel.h"
+#include "pqTreeViewSelectionHelper.h"
+#include "pqTreeWidgetSelectionHelper.h"
+#include "pqPropertyLinks.h"
+
+#include <QHeaderView>
+
+static const char ZE_SEP[]="@@][@@";
+
+class PixSingleExtractPanel
+{
+public:
+  static const PixSingleExtractPanel &GetInstance();
+  QPixmap getPixFromStr(int pos) const;
+  PixSingleExtractPanel();
+private:
+  static const int NB_OF_DISCR=4;
+  static PixSingleExtractPanel *UNIQUE_INSTANCE;
+  QPixmap _pixmaps[NB_OF_DISCR];
+};
+
+PixSingleExtractPanel *PixSingleExtractPanel::UNIQUE_INSTANCE=0;
+
+const PixSingleExtractPanel &PixSingleExtractPanel::GetInstance()
+{
+  if(!UNIQUE_INSTANCE)
+    UNIQUE_INSTANCE=new PixSingleExtractPanel;
+  return *UNIQUE_INSTANCE;
+}
+
+PixSingleExtractPanel::PixSingleExtractPanel()
+{
+  _pixmaps[0]=QPixmap(":/ParaViewResources/Icons/pqCellData16.png");
+  _pixmaps[1]=QPixmap(":/ParaViewResources/Icons/pqPointData16.png");
+}
+
+QPixmap PixSingleExtractPanel::getPixFromStr(int pos) const
+{
+  if(pos>=0 && pos<=1)
+    return _pixmaps[pos];
+  else
+    return QPixmap();
+}
+
+class pqExtractGroupPanel::pqUI: public QObject, public Ui::ExtractGroupPanel
+{
+public:
+  pqUI(pqExtractGroupPanel* p):QObject(p)
+  {
+    this->VTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
+    this->SILUpdateStamp = -1;
+  }
+
+  ~pqUI() { }
+
+  pqSILModel SILModel;
+  vtkSmartPointer<vtkEventQtSlotConnect> VTKConnect;
+  pqPropertyLinks Links;
+  QMap<QTreeWidgetItem*, QString> TreeItemToPropMap;
+  int SILUpdateStamp;
+};
+
+pqExtractGroupPanel::pqExtractGroupPanel(pqProxy* object_proxy, QWidget* p):Superclass(object_proxy, p)
+{
+  this->UI=new pqUI(this);
+  this->UI->setupUi(this);
+  pqProxySILModel*proxyModel2 = new pqProxySILModel("GroupsFlagsStatusTree", &this->UI->SILModel);
+  proxyModel2->setSourceModel(&this->UI->SILModel);
+  this->UI->Fields->setHeaderHidden(true);
+  this->updateSIL();
+  this->linkServerManagerProperties();
+  ////////////////////
+  vtkSMProperty *SMProperty(this->proxy()->GetProperty("GroupsFlagsStatus"));
+  ////////////////////
+  vtkSMProxy* reader = this->referenceProxy()->getProxy();
+  vtkPVSILInformation* info=vtkPVSILInformation::New();
+  reader->GatherInformation(info);
+  vtkGraph *g(info->GetSIL());
+  vtkMutableDirectedGraph *g2(vtkMutableDirectedGraph::SafeDownCast(g));
+  int idNames(0);
+  vtkAbstractArray *verticesNames(g2->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  vtkIdType id0;
+  bool found(false);
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="MeshesFamsGrps")
+        {
+          id0=i;
+          found=true;
+        }
+    }
+  if(!found)
+    std::cerr << "There is an internal error ! The tree on server side has not the expected look !" << std::endl;
+  vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
+  g2->GetAdjacentVertices(id0,it0);
+  int kk(0),ll(0);
+  while(it0->HasNext())
+    {
+      vtkIdType id1(it0->Next());
+      QString meshName(QString::fromStdString((const char *)verticesNames2->GetValue(id1)));
+      vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());
+      g2->GetAdjacentVertices(id1,it1);
+      vtkIdType idZeGrps(it1->Next());//zeGroups
+      QList<QString> strs0; strs0.append(QString("Groups of \"%1\"").arg(meshName));
+      pqTreeWidgetItemObject *item0(new pqTreeWidgetItemObject(this->UI->Fields,strs0));
+      std::map<std::string,int> famIds(DeduceMapOfFamilyFromSIL(g2));
+      //item0->setData(0,Qt::CheckStateRole,0);
+      vtkAdjacentVertexIterator *itGrps(vtkAdjacentVertexIterator::New());
+      g2->GetAdjacentVertices(idZeGrps,itGrps);
+      while(itGrps->HasNext())
+        {
+          vtkIdType idg(itGrps->Next());
+          QString name0(QString::fromStdString((const char *)verticesNames2->GetValue(idg))); QList<QString> strs0; strs0.append(name0);
+          QString toolTipName0(name0);
+          pqTreeWidgetItemObject *item1(new pqTreeWidgetItemObject(item0,strs0));
+          //
+          vtkAdjacentVertexIterator *itFamsOnGrp(vtkAdjacentVertexIterator::New());
+          g2->GetAdjacentVertices(idg,itFamsOnGrp);
+          bool isOnCell(true),isOnPoint(true);
+          while(itFamsOnGrp->HasNext())
+            {
+              vtkIdType idfg(itFamsOnGrp->Next());
+              std::string namefg((const char *)verticesNames2->GetValue(idfg));
+              std::map<std::string,int>::const_iterator ittt(famIds.find(namefg));
+              if(ittt==famIds.end())
+                { isOnCell=false; isOnPoint=false; break; }
+              int zeId((*ittt).second);
+              if(zeId<0)
+                {
+                  if(!isOnCell)
+                    { isOnCell=false; isOnPoint=false; break; }
+                  else
+                    isOnPoint=false;
+                }
+              if(zeId>0)
+                {
+                  if(!isOnPoint)
+                    { isOnCell=false; isOnPoint=false; break; }
+                  else
+                    isOnCell=false;
+                }
+            }
+          itFamsOnGrp->Delete();
+          item1->setData(0,Qt::UserRole,name0);
+          item1->setData(0,Qt::ToolTipRole,toolTipName0);
+          item1->setData(0,Qt::CheckStateRole,0);
+          if(isOnCell && !isOnPoint)
+            item1->setData(0,Qt::DecorationRole,PixSingleExtractPanel::GetInstance().getPixFromStr(0));
+          if(!isOnCell && isOnPoint)
+            item1->setData(0,Qt::DecorationRole,PixSingleExtractPanel::GetInstance().getPixFromStr(1));
+          this->propertyManager()->registerLink(item1,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll++);
+        }
+      itGrps->Delete();
+      // families 
+      vtkIdType idZeFams(it1->Next());//zeFams
+      strs0.clear(); strs0.append(QString("Families of \"%1\"").arg(meshName));
+      pqTreeWidgetItemObject *item00(new pqTreeWidgetItemObject(this->UI->Fields,strs0));
+      //item00->setData(0,Qt::CheckStateRole,0);
+      vtkAdjacentVertexIterator *itFams(vtkAdjacentVertexIterator::New());
+      g2->GetAdjacentVertices(idZeFams,itFams);
+      while(itFams->HasNext())
+        {
+          vtkIdType idf(itFams->Next());
+          std::string crudeFamName((const char *)verticesNames2->GetValue(idf));
+          std::size_t pos(crudeFamName.find_first_of(ZE_SEP));
+          std::string famName(crudeFamName.substr(0,pos)); std::string idStr(crudeFamName.substr(pos+strlen(ZE_SEP)));
+          int idInt(QString(idStr.c_str()).toInt());
+          famIds[famName]=idInt;
+          QString name0(famName.c_str()); QList<QString> strs0; strs0.append(name0);
+          QString toolTipName0(QString("%1 (%2)").arg(QString(famName.c_str())).arg(QString(idStr.c_str())));
+          pqTreeWidgetItemObject *item1(new pqTreeWidgetItemObject(item00,strs0));
+          item1->setData(0,Qt::UserRole,name0);
+          item1->setData(0,Qt::ToolTipRole,toolTipName0);
+          item1->setData(0,Qt::CheckStateRole,0);
+          if(idInt<0)
+            item1->setData(0,Qt::DecorationRole,PixSingleExtractPanel::GetInstance().getPixFromStr(0));
+          if(idInt>0)
+            item1->setData(0,Qt::DecorationRole,PixSingleExtractPanel::GetInstance().getPixFromStr(1));
+          this->propertyManager()->registerLink(item1,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll++);
+        }
+      itFams->Delete();
+    }
+  it0->Delete(); 
+  this->UI->Fields->header()->setStretchLastSection(true);
+  this->UI->Fields->expandAll();
+  info->Delete();
+  ////////////////////
+  vtkSMProperty *SMPropertyExtractComp(this->proxy()->GetProperty("InsideOut"));
+  this->propertyManager()->registerLink(this->UI->ExtractComplementary,"checked",SIGNAL(stateChanged(int)),this->proxy(),SMPropertyExtractComp);
+  ////////////////////
+  this->UI->VTKConnect->Connect(this->proxy(),vtkCommand::UpdateInformationEvent, this, SLOT(updateSIL()));
+}
+
+pqExtractGroupPanel::~pqExtractGroupPanel()
+{
+}
+
+void pqExtractGroupPanel::linkServerManagerProperties()
+{
+  this->Superclass::linkServerManagerProperties();
+}
+
+void pqExtractGroupPanel::updateSIL()
+{
+  vtkSMProxy* reader = this->referenceProxy()->getProxy();
+  reader->UpdatePropertyInformation(reader->GetProperty("SILUpdateStamp"));
+  int stamp = vtkSMPropertyHelper(reader, "SILUpdateStamp").GetAsInt();
+  if (stamp != this->UI->SILUpdateStamp)
+    {
+    this->UI->SILUpdateStamp = stamp;
+    vtkPVSILInformation* info = vtkPVSILInformation::New();
+    reader->GatherInformation(info);
+    this->UI->SILModel.update(info->GetSIL());
+    this->UI->Fields->expandAll();
+    info->Delete();
+    }
+}
+
+void pqExtractGroupPanel::aLev4HasBeenFired()
+{
+  pqTreeWidgetItemObject *zeItem(qobject_cast<pqTreeWidgetItemObject *>(sender()));
+  if(!zeItem)
+    return;
+  pqTreeWidgetItemObject *father(dynamic_cast<pqTreeWidgetItemObject *>(zeItem->QTreeWidgetItem::parent()));
+  if(!father)
+    return ;
+  if(zeItem->isChecked())
+    {
+      // This part garantees that all leaves having not the same father than zeItem are desactivated
+      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
+        {
+          QTreeWidgetItem *testFath(elt->QTreeWidgetItem::parent());
+          if(testFath!=father)
+            if(elt->isChecked())
+              elt->setChecked(false);
+        }
+      //If all leaves are checked the father is check too
+      bool allItemsAreChked(true);
+      for(int i=0;i<father->childCount() && allItemsAreChked;i++)
+        {
+          pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
+          if(elt && !elt->isChecked())
+            allItemsAreChked=false;
+        }
+      if(allItemsAreChked && !father->isChecked())
+        father->setChecked(true);
+    }
+  else
+    {
+      // if all are unchecked - check it again
+      bool allItemsAreUnChked(true);
+      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
+        {
+          if(elt && elt->isChecked())
+            allItemsAreUnChked=false;
+        }
+      if(allItemsAreUnChked)
+        zeItem->setChecked(true);// OK zeItem was required to be unchecked but as it is the last one. Recheck it !
+      else
+        {// if all items are uncheked inside a same parent - uncheck the parent
+          allItemsAreUnChked=true;
+          for(int i=0;i<father->childCount() && allItemsAreUnChked;i++)
+            {
+              pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
+              if(elt && elt->isChecked())
+            allItemsAreUnChked=false;
+            }
+          if(allItemsAreUnChked && father->isChecked())
+            father->setChecked(false);
+        } 
+    }
+}
+
+std::map<std::string,int> pqExtractGroupPanel::DeduceMapOfFamilyFromSIL(vtkMutableDirectedGraph *graph)
+{
+  std::map<std::string,int> ret;
+  int idNames(0);
+  vtkAbstractArray *verticesNames(graph->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
+  vtkIdType id0;
+  bool found(false);
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="MeshesFamsGrps")
+        {
+          id0=i;
+          found=true;
+        }
+    }
+  if(!found)
+    std::cerr << "There is an internal error ! The tree on server side has not the expected look !" << std::endl;
+  graph->GetAdjacentVertices(id0,it0);
+  while(it0->HasNext())
+    {
+      vtkIdType id1(it0->Next());//meshName
+      vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());
+      graph->GetAdjacentVertices(id1,it1);
+      it1->Next();//zeGroups
+      vtkIdType idZeFams(it1->Next());//zeFams
+      vtkAdjacentVertexIterator *itFams(vtkAdjacentVertexIterator::New());
+      graph->GetAdjacentVertices(idZeFams,itFams);
+      while(itFams->HasNext())
+        {
+          vtkIdType idf(itFams->Next());
+          std::string crudeFamName((const char *)verticesNames2->GetValue(idf));
+          std::size_t pos(crudeFamName.find_first_of(ZE_SEP));
+          std::string famName(crudeFamName.substr(0,pos)); std::string idStr(crudeFamName.substr(pos+strlen(ZE_SEP)));
+          int idInt(QString(idStr.c_str()).toInt());
+          ret[famName]=idInt;
+        }
+      it1->Delete();
+    }
+  it0->Delete();
+  return ret;
+}
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.h b/src/Plugins/MEDReader/ParaViewPlugin/pqExtractGroupPanel.h
new file mode 100644 (file)
index 0000000..699bd07
--- /dev/null
@@ -0,0 +1,53 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef _pqExtractGroupPanel_h
+#define _pqExtractGroupPanel_h
+
+#include "pqNamedObjectPanel.h"
+
+#include <map>
+
+class pqTreeWidgetItemObject;
+
+class vtkSMProperty;
+class vtkMutableDirectedGraph;
+
+class pqExtractGroupPanel: public pqNamedObjectPanel
+{
+Q_OBJECT
+  typedef pqNamedObjectPanel Superclass;
+public:
+  pqExtractGroupPanel(pqProxy* proxy, QWidget* p = NULL);
+  ~pqExtractGroupPanel();
+protected slots:
+  void aLev4HasBeenFired();
+  void updateSIL();
+private:
+  static std::map<std::string,int> DeduceMapOfFamilyFromSIL(vtkMutableDirectedGraph *graph);
+protected:
+  /// populate widgets with properties from the server manager
+  virtual void linkServerManagerProperties();
+  class pqUI;
+  pqUI* UI;
+  std::vector<pqTreeWidgetItemObject *> _all_lev4;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.cxx
new file mode 100644 (file)
index 0000000..ed70bd5
--- /dev/null
@@ -0,0 +1,475 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#include "pqMEDReaderPanel.h"
+#include "ui_MEDReaderPanel.h"
+#include "VectBoolWidget.h"
+
+#include "vtkProcessModule.h"
+#include "vtkMultiBlockDataSet.h"
+#include "vtkInformation.h"
+#include "vtkIntArray.h"
+#include "vtkSMDoubleVectorProperty.h"
+#include "vtkSMIntVectorProperty.h"
+#include "vtkSMStringVectorProperty.h"
+#include "vtkSMProxy.h"
+#include "vtkEventQtSlotConnect.h"
+#include "vtkPVSILInformation.h"
+#include "vtkGraph.h"
+#include "vtkMutableDirectedGraph.h"
+#include "vtkAdjacentVertexIterator.h"
+#include "vtkSMPropertyHelper.h"
+#include "vtkStringArray.h"
+#include "vtkDataSetAttributes.h"
+#include "vtkMEDReader.h"
+
+#include "pqTreeWidgetItemObject.h"
+#include "pqSMAdaptor.h"
+#include "pqProxy.h"
+#include "pqPropertyManager.h"
+#include "pqSILModel.h"
+#include "pqProxySILModel.h"
+#include "pqTreeViewSelectionHelper.h"
+#include "pqTreeWidgetSelectionHelper.h"
+
+#include <QHeaderView>
+
+static const char ZE_SEP[]="@@][@@";
+
+class PixSingle
+{
+public:
+  static const PixSingle &GetInstance();
+  QPixmap getPixFromStr(const std::string& st) const;
+  QPixmap getWholeMeshPix() const;
+  PixSingle();
+private:
+  static const int NB_OF_DISCR=4;
+  static PixSingle *UNIQUE_PIX_SINGLE;
+  QPixmap _pixmaps[NB_OF_DISCR];
+  std::map<std::string,int> _ze_map;
+  QPixmap _whole_mesh;
+};
+
+PixSingle *PixSingle::UNIQUE_PIX_SINGLE=0;
+
+const PixSingle &PixSingle::GetInstance()
+{
+  if(!UNIQUE_PIX_SINGLE)
+    UNIQUE_PIX_SINGLE=new PixSingle;
+  return *UNIQUE_PIX_SINGLE;
+}
+
+PixSingle::PixSingle()
+{
+  _pixmaps[0]=QPixmap(":/ParaViewResources/Icons/pqCellData16.png");
+  _pixmaps[1]=QPixmap(":/ParaViewResources/Icons/pqPointData16.png");
+  _pixmaps[2]=QPixmap(":/ParaViewResources/Icons/pqQuadratureData16.png");
+  _pixmaps[3]=QPixmap(":/ParaViewResources/Icons/pqElnoData16.png");
+  _ze_map[std::string("P0")]=0;
+  _ze_map[std::string("P1")]=1;
+  _ze_map[std::string("GAUSS")]=2;
+  _ze_map[std::string("GSSNE")]=3;
+  _whole_mesh=QPixmap(":/ParaViewResources/Icons/pqCellDataForWholeMesh16.png");
+}
+
+QPixmap PixSingle::getPixFromStr(const std::string& st) const
+{
+  std::map<std::string,int>::const_iterator it(_ze_map.find(st));
+  if(it!=_ze_map.end())
+    return _pixmaps[(*it).second];
+  else
+    return QPixmap();
+}
+
+QPixmap PixSingle::getWholeMeshPix() const
+{
+  return _whole_mesh;
+}
+
+class pqMEDReaderPanel::pqUI: public QObject, public Ui::MEDReaderPanel
+{
+public:
+  pqUI(pqMEDReaderPanel *p):QObject(p)
+  {
+    this->VTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
+  }
+
+  ~pqUI() { }
+  
+  vtkSmartPointer<vtkEventQtSlotConnect> VTKConnect;
+  QMap<QTreeWidgetItem*, QString> TreeItemToPropMap;
+};
+
+pqMEDReaderPanel::pqMEDReaderPanel(pqProxy *object_proxy, QWidget *p):Superclass(object_proxy,p),_reload_req(false),_optional_widget(0)
+{
+  initAll();
+}
+
+void pqMEDReaderPanel::initAll()
+{
+  _all_lev4.clear();
+  this->UI=new pqUI(this);
+  this->UI->setupUi(this);
+  this->UI->Fields->setHeaderHidden(true);
+  this->updateSIL();
+  ////////////////////
+  vtkSMProxy *reader(this->referenceProxy()->getProxy());
+  vtkPVSILInformation *info(vtkPVSILInformation::New());
+  reader->GatherInformation(info);
+  vtkGraph *g(info->GetSIL());
+  if(!g)//something wrong server side...
+    return ;
+  vtkMutableDirectedGraph *g2(vtkMutableDirectedGraph::SafeDownCast(g));
+  int idNames(0);
+  vtkAbstractArray *verticesNames(g2->GetVertexData()->GetAbstractArray("Names",idNames));
+  vtkStringArray *verticesNames2(vtkStringArray::SafeDownCast(verticesNames));
+  vtkIdType id0;
+  bool found(false);
+  for(int i=0;i<verticesNames2->GetNumberOfValues();i++)
+    {
+      vtkStdString &st(verticesNames2->GetValue(i));
+      if(st=="FieldsStatusTree")
+        {
+          id0=i;
+          found=true;
+        }
+    }
+  if(!found)
+    std::cerr << "There is an internal error ! The tree on server side has not the expected look !" << std::endl;
+  vtkAdjacentVertexIterator *it0(vtkAdjacentVertexIterator::New());
+  g2->GetAdjacentVertices(id0,it0);
+  int kk(0),ll(0);
+  while(it0->HasNext())
+    {
+      vtkIdType idToolTipForTS(it0->Next());
+      QString toolTipName0(QString::fromStdString((const char *)verticesNames2->GetValue(idToolTipForTS)));
+      QString nbTS;
+      QList<QString> dts,its,tts;
+      {
+        vtkAdjacentVertexIterator *itForTS(vtkAdjacentVertexIterator::New());
+        g2->GetAdjacentVertices(idToolTipForTS,itForTS);
+        vtkIdType idForNbTS(itForTS->Next());
+        nbTS=QString::fromStdString((const char *)verticesNames2->GetValue(idForNbTS));
+        itForTS->Delete();
+        int nbTSInt(nbTS.toInt());
+        for(int ii=0;ii<nbTSInt;ii++)
+          {
+            dts.push_back(QString::fromStdString((const char *)verticesNames2->GetValue(idForNbTS+3*ii+1)));
+            its.push_back(QString::fromStdString((const char *)verticesNames2->GetValue(idForNbTS+3*ii+2)));
+            tts.push_back(QString::fromStdString((const char *)verticesNames2->GetValue(idForNbTS+3*ii+3)));
+          }
+      }
+      vtkIdType id1(it0->Next());
+      //
+      vtkSMProperty *SMProperty(this->proxy()->GetProperty("FieldsStatus"));
+      SMProperty->ResetToDefault();//this line is very important !
+      //
+      QString name0(QString::fromStdString((const char *)verticesNames2->GetValue(id1))); QList<QString> strs0; strs0.append(name0);
+      pqTreeWidgetItemObject *item0(new pqTreeWidgetItemObject(this->UI->Fields,strs0));
+      item0->setData(0,Qt::UserRole,name0);
+      item0->setData(0,Qt::ToolTipRole,toolTipName0);
+      //
+      QList<QVariant> modulesAct;
+      for(int i=0;i<nbTS.toInt();i++)
+        modulesAct.push_back(QVariant(true));
+      item0->setProperty("NbOfTS",nbTS);
+      item0->setProperty("DTS",QVariant(dts));
+      item0->setProperty("ITS",QVariant(its));
+      item0->setProperty("TTS",QVariant(tts));
+      item0->setProperty("ChosenTS",QVariant(modulesAct));
+      //
+      vtkAdjacentVertexIterator *it1(vtkAdjacentVertexIterator::New());//mesh
+      g2->GetAdjacentVertices(id1,it1);
+      while(it1->HasNext())
+        {
+          vtkIdType id2(it1->Next());
+          QString name1(QString::fromStdString((const char *)verticesNames2->GetValue(id2))); QList<QString> strs1; strs1.append(name1);
+          QString toolTipName1(name1);
+          pqTreeWidgetItemObject *item1(new pqTreeWidgetItemObject(item0,strs1));
+          item1->setData(0,Qt::UserRole,name1);
+          item1->setData(0,Qt::ToolTipRole,toolTipName1);
+          vtkAdjacentVertexIterator *it2(vtkAdjacentVertexIterator::New());//common support
+          g2->GetAdjacentVertices(id2,it2);
+          while(it2->HasNext())
+            {
+              vtkIdType id3(it2->Next());
+              QString name2(QString::fromStdString((const char *)verticesNames2->GetValue(id3))); QList<QString> strs2; strs2.append(name2);
+              pqTreeWidgetItemObject *item2(new pqTreeWidgetItemObject(item1,strs2));
+              item2->setData(0,Qt::UserRole,name2);
+              item2->setData(0,Qt::CheckStateRole,0);
+              vtkAdjacentVertexIterator *it3(vtkAdjacentVertexIterator::New());//fields !
+              g2->GetAdjacentVertices(id3,it3);
+              vtkIdType id3Arrs(it3->Next());
+              vtkAdjacentVertexIterator *it3Arrs(vtkAdjacentVertexIterator::New());//arrs in fields !
+              g2->GetAdjacentVertices(id3Arrs,it3Arrs);
+              while(it3Arrs->HasNext())
+                {
+                  vtkIdType id4(it3Arrs->Next());
+                  std::string name3CppFull((const char *)verticesNames2->GetValue(id4));
+                  std::size_t pos(name3CppFull.find_first_of(ZE_SEP));
+                  std::string name3Only(name3CppFull.substr(0,pos)); std::string spatialDiscr(name3CppFull.substr(pos+sizeof(ZE_SEP)-1));
+                  QString name3(QString::fromStdString(name3Only)); QList<QString> strs3; strs3.append(name3);
+                  QString toolTipName3(name3+QString(" (")+spatialDiscr.c_str()+QString(")"));
+                 //
+                 vtkAdjacentVertexIterator *it4(vtkAdjacentVertexIterator::New());// is it a special field ? A field mesh ?
+                 g2->GetAdjacentVertices(id4,it4);
+                 bool isSpecial(it4->HasNext());
+                 it4->Delete();
+                 //
+                  pqTreeWidgetItemObject *item3(new pqTreeWidgetItemObject(item2,strs3));
+                  _all_lev4.push_back(item3);
+                  item3->setData(0,Qt::UserRole,name3);
+                  item3->setData(0,Qt::CheckStateRole,0);
+                 if(isSpecial)
+                   {
+                     QFont font; font.setItalic(true); font.setUnderline(true);
+                     item3->setData(0,Qt::FontRole,QVariant(font));
+                     item3->setData(0,Qt::ToolTipRole,QString("Whole \"%1\" mesh").arg(name3));
+                     item3->setData(0,Qt::DecorationRole,PixSingle::GetInstance().getWholeMeshPix());
+                   }
+                 else
+                   {
+                     item3->setData(0,Qt::ToolTipRole,toolTipName3);
+                     item3->setData(0,Qt::DecorationRole,PixSingle::GetInstance().getPixFromStr(spatialDiscr));
+                   }
+                  this->propertyManager()->registerLink(item3,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,ll);
+                  _leaves.insert(std::pair<pqTreeWidgetItemObject *,int>(item3,ll));
+                  connect(item2,SIGNAL(checkedStateChanged(bool)),item3,SLOT(setChecked(bool)));
+                  connect(item3,SIGNAL(checkedStateChanged(bool)),this,SLOT(aLev4HasBeenFired()));
+                  ll++;
+                }
+              vtkIdType id3Gts(it3->Next());
+              vtkAdjacentVertexIterator *it3Gts(vtkAdjacentVertexIterator::New());//geo types in fields !
+              g2->GetAdjacentVertices(id3Gts,it3Gts);
+              QString toolTipName2(name2);
+              while(it3Gts->HasNext())
+                {
+                  vtkIdType idGt(it3Gts->Next());
+                  std::string gtName((const char *)verticesNames2->GetValue(idGt));
+                  toolTipName2=QString("%1\n- %2").arg(toolTipName2).arg(QString(gtName.c_str()));
+                }
+              item2->setData(0,Qt::ToolTipRole,toolTipName2);
+              it3Gts->Delete();
+              it3->Delete();
+              it3Arrs->Delete();
+              if(kk==0)
+                item2->setChecked(true);
+              kk++;
+            }
+          it2->Delete();
+        }
+      it1->Delete();
+    }
+  it0->Delete();
+  this->UI->Fields->header()->setStretchLastSection(true);
+  this->UI->Fields->expandAll();
+  info->Delete();
+  this->UI->stdMode->setChecked(true);
+  this->UI->VTKConnect->Connect(this->proxy(),vtkCommand::UpdateInformationEvent, this, SLOT(updateSIL()));
+  ///
+  this->UI->Reload->setProperty("NbOfReloadDynProp",QVariant(1));
+  vtkSMProperty *SMProperty(this->proxy()->GetProperty("ReloadReq"));
+  connect(this->UI->Reload,SIGNAL(pressed()),this,SLOT(reloadFired()));
+  this->propertyManager()->registerLink(this->UI->Reload,"NbOfReloadDynProp",SIGNAL(pressed()),this->proxy(),SMProperty);
+  ///
+  vtkSMProperty *SMProperty0(this->proxy()->GetProperty("GenerateVectors"));
+  this->propertyManager()->registerLink(this->UI->GenerateVects,"checked",SIGNAL(stateChanged(int)),this->proxy(),SMProperty0);
+  ///
+  vtkSMProperty *SMProperty2(this->proxy()->GetProperty("TimeOrModal"));
+  SMProperty2->ResetToDefault();//this line is very important !
+  this->propertyManager()->registerLink(this->UI->modeMode,"checked",SIGNAL(toggled(bool)),this->proxy(),SMProperty2);
+  ///
+  delete _optional_widget;
+  _optional_widget=new VectBoolWidget(this->UI->timeStepsInspector,getMaxNumberOfTS());
+  _optional_widget->hide();
+  this->UI->timeStepsInspector->setMinimumSize(QSize(0,0));
+  connect(this->UI->modeMode,SIGNAL(toggled(bool)),this,SLOT(vectOfBoolWidgetRequested(bool)));
+  vtkSMProperty *SMProperty3(this->proxy()->GetProperty("TimesFlagsStatus"));
+  SMProperty3->ResetToDefault();
+  const QVector<VectBoolItem *>& items(_optional_widget->getItems());
+  int itt(0);
+  foreach(VectBoolItem *item,items)
+    {
+      this->propertyManager()->registerLink(item,"activated",SIGNAL(changed()),this->proxy(),SMProperty3,itt++);
+    }
+}
+
+pqMEDReaderPanel::~pqMEDReaderPanel()
+{
+  delete _optional_widget;
+}
+
+void pqMEDReaderPanel::linkServerManagerProperties()
+{
+  this->Superclass::linkServerManagerProperties();
+}
+
+void pqMEDReaderPanel::updateSIL()
+{
+  if(_reload_req)
+    {
+      _reload_req=false;
+      this->UI->geometryGroupBox->hide();
+      delete this->UI;
+      foreach(QObject *child,children())
+        {
+          QLayout *layout(qobject_cast<QLayout *>(child));
+          if(layout)
+            delete layout;
+        }
+      initAll();
+    }
+}
+
+void pqMEDReaderPanel::aLev4HasBeenFired()
+{
+  pqTreeWidgetItemObject *zeItem(qobject_cast<pqTreeWidgetItemObject *>(sender()));
+  if(!zeItem)
+    return;
+  pqTreeWidgetItemObject *father(dynamic_cast<pqTreeWidgetItemObject *>(zeItem->QTreeWidgetItem::parent()));
+  QTreeWidgetItem *godFather(father->QTreeWidgetItem::parent()->parent());
+  if(!father)
+    return ;
+  if(zeItem->isChecked())
+    {
+      bool isActivatedTSChanged(false);
+      // This part garantees that all leaves having not the same father than zeItem are desactivated
+      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
+        {
+          QTreeWidgetItem *testFath(elt->QTreeWidgetItem::parent());
+          if(testFath!=father)
+            if(elt->isChecked())
+              {
+                elt->setChecked(false);
+                if(godFather!=testFath->parent()->parent())
+                  isActivatedTSChanged=true;
+              }
+        }
+      //If all leaves are checked the father is check too
+      bool allItemsAreChked(true);
+      for(int i=0;i<father->childCount() && allItemsAreChked;i++)
+        {
+          pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
+          if(elt && !elt->isChecked())
+            allItemsAreChked=false;
+        }
+      if(allItemsAreChked && !father->isChecked())
+        father->setChecked(true);
+      // the user by clicking to a new entry has changed of TimeStepSeries -> notify it to thee time step selector widget
+      if(isActivatedTSChanged)
+        {
+          QStringList its,dts,tts;
+          getCurrentTS(its,dts,tts);
+          _optional_widget->setItems(its,dts,tts);
+        }
+    }
+  else
+    {
+      // if all are unchecked - check it again
+      bool allItemsAreUnChked(true);
+      foreach(pqTreeWidgetItemObject* elt,this->_all_lev4)
+        {
+          if(elt && elt->isChecked())
+            allItemsAreUnChked=false;
+        }
+      if(allItemsAreUnChked)
+        zeItem->setChecked(true);// OK zeItem was required to be unchecked but as it is the last one. Recheck it !
+      else
+        {// if all items are uncheked inside a same parent - uncheck the parent
+          allItemsAreUnChked=true;
+          for(int i=0;i<father->childCount() && allItemsAreUnChked;i++)
+            {
+              pqTreeWidgetItemObject *elt(dynamic_cast<pqTreeWidgetItemObject *>(father->child(i)));
+              if(elt && elt->isChecked())
+            allItemsAreUnChked=false;
+            }
+          if(allItemsAreUnChked && father->isChecked())
+            father->setChecked(false);
+        } 
+    }
+}
+
+void pqMEDReaderPanel::reloadFired()
+{
+  static int iii(1);
+  QVariant v(iii++);
+  this->UI->Reload->setProperty("NbOfReloadDynProp",v);
+  _reload_req=true;
+  for(std::set<std::pair<pqTreeWidgetItemObject *,int> >::const_iterator it=_leaves.begin();it!=_leaves.end();it++)
+    ((*it).first)->disconnect(SIGNAL(checkedStateChanged(bool)));
+  //
+  vtkSMProperty *SMProperty(this->proxy()->GetProperty("FieldsStatus"));
+  for(std::set<std::pair<pqTreeWidgetItemObject *,int> >::const_iterator it=_leaves.begin();it!=_leaves.end();it++)
+    this->propertyManager()->unregisterLink((*it).first,"checked",SIGNAL(checkedStateChanged(bool)),this->proxy(),SMProperty,(*it).second);
+  this->propertyManager()->propertyChanged();
+  vtkSMProperty *SMProperty3(this->proxy()->GetProperty("TimeOrModal"));
+  this->propertyManager()->unregisterLink(this->UI->modeMode,"checked",SIGNAL(toggled(bool)),this->proxy(),SMProperty3);
+}
+
+void pqMEDReaderPanel::vectOfBoolWidgetRequested(bool isMode)
+{
+  if(isMode)
+    {
+      this->UI->timeStepsInspector->setMinimumSize(QSize(200,250));
+      _optional_widget->show();
+      QStringList its,dts,tts;
+      getCurrentTS(its,dts,tts);
+      _optional_widget->setItems(its,dts,tts);
+    }
+  else
+    {
+      _optional_widget->hide();
+      this->UI->timeStepsInspector->setMinimumSize(QSize(0,0));
+    }
+}
+
+void pqMEDReaderPanel::getCurrentTS(QStringList& its, QStringList& dts, QStringList& tts) const
+{
+  
+  for(std::vector<pqTreeWidgetItemObject *>::const_iterator it=_all_lev4.begin();it!=_all_lev4.end();it++)
+    {
+      if((*it)->property("checked").toInt())
+        {
+          QTreeWidgetItem *obj((*it)->QTreeWidgetItem::parent()->QTreeWidgetItem::parent()->QTreeWidgetItem::parent());
+          pqTreeWidgetItemObject *objC(dynamic_cast<pqTreeWidgetItemObject *>(obj));
+          its=objC->property("ITS").toStringList();
+          dts=objC->property("DTS").toStringList();
+          tts=objC->property("TTS").toStringList();
+          return;
+        }
+    }
+  std::cerr << "pqMEDReaderPanel::getCurrentTS : internal error ! Something is going wrong !" << std::endl;
+}
+
+int pqMEDReaderPanel::getMaxNumberOfTS() const
+{
+  int ret(0);
+  for(std::vector<pqTreeWidgetItemObject *>::const_iterator it=_all_lev4.begin();it!=_all_lev4.end();it++)
+    {
+      if((*it)->property("checked").toInt())
+        {
+          QTreeWidgetItem *obj((*it)->QTreeWidgetItem::parent()->QTreeWidgetItem::parent()->QTreeWidgetItem::parent());
+          pqTreeWidgetItemObject *objC(dynamic_cast<pqTreeWidgetItemObject *>(obj));
+          ret=std::max(ret,objC->property("NbOfTS").toInt());
+        }
+    }
+  return ret;
+}
diff --git a/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h b/src/Plugins/MEDReader/ParaViewPlugin/pqMEDReaderPanel.h
new file mode 100644 (file)
index 0000000..3d84896
--- /dev/null
@@ -0,0 +1,61 @@
+// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay
+
+#ifndef _pqMEDReaderPanel_h
+#define _pqMEDReaderPanel_h
+
+#include "pqNamedObjectPanel.h"
+
+#include <set>
+
+class pqTreeWidgetItemObject;
+class VectBoolWidget;
+
+class vtkSMProperty;
+
+class pqMEDReaderPanel: public pqNamedObjectPanel
+{
+Q_OBJECT
+  typedef pqNamedObjectPanel Superclass;
+public:
+  pqMEDReaderPanel(pqProxy* proxy, QWidget* p = NULL);
+  ~pqMEDReaderPanel();
+protected slots:
+  void aLev4HasBeenFired();
+  void updateSIL();
+  void reloadFired();
+  void vectOfBoolWidgetRequested(bool isMode);
+private:
+  int getMaxNumberOfTS() const;
+  void getCurrentTS(QStringList& its, QStringList& dts, QStringList& tts) const;
+protected:
+  /// populate widgets with properties from the server manager
+  virtual void linkServerManagerProperties();
+  void initAll();
+  class pqUI;
+  pqUI* UI;
+  std::vector<pqTreeWidgetItemObject *> _all_lev4;
+private:
+  bool _reload_req;
+  std::set<std::pair<pqTreeWidgetItemObject *,int> > _leaves;
+  VectBoolWidget *_optional_widget;
+};
+
+#endif
diff --git a/src/Plugins/MEDReader/TODO.txt b/src/Plugins/MEDReader/TODO.txt
new file mode 100644 (file)
index 0000000..7dd9edd
--- /dev/null
@@ -0,0 +1,42 @@
+TODO :
+------
+
+
+
+3 - propagate the update of filters connected directly or not (typically ExtractGroup) to the MEDReader when the groups have been updated.
+UC : ForMEDReader16.med, then extractgroup, then return to MEDReader properties and select zeField3_1 & zeField4_1 -> ExtractGroup filter is out of date and "Apply" button not green.
+
+
+Known bug :
+-----------
+
+- Extract cell type + Extract Group
+
+
+TODO in MED:
+------------
+
+- Manage degenerated cases.
+
+DONE
+----
+
+0- Sur le time quand tout a echouer prendre le plus grand < (07/01/2014)
+
+1 - Load ForMEDReader8.med, Load ForMEDReader17.med
+-> throw because of missynchronization of time. -> Alejandro (07/01/2014)
+
+1 - ELNO to be added only once not for each GAUSS_NE -> To test a file having > 1 field with GAUSS_NE
+
+1 - Keep tracks of built support to accelerate rendering in MEDFileFieldRepresentation. 
+
+2 - in branch EDF1 : adm_local_without_kernel to put in install of MED_SRC
+when in STANDALONE mode.
+
+0 - test22 doit etre sur les seg2 et tri3
+
+1 - When Reload Applied it is possible with gui to unselect all !
+
+0 - protect ExtractGroup against throw
+
+0 - protect ExctractCellType against throw
diff --git a/src/Plugins/MEDReader/Test/CMakeLists.txt b/src/Plugins/MEDReader/Test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..db1ddd5
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+ADD_TEST(testMEDReader0 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader0.py)
+ADD_TEST(testMEDReader1 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader1.py)
+ADD_TEST(testMEDReader2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader2.py)
+ADD_TEST(testMEDReader3 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader3.py)
+ADD_TEST(testMEDReader4 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader4.py)
+ADD_TEST(testMEDReader5 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader5.py)
+ADD_TEST(testMEDReader6 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader6.py)
+ADD_TEST(testMEDReader7 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader7.py)
+ADD_TEST(testMEDReader8 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testMEDReader8.py)
diff --git a/src/Plugins/MEDReader/Test/testMEDReader0.py b/src/Plugins/MEDReader/Test/testMEDReader0.py
new file mode 100644 (file)
index 0000000..5b33b46
--- /dev/null
@@ -0,0 +1,124 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+fname="testMEDReader0.med"
+outImgName="testMEDReader0.png"
+#########
+mz=MEDCoupling1SGTUMesh("mesh",NORM_QUAD9)
+mz.setNodalConnectivity(DataArrayInt([0,6,37,12,76,112,113,82,205,12,37,38,13,113,114,115,83,206,13,38,9,1,115,116,79,84,207,6,7,39,37,77,117,118,112,208,37,39,40,38,118,119,120,114,209,38,40,10,9,120,121,80,116,210,7,8,41,39,78,122,123,117,211,39,41,42,40,123,124,125,119,212,40,42,11,10,125,126,81,121,213,1,9,43,17,79,127,128,88,214,17,43,44,18,128,129,130,89,215,18,44,14,2,130,131,85,90,216,9,10,45,43,80,132,133,127,217,43,45,46,44,133,134,135,129,218,44,46,15,14,135,136,86,131,219,10,11,47,45,81,137,138,132,220,45,47,48,46,138,139,140,134,221,46,48,16,15,140,141,87,136,222,1,9,49,22,79,142,143,94,223,22,49,50,23,143,144,145,95,224,23,50,51,24,145,146,147,96,225,24,51,52,25,147,148,149,97,226,25,52,53,26,149,150,151,98,227,26,53,19,3,151,152,91,99,228,9,10,54,49,80,153,154,142,229,49,54,55,50,154,155,156,144,230,50,55,56,51,156,157,158,146,231,51,56,57,52,158,159,160,148,232,52,57,58,53,160,161,162,150,233,53,58,20,19,162,163,92,152,234,10,11,59,54,81,164,165,153,235,54,59,60,55,165,166,167,155,236,55,60,61,56,167,168,169,157,237,56,61,62,57,169,170,171,159,238,57,62,63,58,171,172,173,161,239,58,63,21,20,173,174,93,163,240,4,27,64,30,100,175,176,103,241,30,64,65,31,176,177,178,104,242,31,65,19,3,178,179,91,105,243,27,28,66,64,101,180,181,175,244,64,66,67,65,181,182,183,177,245,65,67,20,19,183,184,92,179,246,28,29,68,66,102,185,186,180,247,66,68,69,67,186,187,188,182,248,67,69,21,20,188,189,93,184,249,3,19,70,35,91,190,191,109,250,35,70,71,36,191,192,193,110,251,36,71,32,5,193,194,106,111,252,19,20,72,70,92,195,196,190,253,70,72,73,71,196,197,198,192,254,71,73,33,32,198,199,107,194,255,20,21,74,72,93,200,201,195,256,72,74,75,73,201,202,203,197,257,73,75,34,33,203,204,108,199,258]))
+coords=DataArrayDouble([-0.04,0.015,0.,0.,0.015,0.,0.04,0.015,0.,0.,0.105,0.,-0.04,0.105,0.,0.04,0.105,0.,-0.04,0.015,0.015,-0.04,0.015,0.03,-0.04,0.015,0.045,0.,0.015,0.015,0.,0.015,0.03,0.,0.015,0.045,-0.026666666666666665,0.015,0.,-0.013333333333333329,0.015,0.,0.04,0.015,0.015,0.04,0.015,0.03,0.04,0.015,0.045,0.013333333333333336,0.015,0.,0.026666666666666672,0.015,0.,0.,0.105,0.015,0.,0.105,0.03,0.,0.105,0.045,0.,0.03,0.,0.,0.045,0.,0.,0.06,0.,0.,0.075,0.,0.,0.09,0.,-0.04,0.105,0.015,-0.04,0.105,0.03,-0.04,0.105,0.045,-0.026666666666666665,0.105,0.,-0.013333333333333329,0.105,0.,0.04,0.105,0.015,0.04,0.105,0.03,0.04,0.105,0.045,0.013333333333333336,0.105,0.,0.026666666666666672,0.105,0.,-0.026666666666666665,0.015,0.015,-0.013333333333333326,0.015,0.015,-0.026666666666666665,0.015,0.03,-0.013333333333333326,0.015,0.03,-0.026666666666666665,0.015,0.045,-0.013333333333333329,0.015,0.045,0.013333333333333338,0.015,0.015,0.026666666666666675,0.015,0.015,0.013333333333333338,0.015,0.03,0.026666666666666675,0.015,0.03,0.013333333333333336,0.015,0.045,0.026666666666666672,0.015,0.045,0.,0.03,0.015,0.,0.045,0.015,0.,0.06,0.015,0.,0.07500000000000001,0.015,0.,0.09,0.015,0.,0.03,0.03,0.,0.045,0.03,0.,0.06,0.03,0.,0.075,0.03,0.,0.09,0.03,0.,0.03,0.045,0.,0.045,0.045,0.,0.06,0.045,0.,0.075,0.045,0.,0.09,0.045,-0.026666666666666665,0.105,0.015,-0.013333333333333326,0.105,0.015,-0.026666666666666665,0.105,0.03,-0.013333333333333326,0.105,0.03,-0.026666666666666665,0.105,0.045,-0.013333333333333329,0.105,0.045,0.013333333333333338,0.105,0.015,0.026666666666666675,0.105,0.015,0.013333333333333338,0.105,0.03,0.026666666666666675,0.105,0.03,0.013333333333333336,0.105,0.045,0.026666666666666672,0.105,0.045,-0.04,0.015,0.0075,-0.04,0.015,0.0225,-0.04,0.015,0.0375,0.,0.015,0.0075,0.,0.015,0.0225,0.,0.015,0.0375,-0.03333333333333333,0.015,0.,-0.02,0.015,0.,-0.0066666666666666645,0.015,0.,0.04,0.015,0.0075,0.04,0.015,0.0225,0.04,0.015,0.0375,0.006666666666666668,0.015,0.,0.02,0.015,0.,0.03333333333333334,0.015,0.,0.,0.105,0.0075,0.,0.105,0.0225,0.,0.105,0.0375,0.,0.0225,0.,0.,0.0375,0.,0.,0.0525,0.,0.,0.0675,0.,0.,0.0825,0.,0.,0.0975,0.,-0.04,0.105,0.0075,-0.04,0.105,0.0225,-0.04,0.105,0.0375,-0.03333333333333333,0.105,0.,-0.02,0.105,0.,-0.0066666666666666645,0.105,0.,0.04,0.105,0.0075,0.04,0.105,0.0225,0.04,0.105,0.0375,0.006666666666666668,0.105,0.,0.02,0.105,0.,0.03333333333333334,0.105,0.,-0.03333333333333333,0.015,0.015,-0.026666666666666665,0.015,0.0075,-0.02,0.015,0.015,-0.013333333333333327,0.015,0.0075,-0.006666666666666663,0.015,0.015,-0.03333333333333333,0.015,0.03,-0.026666666666666665,0.015,0.0225,-0.02,0.015,0.03,-0.013333333333333326,0.015,0.0225,-0.006666666666666663,0.015,0.03,-0.03333333333333333,0.015,0.045,-0.026666666666666665,0.015,0.0375,-0.02,0.015,0.045,-0.013333333333333327,0.015,0.0375,-0.0066666666666666645,0.015,0.045,0.006666666666666669,0.015,0.015,0.013333333333333336,0.015,0.0075,0.020000000000000007,0.015,0.015,0.026666666666666672,0.015,0.0075,0.03333333333333334,0.015,0.015,0.006666666666666669,0.015,0.03,0.013333333333333338,0.015,0.0225,0.02,0.015,0.03,0.026666666666666675,0.015,0.0225,0.03333333333333334,0.015,0.03,0.006666666666666668,0.015,0.045,0.013333333333333336,0.015,0.0375,0.02,0.015,0.045,0.026666666666666672,0.015,0.0375,0.03333333333333334,0.015,0.045,0.,0.0225,0.015,0.,0.03,0.0075,0.,0.0375,0.015,0.,0.045,0.0075,0.,0.0525,0.015,0.,0.06,0.0075,0.,0.0675,0.015,0.,0.07500000000000001,0.0075,0.,0.0825,0.015,0.,0.09,0.0075,0.,0.0975,0.015,0.,0.0225,0.03,0.,0.03,0.0225,0.,0.0375,0.03,0.,0.045,0.0225,0.,0.0525,0.03,0.,0.06,0.0225,0.,0.0675,0.03,0.,0.07500000000000001,0.0225,0.,0.08249999999999999,0.03,0.,0.09,0.0225,0.,0.0975,0.03,0.,0.0225,0.045,0.,0.03,0.0375,0.,0.0375,0.045,0.,0.045,0.0375,0.,0.0525,0.045,0.,0.06,0.0375,0.,0.0675,0.045,0.,0.075,0.0375,0.,0.08249999999999999,0.045,0.,0.09,0.0375,0.,0.0975,0.045,-0.03333333333333333,0.105,0.015,-0.026666666666666665,0.105,0.0075,-0.02,0.105,0.015,-0.013333333333333327,0.105,0.0075,-0.006666666666666663,0.105,0.015,-0.03333333333333333,0.105,0.03,-0.026666666666666665,0.105,0.0225,-0.02,0.105,0.03,-0.013333333333333326,0.105,0.0225,-0.006666666666666663,0.105,0.03,-0.03333333333333333,0.105,0.045,-0.026666666666666665,0.105,0.0375,-0.02,0.105,0.045,-0.013333333333333327,0.105,0.0375,-0.0066666666666666645,0.105,0.045,0.006666666666666669,0.105,0.015,0.013333333333333336,0.105,0.0075,0.020000000000000007,0.105,0.015,0.026666666666666672,0.105,0.0075,0.03333333333333334,0.105,0.015,0.006666666666666669,0.105,0.03,0.013333333333333338,0.105,0.0225,0.020000000000000007,0.105,0.03,0.026666666666666675,0.105,0.0225,0.03333333333333334,0.105,0.03,0.006666666666666668,0.105,0.045,0.013333333333333336,0.105,0.0375,0.02,0.105,0.045,0.026666666666666672,0.105,0.0375,0.03333333333333334,0.105,0.045,-0.03333333333333333,0.015,0.0075,-0.02,0.015,0.0075,-0.006666666666666664,0.015,0.0075,-0.03333333333333333,0.015,0.0225,-0.02,0.015,0.0225,-0.006666666666666663,0.015,0.0225,-0.03333333333333333,0.015,0.0375,-0.02,0.015,0.0375,-0.006666666666666662,0.015,0.0375,0.006666666666666668,0.015,0.0075,0.02,0.015,0.0075,0.03333333333333334,0.015,0.0075,0.006666666666666669,0.015,0.0225,0.020000000000000007,0.015,0.0225,0.03333333333333334,0.015,0.0225,0.006666666666666668,0.015,0.0375,0.02,0.015,0.0375,0.03333333333333334,0.015,0.0375,0.,0.0225,0.0075,0.,0.0375,0.0075,0.,0.0525,0.0075,0.,0.0675,0.0075,0.,0.0825,0.0075,0.,0.0975,0.0075,0.,0.0225,0.0225,0.,0.0375,0.0225,0.,0.0525,0.0225,0.,0.0675,0.0225,0.,0.0825,0.0225,0.,0.0975,0.0225,0.,0.0225,0.0375,0.,0.0375,0.0375,0.,0.0525,0.0375,0.,0.0675,0.0375,0.,0.08249999999999999,0.0375,0.,0.0975,0.0375,-0.03333333333333333,0.105,0.0075,-0.02,0.105,0.0075,-0.006666666666666664,0.105,0.0075,-0.03333333333333333,0.105,0.0225,-0.02,0.105,0.0225,-0.006666666666666663,0.105,0.0225,-0.03333333333333333,0.105,0.0375,-0.02,0.105,0.0375,-0.006666666666666662,0.105,0.0375,0.006666666666666668,0.105,0.0075,0.02,0.105,0.0075,0.03333333333333334,0.105,0.0075,0.006666666666666669,0.105,0.0225,0.020000000000000007,0.105,0.0225,0.03333333333333334,0.105,0.0225,0.006666666666666668,0.105,0.0375,0.02,0.105,0.0375,0.03333333333333334,0.105,0.0375],259,3)
+coords.setInfoOnComponents(['X [INCONNUE]','Y [INCONNUE]','Z [INCONNUE]'])
+mz.setCoords(coords)
+mz=mz.buildUnstructured()
+#
+arr0=DataArrayDouble()
+vals0=9*[-3593.,85220.,-15343.,-438.,11985.,-15343.,2716.,-61248.,-15343.,5488.,101072.,-16250.,549.,13186.,-16250.,-4389.,-74699.,-16250.,9988.,101646.,-17156.,1537.,14386.,-17156.,-6913.,-72874.,-17156.,22178.,120238.,-19521.,2342.,14222.,-19521.,-17493.,-91793.,-19521.,37737.,139840.,-21887.,3147.,14059.,-21887.,-31443.,-111722.,-21887.,34350.,140668.,-18690.,3714.,16214.,-18690.,-26922.,-108238.,-18690.,34563.,153494.,-15493.,4281.,18370.,-15493.,-26000.,-116753.,-15493.,2147.,115356.,-15418.,1921.,15178.,-15418.,1695.,-84999.,-15418.,12408.,118616.,-17470.,2131.,14700.,-17470.,-8144.,-89215.,-17470.,15624.,100983.,-16718.,2286.,15441.,-16718.,-11050.,-70101.,-16718.,19381.,102680.,-17191.,2505.,16813.,-17191.,-14370.,-69054.,-17191.,22911.,103615.,-17665.,2725.,18184.,-17665.,-17461.,-67245.,-17665.,32377.,125140.,-20005.,4011.,17741.,-20005.,-24353.,-89657.,-20005.,43183.,147067.,-22345.,5298.,17297.,-22345.,-32586.,-112472.,-22345.,41570.,144664.,-22105.,4896.,15874.,-22105.,-31778.,-112915.,-22105.,40070.,142637.,-21866.,4493.,14451.,-21866.,-31083.,-113734.,-21866.,25367.,121066.,-19292.,3390.,14946.,-19292.,-18587.,-91173.,-19292.,28901.,123199.,-19648.,3701.,16343.,-19648.,-21499.,-90512.,-19648.,23716.,103481.,-17470.,2234.,18509.,-17470.,-19247.,-66463.,-17470.,22561.,104808.,-17142.,1238.,20732.,-17142.,-20084.,-63343.,-17142.,21499.,106443.,-16813.,242.,22956.,-16813.,-21014.,-60531.,-16813.,32906.,133441.,-20775.,3873.,26633.,-20775.,-25158.,-80173.,-20775.,45801.,160885.,-24737.,7505.,30311.,-24737.,-30791.,-100262.,-24737.,44184.,154705.,-23601.,5922.,24329.,-23601.,-32340.,-106046.,-23601.,42566.,148521.,-22465.,4338.,18347.,-22465.,-33888.,-111825.,-22465.,32545.,125822.,-19968.,3286.,18428.,-19968.,-25972.,-88965.,-19968.,32703.,129556.,-20371.,3580.,22531.,-20371.,-25542.,-84493.,-20371.,-580.,50781.,-14878.,-188.,10419.,-14878.,203.,-29941.,-14878.,974.,53486.,-13087.,-197.,11696.,-13087.,-1370.,-30094.,-13087.,2154.,54941.,-11297.,-206.,12972.,-11297.,-2567.,-28996.,-11297.,4921.,72039.,-13221.,709.,13770.,-13221.,-3503.,-44499.,-13221.,6472.,88772.,-15144.,1624.,14567.,-15144.,-3223.,-59637.,-15144.,4104.,85353.,-15580.,600.,13047.,-15580.,-2903.,-59258.,-15580.,1258.,80341.,-16016.,-423.,11526.,-16016.,-2105.,-57288.,-16016.,-822.,65212.,-15447.,-306.,10973.,-15447.,210.,-43266.,-15447.,2262.,69336.,-14334.,201.,12371.,-14334.,-1859.,-44593.,-14334.,4047.,55415.,-11562.,137.,13264.,-11562.,-3772.,-28887.,-11562.,6455.,56737.,-11164.,80.,14219.,-11164.,-6294.,-28298.,-11164.,8701.,57516.,-10766.,23.,15175.,-10766.,-8653.,-27166.,-10766.,12843.,74210.,-13196.,662.,16118.,-13196.,-11519.,-41972.,-13196.,17837.,91160.,-15627.,1300.,17062.,-15627.,-15237.,-57034.,-15627.,14573.,90279.,-15674.,1166.,15841.,-15674.,-12240.,-58596.,-15674.,11497.,90026.,-15722.,1033.,14619.,-15722.,-9431.,-60786.,-15722.,7014.,72493.,-13642.,585.,13941.,-13642.,-5844.,-44609.,-13642.,9922.,73330.,-13419.,623.,15030.,-13419.,-8675.,-43270.,-13419.,9608.,58062.,-10666.,-408.,15882.,-10666.,-10425.,-26297.,-10666.,10622.,58358.,-9978.,-497.,16431.,-9978.,-11617.,-25496.,-9978.,11722.,58941.,-9290.,-587.,16979.,-9290.,-12896.,-24981.,-9290.,14386.,76411.,-12130.,-417.,19190.,-12130.,-15221.,-38029.,-12130.,18009.,94168.,-14969.,-248.,21401.,-14969.,-18505.,-51365.,-14969.,19049.,93091.,-15325.,999.,19998.,-15325.,-17050.,-53095.,-15325.,20242.,92527.,-15681.,2246.,18594.,-15681.,-15748.,-55338.,-15681.,14435.,75147.,-13174.,919.,17238.,-13174.,-12597.,-40670.,-13174.,14351.,75579.,-12652.,250.,18214.,-12652.,-13849.,-39150.,-12652.0]
+arr0.setValues(vals0,1458,3)
+arr0.setInfoOnComponents(['SIXX','SIYY','SIYZ'])
+f0z=MEDCouplingFieldDouble(ON_GAUSS_PT)
+f0z.setMesh(mz)
+f0z.setArray(arr0)
+f0z.setGaussLocalizationOnType(NORM_QUAD9,[-1,-1,1,-1,1,1,-1,1,0,-1,1,0,0,1,-1,0,0,0],[-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0,-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0,-0.774597,-0.774597,0.774597,-0.774597,0.774597,0.774597,-0.774597,0.774597,0,-0.774597,0.774597,0,0,0.774597,-0.774597,0,0,0],[0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123,0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123,0.308642,0.308642,0.308642,0.308642,0.493827,0.493827,0.493827,0.493827,0.790123])
+f0z.setName("SolutionSIEF_ELGA")
+f0z.checkCoherency()
+ff0z=MEDFileField1TS()
+ff0z.setFieldNoProfileSBT(f0z)
+#
+arr1=DataArrayDouble([158663.,171562.,32597.,37341.,118998.,128979.,88846.,94935.,28786.,32250.,67038.,71287.,102742.,108939.,32907.,37716.,0.,0.,138922.,155768.,41391.,47731.,114491.,128395.,94101.,100197.,31445.,35939.,67322.,71913.,94031.,103701.,34833.,39475.,0.,0.,142412.,160086.,42700.,49041.,113826.,128551.,92705.,102386.,34032.,38580.,61698.,69417.,96177.,104283.,38223.,40570.,0.,0.,87935.,89674.,30482.,34419.,66325.,69150.,53964.,55380.,28306.,32157.,37909.,40395.,53662.,55355.,22264.,24611.,0.,0.,94013.,100457.,31768.,36134.,68065.,73681.,53358.,55305.,23341.,26188.,32996.,35203.,52496.,56792.,23849.,26556.,0.,0.,92797.,102692.,33656.,38268.,61244.,68735.,52594.,56740.,24539.,27146.,29157.,33011.,52853.,57683.,25671.,28315.,0.,0.,53581.,55745.,27972.,31820.,37174.,39935.,29236.,31416.,22475.,25354.,20531.,23672.,25557.,26298.,15741.,17492.,0.,0.,53385.,55725.,23224.,25998.,32556.,35093.,25809.,26619.,16518.,18338.,18447.,21219.,23343.,26173.,16948.,19353.,0.,0.,52384.,56725.,24293.,26951.,29491.,33373.,23510.,26382.,17117.,19543.,19649.,22252.,26670.,30680.,19554.,22512.,0.,0.,158781.,178651.,54413.,62227.,103151.,116693.,96177.,104283.,38223.,40570.,56254.,64331.,92705.,102386.,34032.,38580.,0.,0.,142873.,161033.,43285.,49854.,113088.,127440.,94031.,103701.,34833.,39475.,61888.,69552.,94101.,100197.,31445.,35939.,0.,0.,132908.,149284.,42933.,49391.,109280.,123481.,102742.,108939.,32907.,37716.,75662.,80547.,88846.,94935.,28786.,32250.,0.,0.,96505.,105010.,37990.,40710.,56669.,64741.,52853.,57683.,25671.,28315.,26824.,30727.,52594.,56740.,24539.,27146.,0.,0.,92360.,101577.,33582.,37900.,61559.,69237.,52496.,56792.,23849.,26556.,29094.,32746.,53358.,55305.,23341.,26188.,0.,0.,95615.,101326.,31440.,36083.,69356.,73116.,53662.,55355.,22264.,24611.,31957.,34376.,53964.,55380.,28306.,32157.,0.,0.,53029.,58077.,25636.,28363.,27182.,31122.,26670.,30680.,19554.,22512.,20758.,22139.,23510.,26382.,17117.,19543.,0.,0.,52348.,56723.,23922.,26648.,29286.,32993.,23343.,26173.,16948.,19353.,19615.,22178.,25809.,26619.,16518.,18338.,0.,0.,53623.,55229.,22321.,24800.,32700.,34971.,25557.,26298.,15741.,17492.,18986.,21836.,29236.,31416.,22475.,25354.,0.,0.,64897.,69997.,64897.,69997.,64897.,69997.,81086.,90448.,81086.,90448.,81086.,90448.,85289.,98323.,85289.,98323.,0.,0.,71712.,82585.,71712.,82585.,71712.,82585.,83868.,96651.,83868.,96651.,83868.,96651.,86266.,99505.,86266.,99505.,0.,0.,77671.,89574.,77671.,89574.,77671.,89574.,86057.,99277.,86057.,99277.,86057.,99277.,86664.,99373.,86664.,99373.,0.,0.,80105.,91799.,80105.,91799.,80105.,91799.,86589.,99313.,86589.,99313.,86589.,99313.,85997.,97609.,85997.,97609.,0.,0.,79826.,90350.,79826.,90350.,79826.,90350.,86438.,98180.,86438.,98180.,86438.,98180.,85995.,95152.,85995.,95152.,0.,0.,75137.,82756.,75137.,82756.,75137.,82756.,88617.,98610.,88617.,98610.,88617.,98610.,79961.,83623.,79961.,83623.,0.,0.,79241.,88756.,79241.,88756.,79241.,88756.,84552.,97374.,84552.,97374.,84552.,97374.,93024.,107413.,93024.,107413.,0.,0.,85301.,98315.,85301.,98315.,85301.,98315.,92453.,106752.,92453.,106752.,92453.,106752.,93783.,108035.,93783.,108035.,0.,0.,86813.,100152.,86813.,100152.,86813.,100152.,93530.,107737.,93530.,107737.,93530.,107737.,92512.,106099.,92512.,106099.,0.,0.,87195.,100044.,87195.,100044.,87195.,100044.,92527.,106109.,92527.,106109.,92527.,106109.,90156.,102760.,90156.,102760.,0.,0.,87342.,99233.,87342.,99233.,87342.,99233.,90384.,103001.,90384.,103001.,90384.,103001.,85458.,96494.,85458.,96494.,0.,0.,90428.,100728.,90428.,100728.,90428.,100728.,85454.,96396.,85454.,96396.,85454.,96396.,70692.,78323.,70692.,78323.,0.,0.,84617.,97440.,84617.,97440.,84617.,97440.,83973.,96607.,83973.,96607.,83973.,96607.,92886.,106795.,92886.,106795.,0.,0.,92294.,106564.,92294.,106564.,92294.,106564.,92515.,106364.,92515.,106364.,92515.,106364.,94158.,108033.,94158.,108033.,0.,0.,93639.,107861.,93639.,107861.,93639.,107861.,93950.,107796.,93950.,107796.,93950.,107796.,91874.,105168.,91874.,105168.,0.,0.,92701.,106313.,92701.,106313.,92701.,106313.,91869.,105167.,91869.,105167.,91869.,105167.,87044.,99369.,87044.,99369.,0.,0.,90450.,103104.,90450.,103104.,90450.,103104.,87236.,99605.,87236.,99605.,87236.,99605.,78375.,89211.,78375.,89211.,0.,0.,84833.,95787.,84833.,95787.,84833.,95787.,78665.,89521.,78665.,89521.,78665.,89521.,63448.,71985.,63448.,71985.,0.,0.,9194.,10306.,41521.,44441.,79431.,85178.,8946.,9792.,22335.,23886.,51736.,54740.,7726.,8300.,30477.,32533.,0.,0.,25028.,27404.,28235.,31471.,75379.,84132.,7236.,8309.,29539.,31536.,54052.,58395.,22577.,23370.,39152.,41429.,0.,0.,37235.,42691.,35353.,38183.,100490.,111738.,23433.,25843.,36759.,39109.,53411.,59694.,57437.,65025.,61345.,68878.,0.,0.,6377.,6683.,22457.,23448.,49503.,50751.,10380.,10835.,19266.,19610.,28417.,28750.,20732.,22044.,26521.,27276.,0.,0.,10131.,11681.,28482.,29670.,52601.,56753.,20722.,21728.,25680.,25959.,30780.,31657.,32161.,33290.,33096.,34633.,0.,0.,21380.,22651.,37121.,39923.,54598.,60751.,34744.,36379.,35111.,37417.,35939.,39080.,46708.,51426.,44384.,48624.,0.,0.,10952.,11418.,19643.,20167.,28488.,29118.,20182.,20242.,18359.,18431.,16718.,16900.,24621.,25169.,20737.,21234.,0.,0.,20251.,21309.,25725.,26026.,31355.,32256.,24539.,25102.,20991.,21593.,17889.,18639.,31588.,32417.,27170.,29235.,0.,0.,33431.,35174.,34427.,36736.,35916.,38926.,31741.,32451.,27148.,29040.,23993.,27214.,38993.,40689.,36596.,40772.,0.,0.,41907.,48128.,77947.,87844.,152033.,169876.,57437.,65025.,61345.,68878.,74154.,85533.,23433.,25843.,36759.,39109.,0.,0.,33932.,38310.,36200.,40713.,99297.,111743.,22577.,23370.,39152.,41429.,57432.,62292.,7236.,8309.,29539.,31536.,0.,0.,22968.,26297.,27645.,30092.,72463.,80413.,7726.,8300.,30477.,32533.,57469.,61055.,8946.,9792.,22335.,23886.,0.,0.,48710.,53918.,59260.,65402.,77350.,87781.,46708.,51426.,44384.,48624.,50354.,58143.,34744.,36379.,35111.,37417.,0.,0.,20908.,22670.,38133.,39669.,56332.,59453.,32161.,33290.,33096.,34633.,34367.,36793.,20722.,21728.,25680.,25959.,0.,0.,7404.,8010.,30073.,32272.,55210.,58955.,20732.,22044.,26521.,27276.,32434.,32943.,10380.,10835.,19266.,19610.,0.,0.,45425.,49667.,44460.,48383.,51014.,58851.,38993.,40689.,36596.,40772.,38865.,44837.,31741.,32451.,27148.,29040.,0.,0.,31595.,32602.,33322.,34837.,35379.,37698.,31588.,32417.,27170.,29235.,24035.,27311.,24539.,25102.,20991.,21593.,0.,0.,19475.,20577.,25384.,25965.,31447.,32050.,24621.,25169.,20737.,21234.,17759.,18414.,20182.,20242.,18359.,18431.,0.,0.],486,2)
+arr1.setInfoOnComponents(['VMIS','TRESCA'])
+f1z=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f1z.setName("SolutionSIEQ_ELNO")
+f1z.setArray(arr1)
+f1z.setMesh(mz)
+f1z.checkCoherency()
+ff1z=MEDFileField1TS()
+ff1z.setFieldNoProfileSBT(f1z)
+#
+arr2=DataArrayDouble([4.938269266683534e-28,-6.232001151245993e-28,1.0602290566170399e-27,4.029857051193646e-29,-1.1103217240985741e-27,-1.5536615528327828e-27,1.5241233363338648e-28,-3.015674201798923e-30,-1.02980203874559e-30,2.72351596604712e-29,-1.1888246600739933e-29,-2.69937196846485e-29,-4.7437993223547586e-07,1.3496193329105202e-07,-7.295395086913946e-07,7.054959528904149e-08,-8.433644218153947e-07,-1.3140517414252605e-08,-4.6699282590396373e-07,-4.307881601165781e-21,-7.181557182928824e-07,-8.028640214851634e-21,-8.231757491716489e-07,-1.2311604671716488e-20,6.500213859021137e-28,-5.36425415550288e-29,2.082592789783471e-28,1.3252863207712998e-28,-4.743799322354692e-07,-1.3496193329105909e-07,-7.295395086913853e-07,-7.054959528905818e-08,-8.433644218153849e-07,1.3140517414226876e-08,6.058451752097371e-28,5.632466863278024e-28,2.208810534618833e-28,2.2876966251409342e-28,-6.120655339318954e-07,1.623023866978208e-20,-7.136250920460284e-07,4.359903572644498e-20,-6.995066975751433e-07,7.373674095935513e-20,0.0,1.4598897976731362e-43,0.0,5.997557427310217e-43,0.0,1.156071233067974e-43,0.0,6.726232628759122e-44,0.0,1.0089348943138683e-43,-4.76082153061813e-07,1.7635130038063272e-07,-7.252650834474581e-07,1.797684522608815e-07,-7.726301925249592e-07,1.3593814652780474e-07,1.28713440720985e-28,8.66262871593868e-30,-1.7918024758329104e-28,1.9633850833341234e-29,-4.7608215306193535e-07,-1.7635130038060178e-07,-7.252650834476241e-07,-1.797684522607695e-07,-7.726301925251186e-07,-1.3593814652760442e-07,-3.0106055763582786e-29,-3.568658720396775e-29,-2.2739766223848432e-29,-1.6603258665331888e-29,-4.741010514018535e-07,5.448590612379579e-08,-4.701818411901992e-07,1.6663000490694165e-08,-7.453102534678627e-07,2.7357217239441644e-08,-7.279540615613018e-07,3.4371113890668217e-09,-8.579330208754989e-07,-2.6008405171390205e-08,-8.357526525453042e-07,-2.5729239758795502e-08,-4.701818411901952e-07,-1.6663000490702818e-08,-4.741010514018457e-07,-5.448590612380402e-08,-7.279540615612966e-07,-3.4371113890835274e-09,-7.45310253467852e-07,-2.7357217239458564e-08,-8.357526525452993e-07,2.572923975877074e-08,-8.579330208754882e-07,2.6008405171364682e-08,0.0,-3.689838846534034e-21,0.0,-3.4057248282497575e-21,0.0,-2.389474304570763e-21,0.0,1.1849907150798524e-21,0.0,7.728930340233592e-21,0.0,-9.409753747161713e-21,0.0,-9.27355993916331e-21,0.0,-5.9005465375222355e-21,0.0,3.45820724462685e-21,0.0,2.0021147143626658e-20,0.0,-1.6042705688202718e-20,0.0,-1.541762360721681e-20,0.0,-8.827856096357078e-21,0.0,6.3984676397065826e-21,0.0,3.396409774956617e-20,-5.21059344905059e-07,1.0785416831218214e-07,-5.942832234061152e-07,1.1284412735292002e-07,-7.291198556954883e-07,1.5975182005082218e-07,-7.29419534669376e-07,1.4146009988497262e-07,-7.536819640264805e-07,1.388363757438669e-07,-7.212688685979149e-07,1.1197909398607218e-07,-5.94283223406162e-07,-1.1284412735287996e-07,-5.210593449051535e-07,-1.0785416831213956e-07,-7.294195346694393e-07,-1.4146009988486582e-07,-7.291198556956173e-07,-1.5975182005070884e-07,-7.212688685979762e-07,-1.1197909398589052e-07,-7.536819640266044e-07,-1.3883637574367513e-07,-2.8576578578864835e-07,1.301140611795876e-07,-6.228581335977658e-07,1.1144407150470386e-07,-8.014360278229913e-07,2.882237382538957e-08,-2.6588034168431343e-07,-2.345549761149889e-21,-6.148909793824232e-07,-5.981322827533954e-21,-7.85277352863385e-07,-1.0225807644204478e-20,3.1049565229499025e-27,-4.196740015775783e-28,-2.887230913108903e-28,-4.403551231441193e-28,4.812051521848172e-29,3.851635443793833e-28,-2.857657857886445e-07,-1.301140611795897e-07,-6.228581335977572e-07,-1.1144407150471579e-07,-8.01436027822981e-07,-2.8822373825410947e-08,-1.5635223141480454e-27,-9.802651538976083e-29,3.278505922098525e-27,-6.797558254135845e-28,4.1020767071492614e-27,5.932234007262009e-28,-4.410314084022777e-07,7.268022452197178e-21,-6.915240267186082e-07,2.9979998916103056e-20,-7.135613152026231e-07,5.968769864060137e-20,0.0,1.793662034335766e-43,0.0,1.793662034335766e-43,0.0,8.96831017167883e-43,0.0,-5.6519283938616335e-43,0.0,1.0761972206014595e-42,0.0,9.269247757898544e-43,-2.627131752301911e-07,1.3274214899302934e-07,-6.329945799890571e-07,1.9265484727832687e-07,-7.677771910976133e-07,1.6184720841148966e-07,1.5146129380243427e-28,-5.494056542378401e-29,1.0988346067719275e-50,3.891714187734575e-29,2.524354896707238e-28,1.6407579324035087e-28,-2.62713175230267e-07,-1.3274214899303003e-07,-6.329945799892127e-07,-1.9265484727825895e-07,-7.677771910977852e-07,-1.6184720841133102e-07,-1.5146129380243427e-28,6.686637000472881e-29,-1.5146129380243427e-28,5.412840523535707e-29,5.048709949123486e-29,-1.0255191767873153e-29,-4.801584184334589e-07,9.447106112382042e-08,-2.646155245804423e-07,4.165624981437424e-08,-4.7283844479037397e-07,3.112099903692373e-08,-2.656912190102633e-07,1.2633757629192664e-08,-4.6803908104000066e-07,8.091752496288301e-09,-7.484767456103177e-07,4.8063930505815753e-08,-6.342336387597463e-07,4.783223809223803e-08,-7.371756425756432e-07,1.2491484933343017e-08,-6.217198644652372e-07,1.3160740615455145e-08,-7.210619794360716e-07,-6.140998451021678e-11,-8.616398069136549e-07,-2.0279767975595878e-08,-8.174867338143947e-07,1.761743718501197e-09,-8.474965025861739e-07,-2.8360688201075687e-08,-7.969390370704656e-07,-1.0156396041453297e-08,-8.26809188564297e-07,-1.6608029814857525e-08,-4.6803908103999843e-07,-8.091752496296909e-09,-2.6569121901026077e-07,-1.2633757629197396e-08,-4.72838444790368e-07,-3.112099903693232e-08,-2.6461552458043755e-07,-4.165624981437841e-08,-4.801584184334501e-07,-9.447106112382803e-08,-7.210619794360687e-07,6.140998449395655e-11,-6.217198644652322e-07,-1.3160740615467643e-08,-7.37175642575635e-07,-1.2491484933360037e-08,-6.342336387597367e-07,-4.783223809225061e-08,-7.484767456103061e-07,-4.8063930505832595e-08,-8.268091885642944e-07,1.6608029814832955e-08,-7.969390370704601e-07,1.015639604143253e-08,-8.474965025861654e-07,2.836068820105083e-08,-8.174867338143834e-07,-1.7617437185225845e-09,-8.616398069136434e-07,2.02797679755703e-08,0.0,-3.435877556189529e-21,0.0,-1.3776771401529971e-21,0.0,-3.403994495899553e-21,0.0,-1.3185754926235634e-21,0.0,-2.7680254878980847e-21,0.0,-1.1103673324958778e-21,0.0,-9.900107724251277e-22,0.0,4.77602156134974e-22,0.0,3.959146546409973e-21,0.0,3.776411006916986e-21,0.0,1.2124392797414627e-20,0.0,-8.731709783191639e-21,0.0,-6.144329300702704e-21,0.0,-8.89968038381516e-21,0.0,-5.404653063609732e-21,0.0,-7.547524363424233e-21,0.0,-3.3206893791145496e-21,0.0,-1.6246546029348425e-21,0.0,1.9854969588545943e-21,0.0,1.1317236337409485e-20,0.0,1.3983874347413824e-20,0.0,3.098996503833694e-20,0.0,-1.407865292807831e-20,0.0,-1.1626000835692668e-20,0.0,-1.533412146384094e-20,0.0,-1.1018823571603408e-20,0.0,-1.2512374860235445e-20,0.0,-6.514267779823197e-21,0.0,-2.4719015385819347e-21,0.0,4.858859984935085e-21,0.0,1.881348220188166e-20,0.0,2.740874292245713e-20,0.0,5.211376231395407e-20,-4.864225626157067e-07,1.3296728230814142e-07,-3.076586015279749e-07,6.740802636874205e-08,-5.594534933091086e-07,1.1066583698276748e-07,-3.841186138586638e-07,7.559745482599735e-08,-6.098267681100678e-07,9.875238991849593e-08,-7.2970765755297e-07,1.669225383108583e-07,-6.573316628421653e-07,1.465581454371536e-07,-7.316181481946474e-07,1.5542337568784254e-07,-6.912676702186072e-07,1.3829023572925456e-07,-7.20589385417476e-07,9.666451163676767e-08,-7.723884127434406e-07,1.3857930563622999e-07,-7.569169347428396e-07,1.547516335925935e-07,-7.383025429990218e-07,1.3271074092312e-07,-7.350854918831709e-07,1.2994146610617741e-07,-7.0646090437235e-07,6.938656131041383e-08,-6.098267681100908e-07,-9.875238991845998e-08,-3.841186138586908e-07,-7.559745482597872e-08,-5.594534933091803e-07,-1.1066583698272561e-07,-3.0765860152803245e-07,-6.740802636872275e-08,-4.864225626158294e-07,-1.329672823081032e-07,-7.20589385417508e-07,-9.666451163666813e-08,-6.912676702186662e-07,-1.3829023572918171e-07,-7.316181481947439e-07,-1.5542337568773118e-07,-6.573316628422832e-07,-1.4655814543707692e-07,-7.297076575531353e-07,-1.6692253831074535e-07,-7.064609043723808e-07,-6.938656131024667e-08,-7.350854918832338e-07,-1.2994146610603196e-07,-7.383025429991161e-07,-1.3271074092293177e-07,-7.56916934742969e-07,-1.5475163359243975e-07,-7.723884127435972e-07,-1.3857930563603445e-07,-2.6225523866596743e-07,7.368618860781533e-08,-2.6483901297419715e-07,2.3043552983380804e-08,-2.6569368384400127e-07,6.351605004005378e-09,-6.372294401265312e-07,7.723333950374213e-08,-6.279151194946851e-07,2.6473214771574048e-08,-6.169026138715963e-07,5.559932643680484e-09,-8.206671947434617e-07,1.419786412636469e-08,-8.077626999789484e-07,-6.830966026358984e-09,-7.886512424652054e-07,-7.805683188152915e-09,-2.6569368384400005e-07,-6.351605004010108e-09,-2.648390129741935e-07,-2.3043552983385364e-08,-2.622552386659623e-07,-7.36861886078186e-08,-6.169026138715935e-07,-5.559932643692688e-09,-6.279151194946777e-07,-2.647321477158676e-08,-6.372294401265209e-07,-7.723333950375434e-08,-7.886512424652024e-07,7.805683188132495e-09,-8.077626999789395e-07,6.830966026337777e-09,-8.2066719474345e-07,-1.4197864126386033e-08,0.0,-1.528080794868089e-21,0.0,-1.5426894495622164e-21,0.0,-1.1495211961775125e-21,0.0,-4.441807280413718e-22,0.0,1.9784166326767865e-21,0.0,5.420802477152069e-21,0.0,-6.12858914756041e-21,0.0,-6.197208509921192e-21,0.0,-4.895012827081806e-21,0.0,-1.2104071985400557e-21,0.0,7.207223659623184e-21,0.0,2.1139789648778443e-20,0.0,-1.178112680978544e-20,0.0,-1.2361618534325795e-20,0.0,-9.332953007651742e-21,0.0,-2.4549106998298197e-21,0.0,1.5192320364423287e-20,0.0,4.128606459003346e-20,-2.6179012371741095e-07,8.492155525093568e-08,-3.431936650750607e-07,6.526689580555302e-08,-4.206987870183037e-07,7.275786337707596e-08,-6.39565352471141e-07,1.6214246375922057e-07,-6.76924119958337e-07,1.4588367240696607e-07,-6.94035042843604e-07,1.042901908413762e-07,-7.689004953903582e-07,1.574343097081281e-07,-7.476782438785353e-07,1.489103868358007e-07,-7.209785981316606e-07,8.394206942691553e-08,-4.2069878701831687e-07,-7.275786337705938e-08,-3.431936650751034e-07,-6.52668958055331e-08,-2.617901237174839e-07,-8.492155525092188e-08,-6.940350428436335e-07,-1.0429019084130907e-07,-6.769241199584262e-07,-1.458836724068901e-07,-6.39565352471292e-07,-1.6214246375914686e-07,-7.209785981316918e-07,-8.394206942678136e-08,-7.476782438786325e-07,-1.4891038683565012e-07,-7.68900495390525e-07,-1.574343097079712e-07],259,2)
+arr2.setInfoOnComponents(['DRX','DRZ'])
+f2z=MEDCouplingFieldDouble(ON_NODES) ; f2z.setName("SolutionDEPL") ; f2z.setArray(arr2)
+f2z.setMesh(mz)
+f2z.checkCoherency()
+ff2z=MEDFileField1TS()
+ff2z.setFieldNoProfileSBT(f2z)
+#
+mm2=MEDFileUMesh()
+mm2.setMeshAtLevel(0,mz)
+mm2.setFamilyFieldArr(0,DataArrayInt([-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-4,-4,-4,-4,-4,-4,-4,-4,-4,-5,-5,-5,-5,-5,-5,-5,-5,-5]))
+mm2.setFamilyFieldArr(1,DataArrayInt([1,2,3,4,5,6,0,0,0,0,0,0,1,1,0,0,0,3,3,0,0,0,7,7,7,7,7,0,0,0,5,5,0,0,0,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,3,3,3,0,0,0,7,7,7,7,7,7,0,0,0,5,5,5,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]))
+for famName,famId in [('FAMILLE_ZERO',0),('ba1_beam',-1),('ba2_beam',-2),('h1',6),('h1_h2_h3',4),('h2',5),('h3',7),('h3_h4_h5',2),('h4',3),('h5',1),('to1_beam',-4),('to2_beam',-5),('web_beam',-3)]:
+    mm2.setFamilyId(famName,famId)
+    pass
+for grName,famsOnGrp in [('ba1',['ba1_beam']),('ba2',['ba2_beam']),('beam',['ba1_beam','ba2_beam','to1_beam','to2_beam','web_beam']),('h1',['h1','h1_h2_h3']),('h2',['h1_h2_h3','h2']),('h3',['h1_h2_h3','h3','h3_h4_h5']),('h4',['h3_h4_h5','h4']),('h5',['h3_h4_h5','h5']),('to1',['to1_beam']),('to2',['to2_beam']),('web',['web_beam'])]:
+    mm2.setFamiliesOnGroup(grName,famsOnGrp)
+    pass
+#
+mm2.write(fname,2)
+ff0z.write(fname,0)
+ff1z.write(fname,0)
+ff2z.write(fname,0)
+################### MED write is done -> Go to MEDReader
+from paraview.simple import *
+
+myMedReader=MEDReader(FileName=fname)
+keys=myMedReader.GetProperty("FieldsTreeInfo")[::2]
+# list all the names of arrays that can be seen (including their spatial discretization)
+arr_name_with_dis=[elt.split("/")[-1] for elt in keys]
+# list all the names of arrays (Equal to those in the MED File)
+arr_name=[elt.split(myMedReader.GetProperty("Separator").GetData())[0] for elt in arr_name_with_dis]
+myMedReader.AllArrays=keys
+RenderView1 = GetRenderView()
+ELNOMesh1=ELNOMesh()
+ELNOMesh1.Input=myMedReader
+ExtractGroup1=ExtractGroup()
+ExtractGroup1.Input=ELNOMesh1
+ExtractGroup1.UpdatePipelineInformation()
+ExtractGroup1.AllGroups=['GRP_ba2','GRP_to1','GRP_web']
+#
+DataRepresentation3 = Show()
+DataRepresentation3.ScaleFactor = 0.008999999705702066
+DataRepresentation3.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation3.SelectionPointFieldDataArrayName = 'SolutionSIEF_ELNO'
+a2_SolutionSIEQ_ELNO_PiecewiseFunction = CreatePiecewiseFunction(Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0])
+#VectorMode='Magnitude' or VectorMode='Component'
+a2_SolutionSIEQ_ELNO_PVLookupTable = GetLookupTableForArray("SolutionSIEQ_ELNO",2,RGBPoints=[0.0, 0.23, 0.299, 0.754, 239013.7773476667, 0.706, 0.016, 0.15], VectorMode='Component', VectorComponent=1, NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+DataRepresentation3.ScalarOpacityFunction = a2_SolutionSIEQ_ELNO_PiecewiseFunction
+DataRepresentation3.ColorArrayName = 'SolutionSIEQ_ELNO'
+DataRepresentation3.LookupTable = a2_SolutionSIEQ_ELNO_PVLookupTable
+DataRepresentation3.Visibility = 1
+#
+GaussPoints1=GaussPoints()
+GaussPoints1.Input=ELNOMesh1
+GaussPoints1.SelectSourceArray=['CELLS','ELGA@0']
+DataRepresentation4 = Show()
+DataRepresentation4.ScaleFactor = 0.008999999705702066
+DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation4.SelectionPointFieldDataArrayName = 'SolutionSIEF_ELGA'
+DataRepresentation4.ColorArrayName = 'SolutionSIEF_ELGA'
+########
+RenderView1.CameraViewUp = [-0.19545466285945437, 0.837274140321886, -0.5106559396646081]
+RenderView1.CameraPosition = [0.11797550069274401, 0.20119836056342144, 0.20885419432082736]
+RenderView1.CameraClippingRange = [0.14700465306315827, 0.40712447273162633]
+RenderView1.CameraFocalPoint = [1.0170565790969026e-18, 0.0599999981932342, 0.022500000894069675]
+RenderView1.ViewSize =[300,300]
+WriteImage(outImgName)
+
diff --git a/src/Plugins/MEDReader/Test/testMEDReader1.py b/src/Plugins/MEDReader/Test/testMEDReader1.py
new file mode 100644 (file)
index 0000000..bede0eb
--- /dev/null
@@ -0,0 +1,59 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+"""
+This test focused on ELNO. Here a 2 QUAD4 cells and a single ELNO field 
+is defined.
+"""
+fname="testMEDReader1.med"
+outImgName="testMEDReader1.png"
+
+coords=DataArrayDouble([(0,0,0),(2,1,0),(1,0,0),(1,1,0),(2,0,0),(0,1,0)])
+m=MEDCouplingUMesh("mesh",2) ; m.setCoords(coords)
+m.allocateCells()
+m.insertNextCell(NORM_QUAD4,[0,5,3,2])
+m.insertNextCell(NORM_QUAD4,[4,2,3,1])
+m.finishInsertingCells()
+MEDLoader.WriteMesh(fname,m,True)
+#
+f0=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f0.setMesh(m) ; f0.setTimeUnit("ms")
+f0.setTime(1.1,1,1)
+f0.setName("myELNOField")
+arr=DataArrayDouble([7,5,3,1,5,3,1,7]) ; arr.setInfoOnComponent(0,"Comp0")
+f0.setArray(arr)
+MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+#
+f0.setTime(2.2,2,1)
+arr=DataArrayDouble([1,7,5,3,7,5,3,1]) ; arr.setInfoOnComponent(0,"Comp0")
+f0.setArray(arr)
+MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+#
+f0.setTime(3.3,3,1)
+arr=DataArrayDouble([3,1,7,5,1,7,5,3]) ; arr.setInfoOnComponent(0,"Comp0")
+f0.setArray(arr)
+MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
+#
+f0.setTime(4.4,4,1)
+arr=DataArrayDouble([5,3,1,7,3,1,7,5]) ; arr.setInfoOnComponent(0,"Comp0")
+f0.setArray(arr)
+MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0)
diff --git a/src/Plugins/MEDReader/Test/testMEDReader2.py b/src/Plugins/MEDReader/Test/testMEDReader2.py
new file mode 100644 (file)
index 0000000..8607411
--- /dev/null
@@ -0,0 +1,111 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+fname="testMEDReader2.med"
+outImgName="testMEDReader2.png"
+
+""" This use case is a mesh containing a large number of orphan cells (cells having no field lying on them)
+"""
+#########
+arrX=DataArrayDouble(7) ; arrX.iota()
+arrY=DataArrayDouble(7) ; arrY.iota()
+arrZ=DataArrayDouble(7) ; arrZ.iota()
+m=MEDCouplingCMesh()
+m.setCoords(arrX,arrY,arrZ)
+m=m.buildUnstructured() ; m.setName("mesh")
+tmp=m[3*36:4*36]
+tmp=tmp.buildDescendingConnectivity()[0]
+nodeIds=tmp.findNodesOnPlane([0.,0.,3.],[0.,0.,1.],1e-12)
+cellIds=tmp.getCellIdsLyingOnNodes(nodeIds,True)
+m1=tmp[cellIds]
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m)
+mm.setMeshAtLevel(-1,m1)
+mm.write(fname,2)
+#
+pfl=DataArrayInt([7,8,9,10,13,14,15,16,19,20,21,22,25,26,27,28]) ; pfl.setName("pfl")
+f=MEDCouplingFieldDouble(ON_CELLS) ; f.setName("ACellField")
+arr=DataArrayDouble(16) ; arr.iota()
+arr2=arr.deepCpy() ; arr2.reverse()
+arr=DataArrayDouble.Meld(arr,arr2) ; arr.setInfoOnComponents(["aa","bbb"])
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldProfile(f,mm,-1,pfl)
+f1ts.write(fname,0)
+
+################### MED write is done -> Go to MEDReader
+
+from paraview.simple import *
+
+
+
+testMEDReader1=MEDReader(FileName=fname)
+testMEDReader1.AllArrays=['TS0/mesh/ComSup0/ACellField@@][@@P0']
+testMEDReader2=MEDReader(FileName=fname)
+testMEDReader2.AllArrays=['TS0/mesh/ComSup1/mesh@@][@@P0']
+GroupDatasets1=GroupDatasets(Input=[testMEDReader1,testMEDReader2])
+
+Clip1 = Clip(ClipType="Plane")
+Clip1.Input=GroupDatasets1
+Clip1.Scalars=['FamilyIdCell']
+Clip1.ClipType.Origin=[3.0, 3.0, 3.0]
+Clip1.InsideOut=1
+Clip1.ClipType.Normal=[0.9255623174457069, 0.0027407477590518157, 0.378585373233375]
+Clip1.Scalars=['CELLS']
+
+DataRepresentation4 = Show()
+DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation4.SelectionCellFieldDataArrayName = 'ACellField'
+DataRepresentation4.ScalarOpacityUnitDistance = 1.61104723630366
+DataRepresentation4.ExtractedBlockIndex = 2
+DataRepresentation4.ScaleFactor = 0.6000000000000001
+DataRepresentation4.Visibility = 1
+DataRepresentation4.Representation = 'Wireframe'
+
+ExtractBlock1 = ExtractBlock()
+ExtractBlock1.BlockIndices=[1, 2]
+ExtractBlock1.Input=Clip1
+
+DataRepresentation5 = Show()
+DataRepresentation5.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation5.SelectionCellFieldDataArrayName = 'FamilyIdCell'
+DataRepresentation5.ScaleFactor = 0.6
+a2_ACellField_PVLookupTable=GetLookupTableForArray( "ACellField", 2, RGBPoints=[10.63014581273465, 0.23, 0.299, 0.754, 15.0, 0.706, 0.016, 0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+a2_ACellField_PiecewiseFunction=CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )
+a2_ACellField_PVLookupTable.ScalarOpacityFunction = a2_ACellField_PiecewiseFunction
+DataRepresentation5.ScalarOpacityFunction = a2_ACellField_PiecewiseFunction
+DataRepresentation5.ColorArrayName = 'ACellField'
+DataRepresentation5.LookupTable = a2_ACellField_PVLookupTable
+DataRepresentation5.ColorAttributeType = 'CELL_DATA'
+
+RenderView1 = GetRenderView()
+RenderView1.CenterOfRotation = [3.0, 3.0, 3.0]
+RenderView1.CameraViewUp = [-0.03886073885859842, 0.48373409998193495, 0.8743518533691291]
+RenderView1.CameraPosition = [7.351939549758929, -5.688193007926853, 8.000155023042788]
+RenderView1.CameraClippingRange = [0.026023957813772633, 26.023957813772633]
+RenderView1.CameraFocalPoint = [2.9999999999999996, 2.9999999999999987, 2.9999999999999982]
+
+RenderView1.ViewSize =[300,300]
+WriteImage(outImgName)
+
+
diff --git a/src/Plugins/MEDReader/Test/testMEDReader3.py b/src/Plugins/MEDReader/Test/testMEDReader3.py
new file mode 100644 (file)
index 0000000..fea2e7b
--- /dev/null
@@ -0,0 +1,121 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+fname="testMEDReader3.med"
+outImgName="testMEDReader3.png"
+
+""" This test checks that invalid double time (not in [-1e299:1e299])
+ leads MEDReader to takes iteration numbers instead of double time to discriminate timesteps each other
+ See EDF 1956.
+"""
+#########
+
+m=MEDCouplingUMesh("mesh",2)
+coords=DataArrayDouble([(0.,0.,0.),(1.,0.,0.),(1.,1.,0.),(0.,1.,0.)],4,3)
+m.setCoords(coords)
+m.allocateCells()
+m.insertNextCell(NORM_QUAD4,[0,3,2,1])
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m)
+mm.write(fname,2)
+fmts=MEDFileFieldMultiTS()
+#
+f=MEDCouplingFieldDouble(ON_NODES) ; f.setName("ANodeField")
+f.setTime(1.7976931348623157e+308,1,1) ; f.setMesh(m)
+arr=DataArrayDouble([0.,4.,4.,4.]) ; arr.setInfoOnComponent(0,"aaa")
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f)
+fmts.pushBackTimeStep(f1ts)
+#
+f.setTime(1.7976931348623157e+308,2,2)
+arr=DataArrayDouble([1.,4.,4.,4.]) ; arr.setInfoOnComponent(0,"aaa")
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f)
+fmts.pushBackTimeStep(f1ts)
+#
+f.setTime(1.7976931348623157e+308,3,3)
+arr=DataArrayDouble([2.,4.,4.,4.]) ; arr.setInfoOnComponent(0,"aaa")
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f)
+fmts.pushBackTimeStep(f1ts)
+#
+f.setTime(1.7976931348623157e+308,4,6)
+arr=DataArrayDouble([3.,4.,4.,4.]) ; arr.setInfoOnComponent(0,"aaa")
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f)
+fmts.pushBackTimeStep(f1ts)
+#
+f.setTime(1.7976931348623157e+308,5,7)
+arr=DataArrayDouble([4.,4.,4.,4.]) ; arr.setInfoOnComponent(0,"aaa")
+f.setArray(arr)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f)
+fmts.pushBackTimeStep(f1ts)
+#
+fmts.write(fname,0)
+
+################### MED write is done -> Go to MEDReader
+
+from paraview.simple import *
+
+AnimationScene1=GetAnimationScene()
+AnimationScene1.PlayMode='Snap To TimeSteps'
+AnimationScene1.EndTime = 2.0
+AnimationScene1.AnimationTime = 1.0
+AnimationScene1.StartTime = 1.0
+
+testMEDReader3=MEDReader(FileName=fname)
+testMEDReader3.AllArrays=['TS0/mesh/ComSup0/ANodeField@@][@@P1']
+
+assert(list(testMEDReader3.TimestepValues)==[1.,2.,3.,4.,5.]) ## <- the test is here - double time steps are too big use dt.
+
+RenderView1=GetRenderView()
+RenderView1.ViewTime=3.0
+RenderView1.CameraPosition=[0.5,0.5,5.7320508075688776]
+RenderView1.CameraClippingRange=[2.704730299493189,2.7730315696824106]
+RenderView1.ViewSize=[300,300]
+
+DataRepresentation2=Show()
+DataRepresentation2.EdgeColor=[0.0, 0.0, 0.5000076295109483]
+DataRepresentation2.SelectionPointFieldDataArrayName='ANodeField'
+DataRepresentation2.SelectionCellFieldDataArrayName='FamilyIdCell'
+DataRepresentation2.ScalarOpacityUnitDistance=1.4142135623730951
+DataRepresentation2.ExtractedBlockIndex=1
+DataRepresentation2.ScaleFactor=0.1
+
+a1_ANodeField_PVLookupTable=GetLookupTableForArray("ANodeField",1,RGBPoints=[0.0,0.23,0.299,0.754,4.0,0.706,0.016,0.15],VectorMode='Magnitude',NanColor=[0.25,0.0,0.0],
+                                                     ColorSpace='Diverging',ScalarRangeInitialized=1.0,AllowDuplicateScalars=1)
+a1_ANodeField_PiecewiseFunction=CreatePiecewiseFunction(Points=[0.0,0.0,0.5,0.0,1.0,1.0,0.5,0.0])
+a1_ANodeField_PVLookupTable.ScalarOpacityFunction=a1_ANodeField_PiecewiseFunction
+
+DataRepresentation2.ScalarOpacityFunction=a1_ANodeField_PiecewiseFunction
+DataRepresentation2.ColorArrayName='ANodeField'
+DataRepresentation2.LookupTable=a1_ANodeField_PVLookupTable
+###
+WriteImage(outImgName)
+
+
diff --git a/src/Plugins/MEDReader/Test/testMEDReader4.py b/src/Plugins/MEDReader/Test/testMEDReader4.py
new file mode 100644 (file)
index 0000000..488a4e9
--- /dev/null
@@ -0,0 +1,95 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+""" This test checks that umeshes with no names work properly.
+"""
+
+fname="testMEDReader4.med"
+outImgName="testMEDReader4.png"
+#########
+coords=DataArrayDouble([(0.,0.,0.),(1.,0.,0.),(2.,0.,0.),(3.,0.,0.),(0.,1.,0.),(1.,1.,0.),(2.,1.,0.),(3.,1.,0.),(0.,2.,0.),(1.,2.,0.),(2.,2.,0.),(3.,2.,0.),(0.,3.,0.),(1.,3.,0.),(2.,3.,0.),(3.,3.,0.)])
+m0=MEDCouplingUMesh("mesh",2)
+m0.allocateCells()
+m0.setCoords(coords)
+##
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m0)
+mm.setFamilyFieldArr(1,DataArrayInt([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))
+#
+f1ts0=MEDFileField1TS()
+f1ts1=MEDFileField1TS()
+#
+f0=MEDCouplingFieldDouble(ON_NODES) ; f0.setMesh(m0) ; f0.setName("f0NoPfl")
+arr0=DataArrayDouble([0.,1.,2.,3.,1.,1.5,2.2,3.1,2.,2.2,3.,3.1,3.,3.1,3.5,4.])
+f0.setArray(arr0)
+f0.checkCoherency()
+f1ts0.setFieldNoProfileSBT(f0)
+#
+pfl1=DataArrayInt([0,1,2,3,4,5,6,8,9,12]) ; pfl1.setName("pfl1")
+f1=MEDCouplingFieldDouble(ON_NODES) ; f1.setName("f1Pfl")
+arr1=DataArrayDouble([3.,2.,1.,0.,2.,1.5,0.,1.,0.,0.2])
+f1.setArray(arr1)
+f1ts1.setFieldProfile(f1,mm,0,pfl1)
+#
+fs=MEDFileFields()
+fmts0=MEDFileFieldMultiTS()
+fmts0.pushBackTimeStep(f1ts0)
+fmts1=MEDFileFieldMultiTS()
+fmts1.pushBackTimeStep(f1ts1)
+fs.pushField(fmts0) ; fs.pushField(fmts1)
+mm.write(fname,2)
+fs.write(fname,0)
+################### MED write is done -> Go to MEDReader
+
+from paraview.simple import *
+
+testMEDReader4_med=MEDReader(FileName=fname)
+
+testMEDReader4_med.AllArrays=['TS0/mesh/ComSup0/f0NoPfl@@][@@P1','TS0/mesh/ComSup0/mesh@@][@@P1']
+#testMEDReader4_med.AllTimeSteps=['0000']
+
+Glyph1=Glyph(GlyphType="Sphere",GlyphTransform="Transform2" )
+Glyph1.Scalars=['POINTS','f0NoPfl']
+Glyph1.SetScaleFactor=0.3
+Glyph1.Vectors=['POINTS', '']
+Glyph1.GlyphTransform="Transform2"
+
+DataRepresentation1 = Show()
+DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation1.SelectionPointFieldDataArrayName = 'f0NoPfl'
+DataRepresentation1.ScaleFactor = 0.3
+DataRepresentation1.ColorArrayName = 'f0NoPfl'
+lookupTable = GetLookupTableForArray( "f0NoPfl", 1, RGBPoints=[0.0, 0.23, 0.299, 0.754, 4.0, 0.706, 0.016, 0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+function=CreatePiecewiseFunction(Points=[0.0,0.0,0.5,0.0,1.0,1.0,0.5,0.0] )
+lookupTable.ScalarOpacityFunction = function
+DataRepresentation1.LookupTable = lookupTable
+
+RenderView1 = GetRenderView()
+RenderView1.CameraViewUp = [0.06254683966704512, 0.9980420295997885, 0.0]
+RenderView1.CameraPosition = [0.8087292125440382, 1.3325993334207897, 12.692130429902462]
+RenderView1.CameraClippingRange = [6.326709113742113, 7.168262401281963]
+RenderView1.CameraFocalPoint = [0.8087292125440382, 1.3325993334207897, 0.0]
+RenderView1.CameraParallelScale = 3.712804729456109
+
+RenderView1.ViewSize =[300,300]
+WriteImage(outImgName)
diff --git a/src/Plugins/MEDReader/Test/testMEDReader5.py b/src/Plugins/MEDReader/Test/testMEDReader5.py
new file mode 100644 (file)
index 0000000..9fbf6eb
--- /dev/null
@@ -0,0 +1,115 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+""" This test is CEA specific one. It generates a .sauv file
+that is then read by MEDReader
+"""
+
+fname="testMEDReader5.sauv"
+outImgName="testMEDReader5.png"
+#########
+arr=DataArrayDouble(5) ; arr.iota()
+c=MEDCouplingCMesh("mesh")
+c.setCoords(arr,arr,arr)
+m=c.buildUnstructured()
+mbis=m.deepCpy() ; mbis.translate([5,0,0]) ; mbis.tetrahedrize(PLANAR_FACE_5)
+m=MEDCouplingUMesh.MergeUMeshes([mbis,m]) ; m.setName(c.getName())
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m)
+grp0=DataArrayInt.Range(0,m.getNumberOfCells(),2) ; grp0.setName("grp0")
+grp1=DataArrayInt.Range(1,m.getNumberOfCells(),2) ; grp1.setName("grp1")
+grp2=DataArrayInt.Range(0,m.getNumberOfNodes(),7) ; grp2.setName("grp2")
+mm.setGroupsAtLevel(0,[grp0,grp1])
+mm.setGroupsAtLevel(1,[grp2])
+ms=MEDFileMeshes()
+ms.pushMesh(mm)
+f=MEDCouplingFieldDouble(ON_CELLS) ; f.setName("fCell") ; f.setMesh(m[:10])
+arr=DataArrayDouble(f.getNumberOfTuplesExpected()) ; arr.iota() ; f.setArray(arr)
+f2=MEDCouplingFieldDouble(ON_NODES) ; f2.setName("fNode") ; f2.setMesh(m)
+arr=DataArrayDouble(f2.getNumberOfTuplesExpected()) ; arr.iota() ; f2.setArray(arr)
+
+fs=MEDFileFields()
+f1ts=MEDFileField1TS()
+#f1ts.setFieldNoProfileSBT(f)
+pfl=DataArrayInt(10); pfl.iota() ; pfl.setName("pfl") ; f1ts.setFieldProfile(f,mm,0,pfl)
+fmts=MEDFileFieldMultiTS()
+fmts.pushBackTimeStep(f1ts)
+fs.pushField(fmts)
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(f2)
+fmts=MEDFileFieldMultiTS()
+fmts.pushBackTimeStep(f1ts)
+fs.pushField(fmts)
+
+mfd=MEDFileData()
+mfd.setMeshes(ms)
+mfd.setFields(fs)
+#mfd.write(fname,2) not activated because useless
+#
+sw=SauvWriter();
+sw.setMEDFileDS(mfd);
+sw.write(fname);
+del mm,m,c,f,arr
+del f1ts
+################### MED write is done -> Go to MEDReader
+from paraview.simple import *
+
+myMedReader=MEDReader(FileName=fname)
+myMedReader.AllArrays = ['TS0/mesh/ComSup1/fNode@@][@@P1']
+myMedReader.AllTimeSteps = ['0000']
+
+Clip1=Clip(ClipType="Plane")
+Clip1.Input=myMedReader
+Clip1.Scalars = ['POINTS', 'FamilyIdNode']
+Clip1.ClipType.Origin = [2.0, 2.0, 2.0]
+Clip1.ClipType = "Plane"
+Clip1.ClipType.Normal = [0.04207410474474753, 0.9319448861971525, 0.3601506612529047]
+Clip1.InsideOut = 1
+
+DataRepresentation2 = Show()
+DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation2.ScalarOpacityUnitDistance = 1.5768745057161244
+DataRepresentation2.ExtractedBlockIndex = 1
+DataRepresentation2.ScaleFactor = 0.4
+
+RenderView1=GetRenderView()
+RenderView1.CenterOfRotation=[2.,2.,2.]
+RenderView1.CameraViewUp=[0.24562884954787187,0.6907950752417243,-0.680050463047831]
+RenderView1.CameraPosition=[-2.5085697461776486,11.6185941755061,10.14210560568201]
+RenderView1.CameraClippingRange=[5.269050059274764,23.64024625330183]
+RenderView1.CameraFocalPoint=[2.,2.,2.]
+RenderView1.CameraParallelScale=5.071791174723188
+
+LookupTable=GetLookupTableForArray("fNode",1,RGBPoints=[0.0,0.23,0.299,0.754,55.0,0.706,0.016,0.15],VectorMode='Magnitude',NanColor=[0.25,0.0,0.0],ColorSpace='Diverging',ScalarRangeInitialized=1.0,AllowDuplicateScalars=1)
+DataRepresentation2 = Show()
+DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation2.ScalarOpacityUnitDistance = 1.5768745057161244
+DataRepresentation2.ExtractedBlockIndex = 1
+DataRepresentation2.ScaleFactor = 0.4
+DataRepresentation2.ColorArrayName='fNode'
+DataRepresentation2.LookupTable=LookupTable
+DataRepresentation2.ColorAttributeType='POINT_DATA'
+
+
+RenderView1.ViewSize=[300,300]
+WriteImage(outImgName)
diff --git a/src/Plugins/MEDReader/Test/testMEDReader6.py b/src/Plugins/MEDReader/Test/testMEDReader6.py
new file mode 100644 (file)
index 0000000..2154fe4
--- /dev/null
@@ -0,0 +1,99 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+""" This test generate a GaussPoint field on a mesh with groups.
+The aim of this test is to check that the ExtractGroup works well for GaussPoints
+"""
+
+fname="testMEDReader6.med"
+outImgName="testMEDReader6.png"
+#########
+arr=DataArrayDouble([(0,0,0),(1,0,0),(2,0,0),(3,0,0),(0,1,0),(1,1,0),(2,1,0),(3,1,0),(0,2,0),(1,2,0),(2,2,0),(3,2,0),(0,3,0),(1,3,0),(2,3,0),(3,3,0)])
+m0=MEDCouplingUMesh("mesh",2) ; m0.setCoords(arr) ; m0.allocateCells()
+for elt in [[2,3,6],[3,7,6],[6,9,5],[6,10,9]]:
+    m0.insertNextCell(NORM_TRI3,elt)
+    pass
+for elt in [[0,4,5,1],[5,6,2,1],[4,8,9,5],[6,10,11,7],[8,12,13,9],[9,13,14,10],[10,14,15,11]]:
+    m0.insertNextCell(NORM_QUAD4,elt)
+    pass
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m0)
+grp0=DataArrayInt([0,1,4,5,7,10]) ; grp0.setName("grp0")
+mm.setGroupsAtLevel(0,[grp0])
+#
+fGauss=MEDCouplingFieldDouble(ON_GAUSS_PT) ; fGauss.setName("fGauss")
+fGauss.setMesh(m0)
+fGauss.setGaussLocalizationOnType(NORM_TRI3,[0.,0.,1.,0.,0.,1.],[0.1,0.1,0.05,0.9],[0.4,0.6])
+fGauss.setGaussLocalizationOnType(NORM_QUAD4,[-1.,-1.,1.,-1.,1.,1.,-1.,1.],[-0.9,-0.9,0.,0.,0.9,0.9],[0.2,0.3,0.5])
+fGauss.setArray(DataArrayDouble([0.9,1.3,0.22,1.3,1.62,2.21,1.62,2.72,2.95,2.54,2.25,2.16,1.58,1.05,3.13,2.91,2.82,1.41,1.58,1.95,3.59,3.53,3.59,2.82,2.91,3.13,2.25,2.54,2.95]))
+fGauss.getArray().setInfoOnComponent(0,"C0")
+fGauss.checkCoherency()
+#
+f1ts=MEDFileField1TS()
+f1ts.setFieldNoProfileSBT(fGauss)
+#
+mm.write(fname,2)
+f1ts.write(fname,0)
+################### MED write is done -> Go to MEDReader
+from paraview.simple import *
+
+myMedReader=MEDReader(FileName=fname)
+myMedReader.AllArrays = ['TS0/mesh/ComSup0/fGauss@@][@@GAUSS']
+myMedReader.AllTimeSteps = ['0000']
+
+ExtractGroup1 = ExtractGroup(Input=myMedReader)
+ExtractGroup1.UpdatePipelineInformation()
+ExtractGroup1.AllGroups = ['GRP_grp0']
+
+GaussPoints1 = GaussPoints(Input=ExtractGroup1)
+GaussPoints1.SelectSourceArray = ['CELLS','ELGA@0']
+
+Glyph1 = Glyph( Input=GaussPoints1, GlyphType="Sphere", GlyphTransform="Transform2" )
+Glyph1.GlyphType = "Sphere"
+Glyph1.Vectors = ['POINTS', '']
+Glyph1.SetScaleFactor = 0.29
+
+RenderView1 = GetRenderView()
+RenderView1.CameraFocalPoint = [1.5, 1.5, 0.0]
+RenderView1.CameraPosition = [1.5, 1.5, 10000.0]
+RenderView1.InteractionMode = '3D'
+RenderView1.CameraPosition = [1.5, 1.5, 8.196152422706632]
+RenderView1.CameraClippingRange = [7.825640906782493, 8.682319698595558]
+RenderView1.CameraParallelScale = 2.1213203435596424
+RenderView1.CenterOfRotation = [1.5, 1.5, 0.0]
+
+DataRepresentation4 = Show()
+DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation4.SelectionPointFieldDataArrayName = 'fGauss'
+DataRepresentation4.ScaleFactor = 0.3182729169726372
+
+a1_fGauss_PVLookupTable = GetLookupTableForArray( "fGauss", 1, RGBPoints=[0.22, 0.23, 0.299, 0.754, 2.95, 0.706, 0.016, 0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+a1_fGauss_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )
+DataRepresentation4.ColorArrayName = 'fGauss'
+DataRepresentation4.LookupTable = a1_fGauss_PVLookupTable
+a1_fGauss_PVLookupTable.ScalarOpacityFunction = a1_fGauss_PiecewiseFunction
+
+
+RenderView1.ViewSize=[300,300]
+WriteImage(outImgName)
+
diff --git a/src/Plugins/MEDReader/Test/testMEDReader7.py b/src/Plugins/MEDReader/Test/testMEDReader7.py
new file mode 100644 (file)
index 0000000..a3b235c
--- /dev/null
@@ -0,0 +1,98 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+""" This test generate a simple multi time field with a very aggressive time steps triplets. Neither dt, nor iteration nor order is considered.
+In this case only the rank is considered.
+"""
+
+fname="testMEDReader7.med"
+outImgName="testMEDReader7.png"
+#########
+arr=DataArrayDouble([(0,0,0),(1,0,0),(2,0,0),(3,0,0),(0,1,0),(1,1,0),(2,1,0),(3,1,0),(0,2,0),(1,2,0),(2,2,0),(3,2,0),(0,3,0),(1,3,0),(2,3,0),(3,3,0)])
+m0=MEDCouplingUMesh("mesh",2) ; m0.setCoords(arr) ; m0.allocateCells()
+for elt in [[2,3,6],[3,7,6],[6,9,5],[6,10,9]]:
+    m0.insertNextCell(NORM_TRI3,elt)
+    pass
+for elt in [[0,4,5,1],[5,6,2,1],[4,8,9,5],[6,10,11,7],[8,12,13,9],[9,13,14,10],[10,14,15,11]]:
+    m0.insertNextCell(NORM_QUAD4,elt)
+    pass
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m0)
+grp0=DataArrayInt([0,1,4,5,7,10]) ; grp0.setName("grp0")
+mm.setGroupsAtLevel(0,[grp0])
+fmts=MEDFileFieldMultiTS()
+#
+fNode=MEDCouplingFieldDouble(ON_NODES) ; fNode.setName("fNode")
+fNode.setMesh(m0)
+fNode.setArray(DataArrayDouble([3,2,1,0,3.16,2.23,1.41,1,3.6,2.82,2.23,2,4.24,3.6,3.16,3]))
+fNode.getArray().setInfoOnComponent(0,"C0")
+fNode.setTime(0.5,1,1)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,1,2)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,2,1)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,2,2)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+mm.write(fname,2)
+fmts.write(fname,0)
+################### MED write is done -> Go to MEDReader
+from paraview.simple import *
+
+
+myMedReader=MEDReader(FileName=fname)
+myMedReader.AllArrays = ['TS0/mesh/ComSup0/fNode@@][@@P1']
+assert(list(myMedReader.TimestepValues)==[0.,1.,2.,3.])
+
+RenderView1 = GetRenderView()
+RenderView1.CameraFocalPoint = [1.5, 1.5, 0.0]
+RenderView1.CameraPosition = [1.5, 1.5, 10000.0]
+RenderView1.InteractionMode = '3D'
+RenderView1.CameraPosition = [1.5, 1.5, 8.196152422706632]
+RenderView1.CameraClippingRange = [7.825640906782493, 8.682319698595558]
+RenderView1.CameraParallelScale = 2.1213203435596424
+RenderView1.CenterOfRotation = [1.5, 1.5, 0.0]
+
+DataRepresentation4 = Show()
+DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation4.SelectionPointFieldDataArrayName = 'fNode'
+DataRepresentation4.ScaleFactor = 0.3182729169726372
+
+a1_fGauss_PVLookupTable = GetLookupTableForArray( "fNode", 1, RGBPoints=[0.22, 0.23, 0.299, 0.754, 2.95, 0.706, 0.016, 0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+a1_fGauss_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )
+DataRepresentation4.ColorArrayName = 'fNode'
+DataRepresentation4.LookupTable = a1_fGauss_PVLookupTable
+a1_fGauss_PVLookupTable.ScalarOpacityFunction = a1_fGauss_PiecewiseFunction
+
+RenderView1.ViewTime = 1.0 #### Important # red is in right bottom
+RenderView1.CacheKey = 1.0
+RenderView1.UseCache = 1
+RenderView1.ViewSize=[300,300]
+WriteImage(outImgName)
diff --git a/src/Plugins/MEDReader/Test/testMEDReader8.py b/src/Plugins/MEDReader/Test/testMEDReader8.py
new file mode 100644 (file)
index 0000000..3571776
--- /dev/null
@@ -0,0 +1,109 @@
+#  -*- coding: iso-8859-1 -*-
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Author : Anthony Geay
+
+from MEDLoader import *
+
+""" This test is a non regression test. ExtractCellType then ExtractGroup.
+"""
+
+fname="testMEDReader8.med"
+outImgName="testMEDReader8.png"
+#########
+arr=DataArrayDouble([(0,0,0),(1,0,0),(2,0,0),(3,0,0),(0,1,0),(1,1,0),(2,1,0),(3,1,0),(0,2,0),(1,2,0),(2,2,0),(3,2,0),(0,3,0),(1,3,0),(2,3,0),(3,3,0)])
+m0=MEDCouplingUMesh("mesh",2) ; m0.setCoords(arr) ; m0.allocateCells()
+for elt in [[2,3,6],[3,7,6],[6,9,5],[6,10,9]]:
+    m0.insertNextCell(NORM_TRI3,elt)
+    pass
+for elt in [[0,4,5,1],[5,6,2,1],[4,8,9,5],[6,10,11,7],[8,12,13,9],[9,13,14,10],[10,14,15,11]]:
+    m0.insertNextCell(NORM_QUAD4,elt)
+    pass
+mm=MEDFileUMesh()
+mm.setMeshAtLevel(0,m0)
+grp0=DataArrayInt([0,1,2,5]) ; grp0.setName("grp0")
+mm.setGroupsAtLevel(0,[grp0])
+fmts=MEDFileFieldMultiTS()
+#
+fNode=MEDCouplingFieldDouble(ON_NODES) ; fNode.setName("fNode")
+fNode.setMesh(m0)
+fNode.setArray(DataArrayDouble([3,2,1,0,3.16,2.23,1.41,1,3.6,2.82,2.23,2,4.24,3.6,3.16,3]))
+fNode.getArray().setInfoOnComponent(0,"C0")
+fNode.setTime(0.5,1,1)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,1,2)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,2,1)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+fNode.getArray().reverse()
+fNode.setTime(0.5,2,2)
+f1ts=MEDFileField1TS() ; f1ts.setFieldNoProfileSBT(fNode) ; fmts.pushBackTimeStep(f1ts)
+#
+mm.write(fname,2)
+fmts.write(fname,0)
+################### MED write is done -> Go to MEDReader
+from paraview.simple import *
+
+myMedReader=MEDReader(FileName=fname)
+myMedReader.AllArrays = ['TS0/mesh/ComSup0/fNode@@][@@P1']
+assert(list(myMedReader.TimestepValues)==[0.,1.,2.,3.])
+myMedReader.UpdatePipeline()
+
+extractCT=ExtractCellType()
+extractCT.Input=myMedReader
+extractCT.UpdatePipelineInformation()
+assert(list(extractCT.GetProperty("GeoTypesInfo"))==['TRI3','0','QUAD4','0'])
+extractCT.AllGeoTypes=['TRI3']
+
+extGrp=ExtractGroup()
+extGrp.Input=extractCT
+extGrp.UpdatePipelineInformation()
+assert(filter(lambda x:x[:4]=="GRP_",list(extGrp.GetProperty("GroupsFlagsInfo")[::2]))==['GRP_grp0'])
+extGrp.AllGroups="GRP_grp0"
+
+RenderView1 = GetRenderView()
+RenderView1.CameraFocalPoint = [1.5, 1.5, 0.0]
+RenderView1.CameraPosition = [1.5, 1.5, 10000.0]
+RenderView1.InteractionMode = '3D'
+RenderView1.CameraPosition = [1.5, 1.5, 8.196152422706632]
+RenderView1.CameraClippingRange = [7.825640906782493, 8.682319698595558]
+RenderView1.CameraParallelScale = 2.1213203435596424
+RenderView1.CenterOfRotation = [1.5, 1.5, 0.0]
+
+DataRepresentation4 = Show()
+DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
+DataRepresentation4.SelectionPointFieldDataArrayName = 'fNode'
+DataRepresentation4.ScaleFactor = 0.3182729169726372
+
+a1_fGauss_PVLookupTable = GetLookupTableForArray( "fNode", 1, RGBPoints=[0.22, 0.23, 0.299, 0.754, 2.95, 0.706, 0.016, 0.15], VectorMode='Magnitude', NanColor=[0.25, 0.0, 0.0], ColorSpace='Diverging', ScalarRangeInitialized=1.0, AllowDuplicateScalars=1 )
+a1_fGauss_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )
+DataRepresentation4.ColorArrayName = 'fNode'
+DataRepresentation4.LookupTable = a1_fGauss_PVLookupTable
+a1_fGauss_PVLookupTable.ScalarOpacityFunction = a1_fGauss_PiecewiseFunction
+
+RenderView1.ViewTime = 1.0 #### Important # red is in right bottom
+RenderView1.CacheKey = 1.0
+RenderView1.UseCache = 1
+RenderView1.ViewSize=[300,300]
+WriteImage(outImgName)
diff --git a/src/Plugins/MEDReader/plugin.cmake b/src/Plugins/MEDReader/plugin.cmake
new file mode 100644 (file)
index 0000000..db15104
--- /dev/null
@@ -0,0 +1,5 @@
+pv_plugin(MEDReader
+  # provide a description for the plugin.
+  DESCRIPTION "Reads the MED data format from Electricite de France"
+  PLUGIN_NAMES MEDReader
+  DEFAULT_ENABLED)
diff --git a/src/Plugins/MedReader/CMake/CTestCustom.ctest.in b/src/Plugins/MedReader/CMake/CTestCustom.ctest.in
deleted file mode 100644 (file)
index cdf7bc5..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-SET(CTEST_CUSTOM_WARNING_MATCH
-  ${CTEST_CUSTOM_WARNING_MATCH}
-  "{standard input}:[0-9][0-9]*: Warning: "
-  )
-
-# Removing this because it somehow matches normal build output lines
-# on several platforms.  Perhaps there is a bug in the custom match
-# support.
-#
-#  SET(CTEST_CUSTOM_ERROR_MATCH
-#    ${CTEST_CUSTOM_ERROR_MATCH}
-#    "\\", line [0-9]+, in "
-#    )
-
-IF("@CMAKE_SYSTEM@" MATCHES "OSF")
-  SET(CTEST_CUSTOM_WARNING_EXCEPTION
-    ${CTEST_CUSTOM_WARNING_EXCEPTION}
-    "vtkKWApplication"
-    "vtkKWObject"
-    )
-ENDIF("@CMAKE_SYSTEM@" MATCHES "OSF")
-
-SET(CTEST_CUSTOM_WARNING_EXCEPTION
-  ${CTEST_CUSTOM_WARNING_EXCEPTION}
-  "Utilities/vtktiff/"
-  "xtree.[0-9]+. : warning C4702: unreachable code"
-  "warning LNK4221"
-  "variable .var_args[2]*. is used before its value is set"
-  "jobserver unavailable"
-  "warning: \\(Long double usage is reported only once for each file"
-  "warning: To disable this warning use"
-  "warning: .+ might be clobbered by .longjmp. or .vfork."
-  "(ranlib|libtool):.*file: .+ has no symbols"
-  "could not be inlined"
-  "ld: warning prebinding disabled because \\((__TEXT|__DATA|__LINKEDIT) segment \\(address = 0x[a-f0-9]+ size = 0x[a-f0-9]+\\) of (.*) overlaps with (__LINKEDIT|__TEXT|__DATA) segment \\(address = 0x[a-f0-9]+ size = 0x[a-f0-9]+\\) of (.*)"
-  "ld: warning prebinding disabled because dependent library: (.*).dylib is not prebound"
-
-  # MPI uses c++ but may have been built with a different c++ compiler.
-  # It seems to work anyway so let's ignore it to make it easier to
-  # test more compilers.
-  "ld: warning: libstdc.*, needed by .*, may conflict with libstdc.*"
-
-  # Does *anyone* have an STL implementation that compiles without warnings...?
-  "cc-1116 CC: WARNING File = /usr/include/CC/stl_alloc.h, Line = 175"
-
-  # vtkfreetype needs to be updated to get rid of warnings that occur during
-  # 64-bit compiles... for now, mask them out of dashboard results:
-  "vtkfreetype.*warning C4"
-  "vtkfreetype.*warning: dereferencing type-punned pointer"
-
-  # vtknetcdf occasionally has warnings for things that are not a problem.
-  "vtknetcdf.*warning: dereferencing type-punned pointer"
-
-  # Some VTK dashboards include building bits of Qt which produce lots of
-  # the following warnings when built with the MS compilers. Qt guys should
-  # fix their code. Until they do, keep the Qt chatter off the VTK dashboard
-  # results:
-  "include.Qt(Core|Gui).*warning C4127: conditional expression is constant"
-  
-  # Specifically for HP compiler, mask out
-  "Utilities.(vtkjpeg|vtksqlite).*warning.*more strictly aligned type"
-  "Filtering.vtkImageMultiple(Input|InputOutput)Filter.cxx.*warning.*more strictly aligned type"
-  "IO.vtkJPEGReader.cxx.*warning.*more strictly aligned type"
-  )
-
-IF(APPLE)
-SET(CTEST_CUSTOM_WARNING_EXCEPTION
-  ${CTEST_CUSTOM_WARNING_EXCEPTION}
-  "warning -.: directory name .* does not exist"
-  "OpenTransport.*warning.*is deprecated"
-
-  # Somebody will have to get rid of these calls eventually (bug 4001) to
-  # eliminate these warnings. For now, mask them out of dashboard results:
-  "vtkCarbonRenderWindow.cxx.*warning: .(New|Diff|Equal|Dispose)Rgn. is deprecated"
-  )
-ENDIF(APPLE)
-
-SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
-  ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
-  "vtk.*TCLInit.cxx"
-  "vtk[^\\.]+(Java|Python|Tcl).cxx"
-  "Utilities.kwsys"
-  "Utilities.vtksys"
-  )
diff --git a/src/Plugins/MedReader/CMake/FindMED.cmake b/src/Plugins/MedReader/CMake/FindMED.cmake
deleted file mode 100644 (file)
index eb6abe0..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# - Find MED library
-# Find the MED includes and library
-# This module defines
-#  MED3HOME, a directory where MED was installed. This directory is used to help find trhe other values.
-#  MED_INCLUDE_DIR, where to find med.h
-#  MED_INCLUDE_DIRS, where to find med.h file, concatenated with other include dirs from HDF5 and MPI (if parallel)
-#  MED_LIBRARIES, libraries to link against to use MED. (including HDF5 and MPI if parallel)
-#  MED_FOUND, If false, do not try to use MED.
-# also defined, but not for general use are
-#  MED_LIBRARY, the med library.
-#  MEDC_LIBRARY, the medC library
-
-SET(MED3HOME $ENV{MED3HOME} CACHE PATH "Path to the med install dir")
-
-IF(NOT MED3HOME)
-  FIND_PROGRAM(MDUMP mdump)
-  IF(MDUMP)
-    SET(MED3HOME ${MDUMP})
-    GET_FILENAME_COMPONENT(MED3HOME ${MED3HOME} PATH)
-    GET_FILENAME_COMPONENT(MED3HOME ${MED3HOME} PATH)
-  ENDIF(MDUMP)
-ENDIF(NOT MED3HOME)
-
-FIND_PATH(MED_INCLUDE_DIR med.h
-  HINTS
-  ${MED3HOME}/include
-  PATHS
-  /usr/local/include
-  /usr/include
-)
-
-FIND_LIBRARY(MED_LIBRARY med
-  HINTS
-  ${MED_INCLUDE_DIR}/../lib
-  ${MED3HOME}/lib
-  PATHS
-  /usr/local/lib
-  /usr/lib
-)
-
-get_filename_component(MED_LIBRARY_DIR ${MED_LIBRARY} PATH)
-
-FIND_LIBRARY(MEDC_LIBRARY medC
-  HINTS
-  ${MED_LIBRARY_DIR}
-  ${MED3HOME}/lib
-  PATHS
-  /usr/local/lib
-  /usr/lib
-)
-
-IF(MED_INCLUDE_DIR)
-  IF(MED_LIBRARY)
-    IF(MEDC_LIBRARY)
-      SET(MED_LIBRARIES ${MED_LIBRARY} ${MEDC_LIBRARY} )
-      SET( MED_FOUND "YES" )
-    ENDIF(MEDC_LIBRARY)
-  ENDIF(MED_LIBRARY)
-ENDIF(MED_INCLUDE_DIR)
-
-IF(${MED_FOUND})
-  IF(WIN32)
-    SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBS})
-    SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIR})
-  ELSE(WIN32)
-    FIND_PACKAGE(SalomeHDF5 REQUIRED)
-    SET(MED_LIBRARIES ${MED_LIBRARIES} ${HDF5_LIBRARIES})
-    SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIR} ${HDF5_INCLUDE_DIRS})
-    IF(${HDF5_IS_PARALLEL})
-      FIND_PACKAGE(SalomeMPI REQUIRED)
-      SET(MED_LIBRARIES ${MED_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
-      SET(MED_INCLUDE_DIRS ${MED_INCLUDE_DIRS} ${MPI_INCLUDE_PATH})
-    ENDIF(${HDF5_IS_PARALLEL})
-  ENDIF(WIN32)
-ENDIF(${MED_FOUND})
-
-SET(MED_INCLUDE_DIR ${MED_INCLUDE_DIRS})
diff --git a/src/Plugins/MedReader/CMakeLists.txt b/src/Plugins/MedReader/CMakeLists.txt
deleted file mode 100644 (file)
index 8d71a8f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-project(MedReader)
-        
-cmake_minimum_required(VERSION 2.8)
-       
-if(COMMAND cmake_policy)
-        cmake_policy(SET CMP0003 NEW)
-endif(COMMAND cmake_policy)
-               
-SET(MED_READER_MAJOR_VERSION 3)
-SET(MED_READER_MINOR_VERSION 1)
-SET(MED_READER_BUILD_VERSION 0)
-SET(MED_READER_VERSION
-    "${MED_READER_MAJOR_VERSION}.${MED_READER_MINOR_VERSION}.${MED_READER_BUILD_VERSION}")
-
-#
-# Load the ParaView/VTK packages
-#
-set(MedReader_BUILD_ParaView_Plugin ON CACHE BOOL "Build the ParaView plugin")
-
-if(MedReader_BUILD_ParaView_Plugin)
-    FIND_PACKAGE(ParaView REQUIRED)
-    if(NOT ParaView_FOUND)
-        MESSAGE(FATAL_ERROR "Please locate ParaView." )
-    ENDIF(NOT ParaView_FOUND)
-    INCLUDE(${PARAVIEW_USE_FILE})
-    # Load information about VTK/ParaView modules loaded/available.
-    pv_setup_module_environment("vtkMedReader")
-else(MedReader_BUILD_ParaView_Plugin)
-    FIND_PACKAGE(VTK REQUIRED)
-    if(NOT VTK_FOUND)
-        MESSAGE(FATAL_ERROR "Please locate VTK." )
-    ENDIF(NOT VTK_FOUND)
-    INCLUDE(${VTK_USE_FILE})
-endif(MedReader_BUILD_ParaView_Plugin)
-
-        
-# Standard CMake option for building libraries shared or static by default.
-OPTION(BUILD_SHARED_LIBS
-       "Build with shared libraries."
-       ${VTK_BUILD_SHARED_LIBS})
-#
-# Find dependant Library
-#
-SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH} )
-FIND_PACKAGE(MED REQUIRED)
-include_directories(${MED_INCLUDE_DIRS})
-include_directories(${MEDFILE_INCLUDE_DIRS})
-
-#
-# process all vtk-modules defined in this plugin. This generates the necessary
-# wrappings for all these modules as well.
-#
-SET(VTK_INSTALL_RUNTIME_DIR lib/salome)
-SET(VTK_INSTALL_LIBRARY_DIR lib/salome)
-SET(VTK_INSTALL_ARCHIVE_DIR lib/salome)
-
-pv_process_modules()
-
-#
-# Build the vtkMedReader
-#
-# add_subdirectory(IO)
-
-#
-# Build the parallel vtkPMedReader
-#
-set(MedReader_BUILD_PARALLEL ${VTK_USE_PARALLEL} CACHE BOOL "Build the Med Reader with parallel support.")
-# MESSAGE(${MedReader_BUILD_PARALLEL})
-
-#
-# Build the ParaView Plugin
-#
-if(MedReader_BUILD_ParaView_Plugin)
-       add_subdirectory(ParaViewPlugin)
-endif(MedReader_BUILD_ParaView_Plugin)
-
-
-       
diff --git a/src/Plugins/MedReader/IO/CMakeLists.txt b/src/Plugins/MedReader/IO/CMakeLists.txt
deleted file mode 100644 (file)
index d42e72a..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-set(MedReader_CLASSES
-    vtkMedReader
-    vtkMedDriver
-    vtkMedDriver30
-    vtkMedFactory
-    vtkMedFile
-    vtkMedMesh
-    vtkMedGrid
-    vtkMedRegularGrid
-    vtkMedPolarGrid
-    vtkMedCartesianGrid
-    vtkMedCurvilinearGrid
-    vtkMedUnstructuredGrid
-    vtkMedFamily
-    vtkMedGroup
-    vtkMedField
-    vtkMedEntityArray
-    vtkMedProfile
-    vtkMedLocalization
-    vtkMedFieldOverEntity
-    vtkMedFieldStep
-    vtkMedUtilities
-    #vtkMedString
-    vtkMedIntArrayInternal
-    vtkMedIntArray
-    vtkMedFamilyOnEntity
-    vtkMedInterpolation
-    vtkMedFraction
-    vtkMedFilter
-    vtkMedFieldOnProfile
-    vtkExtractGroup
-    vtkMedSelection
-    vtkMedLink
-    vtkMedFamilyOnEntityOnProfile
-    vtkMedConstantAttribute
-    vtkMedVariableAttribute
-    vtkMedStructElement
-    vtkGenerateStructElement
-)
-
-set(MedReader_SRCS)
-set(MedReader_HDRS)
-
-foreach(class ${MedReader_CLASSES})
-    set(MedReader_SRCS ${MedReader_SRCS} ${class}.cxx)
-    set(MedReader_HDRS ${MedReader_HDRS} ${class}.h)
-endforeach(class)
-
-set_source_files_properties(
-  vtkMedGrid
-  vtkMedRegularGrid
-  vtkMedUtilities
-  PROPERTIES ABSTRACT 1
-)
-
-set_source_files_properties(
-  vtkMedIntArrayInternal
-  vtkMedUtilities
-  PROPERTIES WRAP_EXCLUDE 1
-)
-
-# this adds target_link_libraries dependencies on all modules listed under
-# DEPENDS in module.cmake
-vtk_module_library(vtkMedReader ${MedReader_SRCS})
-
-# Introducing selection for parallel compilation
-# CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/IO/config.h.cmake ${PROJECT_SOURCE_DIR}/IO/config.h )
-CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
-
-target_link_libraries(vtkMedReader ${MEDFILE_LIBRARIES})
-
-#set(MedReader_BUILD_Testing ${VTK_BUILD_TESTING} CACHE BOOL "Build tests for the MedReader filter")
-
-#if(MedReader_BUILD_Testing)
-#    add_subdirectory(Testing)
-#endif(MedReader_BUILD_Testing)
-
-install(
-    TARGETS vtkMedReader
-    RUNTIME DESTINATION lib/salome
-    LIBRARY DESTINATION lib/salome
-    ARCHIVE DESTINATION lib/salome
-    )
-
-install(FILES ${MedReader_HDRS} DESTINATION include)
-        
-# -----------------------------------------------------------------------------
-# This make it easy for other projects to get the list of files etc. in this
-# kit.
-# -----------------------------------------------------------------------------
-# needed by vtkExportKit.cmake
-
-#include(${ParaView_CMAKE_DIR}/VTKMono/vtkExportKit.cmake)
-
-#  #include(${VTK_CMAKE_DIR}/vtkExportKit.cmake)
-#IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
-#  STRING(REGEX REPLACE "^/" "" VTK_INSTALL_PACKAGE_DIR_CM24 "${VTK_INSTALL_PACKAGE_DIR}")
-#ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
-
-#set(VTK_INSTALL_PACKAGE_DIR_CM24 ${VTK_MODULES_DIR})
-#vtk_export_kit2(
-#  "MedReader_IO" 
-#  "MEDREADER_IO" 
-#  ${CMAKE_CURRENT_BINARY_DIR} 
-#  "${MedReader_SRCS}"
-#)
diff --git a/src/Plugins/MedReader/IO/Testing/CMakeLists.txt b/src/Plugins/MedReader/IO/Testing/CMakeLists.txt
deleted file mode 100644 (file)
index b88d537..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-add_subdirectory(Cxx)
\ No newline at end of file
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/CMakeLists.txt b/src/Plugins/MedReader/IO/Testing/Cxx/CMakeLists.txt
deleted file mode 100644 (file)
index 3240b82..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
-
-set(TestMedReader_SRCS
-    TestMedReader.cxx
-)
-
-set(TestMedPolyhedron_SRCS
-    TestMedPolyhedron.cxx
-)
-
-set(TestMedReadPolyhedron_SRCS
-    TestMedReadPolyhedron.cxx
-)
-
-set(TestMedDescendingPolyhedron_SRCS
-    TestMedDescendingPolyhedron.cxx
-)
-
-set(TestMedReadDescendingPolyhedron_SRCS
-    TestMedReadDescendingPolyhedron.cxx
-)
-
-set(TestMedWriteOcta12_SRCS
-    TestMedWriteOcta12.cxx
-)
-
-set(TestMedParallelRead_SRCS
-    TestMedParallelRead.cxx
-)
-
-set(TestMedParallelWrite_SRCS
-    TestMedParallelWrite.cxx
-)
-
-add_executable(TestMedReader ${TestMedReader_SRCS})
-add_executable(TestMedPolyhedron ${TestMedPolyhedron_SRCS})
-add_executable(TestMedReadPolyhedron ${TestMedReadPolyhedron_SRCS})
-add_executable(TestMedDescendingPolyhedron ${TestMedDescendingPolyhedron_SRCS})
-add_executable(TestMedReadDescendingPolyhedron ${TestMedReadDescendingPolyhedron_SRCS})
-add_executable(TestMedWriteOcta12 ${TestMedWriteOcta12_SRCS})
-
-if(${HDF5_IS_PARALLEL})
-  add_executable(TestMedParallelRead ${TestMedParallelRead_SRCS})
-  add_executable(TestMedParallelWrite ${TestMedParallelWrite_SRCS})
-  target_link_libraries(TestMedParallelRead vtkParallelCore ${MEDFILE_LIBRARIES})
-  target_link_libraries(TestMedParallelWrite vtkParallelCore ${MEDFILE_LIBRARIES})
-endif(${HDF5_IS_PARALLEL})
-
-INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/../../module.cmake)
-
-target_link_libraries(TestMedReader ${${vtk-module-test}_DEPENDS} ${MEDFILE_LIBRARIES})
-target_link_libraries(TestMedPolyhedron ${MEDFILE_LIBRARIES})
-target_link_libraries(TestMedReadPolyhedron ${MEDFILE_LIBRARIES})
-target_link_libraries(TestMedDescendingPolyhedron ${MEDFILE_LIBRARIES})
-target_link_libraries(TestMedReadDescendingPolyhedron ${MEDFILE_LIBRARIES})
-target_link_libraries(TestMedWriteOcta12 ${MEDFILE_LIBRARIES})
-
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedDescendingPolyhedron.cxx
deleted file mode 100644 (file)
index 0809a77..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedDescendingPolyhedron.cxx
- *
- *  Created on: 3 mars 2011
- *      Author: alejandro
- */
-
-#include <med.h>
-#define MESGERR 1
-#include <med_utils.h>
-
-#include <string.h>
-
-int main (int argc, char **argv) {
-  med_idt fid;
-  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
-  const med_int spacedim = 3;
-  const med_int meshdim = 3;
-  /*                                         12345678901234561234567890123456 */
-  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
-  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
-  const med_int nnodes = 12;
-  const med_float coordinates[3 * 12] =
-          { 1.618,  1.,     0.,
-           -1.618,  1.,     0.,
-            1.618, -1.,     0.,
-           -1.618, -1.,     0.,
-            1.,     0.,     1.618,
-            1.,     0.,    -1.618,
-           -1.,     0.,     1.618,
-           -1.,     0.,    -1.618,
-            0.,  1.618,     1.,
-            0., -1.618,     1.,
-            0.,  1.618,    -1.,
-            0., -1.618,    -1.  };
-  const med_int nodeIndexSize = 20;
-  const med_int nodeindex[20] = {
-          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
-          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
-          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3,
-          MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3, MED_TRIA3 };
-  const med_int faceIndexSize = 2;
-  /* connectivity : 1 icosahedron */
-  const med_int faceindex[2] = { 1, 21 };
-
-  const med_int connectivity[20] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10,
-                                    11,12,13,14,15,16,17,18,19,20 };
-
-  const med_int ntria3 = 20;
-  const med_int triaConnectivity[60] = { 1,  9,  5,
-                                     1,  6, 11,
-                                     3,  5, 10,
-                                     3, 12,  6,
-                                     2,  7,  9,
-                                     2, 11,  8,
-                                     4, 10,  7,
-                                     4,  8, 12,
-                                     1, 11,  9,
-                                     2,  9, 11,
-                                     3, 10, 12,
-                                     4, 10, 12,
-                                     5,  3,  1,
-                                     6,  1,  3,
-                                     7,  2,  4,
-                                     8,  4,  2,
-                                     9,  7,  5,
-                                    10,  5,  7,
-                                    11,  6,  8,
-                                    12,  8,  6  };
-
-  /* open MED file */
-  fid = MEDfileOpen("UsesCase_MEDmesh_17.med",
-        MED_ACC_CREAT);
-  if (fid < 0) {
-    MESSAGE("ERROR : file creation ...");
-    return -1;
-  }
-
-  /* write a comment in the file */
-  if (MEDfileCommentWr(fid,
-           "A 3D unstructured mesh : 1 icosahedron") < 0) {
-    MESSAGE("ERROR : write file description ...");
-    return -1;
-  }
-
-  /* mesh creation : a 3D unstructured mesh */
-  if (MEDmeshCr(fid,
-    meshname,
-    spacedim,
-    meshdim,
-    MED_UNSTRUCTURED_MESH,
-    "A 3D mesh with 1 icosahedron in DESCENDING connectivity",
-    "",
-    MED_SORT_DTIT,
-    MED_CARTESIAN,
-    axisname,
-    unitname) < 0) {
-    MESSAGE("ERROR : mesh creation ...");
-    return -1;
-  }
-
-  /* nodes coordinates in a cartesian axis in full interlace mode
-     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
-  */
-  if (MEDmeshNodeCoordinateWr(fid,
-            meshname,
-            MED_NO_DT,
-            MED_NO_IT,
-            MED_UNDEF_DT,
-            MED_FULL_INTERLACE,
-            nnodes,
-            coordinates) < 0) {
-    MESSAGE("ERROR : nodes coordinates ...");
-    return -1;
-  }
-
-  // cells connectiviy is defined in nodal mode
-  // it is later in the polyhedron thet the connectivity is descending
-  if (MEDmeshElementConnectivityWr(fid,
-           meshname,
-           MED_NO_DT,
-           MED_NO_IT,
-           0.0,
-           MED_DESCENDING_FACE,
-           MED_TRIA3,
-           MED_NODAL,
-           MED_FULL_INTERLACE,
-           ntria3,
-           triaConnectivity) < 0) {
-    MESSAGE("ERROR : triangular cells connectivity ...");
-    return -1;
-  }
-
-  // cells connectiviy is defined in descending mode
-  // 1 icosahedron
-  if (MEDmeshPolyhedronWr(fid,
-              meshname,
-              MED_NO_DT,
-              MED_NO_IT,
-              MED_UNDEF_DT,
-              MED_CELL,
-              MED_DESCENDING,
-              faceIndexSize,
-              faceindex,
-              nodeIndexSize,
-              nodeindex,
-              connectivity) < 0) {
-    MESSAGE("ERROR : polyhedron connectivity ...");
-    return -1;
-  }
-
-  /* create family 0 : by default, all mesh entities family number is 0 */
-  if (MEDfamilyCr(fid,
-      meshname,
-      "",
-      0,
-      0,
-      "") < 0) {
-    MESSAGE("ERROR : quadrangular cells connectivity ...");
-    return -1;
-  }
-
-  /* close MED file */
-  if (MEDfileClose(fid)  < 0) {
-    MESSAGE("ERROR : close file ...");
-    return -1;
-  }
-
-  return 0;
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelRead.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelRead.cxx
deleted file mode 100644 (file)
index dc4f91e..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedParallelRead.cxx
- *
- *  Created on: 20 avr. 2011
- *      Author: alejandro
- */
-
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
-#define MED_HAVE_MPI
-
-#include <vtkMed.h>
-#define MESGERR 1
-#include "med_utils.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-int main (int argc, char **argv)
-{
-  med_err _ret=0;
-  med_idt _fid;
-
-  int mpi_size, mpi_rank;
-  MPI_Comm comm = MPI_COMM_WORLD;
-  MPI_Info info = MPI_INFO_NULL;
-
-  med_int    _nbofentitiesfiltered=0;
-  med_int    *_filterarray=NULL;
-
-  MPI_Init(&argc, &argv);
-  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
-  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
-  med_size            _nbblocksperproc    = 0;
-  int           _nbofentities             = 0;
-  int           _nbofvaluesperentity      = 0;
-  int           _nbofconstituentpervalue  = 0;
-
-  printf("mpi_size = %03d\n", mpi_size);
-
-  if (mpi_rank == 0 ) {
-
-    struct tm *_tm ;
-    time_t _tt=time(0);
-    _tm = localtime(&_tt);
-
-    srandom((*_tm).tm_sec * (*_tm).tm_min );
-    _nbblocksperproc         = 1 + (int) (mpi_size * (random() / (RAND_MAX + 1.0)));
-    _nbofentities            = 1 + (int) (1000.0 * (random() / (RAND_MAX + 1.0)));
-    _nbofvaluesperentity     = 1 + (int) (11.0 * (random() / (RAND_MAX + 1.0)));
-    _nbofconstituentpervalue = 1 + (int) (7.0 * (random() / (RAND_MAX + 1.0)));
-  }
-
-  MPI_Bcast(&_nbblocksperproc         , 1, MPI_LONG, 0, MPI_COMM_WORLD);
-  MPI_Bcast(&_nbofentities            , 1, MPI_LONG, 0, MPI_COMM_WORLD);
-  MPI_Bcast(&_nbofvaluesperentity     , 1, MPI_LONG, 0, MPI_COMM_WORLD);
-  MPI_Bcast(&_nbofconstituentpervalue , 1, MPI_LONG, 0, MPI_COMM_WORLD);
-
-  printf( "NENT-%03d_NVAL-%03d_NCST-%03d_NBL-%03llu\n",_nbofentities,_nbofvaluesperentity,
-          _nbofconstituentpervalue,_nbblocksperproc);
-
-  char         _filename   [255]="";
-  sprintf(_filename,"/home/alejandro/work/Data-test-Med/tmp/depl.resu.med");
-  /*     SSCRUTE(_filename); */
-
-  /* Ouverture du fichier en mode parallel */
-  if ((_fid = MEDparFileOpen(_filename, MED_ACC_RDONLY ,comm, info)) < 0){
-    MED_ERR_(_ret,MED_ERR_OPEN,MED_ERR_FILE,_filename);
-  }
-
-  if ( MEDfileClose( _fid ) < 0) {
-      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,""); _ret = -1;
-    }
-
-  /* MPI_Finalize must be called AFTER MEDclose which may use MPI calls */
-  MPI_Finalize();
-
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelWrite.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedParallelWrite.cxx
deleted file mode 100644 (file)
index 1d72220..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedParallelWrite.cxx
- *
- *  Created on: 11 mai 2011
- *      Author: alejandro
- */
-
-#define MED_HAVE_MPI
-
-#include <vtkMed.h>
-#define MESGERR 1
-#include "med_utils.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-
-int main (int argc, char **argv)
-{
-  const char meshname[MED_NAME_SIZE+1] = "2D unstructured mesh";
-  const med_int spacedim = 2;
-  const med_int meshdim = 2;
-  /*                                         12345678901234561234567890123456 */
-  const char axisname[2*MED_SNAME_SIZE+1] = "x               y               ";
-  const char unitname[2*MED_SNAME_SIZE+1] = "cm              cm              ";
-  med_float coordinates[2222];
-  const med_int nnodes = 1111;
-
-  med_int* quadconnectivity;
-  const med_int nquad4 = 1000;
-
-  med_err _ret=-1;
-
-  int mpi_size, mpi_rank;
-  MPI_Comm comm = MPI_COMM_WORLD;
-  MPI_Info info = MPI_INFO_NULL;
-
-  MPI_Init(&argc, &argv);
-  MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
-  MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
-  med_idt  fid;
-  char    filename[255]="UsesCase_MEDmesh_parallel.med";
-  /*     SSCRUTE(_filename); */
-
-  if (mpi_rank == 0 ) {
-    printf("mpi_size = %03d\n", mpi_size);
-
-    /* Ouverture du fichier en mode non-parallel */
-    if ((fid = MEDfileOpen(filename, MED_ACC_CREAT)) < 0){
-      MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
-    }
-
-    /* write a comment in the file */
-    if (MEDfileCommentWr(fid,"A 2D unstructured mesh : 15 nodes, 12 cells") < 0) {
-      MESSAGE("ERROR : write file description ...");
-    }
-
-    /* mesh creation : a 2D unstructured mesh */
-    if (MEDmeshCr(fid, meshname, spacedim, meshdim, MED_UNSTRUCTURED_MESH,
-      "A 2D unstructured mesh","",MED_SORT_DTIT,MED_CARTESIAN, axisname, unitname) < 0) {
-      MESSAGE("ERROR : mesh creation ...");
-    }
-
-    /*
-     * Building the coordinates of a rectangle of 101 points in the Y-axis,
-     * and 11 in the X-axis
-     */
-    for (int j=0; j<11; j++ )
-      for (int i=0; i<101; i++ )
-      {
-      coordinates[j*202+i*2]   = j+1;
-      coordinates[j*202+i*2+1] = i+1;
-      }
-
-    /* nodes coordinates in a Cartesian axis in full interlace mode
-        (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
-     */
-    if (MEDmeshNodeCoordinateWr(fid, meshname, MED_NO_DT, MED_NO_IT, 0.0,
-              MED_FULL_INTERLACE, nnodes, coordinates) < 0) {
-      MESSAGE("ERROR : nodes coordinates ...");
-    }
-
-    if ( MEDfileClose( fid ) < 0) {
-      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,"");;
-    }
-
-    MPI_Barrier(comm);
-  } /* End of process ZERO */
-  else
-    {
-    MPI_Barrier(comm);
-    }
-
-  /* Ouverture du fichier en mode parallel */
-  if ((fid = MEDparFileOpen(filename, MED_ACC_RDWR ,comm, info)) < 0){
-    MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
-  }
-
-  med_int     nbofentity = nquad4;
-  med_int     nbofvaluesperentity = 1;
-  med_int     nbofconstituentpervalue = 4;
-  med_int     constituentselect = MED_ALL_CONSTITUENT;
-  med_switch_mode   switchmode = MED_FULL_INTERLACE;
-  med_storage_mode    storagemode = MED_COMPACT_STMODE;
-  const char *const   profilename = MED_NO_PROFILE;
-
-  /*
-   * Calculating block sizes
-   */
-
-  int block_size = (100/mpi_size)*10;
-  med_size    start  = block_size * mpi_rank + 1;
-  med_size    stride = block_size;
-  med_size    count  = 1;
-  med_size    blocksize = block_size;
-  med_size    lastblocksize = (100 % mpi_size)*10;
-  if ((mpi_size == mpi_rank+1) && (lastblocksize != 0))
-    {
-    blocksize += lastblocksize;
-    stride    += lastblocksize;
-    }
-  lastblocksize = 0;
-
-  printf("%03d: block_size = %03d\n", mpi_rank, block_size);
-  printf("%03d: start = %03d\n", mpi_rank, start);
-  printf("%03d: stride = %03d\n", mpi_rank, stride);
-  printf("%03d: count = %03d\n", mpi_rank, count);
-  printf("%03d: blocksize = %03d\n", mpi_rank, blocksize);
-  printf("%03d: lastblocksize = %03d\n", mpi_rank, lastblocksize);
-  med_filter filter = MED_FILTER_INIT;
-
-  if ( MEDfilterBlockOfEntityCr( fid,
-      nbofentity,
-      nbofvaluesperentity,
-      nbofconstituentpervalue,
-      constituentselect,
-      switchmode,
-      storagemode,
-      profilename,
-      start,
-      stride,
-      count,
-      blocksize,
-      lastblocksize,
-      &filter ) < 0 )
-    {
-    MESSAGE("ERROR : filter creation ...");
-    }
-
-  // Attention: there is blocksize and block_size and it does not
-  // represent the same quantity, in case we are in the last
-  // block they are different, if not it is the same
-  quadconnectivity = new med_int[blocksize*4];
-  int shift = mpi_rank*block_size;
-  printf("%03d: mpi_rank*block_size = %03d\n", mpi_rank, shift);
-  printf("%03d: block_size = %03d\n", mpi_rank, block_size);
-  int base = shift + shift / 101;
-  int c = 0;
-  for (int i=0; i<blocksize*4; i+=4 )
-    {
-    base++;
-    if ((base%101) == 0)
-      base++;
-
-    quadconnectivity[i]   = base;
-    quadconnectivity[i+1] = base+1;
-    quadconnectivity[i+2] = base+102;
-    quadconnectivity[i+3] = base+101;
-    c++;
-    }
-  printf("%03d: number of written quads = %03d\n", mpi_rank, c);
-
-  if (MEDmeshElementConnectivityAdvancedWr(fid, meshname, MED_NO_DT,
-           MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
-           MED_NODAL, &filter, quadconnectivity) < 0) {
-    MESSAGE("ERROR : quadrangular cells connectivity ...");
-  }
-
-    if ( MEDfilterClose( &filter ) < 0) {
-      MESSAGE("ERROR : filter closing ...");
-    }
-
-    if ( MEDfileClose( fid ) < 0) {
-      MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,""); _ret = -1;
-    }
-
-    /* Barrier before writing family ZERO */
-    MPI_Barrier(comm);
-
-    if (mpi_rank == 0 ) {
-
-      if ((fid = MEDfileOpen(filename, MED_ACC_RDWR)) < 0){
-        MED_ERR_(_ret, MED_ERR_OPEN,MED_ERR_FILE, filename);
-      }
-
-      /* create family 0 : by default, all mesh entities family number is 0 */
-      if (MEDfamilyCr(fid, meshname,MED_NO_NAME, 0, 0, MED_NO_GROUP) < 0) {
-        MESSAGE("ERROR : family 0 creation ...");
-      }
-
-      const char familyname_root[MED_NAME_SIZE+1] = "PROCESSOR ";
-      char familyname[MED_NAME_SIZE+1] = " ";
-      for (int i=1; i<mpi_size+1; i++)
-        {
-        snprintf(familyname, sizeof familyname, "%s%d", familyname_root, i);
-        if (MEDfamilyCr(fid, meshname,familyname, -i, 0, MED_NO_GROUP) < 0) {
-          MESSAGE("ERROR : family creation ...");
-          }
-        printf("%03d: %s\n", mpi_rank, familyname);
-        }
-
-      med_int familynumbers[nquad4];
-      int l = 1;
-      for (int i=0; i<nquad4; i++)
-        {
-        if ((i > block_size * l - 1) && (l < mpi_size))
-          {
-          l++;
-          }
-        familynumbers[i] = -l;
-        }
-
-      if (MEDmeshEntityFamilyNumberWr(fid, meshname, MED_NO_DT, MED_NO_IT,
-                           MED_CELL, MED_QUAD4, nquad4, familynumbers) < 0) {
-        MESSAGE("ERROR : nodes family numbers ...");
-      }
-
-      /* Write a Profile */
-      const char profileName[MED_NAME_SIZE+1] = "QUAD4_PROFILE";
-      const med_int profilesize = 9;
-      med_int profilearray[9] = {1, 3, 5, 7, 9, 11, 13, 15, 17};
-      if (MEDprofileWr(fid, profileName, profilesize, profilearray ) < 0) {
-        MESSAGE("ERROR : nodes family numbers ...");
-      }
-
-      /* write localization for integration points */
-      const char localizationName[MED_NAME_SIZE+1] = "QUAD4_INTEGRATION_POINTS_4";
-      const med_float elementcoordinate[6] = {0.0, 0.0,  1.0, 0.0,  0.0,1.0};
-      const med_float iPointCoordinate[8] = {1.0/5, 1.0/5,  3.0/5, 1.0/5,  1.0/5, 3.0/5,  1.0/3, 1.0/3};
-      const med_float weight[4] = {1.0/8, 1.0/8, 1.0/8, 1.0/8};
-      med_int spacedim = 2;
-      med_int nipoint = 4;
-      if (MEDlocalizationWr(fid, localizationName, MED_QUAD4, spacedim,
-          elementcoordinate, MED_FULL_INTERLACE,
-          nipoint, iPointCoordinate, weight,
-          MED_NO_INTERPOLATION, MED_NO_MESH_SUPPORT) < 0) {
-        MESSAGE("ERROR : create family of integration points ...");
-      }
-
-      /* Writing a scalar Field on the Quads right here */
-      const char fieldname[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD";
-      const med_int ncomponent = 1;
-      const char componentname[MED_SNAME_SIZE+1] = "TEMPERATURE";
-      const char componentunit[MED_SNAME_SIZE+1] = "C";
-
-      if (MEDfieldCr(fid, fieldname, MED_FLOAT64,
-                     ncomponent, componentname, componentunit,"",
-                     meshname) < 0) {
-        MESSAGE("ERROR : create field");
-      }
-
-      /* write values at cell (QUADS) centers */
-      med_float quad4values[nquad4];
-      for (int i=0; i<nquad4; i++)
-        quad4values[i] = i%100 + 1;
-
-      med_float quad4values4[nquad4 * 4];
-      long int counter = 0;
-      for (int i=0; i<nquad4; i++)
-        {
-        quad4values[i] = i%100 + 1;
-        for (int j=0; j<4; j++)
-          {
-          quad4values4[counter] = quad4values[i];
-          counter++;
-          }
-        }
-      if (MEDfieldValueWr(fid, fieldname, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL,
-                         MED_QUAD4, MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
-                         nquad4, (unsigned char*) quad4values) < 0) {
-        MESSAGE("ERROR : write field values on MED_QUAD4");
-      }
-
-      const char fieldname2[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD_PGAUSS";
-      if (MEDfieldCr(fid, fieldname2, MED_FLOAT64,
-                     ncomponent, componentname, componentunit,"",
-                     meshname) < 0) {
-        MESSAGE("ERROR : create field");
-      }
-
-      if (MEDfieldValueWithProfileWr(
-             fid, fieldname2, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
-             MED_GLOBAL_PFLMODE, MED_NO_PROFILE, localizationName,
-           MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
-           nquad4, (unsigned char*) quad4values4) < 0) {
-        MESSAGE("ERROR : write field values on MED_QUAD4");
-      }
-
-      const char fieldname3[MED_NAME_SIZE+1] = "TEMPERATURE_FIELD_ELNO";
-      if (MEDfieldCr(fid, fieldname3, MED_FLOAT64,
-                     ncomponent, componentname, componentunit,"",
-                     meshname) < 0) {
-        MESSAGE("ERROR : create field");
-      }
-
-      if (MEDfieldValueWithProfileWr(
-             fid, fieldname3, MED_NO_DT, MED_NO_IT, 0.0, MED_CELL, MED_QUAD4,
-             MED_GLOBAL_PFLMODE, MED_NO_PROFILE, MED_GAUSS_ELNO,
-           MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
-           nquad4, (unsigned char*) quad4values4) < 0) {
-        MESSAGE("ERROR : write field values on MED_QUAD4");
-      }
-
-      if ( MEDfileClose( fid ) < 0) {
-        MED_ERR_(_ret,MED_ERR_CLOSE,MED_ERR_FILE,"");;
-      }
-
-      printf("File UsesCase_MEDmesh_parallel.med has been generated.\n");
-    } /* End of process ZERO */
-
-  /* MPI_Finalize must be called AFTER MEDclose which may use MPI calls */
-  MPI_Finalize();
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedPolyhedron.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedPolyhedron.cxx
deleted file mode 100644 (file)
index 7f1a149..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedPolyhedron.cxx
- *
- *  Created on: 15 févr. 2011
- *      Author: alejandro
- */
-
-#include <med.h>
-#define MESGERR 1
-#include <med_utils.h>
-
-#include <string.h>
-
-int main (int argc, char **argv) {
-  med_idt fid;
-  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
-  const med_int spacedim = 3;
-  const med_int meshdim = 3;
-  /*                                         12345678901234561234567890123456 */
-  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
-  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
-  const med_int nnodes = 12;
-  const med_float coordinates[3 * 12] =
-          { 1.618,  1.,     0.,
-           -1.618,  1.,     0.,
-            1.618, -1.,     0.,
-           -1.618, -1.,     0.,
-            1.,     0.,     1.618,
-            1.,     0.,    -1.618,
-           -1.,     0.,     1.618,
-           -1.,     0.,    -1.618,
-            0.,  1.618,     1.,
-            0., -1.618,     1.,
-            0.,  0,    0.,
-//            0.,  1.618,    -1.,
-            0., -1.618,    -1.  };
-  const med_int faceIndexSize = 2;
-  const med_int faceindex[2] = {1,22};
-  const med_int nodeIndexSize = 21;
-  /* connectivity : 1 icosahedron */
-  const med_int nodeindex[21] = { 1, 4, 7,10,13,16,19,22,25,28,
-                                 31,34,37,40,43,46,49,52,55,58,61 };
-  const med_int connectivity[60] = { 1,  9,  5,
-                                     1,  6, 11,
-                                     3,  5, 10,
-                                     3, 12,  6,
-                                     2,  7,  9,
-                                     2, 11,  8,
-                                     4, 10,  7,
-                                     4,  8, 12,
-                                     1, 11,  9,
-                                     2,  9, 11,
-                                     3, 10, 12,
-                                     4, 10, 12,
-                                     5,  3,  1,
-                                     6,  1,  3,
-                                     7,  2,  4,
-                                     8,  4,  2,
-                                     9,  7,  5,
-                                    10,  5,  7,
-                                    11,  6,  8,
-                                    12,  8,  6  };
-
-  /* open MED file */
-  fid = MEDfileOpen("UsesCase_MEDmesh_15.med",
-        MED_ACC_CREAT);
-  if (fid < 0) {
-    MESSAGE("ERROR : file creation ...");
-    return -1;
-  }
-
-  /* write a comment in the file */
-  if (MEDfileCommentWr(fid,
-           "A 3D unstructured mesh : 1 icosahedron") < 0) {
-    MESSAGE("ERROR : write file description ...");
-    return -1;
-  }
-
-  /* mesh creation : a 3D unstructured mesh */
-  if (MEDmeshCr(fid,
-    meshname,
-    spacedim,
-    meshdim,
-    MED_UNSTRUCTURED_MESH,
-    "A 3D mesh with 1 icosahedron",
-    "",
-    MED_SORT_DTIT,
-    MED_CARTESIAN,
-    axisname,
-    unitname) < 0) {
-    MESSAGE("ERROR : mesh creation ...");
-    return -1;
-  }
-
-  /* nodes coordinates in a cartesian axis in full interlace mode
-     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
-  */
-  if (MEDmeshNodeCoordinateWr(fid,
-            meshname,
-            MED_NO_DT,
-            MED_NO_IT,
-            MED_UNDEF_DT,
-            MED_FULL_INTERLACE,
-            nnodes,
-            coordinates) < 0) {
-    MESSAGE("ERROR : nodes coordinates ...");
-    return -1;
-  }
-
-  /* cells connectiviy is defined in nodal mode */
-  /* 1 icosahedron */
-  if (MEDmeshPolyhedronWr(fid,
-              meshname,
-              MED_NO_DT,
-              MED_NO_IT,
-              MED_UNDEF_DT,
-              MED_CELL,
-              MED_NODAL,
-              faceIndexSize,
-              faceindex,
-              nodeIndexSize,
-              nodeindex,
-              connectivity) < 0) {
-    MESSAGE("ERROR : polyhedron connectivity ...");
-    return -1;
-  }
-
-  /* create family 0 : by default, all mesh entities family number is 0 */
-  if (MEDfamilyCr(fid,
-      meshname,
-      "",
-      0,
-      0,
-      "") < 0) {
-    MESSAGE("ERROR : quadrangular cells connectivity ...");
-    return -1;
-  }
-
-  /* close MED file */
-  if (MEDfileClose(fid)  < 0) {
-    MESSAGE("ERROR : close file ...");
-    return -1;
-  }
-
-  return 0;
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadDescendingPolyhedron.cxx
deleted file mode 100644 (file)
index 33ff52f..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedReadDescendingPolyhedron.cxx
- *
- *  Created on: 3 mars 2011
- *      Author: alejandro
- */
-
-#include <med.h>
-#define MESGERR 1
-#include <med_utils.h>
-
-#include <string.h>
-
-int main (int argc, char **argv) {
-  med_idt fid;
-  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
-  char meshdescription[MED_COMMENT_SIZE+1];
-  med_int meshdim;
-  med_int spacedim;
-  med_sorting_type sortingtype;
-  med_int nstep;
-  med_mesh_type meshtype;
-  med_axis_type axistype;
-  char axisname[3*MED_SNAME_SIZE+1];
-  char unitname[3*MED_SNAME_SIZE+1];
-  char dtunit[MED_SNAME_SIZE+1];
-  med_float *coordinates = NULL;
-  med_int nnodes = 0;
-  med_int npoly = 0;
-  med_int indexsize;
-  med_int faceIndexSize;
-  med_int *index = NULL;
-  med_int *faceindex = NULL;
-  med_int *connectivity = NULL;
-  med_int connectivitysize;
-  med_int *triaconnectivity = NULL;
-  med_int ntria3 = 0;
-  med_bool coordinatechangement;
-  med_bool geotransformation;
-  int i;
-  int k,ind1,ind2;
-  int j,jind1,jind2;
-
-  /* open MED file with READ ONLY access mode */
-  fid = MEDfileOpen("./UsesCase_MEDmesh_17.med",MED_ACC_RDONLY);
-  if (fid < 0) {
-    MESSAGE("ERROR : open file in READ ONLY ACCESS mode ...");
-    return -1;
-  }
-
-  /*
-   * ... we know that the MED file has only one mesh,
-   * a real code working would check ...
-   */
-
-  /* read mesh informations : mesh dimension, space dimension ... */
-  if (MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
-      dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
-    MESSAGE("ERROR : mesh info ...");
-    return -1;
-  }
-
-  /* read how many nodes in the mesh */
-  if ((nnodes = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_NODE, MED_POINT1,
-             MED_COORDINATE, MED_NO_CMODE,&coordinatechangement,
-             &geotransformation)) < 0) {
-    MESSAGE("ERROR : number of nodes ...");
-    return -1;
-  }
-
-  /* read how many triangular cells in the mesh */
-  if ((ntria3 = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_DESCENDING_FACE,MED_TRIA3,
-             MED_CONNECTIVITY, MED_NODAL,&coordinatechangement,
-             &geotransformation)) < 0) {
-    MESSAGE("ERROR : number of MED_TRIA3 ...");
-    return -1;
-  }
-  ISCRUTE(ntria3);
-
-  /* read cells connectivity in the mesh */
-  if ((triaconnectivity = (med_int *) malloc(sizeof(med_int)*ntria3*3)) == NULL) {
-    MESSAGE("ERROR : memory allocation ...");
-    return -1;
-  }
-  if (MEDmeshElementConnectivityRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_DESCENDING_FACE,
-           MED_TRIA3, MED_NODAL, MED_FULL_INTERLACE, triaconnectivity) < 0) {
-    MESSAGE("ERROR : MED_TRIA3 connectivity ...");
-    return -1;
-  }
-  for (i=0;i<ntria3*3;i++)
-    printf("%d - ",*(triaconnectivity+i));
-  printf("\n");
-  /*
-   * ... we know that we only have MED_POLYHEDRON cells in the mesh,
-   * a real code working would check all MED geometry cell types ...
-   */
-
-  /* How many polygon in the mesh in nodal connectivity mode */
-  /* For the polygons, we get the size of array index */
-  if ((faceIndexSize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-          MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_DESCENDING,
-          &coordinatechangement,
-          &geotransformation)) < 0) {
-    MESSAGE("ERROR : read number of polyedron ...");
-    return -1;
-  }
-  npoly = faceIndexSize - 1;
-  ISCRUTE(npoly);
-
-  if ((indexsize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-          MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_DESCENDING,
-          &coordinatechangement,
-          &geotransformation)) < 0) {
-    MESSAGE("ERROR : read number of polyedron ...");
-    return -1;
-  }
-  ISCRUTE(indexsize);
-
-  /* how many nodes for the polyhedron connectivity ? */
-  if ((connectivitysize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-           MED_CELL,MED_POLYHEDRON,MED_CONNECTIVITY,MED_DESCENDING,
-           &coordinatechangement,
-           &geotransformation)) < 0) {
-    MESSAGE("ERROR : read connevity size ...");
-    return -1;
-    }
-  ISCRUTE(connectivitysize);
-
-  /* read mesh nodes coordinates */
-  if ((coordinates = (med_float*) malloc(sizeof(med_float)*nnodes*spacedim)) == NULL) {
-    MESSAGE("ERROR : memory allocation ...");
-    return -1;
-  }
-
-  if (MEDmeshNodeCoordinateRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
-            coordinates) < 0) {
-    MESSAGE("ERROR : nodes coordinates ...");
-    return -1;
-  }
-  for (i=0;i<nnodes*spacedim;i++)
-    printf("%f - ",*(coordinates+i));
-  printf("\n");
-
-  /* read polygons connectivity */
-  if ((index = (med_int *) malloc(sizeof(med_int)*indexsize)) == NULL) {
-     MESSAGE("ERROR : memory allocation ...");
-     return -1;
-   }
-
-  if ((faceindex = (med_int *) malloc(sizeof(med_int)*faceIndexSize)) == NULL) {
-     MESSAGE("ERROR : memory allocation ...");
-     return -1;
-   }
-
-  if ((connectivity = (med_int *) malloc(sizeof(med_int)*connectivitysize)) == NULL) {
-    MESSAGE("ERROR : memory allocation ...");
-    return -1;
-  }
-
-  if (MEDmeshPolyhedronRd(fid,meshname,MED_NO_DT,MED_NO_IT,MED_CELL,MED_DESCENDING,
-        faceindex, index, connectivity) < 0) {
-    MESSAGE("ERROR : read polygon connectivity ...");
-    return -1;
-  }
-
-  for (i=0;i<npoly;i++)
-    {
-    printf(">> MED_POLYHEDRON "IFORMAT" : \n",i+1);
-    printf("---- Face Index         ----- : [ ");
-    ind1 = *(index+i)-1;
-    ind2 = *(index+i+1)-1;
-    for (k=ind1;k<ind2;k++)
-      printf(IFORMAT" ",*(faceindex+k));
-    printf(" ] \n");
-    printf("---- Connectivity       ----- : [ ");
-    for (k=0;k<connectivitysize;k++)
-      {
-      for (j=0;j<3;j++)
-        {
-        printf(IFORMAT" ",triaconnectivity[connectivity[k]+j]);
-        }
-      printf("\n");
-      }
-    printf(" ] \n");
-    }
-
-  /*
-   * ... we know that the family number of nodes and elements is 0, a real working would check ...
-   */
-
-  /* close MED file */
-  if (MEDfileClose(fid) < 0) {
-    MESSAGE("ERROR : close file");
-    return -1;
-  }
-
-  /* memory deallocation */
-  printf("Before free(coordinates)\n");
-  if (coordinates)
-    free(coordinates);
-
-  printf("Before free(connectivity)\n");
-  if (connectivity)
-    free(connectivity);
-
-  printf("Before free(triaconnectivity)\n");
-  if (triaconnectivity)
-    free(triaconnectivity);
-
-  printf("Before free(index)\n");
-  if (index)
-    free(index);
-
-  return 0;
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReadPolyhedron.cxx
deleted file mode 100644 (file)
index 6d00488..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- *  How to create an unstructured mesh with polygons
- *
- *  Use case 16 : read a 2D unstructured mesh with 2 polyhedrons
- */
-
-#include <med.h>
-#define MESGERR 1
-#include <med_utils.h>
-
-#include <string.h>
-
-int main (int argc, char **argv) {
-  med_idt fid;
-  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
-  char meshdescription[MED_COMMENT_SIZE+1];
-  med_int meshdim;
-  med_int spacedim;
-  med_sorting_type sortingtype;
-  med_int nstep;
-  med_mesh_type meshtype;
-  med_axis_type axistype;
-  char axisname[3*MED_SNAME_SIZE+1];
-  char unitname[3*MED_SNAME_SIZE+1];
-  char dtunit[MED_SNAME_SIZE+1];
-  med_float *coordinates = NULL;
-  med_int nnodes = 0;
-  med_int npoly = 0;
-  med_int indexsize;
-  med_int faceIndexSize;
-  med_int *index = NULL;
-  med_int *faceindex = NULL;
-  med_int *connectivity = NULL;
-  med_int connectivitysize;
-  med_bool coordinatechangement;
-  med_bool geotransformation;
-  int i;
-  int k,ind1,ind2;
-  int j, jind1,jind2;
-
-  /* open MED file with READ ONLY access mode */
-  fid = MEDfileOpen("./UsesCase_MEDmesh_15.med",MED_ACC_RDONLY);
-  if (fid < 0) {
-    MESSAGE("ERROR : open file in READ ONLY ACCESS mode ...");
-    return -1;
-  }
-
-  /*
-   * ... we know that the MED file has only one mesh,
-   * a real code working would check ...
-   */
-
-  /* read mesh informations : mesh dimension, space dimension ... */
-  if (MEDmeshInfoByName(fid, meshname, &spacedim, &meshdim, &meshtype, meshdescription,
-      dtunit, &sortingtype, &nstep, &axistype, axisname, unitname) < 0) {
-    MESSAGE("ERROR : mesh info ...");
-    return -1;
-  }
-
-  /* read how many nodes in the mesh */
-  if ((nnodes = MEDmeshnEntity(fid, meshname, MED_NO_DT, MED_NO_IT, MED_NODE, MED_POINT1,
-             MED_COORDINATE, MED_NO_CMODE,&coordinatechangement,
-             &geotransformation)) < 0) {
-    MESSAGE("ERROR : number of nodes ...");
-    return -1;
-  }
-
-  /*
-   * ... we know that we only have MED_POLYHEDRON cells in the mesh,
-   * a real code working would check all MED geometry cell types ...
-   */
-
-  /* How many polygon in the mesh in nodal connectivity mode */
-  /* For the polygons, we get the size of array index */
-  if ((indexsize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-          MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_NODAL,
-          &coordinatechangement,
-          &geotransformation)) < 0) {
-    MESSAGE("ERROR : read number of polyedron ...");
-    return -1;
-  }
-  npoly = indexsize-1;
-  ISCRUTE(npoly);
-
-  if ((faceIndexSize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-          MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_NODAL,
-          &coordinatechangement,
-          &geotransformation)) < 0) {
-    MESSAGE("ERROR : read number of polyedron ...");
-    return -1;
-  }
-  ISCRUTE(faceIndexSize);
-
-  /* how many nodes for the polyhedron connectivity ? */
-  if ((connectivitysize = MEDmeshnEntity(fid,meshname,MED_NO_DT,MED_NO_IT,
-           MED_CELL,MED_POLYHEDRON,MED_CONNECTIVITY,MED_NODAL,
-           &coordinatechangement,
-           &geotransformation)) < 0) {
-    MESSAGE("ERROR : read connevity size ...");
-    return -1;
-    }
-  ISCRUTE(connectivitysize);
-
-  /* read mesh nodes coordinates */
-  if ((coordinates = (med_float*) malloc(sizeof(med_float)*nnodes*spacedim)) == NULL) {
-    MESSAGE("ERROR : memory allocation ...");
-    return -1;
-  }
-
-  if (MEDmeshNodeCoordinateRd(fid, meshname, MED_NO_DT, MED_NO_IT, MED_FULL_INTERLACE,
-            coordinates) < 0) {
-    MESSAGE("ERROR : nodes coordinates ...");
-    return -1;
-  }
-  for (i=0;i<nnodes*spacedim;i++)
-    printf("%f - ",*(coordinates+i));
-  printf("\n");
-
-  /* read polygons connectivity */
-  index = (med_int *) malloc(sizeof(med_int)*indexsize);
-  faceindex = (med_int *) malloc(sizeof(med_int)*faceIndexSize);
-  connectivity = (med_int *) malloc(sizeof(med_int)*connectivitysize);
-
-  if (MEDmeshPolyhedronRd(fid,meshname,MED_NO_DT,MED_NO_IT,MED_CELL,MED_NODAL,
-        index,faceindex,connectivity) < 0) {
-    MESSAGE("ERROR : read polygon connectivity ...");
-    return -1;
-  }
-
-  for (i=0;i<npoly;i++)
-    {
-    printf(">> MED_POLYHEDRON "IFORMAT" : \n",i+1);
-    printf("---- Face Index         ----- : [ ");
-    ind1 = *(index+i)-1;
-    ind2 = *(index+i+1)-1;
-    for (k=ind1;k<ind2;k++)
-      printf(IFORMAT" ",*(faceindex+k));
-    printf(" ] \n");
-    printf("---- Connectivity       ----- : [ ");
-    for (k=ind1;k<ind2;k++)
-      {
-      jind1 = *(faceindex+k)-1;
-      jind2 = *(faceindex+k+1)-1;
-      for (j=jind1;j<jind2;j++)
-        printf(IFORMAT" ",*(connectivity+j));
-      printf(" \n");
-      }
-    printf(" ] \n");
-    }
-
-  /*
-   * ... we know that the family number of nodes and elements is 0, a real working would check ...
-   */
-
-  /* close MED file */
-  if (MEDfileClose(fid) < 0) {
-    MESSAGE("ERROR : close file");
-    return -1;
-  }
-
-  /* memory deallocation */
-  if (coordinates)
-    free(coordinates);
-
-  if (index)
-    free(index);
-
-  if (connectivity)
-    free(connectivity);
-
-  return 0;
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReader.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedReader.cxx
deleted file mode 100644 (file)
index d881a1b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkActor.h"
-#include "vtkCamera.h"
-#include "vtkProperty.h"
-#include "vtkCompositePolyDataMapper.h"
-#include "vtkRenderer.h"
-#include "vtkRenderWindow.h"
-#include "vtkRenderWindowInteractor.h"
-#include "vtkCylinderSource.h"
-#include "vtkMedReader.h"
-#include "vtkDataObject.h"
-#include "vtkDataSetAttributes.h"
-#include "vtkPolyDataNormals.h"
-#include "vtkMedReader.h"
-
-#include "vtkTestUtilities.h"
-#include "vtkRegressionTestImage.h"
-
-int main(int argc, char *argv[])
-{
-  vtkMedReader* reader = vtkMedReader::New();
-  reader->SetFileName(argv[1]);
-  reader->Update();
-
-  vtkCompositePolyDataMapper *mapper = vtkCompositePolyDataMapper::New();
-  mapper->SetInputConnection(reader->GetOutputPort());
-
-  vtkActor *actor = vtkActor::New();
-  actor->SetMapper(mapper);
-
-  vtkRenderer *renderer = vtkRenderer::New();
-  renderer->AddActor(actor);
-  renderer->SetBackground(0.5, 0.5, 0.5);
-
-  vtkRenderWindow *renWin = vtkRenderWindow::New();
-  renWin->AddRenderer(renderer);
-
-  vtkRenderWindowInteractor *interactor = vtkRenderWindowInteractor::New();
-  interactor->SetRenderWindow(renWin);
-
-  renWin->SetSize(400,400);
-  renWin->Render();
-  interactor->Initialize();
-  renderer->ResetCamera();
-  renWin->Render();
-  renderer->ResetCamera();
-
-  int retVal = vtkRegressionTestImageThreshold(renWin,18);
-  if( retVal == vtkRegressionTester::DO_INTERACTOR)
-    {
-    interactor->Start();
-    }
-
-  reader->Delete();
-  mapper->Delete();
-  actor->Delete();
-  renderer->Delete();
-  renWin->Delete();
-  interactor->Delete();
-
-  return !retVal;
-}
diff --git a/src/Plugins/MedReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx b/src/Plugins/MedReader/IO/Testing/Cxx/TestMedWriteOcta12.cxx
deleted file mode 100644 (file)
index 3a7a138..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-/*
- * TestMedWriteOcta12.cxx
- *
- *  Created on: 17 mars 2011
- *      Author: alejandro
- */
-
-#include <med.h>
-#define MESGERR 1
-#include <med_utils.h>
-
-#include <string.h>
-
-int main (int argc, char **argv) {
-  med_idt fid;
-  const char meshname[MED_NAME_SIZE+1] = "3D unstructured mesh";
-  const med_int spacedim = 3;
-  const med_int meshdim = 3;
-  /*                                         12345678901234561234567890123456 */
-  const char axisname[3*MED_SNAME_SIZE+1] = "x               y               z               ";
-  const char unitname[3*MED_SNAME_SIZE+1] = "cm              cm              cm              ";
-  const med_int nnodes = 20;
-  const med_float coordinates[3 * 20] =
-          { 0.,   0.,   1.,
-            1.,   0.,   1.,
-            1.5,  1.,   1.,
-            1.,   2.,   1.,
-            0.,   2.,   1.,
-           -0.5,  1.,   1.,
-            0.,   0.,   0.,
-            1.,   0.,   0.,
-            1.5,  1.,   0.,
-            1.,   2.,   0.,
-            0.,   2.,   0.,
-           -0.5,  1.,   0.,
-            2.5,  1.,   1.,
-            3.,   2.,   1.,
-            2.5,  2.5,  1.,
-            1.5,  2.5,  1.,
-            2.5,  1.,   0.,
-            3.,   2.,   0.,
-            2.5,  2.5,  0.,
-            1.5,  2.5,  0.  };
-
-  const med_int nOcta = 2;
-  const med_int octa12Connectivity[12*2] =
-     { 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
-      13, 14, 15, 16,  4,  3, 17, 18, 19, 20, 10,  9 };
-
-  /* open MED file */
-  fid = MEDfileOpen("UsesCase_MEDmesh_19.med",
-        MED_ACC_CREAT);
-  if (fid < 0) {
-    MESSAGE("ERROR : file creation ...");
-    return -1;
-  }
-
-  /* write a comment in the file */
-  if (MEDfileCommentWr(fid,
-           "A 3D unstructured mesh : 2 Hexagonal Prisms") < 0) {
-    MESSAGE("ERROR : write file description ...");
-    return -1;
-  }
-
-  /* mesh creation : a 3D unstructured mesh */
-  if (MEDmeshCr(fid,
-    meshname,
-    spacedim,
-    meshdim,
-    MED_UNSTRUCTURED_MESH,
-    "A 3D mesh with 1 hexagonal in NODAL connectivity",
-    "",
-    MED_SORT_DTIT,
-    MED_CARTESIAN,
-    axisname,
-    unitname) < 0) {
-    MESSAGE("ERROR : mesh creation ...");
-    return -1;
-  }
-
-  /* nodes coordinates in a cartesian axis in full interlace mode
-     (X1,Y1, X2,Y2, X3,Y3, ...) with no iteration and computation step
-  */
-  if (MEDmeshNodeCoordinateWr(fid,
-            meshname,
-            MED_NO_DT,
-            MED_NO_IT,
-            MED_UNDEF_DT,
-            MED_FULL_INTERLACE,
-            nnodes,
-            coordinates) < 0) {
-    MESSAGE("ERROR : nodes coordinates ...");
-    return -1;
-  }
-
-  // cells connectiviy is defined in nodal mode
-  if (MEDmeshElementConnectivityWr(fid,
-           meshname,
-           MED_NO_DT,
-           MED_NO_IT,
-           0.0,
-           MED_CELL,
-           MED_OCTA12,
-           MED_NODAL,
-           MED_FULL_INTERLACE,
-           nOcta,
-           octa12Connectivity) < 0) {
-    MESSAGE("ERROR : triangular cells connectivity ...");
-    return -1;
-  }
-
-  /* create family 0 : by default, all mesh entities family number is 0 */
-  if (MEDfamilyCr(fid,
-      meshname,
-      "",
-      0,
-      0,
-      "") < 0) {
-    MESSAGE("ERROR : quadrangular cells connectivity ...");
-    return -1;
-  }
-
-  /* close MED file */
-  if (MEDfileClose(fid)  < 0) {
-    MESSAGE("ERROR : close file ...");
-    return -1;
-  }
-
-  return 0;
-}
diff --git a/src/Plugins/MedReader/IO/config.h.cmake b/src/Plugins/MedReader/IO/config.h.cmake
deleted file mode 100644 (file)
index bb04c42..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
- #ifndef __CONFIG_H__
- #define __CONFIG_H__
- #cmakedefine MedReader_BUILD_PARALLEL
-     
- #endif // __CONFIG_H__
\ No newline at end of file
diff --git a/src/Plugins/MedReader/IO/module.cmake b/src/Plugins/MedReader/IO/module.cmake
deleted file mode 100644 (file)
index 80282b0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-SET(VTK_LIBS vtkCommonExecutionModel vtkParallelCore)
-
-vtk_module(vtkMedReader
-  DEPENDS
-    ${VTK_LIBS}
-    vtkRenderingFreeTypeOpenGL
-    vtkRenderingOpenGL
-    vtkRenderingFreeType
-    vtkRenderingCore
-    vtkInteractionStyle
-    TEST_DEPENDS
-    vtkRenderingCore
-    vtkTestingRendering
-    vtkInteractionStyle
-    vtkRenderingFreeTypeOpenGL
-  EXCLUDE_FROM_WRAP_HIERARCHY
-)
diff --git a/src/Plugins/MedReader/IO/vtkExtractGroup.cxx b/src/Plugins/MedReader/IO/vtkExtractGroup.cxx
deleted file mode 100644 (file)
index 1973928..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkExtractGroup.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMutableDirectedGraph.h"
-#include "vtkMultiBlockDataSet.h"
-#include "vtkInformationVector.h"
-#include "vtkInformation.h"
-#include "vtkDataArraySelection.h"
-#include "vtkMedUtilities.h"
-#include "vtkTimeStamp.h"
-#include "vtkInEdgeIterator.h"
-#include "vtkMedReader.h"
-#include "vtkInformationDataObjectKey.h"
-#include "vtkExecutive.h"
-#include "vtkVariantArray.h"
-#include "vtkStringArray.h"
-#include "vtkUnsignedCharArray.h"
-#include "vtkDataSetAttributes.h"
-#include "vtkDemandDrivenPipeline.h"
-//#include "vtkCompositeDataIterator.h"
-#include "vtkDataObjectTreeIterator.h"
-
-#include <map>
-#include <deque>
-//#include <vtkstd/map>
-//#include <vtkstd/deque>
-
-// vtkCxxRevisionMacro(vtkExtractGroup, "$Revision$");
-vtkStandardNewMacro(vtkExtractGroup);
-
-vtkCxxSetObjectMacro(vtkExtractGroup, SIL, vtkMutableDirectedGraph);
-
-vtkExtractGroup::vtkExtractGroup()
-{
-  this->SIL=NULL;
-  this->Entities=vtkDataArraySelection::New();
-  this->Families=vtkDataArraySelection::New();
-  this->Groups=vtkDataArraySelection::New();
-  this->PruneOutput=0;
-}
-
-vtkExtractGroup::~vtkExtractGroup()
-{
-  this->Entities->Delete();
-  this->Families->Delete();
-  this->Groups->Delete();
-}
-
-int vtkExtractGroup::ModifyRequest(vtkInformation* request, int when)
-{
-  request->Set(vtkDemandDrivenPipeline::REQUEST_REGENERATE_INFORMATION(), 1);
-  return this->Superclass::ModifyRequest(request, when);
-}
-
-int vtkExtractGroup::RequestInformation(vtkInformation *request,
-    vtkInformationVector **inputVector, vtkInformationVector *outputVector)
-{
-  vtkInformation* outInfo=outputVector->GetInformationObject(0);
-
-  vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
-
-  vtkMutableDirectedGraph* old_SIL=this->GetSIL();
-
-  if(inputInfo->Has(vtkDataObject::SIL()))
-    {
-    this->SetSIL(vtkMutableDirectedGraph::SafeDownCast(inputInfo->Get(
-        vtkDataObject::SIL())));
-    }
-  else
-    {
-    vtkMutableDirectedGraph* sil=vtkMutableDirectedGraph::New();
-    this->BuildDefaultSIL(sil);
-    this->SetSIL(sil);
-    sil->Delete();
-    }
-
-  if(this->GetSIL()!=old_SIL||this->GetSIL()->GetMTime()>this->SILTime)
-    {
-    this->ClearSelections();
-    this->SILTime.Modified();
-    outInfo->Set(vtkDataObject::SIL(), this->GetSIL());
-    }
-
-  return 1;
-}
-
-vtkIdType vtkExtractGroup::FindVertex(const char* name)
-{
-  vtkStringArray* names=vtkStringArray::SafeDownCast(
-      this->GetSIL()->GetVertexData()->GetAbstractArray("Names"));
-
-  return names->LookupValue(name);
-}
-
-void vtkExtractGroup::ClearSelections()
-{
-  this->Families->RemoveAllArrays();
-  this->Entities->RemoveAllArrays();
-  this->Groups->RemoveAllArrays();
-}
-
-void vtkExtractGroup::BuildDefaultSIL(vtkMutableDirectedGraph* sil)
-{
-  sil->Initialize();
-
-  vtkSmartPointer<vtkVariantArray> childEdge=
-      vtkSmartPointer<vtkVariantArray>::New();
-  childEdge->InsertNextValue(0);
-
-  vtkSmartPointer<vtkVariantArray> crossEdge=
-      vtkSmartPointer<vtkVariantArray>::New();
-  crossEdge->InsertNextValue(1);
-
-  // CrossEdge is an edge linking hierarchies.
-  vtkUnsignedCharArray* crossEdgesArray=vtkUnsignedCharArray::New();
-  crossEdgesArray->SetName("CrossEdges");
-  sil->GetEdgeData()->AddArray(crossEdgesArray);
-  crossEdgesArray->Delete();
-  std::deque<std::string> names;
-
-  // Now build the hierarchy.
-  vtkIdType rootId=sil->AddVertex();
-  names.push_back("SIL");
-
-  // Add a global entry to encode global names for the families
-  vtkIdType globalFamilyRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Families");
-
-  // Add a global entry to encode global names for the families
-  vtkIdType globalGroupRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Groups");
-
-  // Add the groups subtree
-  vtkIdType groupsRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("GroupTree");
-
-  // Add the attributes subtree
-  vtkIdType attributesRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Attributes");
-
-  // Add a global entry to encode names for the cell types
-  vtkIdType globalEntityRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Entity");
-
-  // Add the cell types subtree
-  vtkIdType entityTypesRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("EntityTree");
-
-  // This array is used to assign names to nodes.
-  vtkStringArray* namesArray=vtkStringArray::New();
-  namesArray->SetName("Names");
-  namesArray->SetNumberOfTuples(sil->GetNumberOfVertices());
-  sil->GetVertexData()->AddArray(namesArray);
-  namesArray->Delete();
-  std::deque<std::string>::iterator iter;
-  vtkIdType cc;
-  for(cc=0, iter=names.begin(); iter!=names.end(); ++iter, ++cc)
-    {
-    namesArray->SetValue(cc, (*iter).c_str());
-    }
-
-}
-
-int vtkExtractGroup::RequestData(vtkInformation *request,
-    vtkInformationVector **inputVector, vtkInformationVector *outputVector)
-
-{
-  vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
-  vtkMultiBlockDataSet* inmb=vtkMultiBlockDataSet::SafeDownCast(inputInfo->Get(
-      vtkDataObject::DATA_OBJECT()));
-
-  if(inmb==NULL)
-    return 0;
-
-  vtkMultiBlockDataSet* outmb=this->GetOutput();
-
-  outmb->CopyStructure(inmb);
-
-  //vtkCompositeDataIterator* iterator = inmb->NewIterator();
-  vtkDataObjectTreeIterator* iterator = vtkDataObjectTreeIterator::SafeDownCast( inmb->NewIterator() );
-  iterator->SetVisitOnlyLeaves(true);
-  iterator->InitTraversal();
-  while(!iterator->IsDoneWithTraversal())
-    {
-    vtkDataObject* indo = iterator->GetCurrentDataObject();
-    if(indo == NULL)
-      continue;
-
-    if(indo->GetFieldData()->HasArray("BLOCK_NAME"))
-      {
-
-      vtkStringArray* path = vtkStringArray::SafeDownCast(
-          indo->GetFieldData()->GetAbstractArray("BLOCK_NAME"));
-
-      if(this->IsBlockSelected(path))
-        {
-        vtkMultiBlockDataSet* parent = vtkMedUtilities::GetParent(outmb, path);
-        int nb = parent->GetNumberOfBlocks();
-        parent->SetNumberOfBlocks(nb+1);
-        vtkDataObject *outdo = indo->NewInstance();
-        outdo->ShallowCopy(indo);
-        parent->SetBlock(nb, outdo);
-        outdo->Delete();
-        }
-      }
-    iterator->GoToNextItem();
-    }
-
-  if(PruneOutput)
-    {
-    this->PruneEmptyBlocks(outmb);
-    }
-  return 1;
-}
-
-void vtkExtractGroup::SetGroupStatus(const char* key, int flag)
-{
-  vtkIdType index=this->Groups->GetArrayIndex(key);
-  if(index==-1)
-    {
-    index = this->Groups->AddArray(key);
-    this->Modified();
-    }
-  int status=this->Groups->GetArraySetting(index);
-  if(status!=flag)
-    {
-    if(flag)
-      {
-      this->Groups->EnableArray(key);
-      }
-    else
-      {
-      this->Groups->DisableArray(key);
-      }
-    this->Modified();
-    }
-  this->GroupSelectionTime.Modified();
-}
-
-void vtkExtractGroup::PruneEmptyBlocks(vtkMultiBlockDataSet* mb)
-{
-  if(mb==NULL)
-    return;
-  vtkIdType nn=0;
-  while(nn<mb->GetNumberOfBlocks())
-    {
-    bool remove=false;
-    vtkDataObject* dataObj=mb->GetBlock(nn);
-    if(dataObj==NULL)
-      {
-      remove=true;
-      }
-    else
-      {
-      vtkMultiBlockDataSet* child=vtkMultiBlockDataSet::SafeDownCast(dataObj);
-      if(child!=NULL)
-        {
-        this->PruneEmptyBlocks(child);
-        if(child->GetNumberOfBlocks()==0)
-          {
-          remove=true;
-          }
-        }
-      }
-    if(remove)
-      {
-      mb->RemoveBlock(nn);
-      }
-    else
-      {
-      nn++;
-      }
-    }
-}
-
-int vtkExtractGroup::IsBlockSelected(vtkStringArray* path)
-{
-  const char* meshName = (path->GetNumberOfValues()>0?
-                          path->GetValue(0) : NULL);
-  const char* cellOrPoint = (path->GetNumberOfValues()>1?
-                             path->GetValue(1) : NULL);
-  const char* familyName = (path->GetNumberOfValues()>2?
-                            path->GetValue(2) : NULL);
-
-  if(!this->IsFamilySelected(meshName, cellOrPoint, familyName))
-    {
-    return 0;
-    }
-
-  bool isOnPoint = (strcmp(cellOrPoint, vtkMedUtilities::OnPointName)==0);
-
-  const char* entityName = (isOnPoint || path->GetNumberOfValues()<=3 ? NULL :
-                            path->GetValue(3));
-
-  if(isOnPoint)
-    return true;
-
-  return IsEntitySelected(entityName);
-
-}
-
-int vtkExtractGroup::IsEntitySelected(const char* entityKey)
-{
-  return this->Entities->GetArraySetting(entityKey);
-}
-
-int vtkExtractGroup::IsFamilySelected(const char* meshName,
-    const char* pointOrCellKey, const char* familyName)
-{
-  if(this->FamilySelectionTime <= this->GroupSelectionTime)
-    {
-    this->SelectFamiliesFromGroups();
-    }
-
-  int
-      pointOrCell= (strcmp(vtkMedUtilities::OnPointName, pointOrCellKey)==0?
-                    vtkMedUtilities::OnPoint
-                    : vtkMedUtilities::OnCell);
-
-  std::string name=
-      vtkMedUtilities::FamilyKey(meshName, pointOrCell, familyName);
-
-  return this->Families->GetArraySetting(name.c_str());
-}
-
-void vtkExtractGroup::SelectFamiliesFromGroups()
-{
-  this->Families->DisableAllArrays();
-  vtkStringArray* names=vtkStringArray::SafeDownCast(
-      this->GetSIL()->GetVertexData()->GetAbstractArray("Names"));
-
-  for(int index = 0; index < this->Groups->GetNumberOfArrays(); index++)
-    {
-    if(this->Groups->GetArraySetting(index) == 0)
-      continue;
-
-    const char* name = this->Groups->GetArrayName(index);
-    vtkIdType silindex = this->FindVertex(name);
-
-    vtkInEdgeIterator* it = vtkInEdgeIterator::New();
-
-    this->GetSIL()->GetInEdges(silindex, it);
-    while(it->HasNext())
-      {
-      vtkIdType famId = it->Next().Source;
-      vtkStdString famName = names->GetValue(famId);
-      if(strncmp(famName, "FAMILY", 6)==0)
-        {
-        this->Families->EnableArray(famName.c_str());
-        }
-      }
-    it->Delete();
-    }
-
-  this->FamilySelectionTime.Modified();
-}
-
-void vtkExtractGroup::SetEntityStatus(const char* key, int flag)
-{
-  vtkIdType index=this->Entities->GetArrayIndex(key);
-  if(index==-1)
-    {
-    index = this->Entities->AddArray(key);
-    this->Modified();
-    }
-  int status=this->Entities->GetArraySetting(index);
-  if(status!=flag)
-    {
-    if(flag)
-      {
-      this->Entities->EnableArray(key);
-      }
-    else
-      {
-      this->Entities->DisableArray(key);
-      }
-    this->Modified();
-    }
-}
-
-void vtkExtractGroup::SetFamilyStatus(const char* key, int flag)
-{
-  vtkIdType index=this->Families->GetArrayIndex(key);
-  if(index==-1)
-    {
-    return;
-    }
-  int status=this->Families->GetArraySetting(index);
-  if(status!=flag)
-    {
-    if(flag)
-      {
-      this->Families->EnableArray(key);
-      }
-    else
-      {
-      this->Families->DisableArray(key);
-      }
-    }
-}
-
-int vtkExtractGroup::GetSILUpdateStamp()
-{
-  return this->SILTime;
-}
-
-void vtkExtractGroup::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkExtractGroup.h b/src/Plugins/MedReader/IO/vtkExtractGroup.h
deleted file mode 100644 (file)
index ffd38ef..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email :
-// webmaster.salome@opencascade.com
-//
-
-#ifndef vtkExtractGroup_h__
-#define vtkExtractGroup_h__
-
-#include "vtkMultiBlockDataSetAlgorithm.h"
-class vtkMutableDirectedGraph;
-class vtkInformation;
-class vtkInformationVector;
-class vtkDataArraySelection;
-class vtkTimeStamp;
-class vtkStringArray;
-
-class VTK_EXPORT vtkExtractGroup: public vtkMultiBlockDataSetAlgorithm
-{
-public:
-  static vtkExtractGroup* New();
-  vtkTypeMacro(vtkExtractGroup, vtkMultiBlockDataSetAlgorithm)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Every time the SIL is updated a this will return a different value.
-  virtual int GetSILUpdateStamp();
-
-  // Description:
-  // use this method to enable/disable cell types
-  // the key is encoded with the vtkMedUtilities::CellTypeKey method
-  // which returns a string
-  // CELL_TYPE/MED_ENTITE_MAILLAGE/MED_GEOMETRIE_ELEMENT
-  virtual void SetEntityStatus(const char* key, int flag);
-
-  // Description:
-  // use this method to enable/disable a family support
-  // the key is formatted by the vtkMedUtilities::FamilyKey method which
-  // returns a string
-  // GROUP/MESH_NAME/OnPoint/FAMILY_NAME or GROUP/MESH_NAME/OnCell/FAMILY_NAME
-  virtual void SetGroupStatus(const char* key, int flag);
-
-  // Description :
-  // If set to 1, this filter will prune the empty parts in the output.
-  // If not, then empty datasets will be kept
-  vtkSetMacro(PruneOutput, int);
-  vtkGetMacro(PruneOutput, int);
-
-  int ModifyRequest(vtkInformation* request, int when);
-
-protected:
-  vtkExtractGroup();
-  ~vtkExtractGroup();
-
-  int RequestInformation(vtkInformation *request,
-      vtkInformationVector **inputVector, vtkInformationVector *outputVector);
-
-  int RequestData(vtkInformation *request, vtkInformationVector **inputVector,
-      vtkInformationVector *outputVector);
-
-  // Description :
-  // returns 1 if this cell type is to be passed through
-  int IsEntitySelected(const char*);
-
-  // Description :
-  // returns 1 if this family is to be passed through
-  int IsFamilySelected(const char* meshName, const char* cellOrPoint,
-      const char* familyName);
-
-  // Description :
-  // removes empty blocks from the vtkMultiBlockDataSet.
-  void PruneEmptyBlocks(vtkMultiBlockDataSet* mb);
-
-  // Description:
-  // This SIL stores the structure of the mesh/groups/cell types
-  // that can be selected.
-  virtual void SetSIL(vtkMutableDirectedGraph*);
-  vtkGetObjectMacro(SIL, vtkMutableDirectedGraph);
-
-  virtual void BuildDefaultSIL(vtkMutableDirectedGraph*);
-
-  // Description:
-  // use this method to enable/disable a family support
-  // the key is formatted by the vtkMedUtilities::FamilyKey method which
-  // returns a string
-  // FAMILY/MESH_NAME/OnPoint/FAMILY_NAME or MESH_NAME/OnCell/FAMILY_NAME
-  virtual void SetFamilyStatus(const char* key, int flag);
-
-  // Description:
-  // Update the Family status from te group status.
-  // The family status is lazily updated when GetFamilyStatus is called.
-  virtual void SelectFamiliesFromGroups();
-
-  // Description:
-  // returns true if the block described by the given information
-  // is selected.
-  virtual int IsBlockSelected(vtkStringArray* path);
-
-  virtual void ClearSelections();
-
-  virtual vtkIdType FindVertex(const char* name);
-
-  vtkMutableDirectedGraph* SIL;
-
-  // Support selection
-  vtkDataArraySelection* Entities;
-  vtkDataArraySelection* Families;
-  vtkDataArraySelection* Groups;
-
-  vtkTimeStamp SILTime;
-  vtkTimeStamp FamilySelectionTime;
-  vtkTimeStamp GroupSelectionTime;
-
-  int PruneOutput;
-
-private:
-  vtkExtractGroup(const vtkExtractGroup&);
-  void operator=(const vtkExtractGroup&); // Not implemented.
-};
-
-#endif
diff --git a/src/Plugins/MedReader/IO/vtkGenerateStructElement.cxx b/src/Plugins/MedReader/IO/vtkGenerateStructElement.cxx
deleted file mode 100644 (file)
index 7943fd1..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkGenerateStructElement.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkInformation.h"
-#include "vtkInformationVector.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkCellData.h"
-#include "vtkIdTypeArray.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedConstantAttribute.h"
-#include "vtkMedVariableAttribute.h"
-
-class vtkGenerateStructElementCache
-{
-public :
-  vtkGenerateStructElementCache(vtkMedStructElement* strelem, vtkUnstructuredGrid* ug)
-    {
-    for(int attid = 0; attid < strelem->GetNumberOfConstantAttribute(); attid++)
-      {
-      vtkMedConstantAttribute* att = strelem->GetConstantAttribute(attid);
-      this->cstAttribute[att->GetName()] = att;
-      }
-
-    for(int attid = 0; attid < strelem->GetNumberOfVariableAttribute(); attid++)
-      {
-      vtkMedVariableAttribute* att = strelem->GetVariableAttribute(attid);
-      vtkDataArray* array = ug->GetFieldData()->GetArray(att->GetName());
-      if(array != NULL)
-        this->varAttribute[att->GetName()] = array;
-      }
-    }
-
-  bool HasParameter(const char* name)
-    {
-    return this->cstAttribute.find(name) != this->cstAttribute.end()
-        || this->varAttribute.find(name) != this->varAttribute.end();
-    }
-
-  double GetParameter1(const char* name, vtkIdType id)
-    {
-    if(this->cstAttribute.find(name) != this->cstAttribute.end())
-      {
-      vtkMedConstantAttribute* att = this->cstAttribute[name];
-      return att->GetValues()->GetVariantValue(0).ToDouble();
-      }
-    if(this->varAttribute.find(name) != this->varAttribute.end())
-      {
-      vtkDataArray* array = this->varAttribute[name];
-      return array->GetTuple1(id);
-      }
-    return 0.0;
-    }
-
-protected :
-  std::map<std::string, vtkMedConstantAttribute*> cstAttribute;
-  std::map<std::string, vtkDataArray*> varAttribute;
-};
-
-// vtkCxxRevisionMacro(vtkGenerateStructElement, "$Revision$");
-vtkStandardNewMacro(vtkGenerateStructElement);
-
-vtkGenerateStructElement::vtkGenerateStructElement()
-{
-
-}
-
-vtkGenerateStructElement::~vtkGenerateStructElement()
-{
-
-}
-
-int vtkGenerateStructElement::RequestData(vtkInformation* request,
-                          vtkInformationVector** inputVector,
-                          vtkInformationVector* outputVector)
-{
-  vtkInformation* outInfo=outputVector->GetInformationObject(0);
-
-  vtkInformation* inputInfo=inputVector[0]->GetInformationObject(0);
-
-  vtkUnstructuredGrid* inug = vtkUnstructuredGrid::SafeDownCast(
-      inputInfo->Get(vtkDataObject::DATA_OBJECT()));
-
-  vtkUnstructuredGrid* outug = vtkUnstructuredGrid::SafeDownCast(
-      outInfo->Get(vtkDataObject::DATA_OBJECT()));
-  outug->Initialize();
-
-  vtkMedStructElement* strelem = vtkMedStructElement::SafeDownCast(
-      inug->GetInformation()->Get(vtkMedUtilities::STRUCT_ELEMENT()));
-
-  std::cout << "Inside vtkGenerateStructElement::RequestData" << std::endl;
-
-  if(strelem == NULL)
-    {
-    vtkDebugMacro("vtkGenerateStructElement needs a vtkMedStructElement information");
-    return 1;
-    }
-
-  vtkIdTypeArray* strelemindex = vtkIdTypeArray::SafeDownCast(
-      inug->GetCellData()->GetArray("STRUCT_ELEMENT_INDEX"));
-  if(strelemindex == NULL)
-    {
-    vtkDebugMacro("vtkGenerateStructElement needs some information on the structural elements");
-    return 1;
-    }
-
-  // loop over input cells.
-  // struct elements support are a set cells of same type following each other.
-  vtkIdType medid = -1;
-  vtkGenerateStructElementCache cache(strelem, inug);
-
-  std::string name = strelem->GetName();
-
-  if(name == MED_BALL_NAME)
-    {
-    std::cout << "vtkGenerateStructElement::RequestData ...  if(name == MED_BALL_NAME)" << std::endl;
-    // sanity check : is the diameter defined?
-    if(!cache.HasParameter(MED_BALL_DIAMETER))
-      {
-      vtkErrorMacro("MED_BALL elements need a diameter");
-      return 1;
-      }
-    std::cout << "inug->GetNumberOfCells() = " << inug->GetNumberOfCells() << std::endl;
-    for(vtkIdType cellId = 0; cellId < inug->GetNumberOfCells(); cellId++)
-      {
-      vtkIdType ballMedId = strelemindex->GetValue(2*cellId);
-      double balldiam = this->GetParameter1(MED_BALL_DIAMETER, ballMedId, cache);
-      std::cout << balldiam << " - ";
-      //TODO
-      //this->GenerateBall(inug, cellId, balldiam, outug);
-      }
-    std::cout << std::endl;
-    }
-  else if(name == MED_PARTICLE_NAME)
-    {
-    bool hasLabel = cache.HasParameter(MED_PARTICLE_LABEL);
-    for(vtkIdType cellId = 0; cellId < inug->GetNumberOfCells(); cellId++)
-      {
-      if(hasLabel)
-        {
-        vtkIdType particleMedId = strelemindex->GetValue(2*cellId);
-        double particlelabel = this->GetParameter1(MED_PARTICLE_LABEL, particleMedId, cache);
-
-        //TODO
-        //  this->GenerateParticle(inug, cellId, particlelabel, outug);
-        }
-      else
-        {
-        //TODO
-        //  this->GenerateParticle(inug, cellId, outug);
-        }
-      }
-    }
-  else if(name == MED_BEAM_NAME)
-    {
-    // sanity check : is the diameter defined?
-    if(!cache.HasParameter(MED_BEAM_THICKNESS))
-      {
-      vtkErrorMacro("MED_BEAM elements need a thickness");
-      return 1;
-      }
-    for(vtkIdType cellId = 0; cellId < inug->GetNumberOfCells(); cellId++)
-      {
-      vtkIdType cellmedid = strelemindex->GetValue(2*cellId);
-      if(cellmedid != medid)
-        {
-        // this means that a new beam begins
-        medid = cellmedid;
-        double thickness = this->GetParameter1(MED_BEAM_THICKNESS, medid, cache);
-
-        //TODO : generate a beam.
-        // rem : a beam can span several segments.
-
-        }
-      }
-    }
-  else
-    {
-    vtkErrorMacro("structural elements of type " << name << " are not supported");
-    }
-
-  return 1;
-}
-
-double  vtkGenerateStructElement::GetParameter1(const char* name,
-                              vtkIdType medid,
-                              vtkGenerateStructElementCache& cache)
-{
-#ifdef WIN32 //rnv : Avoid compliation error in the VS under windows.
-  return 0;
-#endif
-}
-
-void  vtkGenerateStructElement::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkGenerateStructElement.h b/src/Plugins/MedReader/IO/vtkGenerateStructElement.h
deleted file mode 100644 (file)
index fb37e03..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkGenerateStructElement_h__
-#define __vtkGenerateStructElement_h__
-
-#include "vtkUnstructuredGridAlgorithm.h"
-
-class vtkMedStructElement;
-class vtkGenerateStructElementCache;
-
-class VTK_EXPORT vtkGenerateStructElement : public vtkUnstructuredGridAlgorithm
-{
-public:
-  static vtkGenerateStructElement* New();
-  vtkTypeMacro(vtkGenerateStructElement, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-protected :
-  vtkGenerateStructElement();
-  virtual ~vtkGenerateStructElement();
-
-  // Description:
-  // This is called by the superclass.
-  // This is the method you should override.
-  virtual int RequestData(vtkInformation* request,
-                          vtkInformationVector** inputVector,
-                          vtkInformationVector* outputVector);
-
-  //BTX
-  virtual double  GetParameter1(const char*,
-                           vtkIdType,
-                           vtkGenerateStructElementCache&);
-  //ETX
-
-private :
-  vtkGenerateStructElement(const vtkGenerateStructElement&);// Not implemented.
-  void operator=(const vtkGenerateStructElement&); // Not implemented.
-
-};
-
-#endif //__vtkGenerateStructElement_h__
diff --git a/src/Plugins/MedReader/IO/vtkMed.h b/src/Plugins/MedReader/IO/vtkMed.h
deleted file mode 100644 (file)
index 9a43b3c..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMed_h__
-#define __vtkMed_h__
-
-#include "hdf5.h"
-#include "config.h"
-
-extern "C"
-{
-#include "med.h"
-#define MESGERR 1
-#include "med_utils.h"
-
-#ifdef MED_HAVE_MPI
-#ifdef MedReader_BUILD_PARALLEL
-#define MedReader_HAVE_PARALLEL_INFRASTRUCTURE
-#endif
-#endif
-
-//#define MED_HAVE_MPI 1
-//#include "mpi.h"
-#ifdef MedReader_HAVE_PARALLEL_INFRASTRUCTURE
-#include "mpi.h"
-#endif
-}
-
-#endif //__vtkMed_h__
diff --git a/src/Plugins/MedReader/IO/vtkMedCartesianGrid.cxx b/src/Plugins/MedReader/IO/vtkMedCartesianGrid.cxx
deleted file mode 100644 (file)
index c096256..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedCartesianGrid.h"
-
-#include "vtkObjectFactory.h"
-
-// vtkCxxRevisionMacro(vtkMedCartesianGrid, "$Revision$")
-vtkStandardNewMacro(vtkMedCartesianGrid)
-
-vtkMedCartesianGrid::vtkMedCartesianGrid()
-{
-}
-
-vtkMedCartesianGrid::~vtkMedCartesianGrid()
-{
-}
-
-void vtkMedCartesianGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedCartesianGrid.h b/src/Plugins/MedReader/IO/vtkMedCartesianGrid.h
deleted file mode 100644 (file)
index 0d84d82..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedCartesianGrid_h_
-#define __vtkMedCartesianGrid_h_
-
-#include "vtkMedRegularGrid.h"
-
-class VTK_EXPORT vtkMedCartesianGrid : public vtkMedRegularGrid
-{
-public :
-  static vtkMedCartesianGrid* New();
-  vtkTypeMacro(vtkMedCartesianGrid, vtkMedRegularGrid);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-protected:
-  vtkMedCartesianGrid();
-  virtual ~vtkMedCartesianGrid();
-
-private:
-  vtkMedCartesianGrid(const vtkMedCartesianGrid&); // Not implemented.
-  void operator=(const vtkMedCartesianGrid&); // Not implemented.
-
-};
-
-#endif //__vtkMedCartesianGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedConstantAttribute.cxx b/src/Plugins/MedReader/IO/vtkMedConstantAttribute.cxx
deleted file mode 100644 (file)
index 4799038..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedConstantAttribute.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-
-#include "vtkAbstractArray.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedProfile.h"
-
-#include <map>
-#include <string>
-#include <vector>
-using namespace std;
-
-// vtkCxxRevisionMacro(vtkMedConstantAttribute, "$Revision$")
-vtkStandardNewMacro(vtkMedConstantAttribute);
-
-vtkCxxSetObjectMacro(vtkMedConstantAttribute, Values, vtkAbstractArray);
-vtkCxxSetObjectMacro(vtkMedConstantAttribute, ParentStructElement, vtkMedStructElement);
-vtkCxxSetObjectMacro(vtkMedConstantAttribute, Profile, vtkMedProfile);
-
-vtkMedConstantAttribute::vtkMedConstantAttribute()
-{
-  this->Name = NULL;
-  this->AttributeType = MED_ATT_UNDEF;
-  this->NumberOfComponent = 0;
-  this->SupportEntityType = MED_UNDEF_ENTITY_TYPE;
-  this->ProfileName = NULL;
-  this->ProfileSize = 0;
-  this->Values = NULL;
-  this->ParentStructElement = NULL;
-  this->Profile = NULL;
-}
-
-vtkMedConstantAttribute::~vtkMedConstantAttribute()
-{
-  this->SetName(NULL);
-  this->SetProfileName(NULL);
-  this->SetParentStructElement(NULL);
-  this->SetValues(NULL);
-  this->SetProfile(NULL);
-}
-
-void vtkMedConstantAttribute::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedConstantAttribute.h b/src/Plugins/MedReader/IO/vtkMedConstantAttribute.h
deleted file mode 100644 (file)
index 6d88a17..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedConstantAttribute_h_
-#define __vtkMedConstantAttribute_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-
-class vtkAbstractArray;
-class vtkMedStructElement;
-class vtkMedProfile;
-
-class VTK_EXPORT vtkMedConstantAttribute : public vtkObject
-{
-public :
-  static vtkMedConstantAttribute* New();
-  vtkTypeMacro(vtkMedConstantAttribute, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the name of this attribute
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // The iterator in the med file of this constant attribute
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // The Geometry type this structural elements lies on.
-  vtkSetMacro(AttributeType, med_attribute_type);
-  vtkGetMacro(AttributeType, med_attribute_type);
-
-  // Description:
-  // The dimension of this structural elements model
-  vtkSetMacro(NumberOfComponent, med_int);
-  vtkGetMacro(NumberOfComponent, med_int);
-
-  // Description:
-  // MED_CELL if the support mesh has any cell, MED_NODE otherwise
-  vtkSetMacro(SupportEntityType, med_entity_type);
-  vtkGetMacro(SupportEntityType, med_entity_type);
-
-  // Description:
-  // The name of the profile if any, MED_NO_PROFILE by default
-  vtkSetStringMacro(ProfileName);
-  vtkGetStringMacro(ProfileName);
-
-  // Description:
-  // The Size of the profile if any
-  vtkSetMacro(ProfileSize, med_int);
-  vtkGetMacro(ProfileSize, med_int);
-
-  // Description:
-  // This store the values of this attribute
-  virtual void  SetValues(vtkAbstractArray*);
-  vtkGetObjectMacro(Values, vtkAbstractArray);
-
-  // Description:
-  // This is the pointer to the actual profile used by this attribute
-  virtual void  SetProfile(vtkMedProfile*);
-  vtkGetObjectMacro(Profile, vtkMedProfile);
-
-  // Description:
-  // The Structural element on which lies this attribute
-  virtual void  SetParentStructElement(vtkMedStructElement*);
-  vtkGetObjectMacro(ParentStructElement, vtkMedStructElement);
-
-protected:
-  vtkMedConstantAttribute();
-  virtual ~vtkMedConstantAttribute();
-
-  char *Name;
-  med_int MedIterator;
-  med_attribute_type AttributeType;
-  med_int NumberOfComponent;
-  med_entity_type SupportEntityType;
-  char* ProfileName;
-  med_int ProfileSize;
-  vtkAbstractArray* Values;
-  vtkMedProfile* Profile;
-
-  vtkMedStructElement * ParentStructElement;
-
-private:
-  vtkMedConstantAttribute(const vtkMedConstantAttribute&); // Not implemented.
-  void operator=(const vtkMedConstantAttribute&); // Not implemented.
-
-};
-
-#endif //__vtkMedConstantAttribute_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.cxx b/src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.cxx
deleted file mode 100644 (file)
index 0aa9c86..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedCurvilinearGrid.h"
-
-#include "vtkMedMesh.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedProfile.h"
-#include "vtkMedFamily.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkDataArray.h"
-#include "vtkStructuredGrid.h"
-
-vtkCxxSetObjectMacro(vtkMedCurvilinearGrid, Coordinates, vtkDataArray);
-
-// vtkCxxRevisionMacro(vtkMedCurvilinearGrid, "$Revision$")
-vtkStandardNewMacro(vtkMedCurvilinearGrid)
-
-vtkMedCurvilinearGrid::vtkMedCurvilinearGrid()
-{
-  this->Coordinates = NULL;
-  this->NumberOfPoints = 0;
-}
-
-vtkMedCurvilinearGrid::~vtkMedCurvilinearGrid()
-{
-  this->SetCoordinates(NULL);
-}
-
-void vtkMedCurvilinearGrid::SetDimension(int dim)
-{
-  this->AxisSize.resize(dim);
-}
-
-int vtkMedCurvilinearGrid::GetDimension()
-{
-  return this->AxisSize.size();
-}
-
-void  vtkMedCurvilinearGrid::SetAxisSize(int axis, med_int size)
-{
-  if(axis < 0)
-    return;
-
-  if(axis >= this->AxisSize.size())
-    this->AxisSize.resize(axis+1);
-
-  this->AxisSize[axis] = size;
-}
-
-med_int vtkMedCurvilinearGrid::GetAxisSize(int axis)
-{
-  if(axis < 0 || axis >= this->AxisSize.size())
-    return 0;
-
-  return this->AxisSize[axis];
-}
-
-void  vtkMedCurvilinearGrid::LoadCoordinates()
-{
-  vtkMedDriver* driver = this->GetParentMesh()->GetParentFile()->GetMedDriver();
-  driver->LoadCoordinates(this);
-}
-
-int vtkMedCurvilinearGrid::IsCoordinatesLoaded()
-{
-  return this->Coordinates != NULL && this->Coordinates->GetNumberOfTuples()
-     == this->NumberOfPoints;
-}
-
-double* vtkMedCurvilinearGrid::GetCoordTuple(med_int index)
-{
-  return this->Coordinates->GetTuple(index);
-}
-
-vtkDataSet* vtkMedCurvilinearGrid::CreateVTKDataSet(
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkStructuredGrid* vtkgrid = vtkStructuredGrid::New();
-
-  vtkPoints* points = vtkPoints::New();
-  vtkgrid->SetPoints(points);
-  points->Delete();
-  vtkgrid->SetDimensions(this->GetAxisSize(0),
-                         this->GetAxisSize(1),
-                         this->GetAxisSize(2));
-
-  this->LoadCoordinates();
-
-  if(this->GetDimension() == 3)
-    {
-    vtkgrid->GetPoints()->SetData(this->GetCoordinates());
-    }
-  else
-    {
-    if(this->GetDimension() == 1)
-      {
-      vtkgrid->SetDimensions(this->GetAxisSize(0),
-                             1,
-                             1);
-      }
-
-    if(this->GetDimension() == 2)
-      {
-      vtkgrid->SetDimensions(this->GetAxisSize(0),
-                             this->GetAxisSize(1),
-                             1);
-      }
-
-    vtkDataArray* coords = vtkDataArray::SafeDownCast(
-        vtkAbstractArray::CreateArray(this->GetCoordinates()->GetDataType()));
-    coords->SetNumberOfComponents(3);
-    coords->SetNumberOfTuples(this->GetNumberOfPoints());
-    vtkgrid->GetPoints()->SetData(coords);
-    coords->Delete();
-
-    med_int npts = this->GetNumberOfPoints();
-    double coord[3] = {0, 0, 0};
-    for(med_int id=0; id<npts; id++)
-      {
-      double * tuple = this->Coordinates->GetTuple(id);
-      for(int dim=0; dim<this->GetDimension(); dim++)
-        {
-        coord[dim] = tuple[dim];
-        }
-      coords->SetTuple(id, coord);
-      }
-    }
-
-  if(foep->GetProfile() != NULL)
-    {
-    foep->GetProfile()->Load();
-    vtkMedIntArray* pids = foep->GetProfile()->GetIds();
-    med_int previd = -1;
-    for(med_int pid=0; pid<pids->GetNumberOfTuples(); pid++)
-      {
-      med_int id = pids->GetValue(pid) - 1;
-      for(med_int theid=previd+1; theid<id; theid++)
-        {
-        vtkgrid->BlankCell(theid);
-        }
-
-      previd = id;
-      }
-    }
-
-  if(foep->GetFamilyOnEntity()->GetEntityArray()->GetNumberOfFamilyOnEntity() > 1)
-    {
-    med_int famid = foep->GetFamilyOnEntity()->GetFamily()->GetId();
-    vtkMedEntityArray* ea = foep->GetFamilyOnEntity()->GetEntityArray();
-    for(med_int id=0; id<vtkgrid->GetNumberOfCells(); id++)
-      {
-      if(ea->GetFamilyId(id) != famid)
-        vtkgrid->BlankCell(id);
-      }
-    }
-
-  return vtkgrid;
-}
-
-void vtkMedCurvilinearGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.h b/src/Plugins/MedReader/IO/vtkMedCurvilinearGrid.h
deleted file mode 100644 (file)
index 8c8dd92..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedCurvilinearGrid_h_
-#define __vtkMedCurvilinearGrid_h_
-
-#include "vtkMedGrid.h"
-#include "vtkMed.h"
-
-class vtkDataArray;
-#include <vector>
-
-class VTK_EXPORT vtkMedCurvilinearGrid : public vtkMedGrid
-{
-public :
-  static vtkMedCurvilinearGrid* New();
-  vtkTypeMacro(vtkMedCurvilinearGrid, vtkMedGrid)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // overloaded to allocate memory for the grid size
-  virtual void  SetDimension(int);
-  virtual int GetDimension();
-
-  // Description:
-  // The number of nodes of this grid. This method do not
-  // perform any allocation.
-  vtkSetMacro(NumberOfPoints, med_int);
-  vtkGetMacro(NumberOfPoints, med_int);
-
-  // Description:
-  // this array contains the coordinates of the points used by this grid.
-  virtual void  SetCoordinates(vtkDataArray*);
-  vtkGetObjectMacro(Coordinates, vtkDataArray);
-
-  // Description:
-  // Set/Get the size of each axis.
-  // Note that the number of points must match the product of the
-  // size of each axis.
-  virtual void  SetAxisSize(int axis, med_int size);
-  virtual med_int GetAxisSize(int axis);
-
-  virtual void  LoadCoordinates();
-  virtual int IsCoordinatesLoaded();
-
-  virtual double* GetCoordTuple(med_int index);
-
-  virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
-
-protected:
-  vtkMedCurvilinearGrid();
-  virtual ~vtkMedCurvilinearGrid();
-
-  std::vector<med_int> AxisSize;
-  med_int NumberOfPoints;
-  vtkDataArray* Coordinates;
-
-private:
-  vtkMedCurvilinearGrid(const vtkMedCurvilinearGrid&); // Not implemented.
-  void operator=(const vtkMedCurvilinearGrid&); // Not implemented.
-
-};
-
-#endif //__vtkMedCurvilinearGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedDriver.cxx b/src/Plugins/MedReader/IO/vtkMedDriver.cxx
deleted file mode 100644 (file)
index 432d836..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedDriver.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkStringArray.h"
-#include "vtkDataArray.h"
-#include "vtkIdTypeArray.h"
-#include "vtkMath.h"
-
-#include "vtkMedFile.h"
-#include "vtkMedCartesianGrid.h"
-#include "vtkMedPolarGrid.h"
-#include "vtkMedCurvilinearGrid.h"
-#include "vtkMedUnstructuredGrid.h"
-#include "vtkMedField.h"
-#include "vtkMedMesh.h"
-#include "vtkMedFamily.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedLocalization.h"
-#include "vtkMedProfile.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedGroup.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedLink.h"
-
-#ifdef MedReader_HAVE_PARALLEL_INFRASTRUCTURE
-#include "vtkMultiProcessController.h"
-#include "vtkMPIController.h"
-#include <vtkMPICommunicator.h>
-#include <vtkMPI.h>
-#endif
-
-vtkCxxSetObjectMacro(vtkMedDriver, MedFile, vtkMedFile);
-
-//vtkCxxRevisionMacro(vtkMedDriver, "$Revision$")
-vtkStandardNewMacro(vtkMedDriver)
-
-vtkMedDriver::vtkMedDriver()
-{
-  this->MedFile = NULL;
-  this->OpenLevel = 0;
-  this->FileId = -1;
-}
-
-vtkMedDriver::~vtkMedDriver()
-{
-  if (this->OpenLevel > 0)
-    {
-    vtkWarningMacro("The file has not be closed before destructor.")
-    this->OpenLevel = 1;
-    this->Close();
-    }
-  this->SetMedFile(NULL);
-}
-
-int vtkMedDriver::RestrictedOpen()
-{
-  int res = 0;
-  if (this->MedFile == NULL || this->MedFile->GetFileName() == NULL)
-    {
-    vtkDebugMacro("Error : FileName has not been set ");
-    return -1;
-    }
-
-  if (this->OpenLevel <= 0)
-    {
-
-    med_bool hdfok;
-    med_bool medok;
-
-    med_err conforme = MEDfileCompatibility(this->MedFile->GetFileName(),
-                                            &hdfok, &medok);
-    if (!hdfok)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-          << " is not a HDF5 file, aborting.");
-      return -1;
-      }
-
-    if (!medok)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-          << " has not been written with the"
-          << " same version as the one currently used to read it, this may lead"
-          << " to errors. Please use the medimport tool.");
-      return -1;
-      }
-
-    if(conforme < 0)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-                    << " is not compatible, please import it to the new version using medimport.");
-      return -1;
-      }
-
-    this->FileId = MEDfileOpen(this->MedFile->GetFileName(), MED_ACC_RDONLY);
-    if (this->FileId < 0)
-      {
-      vtkDebugMacro("Error : unable to open file "
-                    << this->MedFile->GetFileName());
-      res = -2;
-      }
-    this->OpenLevel = 0;
-
-    } // OpenLevel
-  this->OpenLevel++;
-  this->ParallelFileId = -1;
-  return res;
-}
-
-int vtkMedDriver::Open()
-{
-  int res = 0;
-  if (this->MedFile == NULL || this->MedFile->GetFileName() == NULL)
-    {
-    vtkDebugMacro("Error : FileName has not been set ");
-    return -1;
-    }
-
-  if (this->OpenLevel <= 0)
-    {
-
-    med_bool hdfok;
-    med_bool medok;
-
-    med_err conforme = MEDfileCompatibility(this->MedFile->GetFileName(),
-                                            &hdfok, &medok);
-    if (!hdfok)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-          << " is not a HDF5 file, aborting.");
-      return -1;
-      }
-
-    if (!medok)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-          << " has not been written with the"
-          << " same version as the one currently used to read it, this may lead"
-          << " to errors. Please use the medimport tool.");
-      return -1;
-      }
-
-    if(conforme < 0)
-      {
-      vtkErrorMacro("The file " << this->MedFile->GetFileName()
-                    << " is not compatible, please import it to the new version using medimport.");
-      return -1;
-      }
-
-    this->FileId = MEDfileOpen(this->MedFile->GetFileName(), MED_ACC_RDONLY);
-    if (this->FileId < 0)
-      {
-      vtkDebugMacro("Error : unable to open file "
-                    << this->MedFile->GetFileName());
-      res = -2;
-      }
-    this->OpenLevel = 0;
-
-    this->ParallelFileId = -1;
-
-#ifdef MedReader_HAVE_PARALLEL_INFRASTRUCTURE
-    // the following code opens the file in parallel
-    vtkMultiProcessController* controller =
-        vtkMultiProcessController::GetGlobalController();
-    int lpID = 0;
-    if (controller == NULL)
-      {
-    return -3;
-      }
-    else
-      {
-      lpID = controller->GetLocalProcessId();
-      }
-
-    vtkMPICommunicator* commu = vtkMPICommunicator::SafeDownCast(
-                  controller->GetCommunicator() );
-    if (commu == NULL)
-      {
-      //vtkErrorMacro("Communicator is NULL in Open");
-      return -3;
-      }
-    MPI_Comm* mpi_com = NULL;
-    mpi_com = commu->GetMPIComm()->GetHandle();
-    if (mpi_com == NULL)
-      {
-      vtkErrorMacro("MPI communicator is NULL in Open");
-      return -3;
-      }
-
-    if (controller->GetNumberOfProcesses() > 1)
-      {
-      int major, minor, release;
-      if (MEDfileNumVersionRd(this->FileId, &major, &minor, &release) < 0)
-        {
-        vtkErrorMacro("Impossible to read the version of this file");
-        return -1;
-        }
-
-    if (major >= 3)
-      {
-        this->ParallelFileId = MEDparFileOpen(this->MedFile->GetFileName(),
-                            MED_ACC_RDONLY,
-                            *mpi_com,
-                            MPI_INFO_NULL);
-        }
-    else
-        {
-        vtkErrorMacro("Parallel access is not allowed in MED files prior to version 3");
-        return -1;
-        }
-      }
-
-    if (this->ParallelFileId < 0)
-      {
-      vtkDebugMacro("Error : unable to parallel-open file "
-                    << this->MedFile->GetFileName());
-      }
-#endif
-
-    } // OpenLevel
-  this->OpenLevel++;
-  return res;
-}
-
-void vtkMedDriver::Close()
-{
-  this->OpenLevel--;
-  if (this->OpenLevel == 0)
-    {
-    if (MEDfileClose(this->FileId) < 0)
-      {
-      vtkErrorMacro("Error: unable to close the current file.");
-      }
-    this->FileId = -1;
-
-    if (this->ParallelFileId != -1)
-    {
-      if (MEDfileClose(this->ParallelFileId) < 0)
-      {
-      vtkErrorMacro("Error: unable to parallel-close the current file.");
-      }
-    }
-    this->ParallelFileId = -1;
-    }
-}
-
-bool vtkMedDriver::CanReadFile()
-{
-  bool canRead = (this->RestrictedOpen() >= 0);
-  this->Close();
-  return canRead;
-}
-
-void vtkMedDriver::ReadFileVersion(int* major, int* minor, int* release)
-{
-  FileRestrictedOpen open(this);
-
-  med_int amajor, aminor, arelease;
-  if (MEDfileNumVersionRd(this->FileId, &amajor, &aminor, &arelease) < 0)
-    {
-    vtkErrorMacro("Impossible to read the version of this file");
-    return;
-    }
-  *major = amajor;
-  *minor = aminor;
-  *release = arelease;
-}
-
-void vtkMedDriver::ReadRegularGridInformation(vtkMedRegularGrid* grid)
-{
-  vtkErrorMacro("vtkMedDriver::ReadInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadCurvilinearGridInformation(vtkMedCurvilinearGrid* grid)
-{
-  vtkErrorMacro("vtkMedDriver::ReadInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadUnstructuredGridInformation(vtkMedUnstructuredGrid* grid)
-{
-  vtkErrorMacro("vtkMedDriver::ReadInformation not Implemented !");
-  return;
-}
-
-// Description:
-// load all Information data associated with this standard grid.
-void vtkMedDriver::ReadGridInformation(vtkMedGrid* grid)
-{
-  if(vtkMedRegularGrid::SafeDownCast(grid) != NULL)
-    {
-    this->ReadRegularGridInformation(vtkMedRegularGrid::SafeDownCast(grid));
-    }
-  if(vtkMedCurvilinearGrid::SafeDownCast(grid) != NULL)
-    {
-    this->ReadCurvilinearGridInformation(vtkMedCurvilinearGrid::SafeDownCast(grid));
-    }
-  if(vtkMedUnstructuredGrid::SafeDownCast(grid) != NULL)
-    {
-    this->ReadUnstructuredGridInformation(vtkMedUnstructuredGrid::SafeDownCast(grid));
-    }
-}
-
-void vtkMedDriver::ReadFamilyInformation(vtkMedMesh* mesh, vtkMedFamily* family)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFamilyInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadFileInformation(vtkMedFile* file)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFileInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadProfileInformation(vtkMedProfile* profile)
-{
-  vtkErrorMacro("vtkMedDriver::ReadProfileInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadFieldInformation(vtkMedField* field)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFieldInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadFieldOverEntityInformation(vtkMedFieldOverEntity* fieldOverEntity)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFieldOverEntityInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadMeshInformation(vtkMedMesh* mesh)
-{
-  vtkErrorMacro("vtkMedDriver::ReadMeshInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadLocalizationInformation(vtkMedLocalization* loc)
-{
-  vtkErrorMacro("vtkMedDriver::ReadLocalizationInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadInterpolationInformation(vtkMedInterpolation* interp)
-{
-  vtkErrorMacro("vtkMedDriver::ReadInterpolationInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadFieldStepInformation(vtkMedFieldStep* step, bool readAllEntityInfo)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFieldStepInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadFieldOnProfileInformation(vtkMedFieldOnProfile* fop)
-{
-  vtkErrorMacro("vtkMedDriver::ReadFieldOnProfileInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadStructElementInformation(
-    vtkMedStructElement*)
-{
-  vtkErrorMacro("vtkMedDriver::ReadStructElementInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadSupportMeshInformation(
-    vtkMedMesh*)
-{
-  vtkErrorMacro("vtkMedDriver::ReadSupportMeshInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadConstantAttributeInformation(vtkMedConstantAttribute*)
-{
-  vtkErrorMacro("vtkMedDriver::ReadConstantAttributeInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::ReadVariableAttributeInformation(vtkMedVariableAttribute*)
-{
-  vtkErrorMacro("vtkMedDriver::ReadVariableAttributeInformation not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadPointGlobalIds(vtkMedGrid* grid)
-{
-  vtkErrorMacro("vtkMedDriver::LoadPointGlobalIds not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadFamilyIds(vtkMedEntityArray* array)
-{
-  vtkErrorMacro("vtkMedDriver::LoadFamilyIds not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadCoordinates(vtkMedGrid* grid)
-{
-  vtkErrorMacro("vtkMedDriver::LoadCoordinates not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadProfile(vtkMedProfile* profile)
-{
-  vtkErrorMacro("vtkMedDriver::LoadProfile not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadConnectivity(vtkMedEntityArray* array)
-{
-  vtkErrorMacro("vtkMedDriver::LoadConnectivity not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadCellGlobalIds(vtkMedEntityArray* array)
-{
-  vtkErrorMacro("vtkMedDriver::LoadGlobalIds not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadField(vtkMedFieldOnProfile* foe, med_storage_mode mode)
-{
-  vtkErrorMacro("vtkMedDriver::LoadFieldOnProfile not Implemented !");
-  return;
-}
-
-void vtkMedDriver::LoadVariableAttribute(vtkMedVariableAttribute*,
-                                         vtkMedEntityArray*)
-{
-  vtkErrorMacro("vtkMedDriver::LoadVariableAttribute not Implemented !");
-  return;
-}
-
-void vtkMedDriver::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, OpenLevel);
-  PRINT_IVAR(os, indent, FileId);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedDriver.h b/src/Plugins/MedReader/IO/vtkMedDriver.h
deleted file mode 100644 (file)
index d02516a..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedDriver_h_
-#define __vtkMedDriver_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-
-class vtkMedFile;
-class vtkMedMesh;
-class vtkMedField;
-class vtkMedFamily;
-class vtkMedPolarGrid;
-class vtkMedRegularGrid;
-class vtkMedCurvilinearGrid;
-class vtkMedUnstructuredGrid;
-class vtkMedLocalization;
-class vtkMedProfile;
-class vtkMedFieldOverEntity;
-class vtkMedEntityArray;
-class vtkMedFieldStep;
-class vtkMedGrid;
-class vtkMedInterpolation;
-class vtkMedFieldOnProfile;
-class vtkMedStructElement;
-class vtkMedConstantAttribute;
-class vtkMedVariableAttribute;
-
-class VTK_EXPORT vtkMedDriver: public vtkObject
-{
-public:
-  static vtkMedDriver* New();
-  vtkTypeMacro(vtkMedDriver, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Set/Get the med file that use this driver
-  virtual void  SetMedFile(vtkMedFile*);
-  vtkGetObjectMacro(MedFile, vtkMedFile);
-
-  // Description :
-  // This gives the File ID to read in parallel.
-  vtkGetMacro(ParallelFileId, med_idt);
-
-  // Description:
-  // open the file for reading. Returns 0 on success, or error code.
-  virtual int RestrictedOpen();
-  virtual int Open();
-  virtual void Close();
-  virtual bool CanReadFile();
-
-  // Description:
-  // Get the Version numbers from the file
-  virtual void ReadFileVersion(int* major, int* minor, int* release);
-
-  // Description:
-  // load all meta data associated with this file.
-  virtual void ReadFileInformation(vtkMedFile*);
-
-  // Description:
-  // load all meta data associated with this mesh.
-  virtual void ReadMeshInformation(vtkMedMesh*);
-
-  // Description:
-  // load all meta data associated with this field.
-  virtual void ReadFieldInformation(vtkMedField*);
-
-  // Description:
-  // load all meta data associated with this regular (Cartesian or polar) grid.
-  virtual void ReadRegularGridInformation(vtkMedRegularGrid*);
-
-  // Description:
-  // load all meta data associated with this standard grid.
-  virtual void ReadCurvilinearGridInformation(vtkMedCurvilinearGrid*);
-
-  // Description:
-  // load all meta data associated with this unstructured grid.
-  virtual void ReadUnstructuredGridInformation(vtkMedUnstructuredGrid*);
-
-  // Description:
-  // load all meta data associated with this grid.
-  // (call one of the above method depending on the type of grid)
-  virtual void ReadGridInformation(vtkMedGrid*);
-
-  // Description:
-  // load all meta data associated with this family.
-  virtual void ReadFamilyInformation(vtkMedMesh*, vtkMedFamily*);
-
-  // Description:
-  // load all meta data associated with this family.
-  virtual void ReadProfileInformation(vtkMedProfile*);
-
-  // Description:
-  // load information on a field and a given cell type at a given step
-  virtual void ReadFieldOverEntityInformation(vtkMedFieldOverEntity*);
-
-  // Description:
-  // load information related to the given quadrature scheme definition
-  virtual void ReadLocalizationInformation(vtkMedLocalization*);
-
-  // Description:
-  // load all information associated witht this field step
-  virtual void ReadFieldStepInformation(vtkMedFieldStep*, bool readAllEntityInfo);
-
-  // Description:
-  // load all information related to this interpolation function
-  virtual void ReadInterpolationInformation(vtkMedInterpolation*);
-
-  // Description:
-  // load all information related to this field on this profile
-  virtual void ReadFieldOnProfileInformation(vtkMedFieldOnProfile*);
-
-  // Description:
-  // read all information related to the structural elements models
-  // in this file
-  virtual void ReadStructElementInformation(vtkMedStructElement*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadSupportMeshInformation(vtkMedMesh*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadConstantAttributeInformation(vtkMedConstantAttribute*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadVariableAttributeInformation(vtkMedVariableAttribute*);
-
-  // Description:
-  // load the field on this profile
-  virtual void LoadField(vtkMedFieldOnProfile* fop, med_storage_mode mode);
-
-  // Description:
-  // Load the indices of the profile
-  virtual void LoadProfile(vtkMedProfile* profile);
-
-  // Description:
-  // Load the values of the given step
-//  void Load(vtkMedFieldOnProfile*);
-
-  virtual void LoadFamilyIds(vtkMedEntityArray*);
-
-  virtual void LoadCoordinates(vtkMedGrid*);
-
-  virtual void LoadPointGlobalIds(vtkMedGrid*);
-
-  //virtual void LoadPointFamilyIds(vtkMedGrid*);
-
-  virtual void LoadConnectivity(vtkMedEntityArray*);
-
-  virtual void LoadCellGlobalIds(vtkMedEntityArray*);
-
-  virtual void  LoadVariableAttribute(vtkMedVariableAttribute*,
-                                      vtkMedEntityArray*);
-
-  //BTX
-  class FileOpen
-  {
-  public:
-    FileOpen(vtkMedDriver* driver)
-    {
-      this->Driver = driver;
-      this->Driver->Open();
-    }
-    ~FileOpen()
-    {
-      this->Driver->Close();
-    }
-  protected:
-    vtkMedDriver* Driver;
-    vtkMedFile* File;
-  };
-  //ETX
-
-  //BTX
-  class FileRestrictedOpen
-  {
-  public:
-    FileRestrictedOpen(vtkMedDriver* driver)
-    {
-      this->Driver = driver;
-      this->Driver->RestrictedOpen();
-    }
-    ~FileRestrictedOpen()
-    {
-      this->Driver->Close();
-    }
-  protected:
-    vtkMedDriver* Driver;
-    vtkMedFile* File;
-  };
-  //ETX
-
-protected:
-  vtkMedDriver();
-  ~vtkMedDriver();
-
-  // name of the file to read from
-  vtkMedFile * MedFile;
-
-  int OpenLevel;
-
-  med_idt FileId;
-  med_idt ParallelFileId;
-
-private:
-  vtkMedDriver(const vtkMedDriver&); // Not implemented.
-  void operator=(const vtkMedDriver&); // Not implemented.
-};
-
-#endif //__vtkMedDriver_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedDriver30.cxx b/src/Plugins/MedReader/IO/vtkMedDriver30.cxx
deleted file mode 100644 (file)
index 924cc85..0000000
+++ /dev/null
@@ -1,2407 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedDriver30.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkStringArray.h"
-#include "vtkDataArray.h"
-#include "vtkIdTypeArray.h"
-#include "vtkDoubleArray.h"
-#include "vtkIntArray.h"
-#include "vtkCharArray.h"
-
-#include "vtkMedFile.h"
-#include "vtkMedCartesianGrid.h"
-#include "vtkMedPolarGrid.h"
-#include "vtkMedCurvilinearGrid.h"
-#include "vtkMedUnstructuredGrid.h"
-#include "vtkMedField.h"
-#include "vtkMedMesh.h"
-#include "vtkMedFamily.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedLocalization.h"
-#include "vtkMedProfile.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedGroup.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedInterpolation.h"
-#include "vtkMedFieldOnProfile.h"
-#include "vtkMedFraction.h"
-#include "vtkMedLink.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedConstantAttribute.h"
-#include "vtkMedVariableAttribute.h"
-
-#include "vtkMultiProcessController.h"
-
-#include <string>
-#include <vector>
-#include <algorithm>
-using namespace std;
-
-// vtkCxxRevisionMacro(vtkMedDriver30, "$Revision$")
-vtkStandardNewMacro(vtkMedDriver30)
-
-vtkMedDriver30::vtkMedDriver30() : vtkMedDriver()
-{
-}
-
-vtkMedDriver30::~vtkMedDriver30()
-{
-}
-
-// Description:
-// load all Information data associated with this cartesian grid.
-void vtkMedDriver30::ReadRegularGridInformation(vtkMedRegularGrid* grid)
-{
-  FileOpen open(this);
-
-  grid->SetDimension(grid->GetParentMesh()->GetNumberOfAxis());
-
-  for(int axis=0; axis < grid->GetDimension(); axis++)
-    {
-    med_int size;
-    med_bool coordinatechangement, geotransformation;
-
-    if ((size = MEDmeshnEntity(
-                  this->FileId,
-                  grid->GetParentMesh()->GetName(),
-                  grid->GetComputeStep().TimeIt,
-                  grid->GetComputeStep().IterationIt,
-                  MED_NODE,
-                  MED_NONE,
-                  (med_data_type)(MED_COORDINATE_AXIS1 + axis),
-                  MED_NO_CMODE,
-                  &coordinatechangement,
-                  &geotransformation)) < 0)
-      {
-      vtkErrorMacro("ERROR : number of coordinates on X axis ...");
-      }
-
-    grid->SetAxisSize(axis, size);
-    }
-
-  med_int ncell = 1;
-  if(grid->GetAxisSize(0) > 1)
-    ncell *= grid->GetAxisSize(0)-1;
-  if(grid->GetAxisSize(1) > 1)
-    ncell *= grid->GetAxisSize(1)-1;
-  if(grid->GetAxisSize(2) > 1)
-    ncell *= grid->GetAxisSize(2)-1;
-
-  vtkMedEntity entity;
-  entity.EntityType = MED_CELL;
-
-  switch(grid->GetDimension())
-    {
-    case 0 :
-      entity.GeometryType = MED_POINT1;
-      break;
-    case 1 :
-      entity.GeometryType = MED_SEG2;
-      break;
-    case 2 :
-      entity.GeometryType = MED_QUAD4;
-      break;
-    case 3 :
-      entity.GeometryType = MED_HEXA8;
-      break;
-    default :
-        vtkErrorMacro("Unsupported dimension for curvilinear grid : "
-                      << grid->GetDimension());
-    return;
-    }
-
-  vtkMedEntityArray* array = vtkMedEntityArray::New();
-  array->SetParentGrid(grid);
-  array->SetNumberOfEntity(ncell);
-  array->SetEntity(entity);
-  array->SetConnectivity(MED_NODAL);
-  grid->AppendEntityArray(array);
-  array->Delete();
-  // this triggers the creation of undefined families
-  this->LoadFamilyIds(array);
-
-}
-
-void  vtkMedDriver30::LoadRegularGridCoordinates(vtkMedRegularGrid* grid)
-{
-  FileOpen open(this);
-
-  for(int axis=0; axis < grid->GetParentMesh()->GetNumberOfAxis(); axis++)
-    {
-
-    vtkDataArray* coords = vtkMedUtilities::NewCoordArray();
-    grid->SetAxisCoordinate(axis, coords);
-    coords->Delete();
-
-    coords->SetNumberOfComponents(1);
-    coords->SetNumberOfTuples(grid->GetAxisSize(axis));
-
-    if (MEDmeshGridIndexCoordinateRd(
-          this->FileId,
-          grid->GetParentMesh()->GetName(),
-          grid->GetComputeStep().TimeIt,
-          grid->GetComputeStep().IterationIt,
-          axis+1,
-          (med_float*)coords->GetVoidPointer(0)) < 0)
-      {
-      vtkErrorMacro("ERROR : read axis " << axis << " coordinates ...");
-      grid->SetAxisCoordinate(axis, NULL);
-      return;
-      }
-    }
-
-}
-
-// Description:
-// load all Information data associated with this standard grid.
-void vtkMedDriver30::ReadCurvilinearGridInformation(vtkMedCurvilinearGrid* grid)
-{
-  FileOpen open(this);
-
-  grid->SetDimension(grid->GetParentMesh()->GetNumberOfAxis());
-
-  med_int size;
-  med_bool coordinatechangement, geotransformation;
-
-  if ((size = MEDmeshnEntity(
-                this->FileId,
-                grid->GetParentMesh()->GetName(),
-                grid->GetComputeStep().TimeIt,
-                grid->GetComputeStep().IterationIt,
-                MED_NODE,
-                MED_NONE,
-                MED_COORDINATE,
-                MED_NO_CMODE,
-                &coordinatechangement,
-                &geotransformation)) < 0)
-    {
-    vtkErrorMacro("ReadCurvilinearGridInformation MEDmeshnEntity");
-    }
-
-  grid->SetNumberOfPoints(size);
-
-  med_int axissize[3];
-
-  if(MEDmeshGridStructRd(
-      this->FileId,
-      grid->GetParentMesh()->GetName(),
-      grid->GetComputeStep().TimeIt,
-      grid->GetComputeStep().IterationIt,
-      axissize) < 0)
-    {
-    vtkErrorMacro("ReadCurvilinearGridInformation MEDmeshGridStructRd");
-    }
-
-  switch(grid->GetDimension())
-    {
-    case 0 :
-      break;
-    case 1 :
-      grid->SetAxisSize(0, (axissize[0] <= 0 ? 1: axissize[0]));
-      break;
-    case 2 :
-      grid->SetAxisSize(0, (axissize[0] <= 0 ? 1: axissize[0]));
-      grid->SetAxisSize(1, (axissize[1] <= 0 ? 1: axissize[1]));
-      break;
-    case 3 :
-      grid->SetAxisSize(0, (axissize[0] <= 0 ? 1: axissize[0]));
-      grid->SetAxisSize(1, (axissize[1] <= 0 ? 1: axissize[1]));
-      grid->SetAxisSize(2, (axissize[2] <= 0 ? 1: axissize[2]));
-      break;
-    default :
-        vtkErrorMacro("Unsupported dimension for curvilinear grid : "
-                      << grid->GetDimension());
-    return;
-    }
-
-  // A test to verify the number of points : total number of
-  // points should be equal to the product of each axis size
-  med_int size2 = 0;
-
-  if (grid->GetDimension() == 1)
-    {
-    size2 = grid->GetAxisSize(0);
-    }
-
-  if (grid->GetDimension() == 2)
-    {
-    size2 = grid->GetAxisSize(0)*grid->GetAxisSize(1);
-    }
-
-  if (grid->GetDimension() == 3)
-    {
-    size2 = grid->GetAxisSize(0)*grid->GetAxisSize(1)*grid->GetAxisSize(2);
-    }
-
-  if(size != size2)
-    {
-    vtkErrorMacro("The total number of points of a Curvilinear grid should "
-                  << "be the product of each axis size!");
-    }
-
-  med_int ncell = 1;
-  if ((grid->GetDimension() >= 1) && (grid->GetAxisSize(0) > 1))
-    ncell *= grid->GetAxisSize(0)-1;
-  if ((grid->GetDimension() >= 2) && (grid->GetAxisSize(1) > 1))
-    ncell *= grid->GetAxisSize(1)-1;
-  if ((grid->GetDimension() >= 3) && (grid->GetAxisSize(2) > 1))
-    ncell *= grid->GetAxisSize(2)-1;
-
-  vtkMedEntity entity;
-  entity.EntityType = MED_CELL;
-
-  switch(grid->GetDimension())
-    {
-    case 0 :
-      entity.GeometryType = MED_POINT1;
-      break;
-    case 1 :
-      entity.GeometryType = MED_SEG2;
-      break;
-    case 2 :
-      entity.GeometryType = MED_QUAD4;
-      break;
-    case 3 :
-      entity.GeometryType = MED_HEXA8;
-      break;
-    default :
-        vtkErrorMacro("Unsupported dimension for curvilinear grid : "
-                      << grid->GetDimension());
-    return;
-    }
-
-  vtkMedEntityArray* array = vtkMedEntityArray::New();
-  array->SetParentGrid(grid);
-  array->SetNumberOfEntity(ncell);
-  array->SetEntity(entity);
-  array->SetConnectivity(MED_NODAL);
-  grid->AppendEntityArray(array);
-  array->Delete();
-  // this triggers the creation of undefined families
-  this->LoadFamilyIds(array);
-}
-
-// Description : read the number of entity of all geometry type
-// for a given entity type and a given connectivity mode
-void vtkMedDriver30::ReadNumberOfEntity(
-    vtkMedUnstructuredGrid* grid,
-    med_entity_type entityType,
-    med_connectivity_mode connectivity)
-{
-  FileOpen open(this);
-
-  med_bool changement, transformation;
-
-  const char* meshName = grid->GetParentMesh()->GetName();
-
-  const vtkMedComputeStep& cs = grid->GetComputeStep();
-
-  med_int nentity = MEDmeshnEntity(
-                        this->FileId,
-                        meshName,
-                        cs.TimeIt,
-                        cs.IterationIt,
-                        entityType,
-                        MED_GEO_ALL,
-                        MED_UNDEF_DATATYPE ,
-                        connectivity,
-                        &changement,
-                        &transformation );
-
-  for(med_int geotypeit = 1; geotypeit <= nentity; geotypeit++)
-    {
-    // read cell informations
-    vtkMedEntity entity;
-    entity.EntityType = entityType;
-
-    char geometryName[MED_NAME_SIZE+1] = "";
-
-    // this gives us the med_geometry_type
-    if( MEDmeshEntityInfo( FileId, meshName,
-                           cs.TimeIt,
-                           cs.IterationIt,
-                           entityType,
-                           geotypeit,
-                           geometryName,
-                           &entity.GeometryType) < 0)
-      {
-      vtkErrorMacro("MEDmeshEntityInfo");
-      continue;
-      }
-
-    entity.GeometryName = geometryName;
-    med_int ncell = 0;
-
-    if(entity.GeometryType == MED_POLYGON)
-      {
-      // read the number of cells of this type
-      ncell = MEDmeshnEntity(this->FileId,
-                             meshName,
-                             cs.TimeIt,
-                             cs.IterationIt,
-                             entity.EntityType,
-                             entity.GeometryType,
-                             MED_INDEX_NODE,
-                             connectivity,
-                             &changement,
-                             &transformation ) - 1;
-      }
-    else if(entity.GeometryType == MED_POLYHEDRON)
-      {
-      // read the number of cells of this type
-      ncell = MEDmeshnEntity(this->FileId,
-                             meshName,
-                             cs.TimeIt,
-                             cs.IterationIt,
-                             entity.EntityType,
-                             entity.GeometryType,
-                             MED_INDEX_FACE,
-                             connectivity,
-                             &changement,
-                             &transformation  ) - 1;
-      }
-    else
-      {
-      ncell = MEDmeshnEntity(this->FileId,
-                             meshName,
-                             cs.TimeIt,
-                             cs.IterationIt,
-                             entity.EntityType,
-                             entity.GeometryType,
-                             MED_CONNECTIVITY,
-                             connectivity,
-                             &changement,
-                             &transformation  );
-      }
-
-    if(ncell > 0)
-      {
-      vtkMedEntityArray* array = vtkMedEntityArray::New();
-      array->SetParentGrid(grid);
-      array->SetNumberOfEntity(ncell);
-      array->SetEntity(entity);
-      array->SetConnectivity(connectivity);
-      grid->AppendEntityArray(array);
-      array->Delete();
-      // this triggers the creation of undefined families
-      this->LoadFamilyIds(array);
-      }
-    }
-}
-
-// Description:
-// load all Information data associated with this unstructured grid.
-void vtkMedDriver30::ReadUnstructuredGridInformation(
-    vtkMedUnstructuredGrid* grid)
-{
-  FileOpen open(this);
-
-  vtkMedMesh *mesh = grid->GetParentMesh();
-
-  const char *meshName = mesh->GetName();
-  med_connectivity_mode connectivity;
-
-  med_bool changement;
-  med_bool transformation;
-  med_int profilesize;
-
-  char profilename[MED_NAME_SIZE+1];
-  memset(profilename, '\0', MED_NAME_SIZE+1);
-
-  vtkMedComputeStep cs = grid->GetComputeStep();
-
-  // first check if we have points
-  vtkIdType npoints = MEDmeshnEntityWithProfile(
-                        this->FileId,
-                        meshName,
-                        cs.TimeIt,
-                        cs.IterationIt,
-                        MED_NODE,
-                        MED_NONE,
-                        MED_COORDINATE,
-                        MED_NODAL,
-                        MED_COMPACT_PFLMODE,
-                        profilename,
-                        &profilesize,
-                        &changement,
-                        &transformation);
-
-  if(npoints > 0)
-    {
-    grid->SetNumberOfPoints(npoints);
-    }
-  else
-    {
-    if(grid->GetPreviousGrid() == NULL)
-      {
-      vtkErrorMacro("No point and no previous grid");
-      }
-    grid->SetUsePreviousCoordinates(true);
-    grid->SetNumberOfPoints(grid->GetPreviousGrid()->GetNumberOfPoints());
-    return;
-    }
-
-  this->ReadNumberOfEntity(grid, MED_CELL, MED_NODAL);
-  //this->ReadNumberOfEntity(grid, MED_CELL, MED_DESCENDING);  // VSR: 29.11.2013: commented according to the issue 22327: descending connectivity is wrongly processed
-  this->ReadNumberOfEntity(grid, MED_DESCENDING_FACE, MED_NODAL);
-  this->ReadNumberOfEntity(grid, MED_DESCENDING_FACE, MED_DESCENDING);
-  this->ReadNumberOfEntity(grid, MED_DESCENDING_EDGE, MED_NODAL);
-  this->ReadNumberOfEntity(grid, MED_DESCENDING_EDGE, MED_DESCENDING);
-  this->ReadNumberOfEntity(grid, MED_STRUCT_ELEMENT, MED_NODAL);
-  this->ReadNumberOfEntity(grid, MED_STRUCT_ELEMENT, MED_DESCENDING);
-
-  // create the point vtkMedEntityArray support
-  vtkMedEntity entity;
-  entity.EntityType = MED_NODE;
-  entity.GeometryType = MED_POINT1;
-  vtkMedEntityArray* pea = vtkMedEntityArray::New();
-  pea->SetEntity(entity);
-  pea->SetParentGrid(grid);
-  pea->SetNumberOfEntity(grid->GetNumberOfPoints());
-  grid->AppendEntityArray(pea);
-  pea->Delete();
-
-  this->LoadFamilyIds(pea);
-}
-
-void vtkMedDriver30::ReadFamilyInformation(vtkMedMesh* mesh, vtkMedFamily* family)
-{
-  FileOpen open(this);
-
-  med_int familyid;
-  med_int ngroup;
-  char* groupNames = NULL;
-  const  char* meshName = mesh->GetName();
-
-  ngroup = MEDnFamilyGroup(FileId, meshName, family->GetMedIterator());
-
-  bool has_no_group = false;
-  if(ngroup <= 0)
-    {
-    if(ngroup < 0)
-      {
-      vtkErrorMacro("Error while reading the number of groups");
-      }
-    ngroup = 1;
-    has_no_group = true;
-    }
-
-  groupNames = new char[ngroup * MED_LNAME_SIZE + 1];
-  memset(groupNames, '\0', ngroup * MED_LNAME_SIZE + 1);
-
-  // special case for files written by med < 3,
-  // I have to use the 23 interface
-  if(mesh->GetParentFile()->GetVersionMajor() < 3)
-    {
-    med_int *attributenumber = NULL;
-    med_int *attributevalue = NULL;
-    char *attributedes = NULL;
-
-    med_int nattr = MEDnFamily23Attribute(
-                      this->FileId,
-                      meshName,
-                      family->GetMedIterator());
-
-    if(nattr < 0)
-      {
-      vtkErrorMacro("MEDnFamily23Attribute");
-      }
-
-    if(nattr > 0)
-      {
-      attributenumber = new med_int[nattr];
-      attributevalue = new med_int[nattr];
-      attributedes = new char[nattr*MED_COMMENT_SIZE+1];
-      memset(attributedes, '\0', nattr*MED_COMMENT_SIZE+1);
-      }
-
-    char familyName[MED_NAME_SIZE+1] = "";
-
-    if(MEDfamily23Info (this->FileId,
-                        meshName,
-                        family->GetMedIterator(),
-                        familyName,
-                        attributenumber,
-                        attributevalue,
-                        attributedes,
-                        &familyid,
-                        groupNames ) < 0)
-      {
-      vtkDebugMacro("MEDfamily23Info");
-      }
-
-    family->SetName(familyName);
-
-    if(attributenumber != NULL)
-      delete[] attributenumber;
-    if(attributevalue != NULL)
-      delete[] attributevalue;
-    if(attributedes != NULL)
-      delete[] attributedes;
-    }
-  else
-    {
-    char familyName[MED_NAME_SIZE+1] = "";
-    if(MEDfamilyInfo( this->FileId,
-                      meshName,
-                      family->GetMedIterator(),
-                      familyName,
-                      &familyid,
-                      groupNames ) < 0)
-      {
-      vtkErrorMacro(
-          "vtkMedDriver30::ReadInformation(vtkMedFamily* family)"
-          << " cannot read family informations.");
-      return;
-      }
-    family->SetName(familyName);
-    }
-
-  family->SetId(familyid);
-
-  // Fix for the issue "0021721: [CEA 590] Invalid groups on cells
-  if( familyid == 0 ) {
-    family->SetPointOrCell( vtkMedUtilities::OnCell );
-    mesh->AppendCellFamily( family );
-  } else {
-    //rnv: improve algorithm to determine entity of the family:
-    //     1) Read Nb nodes
-    //     2) Read families of the nodes
-    //     3) If list of the families of the nodes contains familyid => vtkMedUtilities::OnPoint
-    //     otherwise => vtkMedUtilities::OnCell
-    med_bool  v1, v2;
-    med_int size = MEDmeshnEntity(
-                                 this->FileId,
-                                 meshName,
-                                 MED_NO_DT,
-                                 MED_NO_IT,
-                                 MED_NODE,
-                                 MED_NO_GEOTYPE,
-                                 MED_COORDINATE,
-                                 MED_NO_CMODE,
-                                 &v1,
-                                 &v2 );
-    if( size < 0 ) {
-      vtkErrorMacro( "vtkMedDriver30::ReadInformation(vtkMedFamily* family)"
-                    <<" cannot read nb Nodes" );
-      return;
-    }
-    
-    vector<med_int> n_fams;
-    n_fams.resize( size );
-    
-    med_int ret_val = MEDmeshEntityFamilyNumberRd( this->FileId,
-                                                   meshName,
-                                                   MED_NO_DT,
-                                                   MED_NO_IT,
-                                                   MED_NODE,
-                                                   MED_NO_GEOTYPE ,
-                                                   &n_fams[0] );
-    // Remove ZERO FAMILY
-    remove( n_fams.begin(),n_fams.end(), 0 );
-
-    bool isOnPoints = ( ret_val >= 0) && (find( n_fams.begin(), n_fams.end(), familyid ) != n_fams.end() );
-    if( isOnPoints ) {
-      family->SetPointOrCell(vtkMedUtilities::OnPoint);
-      mesh->AppendPointFamily(family);
-    } else {
-      family->SetPointOrCell(vtkMedUtilities::OnCell);       
-      mesh->AppendCellFamily(family);  
-    }
-  }
-  
-  family->AllocateNumberOfGroup(ngroup);
-  // if there where no group, set the name to the default value
-  if(has_no_group)
-    {
-    memcpy(groupNames, vtkMedUtilities::NoGroupName,
-           strlen(vtkMedUtilities::NoGroupName));
-    }
-
-  for(int index = 0; index < ngroup; index++)
-    {
-    char realGroupName[MED_LNAME_SIZE + 1];
-    memset(realGroupName, '\0', MED_LNAME_SIZE + 1);
-    memcpy(realGroupName, groupNames + index * MED_LNAME_SIZE,
-        MED_LNAME_SIZE * sizeof(char));
-    vtkMedGroup* group = mesh->GetOrCreateGroup(family->GetPointOrCell(),
-        realGroupName);
-
-    family->SetGroup(index, group);
-    }
-
-  delete[] groupNames;
-
-  if(familyid == 0)
-    {
-    vtkMedFamily* famzero = vtkMedFamily::New();
-    mesh->AppendPointFamily(famzero);
-    famzero->Delete();
-
-    famzero->SetName(family->GetName());
-    famzero->SetMedIterator(family->GetMedIterator());
-    famzero->SetId(family->GetId());
-    famzero->SetPointOrCell(vtkMedUtilities::OnPoint);
-    famzero->AllocateNumberOfGroup(family->GetNumberOfGroup());
-    for(int gid=0; gid<family->GetNumberOfGroup(); gid++)
-      {
-      vtkMedGroup* group = mesh->GetOrCreateGroup(
-          vtkMedUtilities::OnPoint,
-          family->GetGroup(gid)->GetName());
-      famzero->SetGroup(gid, group);
-      mesh->AppendPointGroup(group);
-      }
-    }
-}
-
-void  vtkMedDriver30::ReadLinkInformation(vtkMedLink* link)
-{
-  med_int size;
-  char linkMeshName[MED_NAME_SIZE+1] = "";
-  if(MEDlinkInfo(this->FileId,
-                 link->GetMedIterator(),
-                 linkMeshName,
-                 &size) < 0)
-    {
-    vtkErrorMacro("MEDlinkInfo");
-    return;
-    }
-  link->SetMeshName(linkMeshName);
-  if(size <= 0)
-    return;
-
-  char* path = new char[size + 1];
-  memset(path, '\0', size+1);
-  if(MEDlinkRd(this->FileId, link->GetMeshName(), path) < 0)
-    {
-    vtkErrorMacro("MEDlinkRd");
-    memset(path, '\0', size+1);
-    }
-
-  link->SetLink(path);
-
-  delete[] path;
-}
-
-void vtkMedDriver30::ReadFileInformation(vtkMedFile* file)
-{
-  FileOpen open(this);
-
-  char comment[MED_COMMENT_SIZE+1] = "";
-
-  MEDfileCommentRd(this->FileId,
-                  comment);
-
-  file->SetComment(comment);
-
-  med_int major, minor, release;
-  MEDfileNumVersionRd(this->FileId, &major, &minor, &release);
-  file->SetVersionMajor(major);
-  file->SetVersionMinor(minor);
-  file->SetVersionRelease(release);
-
-  int nlink = MEDnLink(this->FileId);
-  file->AllocateNumberOfLink(nlink);
-  for(int linkid=0; linkid<nlink; linkid++)
-    {
-    vtkMedLink* link = file->GetLink(linkid);
-    link->SetMedIterator(linkid+1);
-    this->ReadLinkInformation(link);
-    }
-
-  int nprof = MEDnProfile(FileId);
-  // Reading id s not possible in parallel if the file contains Profiles
-  vtkMultiProcessController* controller = vtkMultiProcessController::GetGlobalController();
-  if (controller != NULL)
-    if ((nprof != 0) && (controller->GetNumberOfProcesses() > 1))
-    {
-      vtkWarningMacro("ATTENTION: The MED Reader cannot read profiles when used in parallel");
-    return;
-    }
-  file->AllocateNumberOfProfile(nprof);
-  for(int i = 0; i < nprof; i++)
-    {
-    vtkMedProfile* profile = file->GetProfile(i);
-    profile->SetMedIterator(i + 1);
-    profile->SetParentFile(file);
-    this->ReadProfileInformation(profile);
-    }
-
-  int nloc = MEDnLocalization(this->FileId);
-  file->AllocateNumberOfLocalization(nloc);
-  for(int i = 0; i < nloc; i++)
-    {
-    vtkMedLocalization* loc = file->GetLocalization(i);
-    loc->SetMedIterator(i + 1);
-    loc->SetParentFile(file);
-    this->ReadLocalizationInformation(loc);
-    }
-
-  int nsupportmesh = MEDnSupportMesh(this->FileId);
-  file->AllocateNumberOfSupportMesh(nsupportmesh);
-  for(int i = 0; i < nsupportmesh; i++)
-    {
-    vtkMedMesh* supportmesh = file->GetSupportMesh(i);
-    supportmesh->SetMedIterator(i + 1);
-    supportmesh->SetParentFile(file);
-    this->ReadSupportMeshInformation(supportmesh);
-    }
-
-  int nmesh = MEDnMesh(this->FileId);
-  file->AllocateNumberOfMesh(nmesh);
-  for(int i = 0; i < nmesh; i++)
-    {
-    vtkMedMesh* mesh = file->GetMesh(i);
-    mesh->SetMedIterator(i + 1);
-    mesh->SetParentFile(file);
-    this->ReadMeshInformation(mesh);
-    }
-
-  int nfields = MEDnField(this->FileId);
-  file->AllocateNumberOfField(nfields);
-  for(int i = 0; i < nfields; i++)
-    {
-    vtkMedField* field = file->GetField(i);
-    field->SetMedIterator(i + 1);
-    field->SetParentFile(file);
-    this->ReadFieldInformation(field);
-    field->ComputeFieldType();
-    while(field->HasManyFieldTypes())
-      {
-      vtkMedField* newfield = vtkMedField::New();
-      int type = field->GetFirstType();
-      newfield->ExtractFieldType(field, type);
-      file->AppendField(newfield);
-      newfield->Delete();
-      }
-    }
-
-  int nstruct = MEDnStructElement(this->FileId);
-
-  file->AllocateNumberOfStructElement(nstruct);
-  for(int i = 0; i < nstruct; i++)
-    {
-    vtkMedStructElement* structelem = file->GetStructElement(i);
-    structelem->SetMedIterator(i+1);
-    structelem->SetParentFile(file);
-    this->ReadStructElementInformation(structelem);
-    }
-
-}
-
-void  vtkMedDriver30::ReadStructElementInformation(
-    vtkMedStructElement* structelem)
-{
-
-  FileOpen open(this);
-
-  char modelname[MED_NAME_SIZE+1] = "";
-  med_geometry_type mgeotype;
-  med_int modeldim;
-  char supportmeshname[MED_NAME_SIZE+1] = "";
-  med_entity_type sentitytype;
-  med_int snbofnode;
-  med_int snbofcell;
-  med_geometry_type sgeotype;
-  med_int nbofconstantattribute;
-  med_bool anyprofile;
-  med_int nbofvariableattribute;
-
-  if(MEDstructElementInfo (this->FileId,
-                           structelem->GetMedIterator(),
-                           modelname,
-                           &mgeotype,
-                           &modeldim,
-                           supportmeshname,
-                           &sentitytype,
-                           &snbofnode,
-                           &snbofcell,
-                           &sgeotype,
-                           &nbofconstantattribute,
-                           &anyprofile,
-                           &nbofvariableattribute) < 0)
-    {
-    vtkErrorMacro("Error in MEDstructElementInfo");
-    return;
-    }
-  structelem->SetName(modelname);
-  structelem->SetGeometryType(mgeotype);
-  structelem->SetModelDimension(modeldim);
-  structelem->SetSupportMeshName(supportmeshname);
-  structelem->SetSupportEntityType(sentitytype);
-  structelem->SetSupportNumberOfNode(snbofnode);
-  structelem->SetSupportNumberOfCell(snbofcell);
-  structelem->SetSupportGeometryType(sgeotype);
-  structelem->AllocateNumberOfConstantAttribute(nbofconstantattribute);
-  structelem->AllocateNumberOfVariableAttribute(nbofvariableattribute);
-  structelem->SetAnyProfile(anyprofile);
-
-  for(int attit = 0; attit < nbofconstantattribute; attit ++)
-    {
-    vtkMedConstantAttribute* constatt = structelem->GetConstantAttribute(attit);
-    constatt->SetMedIterator(attit+1);
-    constatt->SetParentStructElement(structelem);
-    this->ReadConstantAttributeInformation(constatt);
-    }
-
-  for(int attit = 0; attit < nbofvariableattribute; attit ++)
-    {
-    vtkMedVariableAttribute* varatt = structelem->GetVariableAttribute(attit);
-    varatt->SetMedIterator(attit+1);
-    varatt->SetParentStructElement(structelem);
-    this->ReadVariableAttributeInformation(varatt);
-    }
-}
-
-void vtkMedDriver30::ReadConstantAttributeInformation(
-    vtkMedConstantAttribute* constAttr)
-{
-
-  FileOpen open(this);
-
-  char constattname[MED_NAME_SIZE+1] = "";
-  med_attribute_type constatttype;
-  med_int nbofcomponent;
-  med_entity_type sentitytype;
-  char profilename[MED_NAME_SIZE+1] = "";
-  med_int profilesize;
-
-  if(MEDstructElementConstAttInfo(
-      this->FileId,
-      constAttr->GetParentStructElement()->GetName(),
-      constAttr->GetMedIterator(),
-      constattname,
-      &constatttype,
-      &nbofcomponent,
-      &sentitytype,
-      profilename,
-      &profilesize)   < 0)
-    {
-    vtkErrorMacro("MEDstructElementConstAttInfo error");
-    return;
-    }
-
-  constAttr->SetName(constattname);
-  constAttr->SetAttributeType(constatttype);
-  constAttr->SetNumberOfComponent(nbofcomponent);
-  constAttr->SetSupportEntityType(sentitytype);
-  constAttr->SetProfileName(profilename);
-  constAttr->SetProfileSize(profilesize);
-
-  vtkAbstractArray* values = vtkMedUtilities::NewArray(constatttype);
-  if(values == NULL)
-    return;
-  constAttr->SetValues(values);
-  values->Delete();
-
-  values->SetNumberOfComponents(nbofcomponent);
-  vtkIdType ntuple = 0;
-  if((strcmp(profilename, MED_NO_PROFILE) != 0) &&
-     (strcmp(profilename, "\0") != 0))
-    {
-    ntuple = profilesize;
-    }
-  else if(constAttr->GetSupportEntityType() == MED_CELL)
-    {
-    ntuple = constAttr->GetParentStructElement()->GetSupportNumberOfCell();
-    }
-  else
-    {
-    ntuple = constAttr->GetParentStructElement()->GetSupportNumberOfNode();
-    }
-  values->SetNumberOfTuples(ntuple);
-
-  void* ptr = NULL;
-  vtkSmartPointer<vtkCharArray> buffer = vtkSmartPointer<vtkCharArray>::New();
-  if(constatttype != MED_ATT_NAME)
-    {
-    ptr = values->GetVoidPointer(0);
-    }
-  else
-    {
-    buffer->SetNumberOfValues(MED_NAME_SIZE*nbofcomponent*ntuple);
-    ptr = buffer->GetVoidPointer(0);
-    }
-
-  if(MEDstructElementConstAttRd (this->FileId,
-        constAttr->GetParentStructElement()->GetName(),
-        constAttr->GetName(), ptr) < 0)
-    {
-    vtkErrorMacro("MEDstructElementConstAttRd");
-    return;
-    }
-
-  if(constatttype == MED_ATT_NAME)
-    {
-    char name[MED_NAME_SIZE+1] = "";
-    char* nameptr = (char*) ptr;
-    vtkStringArray* names = vtkStringArray::SafeDownCast(values);
-    for(vtkIdType id = 0; id < nbofcomponent*ntuple; id++)
-      {
-      memset(name, '\0', MED_NAME_SIZE+1);
-      strncpy(name, nameptr + id * MED_NAME_SIZE, MED_NAME_SIZE);
-      names->SetValue(id, name);
-      }
-    }
-
-  return;
-}
-
-void vtkMedDriver30::ReadVariableAttributeInformation(
-    vtkMedVariableAttribute* varAttr)
-{
-
-  FileOpen open(this);
-
-  char varattname[MED_NAME_SIZE+1] = "";
-  med_attribute_type varatttype;
-  med_int nbofcomponent;
-
-  if(MEDstructElementVarAttInfo (
-      this->FileId,
-      varAttr->GetParentStructElement()->GetName(),
-      varAttr->GetMedIterator(),
-      varattname,
-      &varatttype,
-      &nbofcomponent) < 0)
-    {
-    vtkErrorMacro("MEDstructElementVarAttInfo");
-    return;
-    }
-
-  varAttr->SetName(varattname);
-  varAttr->SetAttributeType(varatttype);
-  varAttr->SetNumberOfComponent(nbofcomponent);
-
-  return;
-}
-
-void vtkMedDriver30::ReadProfileInformation(vtkMedProfile* profile)
-{
-  FileOpen open(this);
-
-  med_int nelem;
-  char profileName[MED_NAME_SIZE+1] = "";
-
-  if(MEDprofileInfo(this->FileId,
-                    profile->GetMedIterator(),
-                    profileName,
-                    &nelem) < 0)
-    {
-    vtkErrorMacro("cannot read information on profile"
-        << profile->GetMedIterator());
-    }
-  profile->SetName(profileName);
-  profile->SetNumberOfElement(nelem);
-}
-
-void vtkMedDriver30::ReadFieldInformation(vtkMedField* field)
-{
-  FileOpen open(this);
-
-  if (field->GetMedIterator() == 0)
-    return;
-
-  int ncomp = MEDfieldnComponent(FileId, field->GetMedIterator());
-
-  if(ncomp < 0)
-    {
-    field->SetNumberOfComponent(-1);
-    vtkErrorMacro("cannot read the number of component of field "
-        << field->GetMedIterator())
-    return;
-    }
-
-  field->SetNumberOfComponent(ncomp);
-
-  char* units = new char[MED_SNAME_SIZE * ncomp + 1];
-  char* componentNames = new char[MED_SNAME_SIZE * ncomp + 1];
-  memset(units, '\0', MED_SNAME_SIZE * ncomp + 1);
-  memset(componentNames, '\0', MED_SNAME_SIZE * ncomp + 1);
-
-  //med_type_champ dataType;
-  med_field_type dataType;
-  med_int nstep;
-  med_bool localmesh;
-
-  char name[MED_NAME_SIZE+1] = "";
-  char meshName[MED_NAME_SIZE+1] = "";
-  char unit[MED_SNAME_SIZE+1] = "";
-
-  if( MEDfieldInfo( FileId,
-                    field->GetMedIterator(),
-                    name,
-                    meshName,
-                    &localmesh,
-                    &dataType,
-                    componentNames,
-                    units,
-                    unit,
-                    &nstep) < 0)
-    {
-    vtkErrorMacro("cannot read the informations on field "
-        << field->GetMedIterator())
-    return;
-    }
-
-  field->SetName(name);
-  field->SetMeshName(meshName);
-  field->SetTimeUnit(unit);
-  field->SetDataType(dataType);
-  field->SetLocal(localmesh);
-
-  for(int comp = 0; comp < ncomp; comp++)
-    {
-    char unit[MED_NAME_SIZE + 1] = "";
-    memcpy(unit, units + MED_SNAME_SIZE * comp, MED_SNAME_SIZE * sizeof(char));
-    field->GetUnit()->SetValue(comp, unit);
-
-    char compName[MED_SNAME_SIZE + 1] = "";
-    memcpy(compName, componentNames + MED_SNAME_SIZE * comp, MED_SNAME_SIZE
-        * sizeof(char));
-    field->GetComponentName()->SetValue(comp, compName);
-    }
-
-  delete[] units;
-  delete[] componentNames;
-
-  med_int ninterp = MEDfieldnInterp(FileId, field->GetName());
-  if(ninterp < 0)
-    {
-    vtkErrorMacro("Error in MEDfieldnInterp");
-    return;
-    }
-
-  field->AllocateNumberOfInterpolation(ninterp);
-
-  for(med_int interpit=0; interpit<ninterp; interpit++)
-    {
-    vtkMedInterpolation* interp = field->GetInterpolation(interpit);
-    interp->SetMedIterator(interpit + 1);
-    this->ReadInterpolationInformation(interp);
-    }
-
-  vtkMedFieldStep* previousStep = NULL;
-
-  for(med_int csit = 0; csit < nstep; csit++)
-    {
-    vtkMedFieldStep* step = vtkMedFieldStep::New();
-    step->SetMedIterator(csit + 1);
-    step->SetParentField(field);
-    this->ReadFieldStepInformation(step, csit == 0);
-    field->AddFieldStep(step);
-    step->SetPreviousStep(previousStep);
-    previousStep = step;
-    step->Delete();
-    }
-}
-
-void vtkMedDriver30::ReadFieldStepInformation(vtkMedFieldStep* step, bool readAllEntityInfo)
-{
-  vtkMedComputeStep cs;
-  vtkMedComputeStep meshcs;
-  vtkMedField* field = step->GetParentField();
-
-  FileOpen open(this);
-
-  if( MEDfieldComputingStepMeshInfo(
-        FileId,
-        field->GetName(),
-        step->GetMedIterator(),
-        &cs.TimeIt,
-        &cs.IterationIt,
-        &cs.TimeOrFrequency,
-        &meshcs.TimeIt,
-        &meshcs.IterationIt) < 0)
-    {
-    vtkErrorMacro("Error in MEDfieldComputingStepMeshInfo");
-    return;
-    }
-
-  step->SetComputeStep(cs);
-  step->SetMeshComputeStep(meshcs);
-
-  if(!readAllEntityInfo || step->GetEntityInfoLoaded())
-    return;
-
-  step->SetEntityInfoLoaded(1);
-  
-  vtkMedFile* file = field->GetParentFile();
-  vtkMedMesh* mesh = file->GetMesh(field->GetMeshName());
-  
-  if(mesh == NULL)
-    return;
-  
-  //rnv begin: fix the  "22335: [CEA 954] Paravis 7.2.0 doesn't read ELNO fields" regression.
-  //           this piece of code needed for the reading ELNO fields
-  std::set<vtkMedEntity> tmp_entities;
-  std::set<vtkMedEntity> entities;
-  mesh->GatherMedEntities(tmp_entities);
-  
-  std::set<vtkMedEntity>::iterator tmp_entity_it = tmp_entities.begin();
-  while(tmp_entity_it != tmp_entities.end())
-    {
-      vtkMedEntity entity = *tmp_entity_it;
-      tmp_entity_it++;
-      entities.insert(entity);
-      if(entity.EntityType == MED_CELL)
-       {
-         vtkMedEntity newEntity;
-         newEntity.EntityType = MED_NODE_ELEMENT;
-         newEntity.GeometryType = entity.GeometryType;
-         newEntity.GeometryName = entity.GeometryName;
-         entities.insert(newEntity);
-       }
-    }  
-  //rnv end
-  
-  std::set<vtkMedEntity>::iterator entity_it = entities.begin();
-  while(entity_it != entities.end())
-    {
-    vtkMedEntity entity = *entity_it;
-    entity_it++;
-
-    med_int nvalues = 0;
-    med_int nprofile;
-    char profilename[MED_NAME_SIZE+1] = "";
-    char localizationname[MED_NAME_SIZE+1] = "";
-
-    nprofile = MEDfieldnProfile(
-        this->FileId, 
-        field->GetName(),
-        step->GetComputeStep().TimeIt,
-        step->GetComputeStep().IterationIt,
-        entity.EntityType,
-        entity.GeometryType,
-        profilename,
-        localizationname);
-    if(nprofile < 0)
-      {
-      vtkErrorMacro("MEDfieldnProfile");
-      continue;
-      }
-
-    bool hasprofile = (nprofile > 0);
-    if(!hasprofile)
-      {
-      nprofile = 1;
-      }
-
-    med_int profilesize;
-    med_int nintegrationpoint;
-    
-    for(int pid=0; pid<nprofile; pid++)
-      {
-      med_int medid = (hasprofile ? pid+1 : -1);
-      nvalues = MEDfieldnValueWithProfile(
-                  this->FileId, 
-                  field->GetName(),
-                  step->GetComputeStep().TimeIt,
-                  step->GetComputeStep().IterationIt,
-                  entity.EntityType,
-                  entity.GeometryType,
-                  medid,
-                  MED_COMPACT_PFLMODE,
-                  profilename,
-                  &profilesize,
-                  localizationname,
-                  &nintegrationpoint);
-            
-      if(nvalues < 0)
-        {
-        vtkErrorMacro("MEDfieldnValueWithProfile");
-        continue;
-        }
-      else if(nvalues > 0)
-        {
-        // I have found a profile with values, stop the loop here
-        break;
-        }
-      }
-
-    if(nvalues > 0)
-      {
-      vtkMedFieldOverEntity* fieldOverEntity = vtkMedFieldOverEntity::New();
-      step->AppendFieldOverEntity(fieldOverEntity);
-      fieldOverEntity->Delete();
-
-      fieldOverEntity->SetParentStep(step);
-      fieldOverEntity->SetEntity(entity);
-
-      this->ReadFieldOverEntityInformation(fieldOverEntity);
-      }
-    }
-}
-
-void vtkMedDriver30::ReadFieldOverEntityInformation(vtkMedFieldOverEntity* fieldOverEntity)
-{
-  FileOpen open(this);
-
-  vtkMedFieldStep* step = fieldOverEntity->GetParentStep();
-  vtkMedField* field = step->GetParentField();
-  vtkMedEntity entity = fieldOverEntity->GetEntity();
-
-  const char* fieldName = field->GetName();
-  const vtkMedComputeStep& cs = step->GetComputeStep();
-
-  char profilename[MED_NAME_SIZE+1] = "";
-  char localizationname[MED_NAME_SIZE+1] = "";
-
-  med_int nProfiles = MEDfieldnProfile(
-                        this->FileId,
-                        fieldName,
-                        cs.TimeIt,
-                        cs.IterationIt,
-                        entity.EntityType,
-                        entity.GeometryType,
-                        profilename,
-                        localizationname);
-
-  if(nProfiles < 0)
-    {
-    vtkErrorMacro("MEDfieldnProfile");
-    }
-  else if(nProfiles == 0)
-    {
-    fieldOverEntity->SetHasProfile(0);
-    nProfiles = 1;
-    }
-  else
-    {
-    fieldOverEntity->SetHasProfile(1);
-    }
-  fieldOverEntity->AllocateNumberOfFieldOnProfile(nProfiles);
-  for(int profit = 0; profit < nProfiles; profit++)
-    {
-    vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(profit);
-    med_int medid = (fieldOverEntity->GetHasProfile()? profit+1: -1);
-    fop->SetMedIterator(medid);
-    fop->SetParentFieldOverEntity(fieldOverEntity);
-    this->ReadFieldOnProfileInformation(fop);
-    }
-}
-
-void vtkMedDriver30::ReadFieldOnProfileInformation(vtkMedFieldOnProfile* fop)
-{
-  vtkMedFieldOverEntity* fieldOverEntity = fop->GetParentFieldOverEntity();
-  vtkMedFieldStep* step = fieldOverEntity->GetParentStep();
-  vtkMedField* field = step->GetParentField();
-
-  const vtkMedComputeStep& cs = step->GetComputeStep();
-  med_int profilesize;
-  med_int nbofintegrationpoint;
-
-  char profileName[MED_NAME_SIZE+1] = "";
-  char localizationName[MED_NAME_SIZE+1] = "";
-
-  med_int nvalue = MEDfieldnValueWithProfile(FileId,
-                    field->GetName(),
-                    cs.TimeIt,
-                    cs.IterationIt,
-                    fieldOverEntity->GetEntity().EntityType,
-                    fieldOverEntity->GetEntity().GeometryType,
-                    fop->GetMedIterator(),
-                    MED_COMPACT_STMODE,
-                    profileName,
-                    &profilesize,
-                    localizationName,
-                    &nbofintegrationpoint);
-
-  if(nvalue < 0)
-    {
-    vtkErrorMacro("Error while reading MEDfieldnValueWithProfile");
-    }
-
-  fop->SetProfileName(profileName);
-  fop->SetLocalizationName(localizationName);
-  fop->SetNumberOfValues(nvalue);
-  fop->SetNumberOfIntegrationPoint(nbofintegrationpoint);
-  fop->SetProfileSize(profilesize);
-}
-
-void vtkMedDriver30::ReadMeshInformation(vtkMedMesh* mesh)
-{
-  FileOpen open(this);
-
-  med_int mdim = 0;
-  med_int sdim = 0;
-  med_mesh_type meshtype;
-
-  med_sorting_type sortingtype;
-  med_int nstep = 0;
-  med_axis_type axistype;
-  med_int naxis;
-
-  if ( (naxis=MEDmeshnAxis(this->FileId, mesh->GetMedIterator())) <0 )
-    {
-    vtkDebugMacro("Error reading mesh axis number");
-    }
-
-  if(naxis == 0)
-    naxis=MEDmeshnAxis(this->FileId, mesh->GetMedIterator());
-
-  char axisname[3*MED_SNAME_SIZE+1] = "";
-  char axisunit[3*MED_SNAME_SIZE+1] = "";
-  char name[MED_NAME_SIZE+1] = "";
-  char description[MED_COMMENT_SIZE+1] = "";
-  char timeUnit[MED_SNAME_SIZE+1] = "";
-
-  if( MEDmeshInfo( this->FileId,
-        mesh->GetMedIterator(),
-        name,
-        &sdim,
-        &mdim,
-        &meshtype,
-        description,
-        timeUnit,
-        &sortingtype,
-        &nstep,
-        &axistype,
-        axisname,
-        axisunit ) )
-    {
-    vtkErrorMacro("Error reading mesh");
-    }
-
-  mesh->SetName(name);
-  mesh->SetDescription(description);
-  mesh->SetTimeUnit(timeUnit);
-  mesh->SetSpaceDimension(sdim);
-  mesh->SetMeshDimension(mdim);
-  mesh->SetMeshType(meshtype);
-  mesh->SetSortingType(sortingtype);
-  mesh->SetAxisType(axistype);
-  mesh->SetNumberOfAxis(naxis);
-
-  for(int axis = 0; axis < naxis; axis++)
-    {
-    char theaxisname[MED_SNAME_SIZE+1] = "";
-    char theaxisunit[MED_SNAME_SIZE+1] = "";
-    strncpy(theaxisname, axisname + axis*MED_SNAME_SIZE, MED_SNAME_SIZE);
-    strncpy(theaxisunit, axisunit + axis*MED_SNAME_SIZE, MED_SNAME_SIZE);
-    mesh->GetAxisName()->SetValue(axis, theaxisname);
-    mesh->GetAxisUnit()->SetValue(axis, theaxisunit);
-    }
-
-  char universalName[MED_LNAME_SIZE+1] = "";
-
-  if(MEDmeshUniversalNameRd(this->FileId, name,
-      universalName) < 0)
-    {
-    vtkDebugMacro("MEDmeshUniversalNameRd < 0");
-    }
-  mesh->SetUniversalName(universalName);
-
-  // read the Information data of all families.
-  // writing the family 0 is optional,
-  // but I need it, so add it if it is not here.
-
-  med_int nfam = MEDnFamily(this->FileId, name);
-
-  for(int index = 0; index < nfam; index++)
-    {
-    vtkMedFamily* family = vtkMedFamily::New();
-    family->SetMedIterator(index + 1);
-    this->ReadFamilyInformation(mesh, family);
-    family->Delete();
-    }
-
-  // this creates a family 0 if none has been read
-  vtkMedFamily* familyZeroOnCell = mesh->GetOrCreateCellFamilyById(0);
-  vtkMedFamily* familyZeroOnPoint = mesh->GetOrCreatePointFamilyById(0);
-
-  // Load Information regarding the grid type
-  if(meshtype == MED_STRUCTURED_MESH)
-    {
-    // Do it for structured data
-    med_grid_type mtg;
-    if(MEDmeshGridTypeRd(FileId, name, &mtg) < 0)
-      {
-      vtkErrorMacro("Error during structured grid Information loading.");
-      return;
-      }
-    mesh->SetStructuredGridType(mtg);
-    }
-
-  vtkMedGrid* previousGrid = NULL;
-  for(int gid=1; gid <= nstep; gid++)
-    {
-    vtkMedComputeStep cs;
-    if(MEDmeshComputationStepInfo(FileId,
-                                  name,
-                                  gid,
-                                  &cs.TimeIt,
-                                  &cs.IterationIt,
-                                  &cs.TimeOrFrequency) < 0)
-      {
-      vtkErrorMacro("MEDmeshComputationStepInfo error");
-      }
-    // Load Information regarding the grid type
-    vtkMedGrid* grid = NULL;
-    if(meshtype == MED_STRUCTURED_MESH)
-      {
-      switch(mesh->GetStructuredGridType())
-        {
-        case MED_CARTESIAN_GRID:
-          grid = vtkMedCartesianGrid::New();
-          break;
-        case MED_POLAR_GRID:
-          grid = vtkMedPolarGrid::New();
-          break;
-        case MED_CURVILINEAR_GRID:
-          grid = vtkMedCurvilinearGrid::New();
-          break;
-        default:
-          vtkErrorMacro("Unknown structured grid type " << mesh->GetStructuredGridType());
-          return;
-        }
-      }
-    else //(mesh->GetType() == MED_STRUCTURED_MESH)
-      {
-      grid = vtkMedUnstructuredGrid::New();
-      }
-    grid->SetParentMesh(mesh);
-    grid->SetComputeStep(cs);
-    this->ReadGridInformation(grid);
-    mesh->AddGridStep(grid);
-    grid->Delete();
-    grid->SetPreviousGrid(previousGrid);
-    previousGrid = grid;
-    }
-}
-
-void vtkMedDriver30::ReadLocalizationInformation(vtkMedLocalization* loc)
-{
-  FileOpen open(this);
-
-  med_int ngp;
-  med_int spaceDimension;
-  med_geometry_type type_geo;
-  med_geometry_type sectiongeotype;
-  med_int nsectionmeshcell;
-
-  char name[MED_NAME_SIZE+1] = "";
-  char interpolationName[MED_NAME_SIZE+1] = "";
-  char sectionName[MED_NAME_SIZE+1] = "";
-
-  if(MEDlocalizationInfo(
-      this->FileId,
-      loc->GetMedIterator(),
-      name,
-      &type_geo,
-      &spaceDimension,
-      &ngp,
-      interpolationName,
-      sectionName,
-      &nsectionmeshcell,
-      &sectiongeotype ) < 0)
-    {
-    vtkErrorMacro("Reading information on quadrature points definition : "
-        << loc->GetMedIterator());
-    }
-
-  loc->SetName(name);
-  loc->SetInterpolationName(interpolationName);
-  loc->SetSectionName(sectionName);
-  loc->SetNumberOfQuadraturePoint(ngp);
-  loc->SetGeometryType(type_geo);
-  loc->SetSpaceDimension(spaceDimension);
-  loc->SetNumberOfCellInSection(nsectionmeshcell);
-  loc->SetSectionGeometryType(sectiongeotype);
-
-  med_float *localCoordinates = new med_float[loc->GetSizeOfPointLocalCoordinates()];
-  med_float *pqLocalCoordinates = new med_float[loc->GetSizeOfQuadraturePointLocalCoordinates()];
-  med_float *weights = new med_float[loc->GetSizeOfWeights()];
-
-  if(MEDlocalizationRd(FileId,
-      loc->GetName(),
-      MED_FULL_INTERLACE,
-      localCoordinates,
-      pqLocalCoordinates,
-      weights) < 0)
-    {
-    vtkErrorMacro("MEDlocalizationRd : " << loc->GetName());
-    }
-
-  vtkDoubleArray* lc = loc->GetPointLocalCoordinates();
-  vtkDoubleArray *pqlc = loc->GetQuadraturePointLocalCoordinates();
-  vtkDoubleArray *w = loc->GetWeights();
-
-  lc->SetNumberOfValues(loc->GetSizeOfPointLocalCoordinates());
-  for(int i=0; i<loc->GetSizeOfPointLocalCoordinates(); i++)
-    {
-    lc->SetValue(i, localCoordinates[i]);
-    }
-
-  pqlc->SetNumberOfValues(loc->GetSizeOfQuadraturePointLocalCoordinates());
-  for(int i=0; i<loc->GetSizeOfQuadraturePointLocalCoordinates(); i++)
-    {
-    pqlc->SetValue(i, pqLocalCoordinates[i]);
-    }
-
-  w->SetNumberOfValues(loc->GetSizeOfWeights());
-  for(int i=0; i<loc->GetSizeOfWeights(); i++)
-    {
-    w->SetValue(i, weights[i]);
-    }
-}
-
-void vtkMedDriver30::ReadInterpolationInformation(vtkMedInterpolation* interp)
-{
-
-  med_geometry_type geotype;
-  med_bool cellnode;
-  med_int nbofbasisfunc;
-  med_int nbofvariable;
-  med_int maxdegree;
-  med_int nmaxcoef;
-
-  char name[MED_NAME_SIZE+1] = "";
-
-  if(MEDinterpInfo (this->FileId,
-                    interp->GetMedIterator(),
-                    name,
-                    &geotype, &cellnode, &nbofbasisfunc,
-                    &nbofvariable, &maxdegree, &nmaxcoef) < 0)
-    {
-    vtkErrorMacro("MEDinterpInfo");
-    return;
-    }
-
-  interp->SetName(name);
-  interp->SetGeometryType(geotype);
-  interp->SetIsCellNode(cellnode);
-  interp->SetNumberOfVariable(nbofvariable);
-  interp->SetMaximumDegree(maxdegree);
-  interp->SetMaximumNumberOfCoefficient(nmaxcoef);
-  interp->AllocateNumberOfBasisFunction(nbofbasisfunc);
-
-  for(int basisid=0; basisid < nbofbasisfunc; basisid++)
-    {
-    vtkMedFraction* func = interp->GetBasisFunction(basisid);
-    func->SetNumberOfVariable(nbofvariable);
-
-    med_int ncoef = MEDinterpBaseFunctionCoefSize (
-        this->FileId,
-        interp->GetName(),
-        basisid+1);
-    func->SetNumberOfCoefficients(ncoef);
-
-    if(ncoef <= 0 || nbofvariable <= 0)
-      continue;
-
-    med_int *power = new med_int[nbofvariable * ncoef];
-    med_float *coefficient = new med_float[ncoef];
-
-    if(MEDinterpBaseFunctionRd  (
-        this->FileId,
-        interp->GetName(),
-        basisid+1,
-        &ncoef,
-        power,
-        coefficient) < 0)
-      {
-      vtkErrorMacro("MEDinterpBaseFunctionRd");
-      continue;
-      }
-    vtkDoubleArray* coeffs = func->GetCoefficients();
-    for(int cid=0; cid < ncoef; cid++)
-      {
-      coeffs->SetValue(cid, coefficient[cid]);
-      }
-    vtkIntArray* powers = func->GetPowers();
-    for(int pid=0; pid < ncoef*nbofvariable; pid++)
-      {
-      powers->SetValue(pid, power[pid]);
-      }
-
-    delete[] power;
-    delete[] coefficient;
-    }
-}
-
-void vtkMedDriver30::ReadSupportMeshInformation(
-    vtkMedMesh* supportMesh)
-{
-  FileOpen open(this);
-
-  char supportmeshname[MED_NAME_SIZE+1] = "";
-  char description[MED_COMMENT_SIZE+1] = "";
-  med_int spacedim;
-  med_int meshdim;
-  med_axis_type axistype;
-  char axisname[3*MED_SNAME_SIZE+1] = "";
-  char axisunit[3*MED_SNAME_SIZE+1] = "";
-
-  if(MEDsupportMeshInfo (this->FileId,
-                         supportMesh->GetMedIterator(),
-                         supportmeshname,
-                         &spacedim,
-                         &meshdim,
-                         description,
-                         &axistype,
-                         axisname,
-                         axisunit) < 0)
-    {
-    vtkErrorMacro("MEDsupportMeshInfo");
-    }
-
-  supportMesh->SetName(supportmeshname);
-  supportMesh->SetDescription(description);
-  supportMesh->SetSpaceDimension(spacedim);
-  supportMesh->SetMeshDimension(meshdim);
-  supportMesh->SetAxisType(axistype);
-  for(int dim = 0; dim < 3; dim++)
-    {
-    char axisname_dim[MED_SNAME_SIZE+1] = "";
-    char axisunit_dim[MED_SNAME_SIZE+1] = "";
-
-    strncpy(axisname_dim, axisname+dim*MED_SNAME_SIZE, MED_SNAME_SIZE);
-    strncpy(axisunit_dim, axisunit+dim*MED_SNAME_SIZE, MED_SNAME_SIZE);
-
-    supportMesh->GetAxisName()->SetValue(dim, axisname_dim);
-    supportMesh->GetAxisUnit()->SetValue(dim, axisunit_dim);
-    }
-
-  return;
-}
-
-void vtkMedDriver30::LoadFamilyIds(vtkMedEntityArray* array)
-{
-  if(array->IsFamilyIdsLoaded())
-    return;
-
-  FileOpen open(this);
-
-  vtkMedGrid* grid = array->GetParentGrid();
-
-  vtkMedComputeStep cs = grid->GetComputeStep();
-
-  // first, find if the family ids are implicit or explicit
-  med_bool changement, transformation;
-
-  med_int nfamid = MEDmeshnEntity(this->FileId,
-                      grid->GetParentMesh()->GetName(),
-                      cs.TimeIt,
-                      cs.IterationIt,
-                      array->GetEntity().EntityType,
-                      array->GetEntity().GeometryType,
-                      MED_FAMILY_NUMBER,
-                      MED_NO_CMODE,
-                      &changement,
-                      &transformation);
-
-  if(nfamid == array->GetNumberOfEntity())
-    {
-
-    vtkMedIntArray* famIds = vtkMedIntArray::New();
-    array->SetFamilyIds(famIds);
-    famIds->Delete();
-
-    famIds->SetNumberOfTuples(nfamid);
-
-    if ( MEDmeshEntityFamilyNumberRd(
-            this->FileId,
-            grid->GetParentMesh()->GetName(),
-            cs.TimeIt,
-            cs.IterationIt,
-            array->GetEntity().EntityType,
-            array->GetEntity().GeometryType,
-            famIds->GetPointer(0) ) < 0)
-      {
-      vtkWarningMacro("Error loading the family ids of entity "
-        << array->GetEntity().EntityType
-        << " " << array->GetEntity().GeometryType
-        << " on mesh " << grid->GetParentMesh()->GetName());
-      array->SetFamilyIds(NULL);
-      }
-    }
-  else
-    {
-    vtkDebugMacro("NumberOfEntity != Number of family ids");
-    array->SetFamilyIds(NULL);
-    }
-
-  array->ComputeFamilies();
-}
-
-void vtkMedDriver30::LoadPointGlobalIds(vtkMedGrid* grid)
-{
-  if(grid->IsPointGlobalIdsLoaded())
-    return;
-
-  FileOpen open(this);
-
-  vtkMedIntArray* globalIds = vtkMedIntArray::New();
-  grid->SetPointGlobalIds(globalIds);
-  globalIds->Delete();
-
-  globalIds->SetNumberOfTuples(grid->GetNumberOfPoints());
-
-  if( MEDmeshEntityNumberRd (
-        this->FileId,
-        grid->GetParentMesh()->GetName(),
-        grid->GetComputeStep().TimeIt,
-        grid->GetComputeStep().IterationIt,
-        MED_NODE,
-        MED_NONE,
-        globalIds->GetPointer(0) ) < 0)
-    {
-    grid->SetPointGlobalIds(NULL);
-    }
-}
-
-void vtkMedDriver30::LoadCoordinates(vtkMedGrid* grid)
-{
-  if(grid->IsCoordinatesLoaded())
-    return;
-
-  vtkMedRegularGrid* rgrid = vtkMedRegularGrid::SafeDownCast(grid);
-  if(rgrid != NULL)
-    {
-    this->LoadRegularGridCoordinates(rgrid);
-    return;
-    }
-
-  vtkMedUnstructuredGrid* ugrid = vtkMedUnstructuredGrid::SafeDownCast(grid);
-  vtkMedCurvilinearGrid* cgrid = vtkMedCurvilinearGrid::SafeDownCast(grid);
-  if(ugrid == NULL && cgrid == NULL)
-    {
-    //TODO : deal with structured grids
-    vtkWarningMacro("this kind of grid is not yet supported");
-    return;
-    }
-
-  if(grid->GetUsePreviousCoordinates())
-    {
-    vtkMedGrid* previousgrid = grid->GetPreviousGrid();
-    if(previousgrid == NULL)
-      {
-      vtkErrorMacro("coordiantes have not changed, "
-                    << "but there is no previous grid!");
-      return;
-      }
-
-    this->LoadCoordinates(previousgrid);
-    if(ugrid != NULL)
-      ugrid->SetCoordinates(vtkMedUnstructuredGrid::SafeDownCast(previousgrid)
-                            ->GetCoordinates());
-    if(cgrid != NULL)
-      cgrid->SetCoordinates(vtkMedCurvilinearGrid::SafeDownCast(previousgrid)
-                            ->GetCoordinates());
-    }
-  else
-    {
-
-    FileOpen open(this);
-
-    vtkDataArray* coords = vtkMedUtilities::NewCoordArray();
-    if(ugrid != NULL)
-      ugrid->SetCoordinates(coords);
-    if(cgrid != NULL)
-      cgrid->SetCoordinates(coords);
-    coords->Delete();
-
-    vtkMedComputeStep cs = grid->GetComputeStep();
-
-    coords->SetNumberOfComponents(grid->GetParentMesh()->GetSpaceDimension());
-    coords->SetNumberOfTuples(grid->GetNumberOfPoints());
-
-    if ( MEDmeshNodeCoordinateRd( this->FileId,
-                                  grid->GetParentMesh()->GetName(),
-                                  cs.TimeIt,
-                                  cs.IterationIt,
-                                  MED_FULL_INTERLACE,
-                                  (med_float*) coords->GetVoidPointer(0) ) < 0)
-      {
-      vtkErrorMacro("Load Coordinates for mesh "
-          << grid->GetParentMesh()->GetName());
-      }
-    }
-}
-
-void vtkMedDriver30::LoadProfile(vtkMedProfile* profile)
-{
-  if(!profile || profile->IsLoaded())
-    return;
-
-  FileOpen open(this);
-
-  vtkMedIntArray* indices = vtkMedIntArray::New();
-  profile->SetIds(indices);
-  indices->Delete();
-
-  indices->SetNumberOfTuples(profile->GetNumberOfElement());
-
-  char name[MED_NAME_SIZE+1] = "";
-
-  if( MEDprofileRd(this->FileId,
-                   profile->GetName(),
-                   indices->GetPointer(0) ) < 0)
-    {
-    vtkErrorMacro("Reading profile indices ");
-    }
-}
-
-void vtkMedDriver30::LoadConnectivity(vtkMedEntityArray* array)
-{
-  if(array->IsConnectivityLoaded())
-    return;
-
-  FileOpen open(this);
-
-  vtkMedGrid* grid = array->GetParentGrid();
-
-  grid = array->GetParentGrid();
-
-  const char* meshName = grid->GetParentMesh()->GetName();
-
-  vtkMedIntArray* conn = vtkMedIntArray::New();
-  array->SetConnectivityArray(conn);
-  conn->Delete();
-
-  vtkMedComputeStep cs = grid->GetComputeStep();
-
-  med_bool change;
-  med_bool transformation;
-
-  if(array->GetEntity().GeometryType == MED_POLYGON)
-    {
-    // first check if we have points
-    med_int connSize = MEDmeshnEntity(
-                            this->FileId,
-                            meshName,
-                            cs.TimeIt,
-                            cs.IterationIt,
-                            array->GetEntity().EntityType,
-                            MED_POLYGON,
-                            MED_CONNECTIVITY,
-                            array->GetConnectivity(),
-                            &change,
-                            &transformation);
-
-    if (connSize < 0)
-      {
-      vtkErrorMacro(<< "Error while reading polygons connectivity size."
-                    << endl );
-            return;
-      }
-
-    conn->SetNumberOfTuples(connSize);
-
-    // How many polygon in the mesh in nodal connectivity mode
-    // For the polygons, we get the size of array index
-    med_int indexsize;
-    if ((indexsize = MEDmeshnEntity(this->FileId,
-                                    meshName,
-                                    cs.TimeIt,
-                                    cs.IterationIt,
-                                    array->GetEntity().EntityType,
-                                    MED_POLYGON,
-                                    MED_INDEX_NODE,
-                                    array->GetConnectivity(),
-                                    &change,
-                                    &transformation )) < 0)
-      {
-      vtkErrorMacro(<< "Error while reading polygons array index." << endl );
-            return;
-      }
-
-    vtkMedIntArray* index = vtkMedIntArray::New();
-    array->SetFaceIndex(index);
-    index->Delete();
-
-    index->SetNumberOfTuples( indexsize );
-
-    if ( MEDmeshPolygonRd(this->FileId,
-                          meshName,
-                          cs.TimeIt,
-                          cs.IterationIt,
-                          array->GetEntity().EntityType,
-                          array->GetConnectivity(),
-                          index->GetPointer(0),
-                          conn->GetPointer(0) ) < 0)
-      {
-      vtkErrorMacro(<< "MEDmeshPolygonRd");
-      return;
-      }
-    }
-  else if(array->GetEntity().GeometryType == MED_POLYHEDRON)
-    {
-
-    vtkIdType connSize = MEDmeshnEntity(this->FileId,
-                                        meshName,
-                                        grid->GetComputeStep().TimeIt,
-                                        grid->GetComputeStep().IterationIt,
-                                        array->GetEntity().EntityType,
-                                        MED_POLYHEDRON,
-                                        MED_CONNECTIVITY,
-                                        array->GetConnectivity(),
-                                        &change,
-                                        &transformation);
-    if (connSize < 0)
-      {
-      vtkErrorMacro(<< "Error while reading polyhedrons connectivity size."
-                    << endl );
-            return;
-      }
-
-    conn->SetNumberOfTuples(connSize);
-
-    vtkMedIntArray* faceIndex = vtkMedIntArray::New();
-    array->SetFaceIndex(faceIndex);
-    faceIndex->Delete();
-
-    vtkMedIntArray* nodeIndex = vtkMedIntArray::New();
-    array->SetNodeIndex(nodeIndex);
-    nodeIndex->Delete();
-
-    vtkIdType np = array->GetNumberOfEntity() + 1;
-    faceIndex->SetNumberOfTuples(np);
-
-    med_int nodeIndexSize;
-
-    if ((nodeIndexSize = MEDmeshnEntity(this->FileId,
-                                        meshName,
-                                        grid->GetComputeStep().TimeIt,
-                                        grid->GetComputeStep().IterationIt,
-                                        array->GetEntity().EntityType,
-                                        MED_POLYHEDRON,
-                                        MED_INDEX_NODE,
-                                        array->GetConnectivity(),
-                                        &change,
-                                        &transformation )) < 0)
-      {
-      vtkErrorMacro(<< "Error while reading polygons array index." << endl );
-            return;
-      }
-
-    nodeIndex->SetNumberOfTuples(nodeIndexSize);
-
-    if (MEDmeshPolyhedronRd(this->FileId,
-                            meshName,
-                            cs.TimeIt,
-                            cs.IterationIt,
-                            array->GetEntity().EntityType,
-                            array->GetConnectivity(),
-                            faceIndex->GetPointer(0),
-                            nodeIndex->GetPointer(0),
-                            conn->GetPointer(0) ) < 0)
-      {
-      vtkErrorMacro("Error while reading connectivity of polyhedrons");
-      return;
-      }
-
-    }
-  else
-    {
-    bool doReadConnectivity = true;
-    if(array->GetConnectivity() == MED_NODAL)
-      {
-      if(array->GetEntity().EntityType == MED_STRUCT_ELEMENT)
-        {
-        std::cout << "  -- MED_STRUCT_ELEMENT --" << std::endl;
-        if(array->GetStructElement() == NULL)
-          {
-          vtkErrorMacro("Entity type = MED_STRUCT_ELEMENT, but StructElement is not set!");
-          return;
-          }
-        vtkIdType ntuple = array->GetNumberOfEntity()
-                           * array->GetStructElement()->GetConnectivitySize();
-
-        conn->SetNumberOfTuples(ntuple);
-        // particles are special : connectivity is not stored in the med file
-        if(strcmp(array->GetStructElement()->GetName(), MED_PARTICLE_NAME) == 0 )
-          {
-          for(vtkIdType cellId = 0; cellId < ntuple; cellId++)
-            {
-            conn->SetValue(cellId, cellId+1);
-            }
-          doReadConnectivity = false;
-          }
-        }
-      else
-        {
-        conn->SetNumberOfTuples(array->GetNumberOfEntity()
-            * vtkMedUtilities::GetNumberOfPoint(
-                array->GetEntity().GeometryType));
-        }
-      }
-    else
-      {
-      conn->SetNumberOfTuples(array->GetNumberOfEntity()
-          * vtkMedUtilities::GetNumberOfSubEntity(
-              array->GetEntity().GeometryType));
-      }
-
-    if  (this->ParallelFileId == -1) // also (array->GetFilter() == NULL)
-      {
-      if ( (MEDmeshElementConnectivityRd(
-            this->FileId,
-            meshName,
-            cs.TimeIt,
-            cs.IterationIt,
-            array->GetEntity().EntityType,
-            array->GetEntity().GeometryType,
-            array->GetConnectivity(),
-            MED_FULL_INTERLACE,
-            conn->GetPointer(0)) ) < 0)
-        {
-        vtkErrorMacro("Error while load connectivity of cells "
-            << array->GetEntity().GeometryType);
-        }
-      }
-    else
-      {
-      med_filter filter = MED_FILTER_INIT;
-
-      int    start;
-      int    stride;
-      int    count;
-      int    blocksize;
-      int    lastblocksize;
-      array->GetFilter()->GetFilterSizes(start, stride, count,
-                                   blocksize, lastblocksize );
-
-      med_int nbofconstituentpervalue = vtkMedUtilities::GetNumberOfNodes(
-                                        array->GetEntity().GeometryType);
-
-      if ( MEDfilterBlockOfEntityCr( this->ParallelFileId,
-              array->GetNumberOfEntity(),
-            1, // one is for mesh elements, more than 1 is for fields
-              nbofconstituentpervalue,
-            MED_ALL_CONSTITUENT,
-            MED_FULL_INTERLACE,
-            MED_COMPACT_STMODE,
-            MED_NO_PROFILE,
-            (med_size)start,
-            (med_size)stride,
-            (med_size)count,
-            (med_size)blocksize,
-            (med_size)lastblocksize,
-            &filter ) < 0 )
-        {
-        vtkErrorMacro("Filter creation ");
-        }
-
-        if ( (MEDmeshElementConnectivityAdvancedRd(
-              this->ParallelFileId,
-              meshName,
-              cs.TimeIt,
-              cs.IterationIt,
-              array->GetEntity().EntityType,
-              array->GetEntity().GeometryType,
-              array->GetConnectivity(),
-              &filter,
-              conn->GetPointer(0)) ) < 0)
-          {
-          vtkErrorMacro("Error while load connectivity of cells "
-              << array->GetEntity().GeometryType);
-          }
-
-      if ( MEDfilterClose( &filter ) < 0)
-          {
-        vtkErrorMacro("ERROR : filter closing ...");
-          }
-
-      }
-    }
-}
-
-void vtkMedDriver30::LoadCellGlobalIds(vtkMedEntityArray* array)
-{
-  if(array->IsGlobalIdsLoaded())
-    return;
-
-  FileOpen open(this);
-
-  vtkMedIntArray* globalIds = vtkMedIntArray::New();
-  array->SetGlobalIds(globalIds);
-  globalIds->Delete();
-
-  globalIds->SetNumberOfTuples(array->GetNumberOfEntity());
-
-  vtkMedGrid* grid = array->GetParentGrid();
-  vtkMedComputeStep cs = grid->GetComputeStep();
-
-  if( MEDmeshEntityNumberRd (
-        this->FileId,
-        grid->GetParentMesh()->GetName(),
-        cs.TimeIt,
-        cs.IterationIt,
-        array->GetEntity().EntityType,
-        array->GetEntity().GeometryType,
-        globalIds->GetPointer(0) ) < 0)
-    {
-    array->SetGlobalIds(NULL);
-    }
-}
-
-void vtkMedDriver30::LoadField(vtkMedFieldOnProfile* fop, med_storage_mode mode)
-{
-  FileOpen open(this);
-
-  vtkMedFieldOverEntity* fieldOverEntity = fop->GetParentFieldOverEntity();
-  vtkMedFieldStep *step = fieldOverEntity->GetParentStep();
-  vtkMedField* field = step->GetParentField();
-  const vtkMedComputeStep& cs = step->GetComputeStep();
-
-  vtkDataArray* data = vtkMedUtilities::NewArray(field->GetDataType());
-  fop->SetData(data);
-  data->Delete();
-
-  med_int size;
-  if(mode == MED_COMPACT_STMODE)
-    {
-    size = fop->GetNumberOfValues();
-    }
-  else
-    {
-    med_int profilesize;
-    med_int nbofintegrationpoint;
-    char profileName[MED_NAME_SIZE+1] = "";
-    char localizationName[MED_NAME_SIZE+1] = "";
-    size = MEDfieldnValueWithProfile(this->FileId,
-                field->GetName(),
-                cs.TimeIt,
-                cs.IterationIt,
-                fieldOverEntity->GetEntity().EntityType,
-                fieldOverEntity->GetEntity().GeometryType,
-                fop->GetMedIterator(),
-                MED_GLOBAL_STMODE,
-                profileName,
-                &profilesize,
-                localizationName,
-                &nbofintegrationpoint);
-    }
-
-  if(fop->GetNumberOfIntegrationPoint() > 1)
-    {
-    size *= fop->GetNumberOfIntegrationPoint();
-    }
-
-  data->SetNumberOfComponents(field->GetNumberOfComponent());
-  data->SetNumberOfTuples(size);
-  if  (this->ParallelFileId == -1)
-    {
-    if ( MEDfieldValueWithProfileRd(
-          this->FileId,
-          field->GetName(),
-          cs.TimeIt,
-          cs.IterationIt,
-          fieldOverEntity->GetEntity().EntityType,
-          fieldOverEntity->GetEntity().GeometryType,
-          mode,
-          fop->GetProfileName(),
-          MED_FULL_INTERLACE,
-          MED_ALL_CONSTITUENT,
-          (unsigned char*) data->GetVoidPointer(0) ) < 0)
-      {
-      vtkErrorMacro("Error on MEDfieldValueWithProfileRd");
-      }
-    }
-  else
-    {
-  if  (field->GetFieldType() == vtkMedField::CellField)
-    {
-    med_filter filter = MED_FILTER_INIT;
-
-    int    start;
-    int    stride;
-    int    count;
-    int    blocksize;
-    int    lastblocksize;
-    fop->GetFilter()->GetFilterSizes(start, stride, count,
-                                 blocksize, lastblocksize );
-
-    if ( MEDfilterBlockOfEntityCr( this->ParallelFileId,
-        fop->GetNumberOfValues(),
-          1, // one is for mesh elements, more than 1 is for fields
-          field->GetNumberOfComponent(),
-          MED_ALL_CONSTITUENT,
-          MED_FULL_INTERLACE,
-          MED_COMPACT_STMODE,
-          MED_NO_PROFILE,
-          (med_size)start,
-          (med_size)stride,
-          (med_size)count,
-          (med_size)blocksize,
-          (med_size)lastblocksize,
-          &filter ) < 0 )
-      {
-      vtkErrorMacro("Filter creation ");
-      }
-
-    if ( MEDfieldValueAdvancedRd(
-            this->ParallelFileId,
-            field->GetName(),
-            cs.TimeIt,
-            cs.IterationIt,
-            fieldOverEntity->GetEntity().EntityType,
-            fieldOverEntity->GetEntity().GeometryType,
-            &filter,
-            (unsigned char*) data->GetVoidPointer(0) ) < 0)
-        {
-        vtkErrorMacro("Error on MEDfieldValueAdvancedRd");
-        }
-
-    if ( MEDfilterClose( &filter ) < 0)
-        {
-      vtkErrorMacro("ERROR : filter closing ...");
-        }
-      }
-  else
-    {//TODO : option utilisateur pour desactiver ou non les champs avec profile en //
-    if ( MEDfieldValueWithProfileRd(
-              this->FileId,
-              field->GetName(),
-              cs.TimeIt,
-              cs.IterationIt,
-              fieldOverEntity->GetEntity().EntityType,
-              fieldOverEntity->GetEntity().GeometryType,
-              mode,
-              fop->GetProfileName(),
-              MED_FULL_INTERLACE,
-              MED_ALL_CONSTITUENT,
-              (unsigned char*) data->GetVoidPointer(0) ) < 0)
-          {
-          vtkErrorMacro("Error on MEDfieldValueWithProfileRd");
-          }
-    }
-    }
-}
-
-void vtkMedDriver30::LoadVariableAttribute(vtkMedVariableAttribute* varatt,
-                                           vtkMedEntityArray* array)
-{
-  FileOpen open(this);
-
-  void  *value = NULL;
-
-  vtkAbstractArray* valuearray = array->GetVariableAttributeValue(varatt);
-  // first test if this is already loaded
-  if(valuearray != NULL && valuearray->GetNumberOfTuples() > 0)
-    return;
-
-  if(valuearray == NULL)
-    {
-    valuearray = vtkMedUtilities::NewArray(varatt->GetAttributeType());
-    array->SetVariableAttributeValues(varatt, valuearray);
-    valuearray->Delete();
-    }
-
-  valuearray->SetNumberOfComponents(varatt->GetNumberOfComponent());
-  valuearray->SetNumberOfTuples(array->GetNumberOfEntity());
-  valuearray->SetName(varatt->GetName());
-
-  vtkSmartPointer<vtkCharArray> chararray = vtkSmartPointer<vtkCharArray>::New();
-
-  if(varatt->GetAttributeType() != MED_ATT_NAME)
-    {
-    value = valuearray->GetVoidPointer(0);
-    }
-  else
-    {
-    chararray->SetNumberOfValues(varatt->GetNumberOfComponent() *
-                                  array->GetNumberOfEntity() *
-                                  MED_NAME_SIZE);
-
-    value = chararray->GetVoidPointer(0);
-    }
-
-  vtkMedComputeStep cs = array->GetParentGrid()->GetComputeStep();
-
-  if(MEDmeshStructElementVarAttRd(
-      this->FileId,
-      array->GetParentGrid()->GetParentMesh()->GetName(),
-      cs.TimeIt,
-      cs.IterationIt,
-      varatt->GetParentStructElement()->GetGeometryType(),
-      varatt->GetName(),
-      value) < 0)
-    {
-
-    if(cs.IterationIt == MED_NO_IT && cs.TimeIt == MED_NO_DT && cs.TimeOrFrequency == MED_UNDEF_DT)
-      {
-      vtkErrorMacro("MEDmeshStructElementVarAttRd");
-      return;
-      }
-    // try to see if I can reuse
-    // the variable attributes of the NO_DT, NO_IT compute step
-    vtkMedComputeStep nocs;
-    nocs.IterationIt = MED_NO_IT;
-    nocs.TimeIt = MED_NO_DT;
-    nocs.TimeOrFrequency = MED_UNDEF_DT;
-    vtkMedEntityArray* nocs_array =
-        array->GetParentGrid()->GetParentMesh()->GetGridStep(nocs)->GetEntityArray(array->GetEntity());
-    if(nocs_array == NULL)
-      {
-      nocs_array = array->GetParentGrid()->GetParentMesh()->GetGridStep(0)->GetEntityArray(array->GetEntity());
-      }
-
-    if(nocs_array == NULL || nocs_array == array)
-      {
-      // try to force load the default compute step.
-      if(MEDmeshStructElementVarAttRd(
-          this->FileId,
-          array->GetParentGrid()->GetParentMesh()->GetName(),
-          nocs.TimeIt,
-          nocs.IterationIt,
-          varatt->GetParentStructElement()->GetGeometryType(),
-          varatt->GetName(),
-          value) < 0)
-        {
-        vtkErrorMacro("MEDmeshStructElementVarAttRd");
-        return;
-        }
-      }
-    else
-      {
-      this->LoadVariableAttribute(varatt, nocs_array);
-      array->SetVariableAttributeValues(varatt, nocs_array->GetVariableAttributeValue(varatt));
-      return;
-      }
-    }
-
-  // If I am here, it means that I read the values
-  if(varatt->GetAttributeType() == MED_ATT_NAME)
-    {
-    char current_name[MED_NAME_SIZE+1] = "";
-    vtkStringArray* sarray = vtkStringArray::SafeDownCast(valuearray);
-    for(vtkIdType id = 0; id < varatt->GetNumberOfComponent() *
-                       array->GetNumberOfEntity(); id++)
-      {
-      memset(current_name, '\0', MED_NAME_SIZE+1);
-      strncpy(current_name, ((char*)value) + id*MED_NAME_SIZE, MED_NAME_SIZE);
-      sarray->SetValue(id, current_name);
-      }
-    }
-
-  return;
-}
-
-void vtkMedDriver30::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedDriver30.h b/src/Plugins/MedReader/IO/vtkMedDriver30.h
deleted file mode 100644 (file)
index 86890dd..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedDriver30_h_
-#define __vtkMedDriver30_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedDriver.h"
-
-class vtkMedFile;
-class vtkMedMesh;
-class vtkMedField;
-class vtkMedFamily;
-class vtkMedRegularGrid;
-class vtkMedCurvilinearGrid;
-class vtkMedUnstructuredGrid;
-class vtkMedLocalization;
-class vtkMedProfile;
-class vtkMedFieldOverEntity;
-class vtkMedEntityArray;
-class vtkMedFieldStep;
-class vtkMedLink;
-class vtkMedStructElement;
-class vtkMedConstantAttribute;
-class vtkMedVariableAttribute;
-
-class VTK_EXPORT vtkMedDriver30: public vtkMedDriver
-{
-public:
-  static vtkMedDriver30* New();
-  vtkTypeMacro(vtkMedDriver30, vtkMedDriver)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // load all meta data associated with this file.
-  virtual void ReadFileInformation(vtkMedFile*);
-
-  // Description:
-  // load all meta data associated with this mesh.
-  virtual void ReadMeshInformation(vtkMedMesh*);
-
-  // Description:
-  // load all meta data associated with this field.
-  virtual void ReadFieldInformation(vtkMedField*);
-
-  // Description:
-  // load all meta data associated with this regular (Cartesian or polar) grid.
-  virtual void ReadRegularGridInformation(vtkMedRegularGrid*);
-
-  // Description:
-  // load all meta data associated with this standard grid.
-  virtual void ReadCurvilinearGridInformation(vtkMedCurvilinearGrid*);
-
-  // Description:
-  // load all meta data associated with this unstructured grid.
-  virtual void ReadUnstructuredGridInformation(vtkMedUnstructuredGrid*);
-
-  // Description:
-  // load all meta data associated with this family.
-  virtual void ReadFamilyInformation(vtkMedMesh*, vtkMedFamily*);
-
-  // Description:
-  // load all meta data associated with this family.
-  virtual void ReadProfileInformation(vtkMedProfile*);
-
-  // Description:
-  // load information on a field and a given cell type at a given step
-  virtual void ReadFieldOverEntityInformation(vtkMedFieldOverEntity*);
-
-  // Description:
-  // load information related to the given quadrature scheme definition
-  virtual void ReadLocalizationInformation(vtkMedLocalization*);
-
-  // Description:
-  // load all information associated witht this field step
-  virtual void ReadFieldStepInformation(vtkMedFieldStep*, bool readAllEntityInfo);
-
-  // Description:
-  // load all information related to this interpolation function
-  virtual void ReadInterpolationInformation(vtkMedInterpolation*);
-
-  // Description:
-  // load all information related to this field on this profile
-  virtual void ReadFieldOnProfileInformation(vtkMedFieldOnProfile*);
-
-  // Description:
-  // load all information related to this field on this profile
-  virtual void ReadLinkInformation(vtkMedLink*);
-
-  // Description:
-  // read all information related to the structural elements models
-  // in this file
-  virtual void ReadStructElementInformation(vtkMedStructElement*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadSupportMeshInformation(vtkMedMesh*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadConstantAttributeInformation(vtkMedConstantAttribute*);
-
-  // Description:
-  // read all information related to the support mesh
-  // in this file
-  virtual void ReadVariableAttributeInformation(vtkMedVariableAttribute*);
-
-  // Description:
-  // load the field on this profile
-  virtual void LoadField(vtkMedFieldOnProfile*, med_storage_mode mode);
-
-  // Description:
-  // Load the indices of the profile
-  virtual void LoadProfile(vtkMedProfile* profile);
-
-  // Description:
-  // Load the values of the given step
-//  void Load(vtkMedFieldOnProfile*);
-
-  virtual void LoadFamilyIds(vtkMedEntityArray*);
-
-  virtual void LoadCoordinates(vtkMedGrid*);
-
-  virtual void LoadPointGlobalIds(vtkMedGrid*);
-
-  //virtual void LoadFamilyIds(vtkMedGrid*);
-
-  virtual void LoadConnectivity(vtkMedEntityArray*);
-
-  virtual void LoadCellGlobalIds(vtkMedEntityArray*);
-
-  virtual void LoadRegularGridCoordinates(vtkMedRegularGrid*);
-
-  virtual void  LoadVariableAttribute(vtkMedVariableAttribute*,
-                                      vtkMedEntityArray*);
-
-protected:
-  vtkMedDriver30();
-  ~vtkMedDriver30();
-
-  void ReadNumberOfEntity(vtkMedUnstructuredGrid*,
-      med_entity_type, med_connectivity_mode);
-
-private:
-  vtkMedDriver30(const vtkMedDriver30&); // Not implemented.
-  void operator=(const vtkMedDriver30&); // Not implemented.
-};
-
-#endif //__vtkMedDriver30_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedEntityArray.cxx b/src/Plugins/MedReader/IO/vtkMedEntityArray.cxx
deleted file mode 100644 (file)
index 0960055..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedEntityArray.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFamily.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedMesh.h"
-#include "vtkMedGrid.h"
-#include "vtkMedUnstructuredGrid.h"
-#include "vtkMedRegularGrid.h"
-#include "vtkMedCurvilinearGrid.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedStructElement.h"
-
-#include "vtkIdList.h"
-
-#include <set>
-using std::set;
-
-vtkCxxSetObjectVectorMacro(vtkMedEntityArray, FamilyOnEntity, vtkMedFamilyOnEntity);
-vtkCxxGetObjectVectorMacro(vtkMedEntityArray, FamilyOnEntity, vtkMedFamilyOnEntity);
-vtkCxxSetObjectMacro(vtkMedEntityArray,FamilyIds,vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedEntityArray,GlobalIds,vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedEntityArray,ConnectivityArray,vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedEntityArray,FaceIndex,vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedEntityArray,NodeIndex,vtkMedIntArray);
-
-vtkCxxSetObjectMacro(vtkMedEntityArray,ParentGrid,vtkMedGrid);
-vtkCxxSetObjectMacro(vtkMedEntityArray,StructElement,vtkMedStructElement);
-
-// vtkCxxRevisionMacro(vtkMedEntityArray, "$Revision$");
-vtkStandardNewMacro(vtkMedEntityArray);
-
-vtkMedEntityArray::vtkMedEntityArray()
-{
-  this->NumberOfEntity = 0;
-  this->Connectivity = MED_NODAL;
-  this->FamilyIds = NULL;
-  this->GlobalIds = NULL;
-  this->ConnectivityArray = NULL;
-  this->FaceIndex = NULL;
-  this->NodeIndex = NULL;
-  this->InitialGlobalId = 0;
-  this->FamilyOnEntity = new vtkObjectVector<vtkMedFamilyOnEntity> ();
-  this->FamilyIdStatus = vtkMedEntityArray::FAMILY_ID_NOT_LOADED;
-  this->ParentGrid = NULL;
-  this->StructElement = NULL;
-  //this->Filter = NULL;
-}
-
-vtkMedEntityArray::~vtkMedEntityArray()
-{
-  this->SetFamilyIds(NULL);
-  this->SetGlobalIds(NULL);
-  this->SetConnectivityArray(NULL);
-  this->SetFaceIndex(NULL);
-  this->SetNodeIndex(NULL);
-  delete this->FamilyOnEntity;
-  this->SetParentGrid(NULL);
-  this->SetStructElement(NULL);
-  //this->SetFilter(NULL);
-}
-
-void vtkMedEntityArray::Initialize()
-{
-  this->SetFamilyIds(NULL);
-  this->SetGlobalIds(NULL);
-  this->SetConnectivityArray(NULL);
-  this->SetFaceIndex(NULL);
-  this->SetNodeIndex(NULL);
-  this->FamilyOnEntity->clear();
-  this->FamilyIdStatus = FAMILY_ID_NOT_LOADED;
-}
-
-void vtkMedEntityArray::ComputeFamilies()
-{
-  this->FamilyOnEntity->clear();
-  vtkMedMesh* mesh = this->ParentGrid->GetParentMesh();
-
-  if(this->FamilyIds == NULL)
-    {
-    vtkMedFamilyOnEntity* foe = vtkMedFamilyOnEntity::New();
-    foe->SetParentGrid(this->ParentGrid);
-    this->AppendFamilyOnEntity(foe);
-    foe->Delete();
-    if(this->GetEntity().EntityType != MED_NODE)
-      {
-      foe->SetFamily(mesh->GetOrCreateCellFamilyById(0));
-      }
-    else
-      {
-      foe->SetFamily(mesh->GetOrCreatePointFamilyById(0));
-      }
-    foe->SetEntityArray(this);
-    this->FamilyIdStatus = vtkMedEntityArray::FAMILY_ID_IMPLICIT;
-    return;
-    }
-
-  this->FamilyIdStatus = vtkMedEntityArray::FAMILY_ID_EXPLICIT;
-
-  set<med_int> idset;
-  for (vtkIdType index = 0; index < this->FamilyIds->GetNumberOfTuples(); index++)
-    {
-    med_int id = this->FamilyIds->GetValue(index);
-    idset.insert(id);
-    }
-
-  for (set<med_int>::iterator it = idset.begin(); it != idset.end(); it++)
-    {
-    vtkMedFamilyOnEntity* foe = vtkMedFamilyOnEntity::New();
-    foe->SetParentGrid(this->ParentGrid);
-    this->AppendFamilyOnEntity(foe);
-    foe->Delete();
-    if(this->GetEntity().EntityType != MED_NODE)
-      {
-      foe->SetFamily(mesh->GetOrCreateCellFamilyById(*it));
-      }
-    else
-      {
-      foe->SetFamily(mesh->GetOrCreatePointFamilyById(*it));
-      }
-    foe->SetEntityArray(this);
-    }
-}
-
-med_int vtkMedEntityArray::GetFamilyId(med_int id)
-{
-  if(this->FamilyIdStatus == FAMILY_ID_IMPLICIT)
-    return 0;
-  if(this->FamilyIdStatus == FAMILY_ID_NOT_LOADED)
-    {
-    vtkErrorMacro("You have to load family ids before asking for it!");
-    }
-  return this->FamilyIds->GetValue(id);
-}
-
-int vtkMedEntityArray::HasFamily(vtkMedFamily* family)
-{
-  for (int i = 0; i < this->FamilyOnEntity->size(); i++)
-    {
-    vtkMedFamilyOnEntity* foe = this->FamilyOnEntity->at(i);
-    if(foe->GetFamily() == family)
-      return 1;
-    }
-  return 0;
-}
-
-int vtkMedEntityArray::IsConnectivityLoaded()
-{
-  // Entity Arrays representing something else than cells
-  // have no connectivity
-
-  if(vtkMedUnstructuredGrid::SafeDownCast(this->GetParentGrid()) == NULL)
-    return 1;
-
-  if( this->Entity.EntityType != MED_CELL &&
-      this->Entity.EntityType != MED_DESCENDING_FACE &&
-      this->Entity.EntityType != MED_DESCENDING_EDGE &&
-      this->Entity.EntityType != MED_STRUCT_ELEMENT)
-    return 1;
-
-  if(this->ConnectivityArray == NULL)
-    return 0;
-
-  if(this->Connectivity == MED_NODAL && this->Entity.EntityType != MED_STRUCT_ELEMENT)
-    {
-    vtkIdType connSize = this->NumberOfEntity
-        * vtkMedUtilities::GetNumberOfPoint(this->Entity.GeometryType);
-
-    return connSize == this->ConnectivityArray->GetNumberOfTuples();
-    }
-  else if (this->Connectivity == MED_NODAL && this->Entity.EntityType == MED_STRUCT_ELEMENT)
-    {
-    if(this->StructElement == NULL)
-      return 1;
-
-    vtkIdType connSize = this->NumberOfEntity
-                         * this->StructElement->GetConnectivitySize();
-
-    return connSize == this->ConnectivityArray->GetNumberOfTuples();
-    }
-  else
-    {
-    vtkIdType connSize = this->NumberOfEntity
-        * vtkMedUtilities::GetNumberOfSubEntity(this->Entity.GeometryType);
-
-    return connSize == this->ConnectivityArray->GetNumberOfTuples();
-    }
-}
-
-int vtkMedEntityArray::IsFamilyIdsLoaded()
-{
-  return this->FamilyIdStatus != vtkMedEntityArray::FAMILY_ID_NOT_LOADED;;
-}
-
-int vtkMedEntityArray::IsGlobalIdsLoaded()
-{
-  return this->GlobalIds != NULL && this->GlobalIds->GetNumberOfTuples()
-      == this->NumberOfEntity;
-}
-
-void vtkMedEntityArray::GetCellVertices(vtkIdType index, vtkIdList* ids)
-{
-  ids->Initialize();
-
-  if(this->Entity.EntityType == MED_NODE)
-    {
-    ids->InsertNextId(index);
-    return;
-    }
-
-  if( this->Entity.EntityType != MED_CELL &&
-      this->Entity.EntityType != MED_DESCENDING_FACE &&
-      this->Entity.EntityType != MED_DESCENDING_EDGE &&
-      this->Entity.EntityType != MED_STRUCT_ELEMENT)
-    {
-    vtkErrorMacro("This reader is not compatible with those entities (yet)...");
-    return;
-    }
-
-  if(vtkMedUnstructuredGrid::SafeDownCast(this->ParentGrid) == NULL)
-    {
-    // this is a structured grid, connectivity is implicit...
-
-    if(this->Entity.GeometryType == MED_POINT1)
-      {
-      // degenerate case if there is only one point
-      ids->InsertNextId(0);
-      return;
-      }
-    if(this->Entity.GeometryType == MED_SEG2)
-      {
-      // line
-      ids->InsertNextId(index);
-      ids->InsertNextId(index+1);
-      return;
-      }
-    vtkMedRegularGrid* vtkrgrid = vtkMedRegularGrid::SafeDownCast(
-        this->GetParentGrid());
-    vtkMedCurvilinearGrid* vtkcgrid = vtkMedCurvilinearGrid::SafeDownCast(
-        this->GetParentGrid());
-    vtkIdType xncell = 0;
-    vtkIdType yncell = 0;
-    vtkIdType zncell = 0;
-    vtkIdType xnpts = 1;
-    vtkIdType ynpts = 1;
-    vtkIdType znpts = 1;
-    if(vtkrgrid!=NULL)
-      {
-      xncell = vtkrgrid->GetAxisSize(0)-1;
-      yncell = vtkrgrid->GetAxisSize(1)-1;
-      zncell = vtkrgrid->GetAxisSize(2)-1;
-      xnpts = vtkrgrid->GetAxisSize(0);
-      ynpts = vtkrgrid->GetAxisSize(1);
-      znpts = vtkrgrid->GetAxisSize(2);
-      }
-    if(vtkcgrid != NULL)
-      {
-      xncell = vtkcgrid->GetAxisSize(0)-1;
-      yncell = vtkcgrid->GetAxisSize(1)-1;
-      zncell = vtkcgrid->GetAxisSize(2)-1;
-      xnpts = vtkcgrid->GetAxisSize(0);
-      ynpts = vtkcgrid->GetAxisSize(1);
-      znpts = vtkcgrid->GetAxisSize(2);
-      }
-    vtkIdType xindex = index % xncell;
-    if(xncell <= 0)
-      return;
-
-    vtkIdType yindex = index / xncell;
-
-    if(this->Entity.GeometryType == MED_QUAD4)
-      {
-      // plane
-
-      ids->InsertNextId(xindex + yindex*xnpts);
-      ids->InsertNextId(xindex + 1 + yindex*xnpts);
-      ids->InsertNextId(xindex + yindex*xnpts);
-      ids->InsertNextId(xindex + 1 + (yindex + 1)*xnpts);
-      return;
-      }
-
-    if(yncell <= 0)
-      return;
-
-    vtkIdType zindex = index / (xncell*yncell);
-
-    if(this->Entity.GeometryType == MED_HEXA8)
-      {
-      // volume
-      ids->InsertNextId(xindex   + (yindex  )*xnpts + (zindex  )*xnpts*ynpts);
-      ids->InsertNextId(xindex+1 + (yindex  )*xnpts + (zindex  )*xnpts*ynpts);
-      ids->InsertNextId(xindex   + (yindex+1)*xnpts + (zindex  )*xnpts*ynpts);
-      ids->InsertNextId(xindex+1 + (yindex+1)*xnpts + (zindex  )*xnpts*ynpts);
-      ids->InsertNextId(xindex   + (yindex  )*xnpts + (zindex+1)*xnpts*ynpts);
-      ids->InsertNextId(xindex+1 + (yindex  )*xnpts + (zindex+1)*xnpts*ynpts);
-      ids->InsertNextId(xindex   + (yindex+1)*xnpts + (zindex+1)*xnpts*ynpts);
-      ids->InsertNextId(xindex+1 + (yindex+1)*xnpts + (zindex+1)*xnpts*ynpts);
-      return;
-      }
-    return;
-    }
-
-  this->LoadConnectivity();
-
-  if (this->GetEntity().GeometryType==MED_POLYHEDRON)
-    {
-    vtkMedIntArray* conn = this->GetConnectivityArray();
-    vtkMedIntArray* faceIndex = this->GetFaceIndex();
-    vtkMedIntArray* nodeIndex = this->GetNodeIndex();
-    med_int start = faceIndex->GetValue(index)-1;
-    med_int end = faceIndex->GetValue(index+1)-1;
-    // the use of a set loses the order, but VTK do not support this order anyway.
-    if (this->GetConnectivity()==MED_NODAL)
-      {
-      for (int ff = start; ff<end; ff++)
-        {
-        med_int fstart = nodeIndex->GetValue(ff)-1;
-        med_int fend = nodeIndex->GetValue(ff+1)-1;
-        for (int pt = fstart; pt<fend; pt++)
-          {
-          med_int ptid = conn->GetValue(pt)-1;
-          ids->InsertNextId(ptid);
-          }
-        }
-      }
-    else // MED_DESCENDING
-      {
-      vtkMedUnstructuredGrid* ugrid =
-          vtkMedUnstructuredGrid::SafeDownCast(this->ParentGrid);
-      if (!ugrid)
-        {
-        vtkErrorMacro(
-        "MED_DESCENDING connectivity is only supported on unstructured grids");
-        return;
-        }
-      set<med_int> pts;
-      vtkIdList* subIds = vtkIdList::New();
-      for (int ff = start; ff<end; ff++)
-        {
-        med_int fid = conn->GetValue(ff)-1;
-        vtkMedEntity entity;
-        entity.GeometryType = (med_geometry_type) NodeIndex->GetValue(ff);
-        entity.EntityType = MED_DESCENDING_FACE;
-        vtkMedEntityArray* subarray = ugrid->GetEntityArray(entity);
-        subarray->GetCellVertices(fid, subIds);
-        for (int id = 0; id<subIds->GetNumberOfIds(); id++)
-          {
-          med_int ptid = subIds->GetId(id);
-          if(pts.find(ptid) == pts.end())
-            {
-            ids->InsertNextId(ptid);
-            pts.insert(ptid);
-            }
-          }
-        }
-      subIds->Delete();
-      }
-    }//end polyhedron
-  else if (this->GetEntity().GeometryType==MED_POLYGON)
-    {
-    vtkMedIntArray* conn = this->GetConnectivityArray();
-    vtkMedIntArray* nids = this->GetFaceIndex();
-    med_int start = nids->GetValue(index)-1;
-    med_int end = nids->GetValue(index+1)-1;
-    if (this->GetConnectivity()==MED_NODAL)
-      {
-      for (int pt = start; pt<end; pt++)
-        {
-        ids->InsertNextId(conn->GetValue(pt)-1);
-        }
-      }
-    else // MED_DESCENDING
-      {
-      vtkIdList* subpts=vtkIdList::New();
-      vtkMedUnstructuredGrid* ugrid =
-          vtkMedUnstructuredGrid::SafeDownCast(this->ParentGrid);
-      if (!ugrid)
-        {
-        vtkErrorMacro("MED_DESCENDING connectivity is only "
-                      << "supported on unstructured grids");
-        return;
-        }
-      set<med_int> pts;
-      for (int sub = start; sub<end; sub++)
-        {
-        med_int subid = conn->GetValue(sub)-1;
-        vtkMedEntity subentity;
-        subentity.GeometryType = MED_SEG2;
-        subentity.EntityType = MED_DESCENDING_EDGE;
-        vtkMedEntityArray* subarray = ugrid->GetEntityArray(subentity);
-        subarray->GetCellVertices(subid, subpts);
-        for(int id=0; id<subpts->GetNumberOfIds(); id++)
-          {
-          med_int ptid = subpts->GetId(id);
-          if(pts.find(ptid) != pts.end())
-            {
-            pts.insert(ptid);
-            ids->InsertNextId(ptid);
-            }
-          }
-        }
-      subpts->Delete();
-      }
-    }//end poygon
-  else if (this->GetConnectivity()==MED_NODAL ||
-           vtkMedUtilities::GetDimension(this->GetEntity().GeometryType)<1)
-    {
-    int npts = 0;
-    if(this->GetEntity().EntityType == MED_STRUCT_ELEMENT)
-      {
-      if(this->StructElement != NULL)
-        {
-        npts = this->StructElement->GetConnectivitySize();
-        }
-      }
-    else
-      {
-      npts = vtkMedUtilities::GetNumberOfPoint(this->GetEntity().GeometryType);
-      }
-    vtkMedIntArray* conn = this->GetConnectivityArray();
-    for (int i = 0; i<npts; i++)
-      {
-      vtkIdType ptid = conn->GetValue(npts*index+i)-1;
-      ids->InsertNextId(ptid);
-      }
-    }//end nodal case
-  else
-    {
-    vtkIdList* subpts=vtkIdList::New();
-    int nsub=vtkMedUtilities::GetNumberOfSubEntity(
-        this->GetEntity().GeometryType);
-    vtkMedUnstructuredGrid* ugrid =
-        vtkMedUnstructuredGrid::SafeDownCast(this->ParentGrid);
-    if (!ugrid)
-      {
-      vtkErrorMacro(
-        "MED_DESCENDING connectivity is only supported on unstructured grids");
-      return;
-      }
-    vtkMedIntArray* conn=this->GetConnectivityArray();
-    ids->SetNumberOfIds(vtkMedUtilities::GetNumberOfPoint(
-        this->GetEntity().GeometryType));
-    for (int sub = 0; sub<nsub; sub++)
-      {
-      med_int subid = conn->GetValue(nsub*index+sub);
-      bool invert = false;
-      if(subid < 0)
-        {
-        subid = -subid;
-        invert = true;
-        }
-      subid = subid-1;
-
-      vtkMedEntity subentity;
-      subentity.GeometryType = vtkMedUtilities::GetSubGeometry(
-          this->GetEntity().GeometryType, sub);
-      subentity.EntityType = vtkMedUtilities::GetSubType(
-          this->GetEntity().EntityType);
-      vtkMedEntityArray* subarray = ugrid->GetEntityArray(subentity);
-      if(subarray == NULL)
-        {
-        subentity.EntityType = MED_CELL;
-        subarray = ugrid->GetEntityArray(subentity);
-        }
-      if(subarray == NULL)
-        {
-        vtkDebugMacro( << "Missing sub entity array " << subentity.GeometryType);
-        this->Valid = false;
-        break;
-        }
-      subarray->GetCellVertices(subid, subpts);
-      vtkMedUtilities::ProjectConnectivity(this->GetEntity().GeometryType, ids, subpts,
-          sub, invert);
-      }
-    subpts->Delete();
-    }
-}
-
-void  vtkMedEntityArray::LoadConnectivity()
-{
-  if(this->IsConnectivityLoaded())
-    return;
-
-  this->GetParentGrid()->GetParentMesh()->GetParentFile()->GetMedDriver()
-      ->LoadConnectivity(this);
-}
-
-void  vtkMedEntityArray::SetVariableAttributeValues(
-    vtkMedVariableAttribute* varatt, vtkAbstractArray* value)
-{
-  this->VariableAttributeValue[varatt] = value;
-}
-
-vtkAbstractArray* vtkMedEntityArray::GetVariableAttributeValue(
-    vtkMedVariableAttribute* varatt)
-{
-  if(this->VariableAttributeValue.find(varatt)
-    == this->VariableAttributeValue.end())
-    return NULL;
-
-  return this->VariableAttributeValue[varatt];
-}
-
-void vtkMedEntityArray::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, NumberOfEntity)
-  PRINT_IVAR(os, indent, Connectivity)
-  PRINT_IVAR(os, indent, InitialGlobalId)
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedEntityArray.h b/src/Plugins/MedReader/IO/vtkMedEntityArray.h
deleted file mode 100644 (file)
index 6e4d037..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedEntityArray_h_
-#define __vtkMedEntityArray_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMedUtilities.h"
-#include "vtkMed.h"
-#include "vtkMedFilter.h"
-
-class vtkMedIntArray;
-class vtkFamilyIdSet;
-class vtkMedFamily;
-class vtkMedFamilyOnEntity;
-class vtkMedMesh;
-class vtkMedGrid;
-class vtkIdList;
-class vtkMedStructElement;
-class vtkMedVariableAttribute;
-
-class VTK_EXPORT vtkMedEntityArray: public vtkObject
-{
-public:
-  static vtkMedEntityArray* New();
-  vtkTypeMacro(vtkMedEntityArray, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the number of cells of this entity type.
-  vtkSetMacro(NumberOfEntity, vtkIdType);
-  vtkGetMacro(NumberOfEntity, vtkIdType);
-
-  // Description:
-  // the support of the cells : one of
-  void  SetEntity(const vtkMedEntity& entity){this->Entity = entity;}
-  const vtkMedEntity& GetEntity(){return this->Entity;}
-
-  // Description:
-  // This connectivity type of this entity : one of
-  // MED_NODAL, MED_DESCENDING, MED_NO_CMODE
-  vtkSetMacro(Connectivity, med_connectivity_mode);
-  vtkGetMacro(Connectivity, med_connectivity_mode);
-
-  // Description:
-  // This array stores the family ids of each entity.
-  virtual void SetConnectivityArray(vtkMedIntArray*);
-  vtkGetObjectMacro(ConnectivityArray, vtkMedIntArray);
-
-  // Description:
-  // This array stores the connectivity array for this entity.
-  virtual void SetFamilyIds(vtkMedIntArray*);
-  virtual med_int GetFamilyId(med_int id);
-
-  // Description:
-  // This array stores the global Ids of the entities.
-  virtual void SetGlobalIds(vtkMedIntArray*);
-  vtkGetObjectMacro(GlobalIds, vtkMedIntArray);
-
-  // Description:
-  // For polygons, this array stores the index of each edge described in
-  // the connectivity array
-  // For polyhedrons, this arrays stores the index of each face described
-  // in the NodeIndex array
-  virtual void SetFaceIndex(vtkMedIntArray*);
-  vtkGetObjectMacro(FaceIndex, vtkMedIntArray);
-
-  // Description:
-  // For polyhedrons, this arrays can store either
-  // the index of each node of each face described in the Index1 array
-  // (node connectivity) or the type each face described in the Index1
-  // array (hierarchical connectivity)
-  virtual void SetNodeIndex(vtkMedIntArray*);
-  vtkGetObjectMacro(NodeIndex, vtkMedIntArray);
-
-  // Description:
-  // Arrays of entities are partitionned over families.
-  vtkSetObjectVectorMacro(FamilyOnEntity, vtkMedFamilyOnEntity);
-  vtkGetObjectVectorMacro(FamilyOnEntity, vtkMedFamilyOnEntity);
-
-  // Description:
-  // For polyhedrons, this arrays can store either
-  // the index of each node of each face described in the Index1 array
-  // (node connectivity) or the type each face described in the Index1
-  // array (hierarchical connectivity)
-  virtual void  SetParentGrid(vtkMedGrid*);
-  vtkGetObjectMacro(ParentGrid, vtkMedGrid);
-
-  // Description:
-  // Compute the list of families that are on this array
-  virtual void  ComputeFamilies();
-
-  // Description:
-  // returns true if there are cells of the given family on this entity.
-  virtual int HasFamily(vtkMedFamily*);
-
-  // Description:
-  // returns 1 if the connectivity array is set and matches the number of
-  // connectivity elements.
-  virtual int IsConnectivityLoaded();
-
-  // Description:
-  // returns 1 if the family ids is set and matches the number of entities.
-  virtual int IsFamilyIdsLoaded();
-
-  // Description:
-  // returns 1 if the global ids is set and matches the number of entities.
-  virtual int IsGlobalIdsLoaded();
-
-  // Description :
-  // This gives the global id of the first element of this array.
-  vtkSetMacro(InitialGlobalId, vtkIdType);
-  vtkGetMacro(InitialGlobalId, vtkIdType);
-
-  // Description :
-  // resets all to default status, release memory
-  virtual void Initialize();
-
-  // Description:
-  // Get the indices of the vertices used by a given cell.
-  void  GetCellVertices(vtkIdType, vtkIdList*);
-
-  virtual void  LoadConnectivity();
-
-  // Descritpion:
-  // This is a pointer to the StructElement object if any
-  // This pointer is set during the LinkMedInfo pass
-  virtual void  SetStructElement(vtkMedStructElement*);
-  vtkGetObjectMacro(StructElement, vtkMedStructElement);
-
-  void  SetVariableAttributeValues(vtkMedVariableAttribute*,
-                                   vtkAbstractArray*);
-  vtkAbstractArray* GetVariableAttributeValue(vtkMedVariableAttribute*);
-
-  // Description:
-  // Get/Set of the MED Filter for parallel reading.
-  void  SetFilter(vtkMedFilter* filter){this->Filter = filter;}
-  vtkMedFilter* GetFilter(){return this->Filter;}
-
-protected:
-  vtkMedEntityArray();
-  virtual ~vtkMedEntityArray();
-
-  vtkIdType NumberOfEntity;
-  vtkMedEntity Entity;
-
-  vtkMedFilter* Filter;
-
-  med_connectivity_mode Connectivity;
-  vtkIdType InitialGlobalId;
-
-  vtkMedGrid* ParentGrid;
-
-  vtkMedIntArray* FamilyIds;
-  vtkMedIntArray* GlobalIds;
-  vtkMedIntArray* ConnectivityArray;
-  vtkMedIntArray* FaceIndex;
-  vtkMedIntArray* NodeIndex;
-
-  vtkMedStructElement* StructElement;
-
-  int FamilyIdStatus;
-  enum{
-    FAMILY_ID_NOT_LOADED,
-    FAMILY_ID_IMPLICIT,
-    FAMILY_ID_EXPLICIT
-  };
-
-  //BTX
-  vtkObjectVector<vtkMedFamilyOnEntity>* FamilyOnEntity;
-
-  std::map<vtkMedVariableAttribute*, vtkSmartPointer<vtkAbstractArray> >
-      VariableAttributeValue;
-  //ETX
-
-  int Valid;
-
-private:
-  vtkMedEntityArray(const vtkMedEntityArray&); // Not implemented.
-  void operator=(const vtkMedEntityArray&); // Not implemented.
-};
-
-#endif //__vtkMedEntityArray_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFactory.cxx b/src/Plugins/MedReader/IO/vtkMedFactory.cxx
deleted file mode 100644 (file)
index ecf75d8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFactory.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkMedDriver30.h"
-
-// vtkCxxRevisionMacro(vtkMedFactory, "$Revision$")
-vtkStandardNewMacro(vtkMedFactory)
-
-vtkMedFactory::vtkMedFactory()
-{
-}
-
-vtkMedFactory::~vtkMedFactory()
-{
-}
-
-vtkMedDriver* vtkMedFactory::NewMedDriver(int major, int minor, int release)
-{
-  return vtkMedDriver30::New();
-}
-
-void vtkMedFactory::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFactory.h b/src/Plugins/MedReader/IO/vtkMedFactory.h
deleted file mode 100644 (file)
index cee9a3d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFactory_h_
-#define __vtkMedFactory_h_
-
-#include "vtkObject.h"
-class vtkMedDriver;
-
-class VTK_EXPORT vtkMedFactory: public vtkObject
-{
-public:
-  static vtkMedFactory* New();
-  vtkTypeMacro(vtkMedFactory, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  virtual vtkMedDriver* NewMedDriver(int major, int minor, int release);
-
-protected:
-  vtkMedFactory();
-  virtual ~vtkMedFactory();
-
-private:
-  vtkMedFactory(const vtkMedFactory&); // Not implemented.
-  void operator=(const vtkMedFactory&); // Not implemented.
-};
-
-#endif //__vtkMedFactory_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFamily.cxx b/src/Plugins/MedReader/IO/vtkMedFamily.cxx
deleted file mode 100644 (file)
index 9de55e3..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFamily.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-
-#include "vtkMedGroup.h"
-#include "vtkMedUtilities.h"
-
-vtkCxxGetObjectVectorMacro(vtkMedFamily, Group, vtkMedGroup);
-vtkCxxSetObjectVectorMacro(vtkMedFamily, Group, vtkMedGroup);
-
-// vtkCxxRevisionMacro(vtkMedFamily, "$Revision$")
-vtkStandardNewMacro(vtkMedFamily)
-
-vtkMedFamily::vtkMedFamily()
-{
-  this->Id = 0;
-  this->Name = NULL;
-  this->Group = new vtkObjectVector<vtkMedGroup>();
-  this->MedIterator = -1;
-  this->PointOrCell = vtkMedUtilities::OnPoint;
-
-  // by default, the family is part of the "NoGroup" fake group
-  this->AllocateNumberOfGroup(1);
-  vtkMedGroup* nogroup = this->GetGroup(0);
-  nogroup->SetName(vtkMedUtilities::NoGroupName);
-
-  this->SetName("UNDEFINED_FAMILY");
-}
-
-vtkMedFamily::~vtkMedFamily()
-{
-  this->SetName(NULL);
-  delete this->Group;
-}
-
-void vtkMedFamily::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, Id);
-  PRINT_IVAR(os, indent, MedIterator);
-  PRINT_IVAR(os, indent, PointOrCell);
-  PRINT_OBJECT_VECTOR(os, indent, Group);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFamily.h b/src/Plugins/MedReader/IO/vtkMedFamily.h
deleted file mode 100644 (file)
index f87ed67..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFamily_h_
-#define __vtkMedFamily_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-
-class vtkMedMesh;
-class vtkMedGroup;
-class vtkMedString;
-
-class VTK_EXPORT vtkMedFamily: public vtkObject
-{
-public:
-  static vtkMedFamily* New();
-  vtkTypeMacro(vtkMedFamily, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Set the name of this family.
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // The id of this family.
-  vtkGetMacro(Id, med_int);
-  vtkSetMacro(Id, med_int);
-
-  // Description:
-  // Each family can be part of one or several groups.
-  // This give access to the group names.
-  vtkGetObjectVectorMacro(Group, vtkMedGroup);
-  vtkSetObjectVectorMacro(Group, vtkMedGroup);
-
-  // Description:
-  // returns id this is a node or a cell centered family.
-  vtkSetMacro(PointOrCell, int);
-  vtkGetMacro(PointOrCell, int);
-
-  // Description:
-  // the index of this field in the med file.
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-protected:
-  vtkMedFamily();
-  virtual ~vtkMedFamily();
-
-  med_int Id;
-  med_int MedIterator;
-  char* Name;
-  int PointOrCell;
-
-  //BTX
-  vtkObjectVector<vtkMedGroup>* Group;
-  //ETX
-
-private:
-  vtkMedFamily(const vtkMedFamily&); // Not implemented.
-  void operator=(const vtkMedFamily&); // Not implemented.
-
-};
-
-#endif //__vtkMedFamily_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.cxx b/src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.cxx
deleted file mode 100644 (file)
index 5ca047d..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFamilyOnEntity.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFamily.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedMesh.h"
-#include "vtkMedGrid.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-
-vtkCxxSetObjectMacro(vtkMedFamilyOnEntity, Family, vtkMedFamily);
-vtkCxxSetObjectMacro(vtkMedFamilyOnEntity, EntityArray, vtkMedEntityArray);
-
-vtkCxxSetObjectMacro(vtkMedFamilyOnEntity, ParentGrid,vtkMedGrid);
-
-// vtkCxxRevisionMacro(vtkMedFamilyOnEntity, "$Revision$");
-vtkStandardNewMacro(vtkMedFamilyOnEntity)
-
-vtkMedFamilyOnEntity::vtkMedFamilyOnEntity()
-{
-  this->Family = NULL;
-  this->EntityArray = NULL;
-  this->ParentGrid = NULL;
-}
-
-vtkMedFamilyOnEntity::~vtkMedFamilyOnEntity()
-{
-  this->SetFamily(NULL);
-  this->SetEntityArray(NULL);
-  this->SetParentGrid(NULL);
-}
-
-vtkMedEntity vtkMedFamilyOnEntity::GetEntity()
-{
-  if(this->EntityArray != NULL)
-    {
-    return this->EntityArray->GetEntity();
-    }
-
-  return vtkMedEntity(MED_NODE, MED_POINT1);
-}
-
-int vtkMedFamilyOnEntity::GetPointOrCell()
-{
-  if(this->GetEntity().EntityType == MED_NODE)
-    return vtkMedUtilities::OnPoint;
-  return vtkMedUtilities::OnCell;
-}
-
-int vtkMedFamilyOnEntity::GetVertexOnly()
-{
-  if(this->GetPointOrCell() == vtkMedUtilities::OnPoint ||
-     this->EntityArray == NULL)
-    return true;
-
-  vtkMedEntity entity = this->EntityArray->GetEntity();
-  if(entity.EntityType == MED_POINT1 || entity.GeometryType == MED_NONE)
-    return true;
-
-  if(entity.GeometryName == MED_BALL_NAME && entity.EntityType == MED_STRUCT_ELEMENT)
-    return true;
-
-  if(entity.GeometryName == MED_PARTICLE_NAME && entity.EntityType == MED_STRUCT_ELEMENT)
-    return true;
-
-  return false;
-}
-
-void  vtkMedFamilyOnEntity::AddFamilyOnEntityOnProfile(
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  this->FamilyOnEntityOnProfile[foep->GetProfile()] = foep;
-}
-
-int vtkMedFamilyOnEntity::GetNumberOfFamilyOnEntityOnProfile()
-{
-  return this->FamilyOnEntityOnProfile.size();
-}
-
-vtkMedFamilyOnEntityOnProfile* vtkMedFamilyOnEntity::
-    GetFamilyOnEntityOnProfile(vtkMedProfile* profile)
-{
-  if(this->FamilyOnEntityOnProfile.find(profile)
-    != this->FamilyOnEntityOnProfile.end())
-    return this->FamilyOnEntityOnProfile[profile];
-
-  return NULL;
-}
-
-vtkMedFamilyOnEntityOnProfile* vtkMedFamilyOnEntity::
-    GetFamilyOnEntityOnProfile(int index)
-{
-  if(index < 0 || index >= this->FamilyOnEntityOnProfile.size())
-    return NULL;
-
-  std::map<vtkMedProfile*,
-  vtkSmartPointer<vtkMedFamilyOnEntityOnProfile> >::iterator it =
-  this->FamilyOnEntityOnProfile.begin();
-
-  for(int ii=0; ii<index; ii++)
-    it++;
-
-  return it->second;
-}
-
-void vtkMedFamilyOnEntity::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_OBJECT(os, indent, Family);
-  PRINT_OBJECT(os, indent, EntityArray);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.h b/src/Plugins/MedReader/IO/vtkMedFamilyOnEntity.h
deleted file mode 100644 (file)
index 948d73e..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFamilyOnEntity_h_
-#define __vtkMedFamilyOnEntity_h_
-
-// Description :
-// This class represents the intersection between a family and an entity.
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedUtilities.h"
-
-class vtkMedEntityArray;
-class vtkMedFamily;
-class vtkMedGrid;
-class vtkMedFamilyOnEntityOnProfile;
-class vtkMedIntArray;
-
-class VTK_EXPORT vtkMedFamilyOnEntity : public vtkObject
-{
-public :
-  static vtkMedFamilyOnEntity* New();
-  vtkTypeMacro(vtkMedFamilyOnEntity, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the family of this family on entity.
-  virtual void  SetFamily(vtkMedFamily*);
-  vtkGetObjectMacro(Family, vtkMedFamily);
-
-  // Description:
-  // This is the entity array this family on entity is on.
-  virtual void  SetEntityArray(vtkMedEntityArray*);
-  vtkGetObjectMacro(EntityArray, vtkMedEntityArray);
-
-  // Description:
-  // This is the grid this family on entity is reffering to
-  virtual void  SetParentGrid(vtkMedGrid*);
-  vtkGetObjectMacro(ParentGrid, vtkMedGrid);
-
-  // Description :
-  //  Returns vtkMedUtilities::OnPoint (0) or vtkMedUtilities::OnCell (1)
-  virtual int  GetPointOrCell();
-
-  // Description :
-  // Returns true if the family is on points or if the entity is MED_POINT1
-  // of if it is MED_BALL or MED_PARTICLE elements
-  virtual int  GetVertexOnly();
-
-  // Description:
-  // returns the entity descriptor associated with this family on entity
-  virtual vtkMedEntity GetEntity();
-
-  // Description:
-  // Fields can use profile to be stored on a subset of entities.
-  // a priori, profiles and families are independent notions.
-  // In case there are profiles, we create the intersection of the profile and
-  // the FamilyOnEntity to be able to map the field on the geometry.
-  // BEFORE calling those function, you have to have assigned a profile
-  // to the vtkMedFamilyOnEntityOnProfile
-  void  AddFamilyOnEntityOnProfile(vtkMedFamilyOnEntityOnProfile*);
-  int GetNumberOfFamilyOnEntityOnProfile();
-  vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(vtkMedProfile*);
-  vtkMedFamilyOnEntityOnProfile* GetFamilyOnEntityOnProfile(int index);
-
-protected:
-  vtkMedFamilyOnEntity();
-  virtual ~vtkMedFamilyOnEntity();
-
-  vtkMedFamily* Family;
-  vtkMedEntityArray* EntityArray;
-  vtkMedGrid* ParentGrid;
-
-  std::map<vtkMedProfile*, vtkSmartPointer<vtkMedFamilyOnEntityOnProfile> >
-      FamilyOnEntityOnProfile;
-
-private:
-  vtkMedFamilyOnEntity(const vtkMedFamilyOnEntity&); // Not implemented.
-  void operator=(const vtkMedFamilyOnEntity&); // Not implemented.
-
-};
-
-#endif //__vtkMedFamilyOnEntity_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.cxx b/src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.cxx
deleted file mode 100644 (file)
index e528f2c..0000000
+++ /dev/null
@@ -1,591 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFamilyOnEntityOnProfile.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedProfile.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedFamily.h"
-#include "vtkMedField.h"
-#include "vtkMedGrid.h"
-#include "vtkMedMesh.h"
-#include "vtkMedFieldOnProfile.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedFile.h"
-#include "vtkMedGrid.h"
-#include "vtkMedDriver.h"
-#include "vtkMedUnstructuredGrid.h"
-#include "vtkMedIntArray.h"
-
-#include "vtkBitArray.h"
-#include "vtkIdList.h"
-
-#include "vtkMultiProcessController.h"
-
-vtkCxxSetObjectMacro(vtkMedFamilyOnEntityOnProfile,FamilyOnEntity, vtkMedFamilyOnEntity);
-vtkCxxSetObjectMacro(vtkMedFamilyOnEntityOnProfile, Profile, vtkMedProfile);
-
-// vtkCxxRevisionMacro(vtkMedFamilyOnEntityOnProfile, "$Revision$");
-vtkStandardNewMacro(vtkMedFamilyOnEntityOnProfile)
-
-vtkMedFamilyOnEntityOnProfile::vtkMedFamilyOnEntityOnProfile()
-{
-  this->FamilyOnEntity = NULL;
-  this->Profile = NULL;
-  this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::NotComputed;
-  this->UseAllPoints = false;
-  this->MatchComputed = false;
-  this->Valid = true;
-}
-
-vtkMedFamilyOnEntityOnProfile::~vtkMedFamilyOnEntityOnProfile()
-{
-  this->SetFamilyOnEntity(NULL);
-  this->SetProfile(NULL);
-}
-
-bool vtkMedFamilyOnEntityOnProfile::KeepPoint(med_int index)
-{
-  if(this->IntersectionStatus == NotComputed)
-    this->ComputeIntersection(NULL);
-
-  if(this->UseAllPoints)
-    return true;
-
-  if(this->MedToVTKPointIndexMap.find(index)
-    == this->MedToVTKPointIndexMap.end())
-    return false;
-
-  return true;
-}
-
-bool vtkMedFamilyOnEntityOnProfile::KeepCell(med_int index)
-{
-  if(this->FamilyOnEntity->GetEntityArray()->GetFamilyId(index)
-    != this->FamilyOnEntity->GetFamily()->GetId())
-    return false;
-  return true;
-}
-
-int vtkMedFamilyOnEntityOnProfile::CanMapField(vtkMedFieldOnProfile* fop)
-{
-  // only point fields can be mapped on point supports.
-  if(this->GetFamilyOnEntity()->GetEntity().EntityType == MED_NODE &&
-     fop->GetParentFieldOverEntity()->GetEntity().EntityType != MED_NODE)
-    return false;
-
-  // if it is a cell-centered field, the geometry need to be the same
-  if(fop->GetParentFieldOverEntity()->GetEntity().EntityType != MED_NODE
-     && fop->GetParentFieldOverEntity()->GetEntity().GeometryType !=
-     this->GetFamilyOnEntity()->GetEntity().GeometryType)
-    return false;
-
-  int numProc = 1;
-  vtkMultiProcessController* controller =
-        vtkMultiProcessController::GetGlobalController();
-  if (controller != NULL)
-    {
-    numProc = controller->GetNumberOfProcesses();
-    }
-
-  if ((this->GetValid() == 0) && numProc == 1)
-    return false;
-
-  this->ComputeIntersection(fop);
-
-  if(this->IntersectionStatus == vtkMedFamilyOnEntityOnProfile::NoIntersection)
-    return false;
-
-  if(fop != NULL &&
-     this->GetFamilyOnEntity()->GetEntity().EntityType != MED_NODE &&
-     fop->GetParentFieldOverEntity()->GetEntity().EntityType == MED_NODE &&
-     this->PointProfileMatch[fop->GetProfile()] == BadOrNoIntersection)
-    return false;
-
-  return true;
-}
-
-int vtkMedFamilyOnEntityOnProfile::CanShallowCopy(vtkMedFieldOnProfile *fop)
-{
-  if(fop == NULL)
-    {
-    bool shallow_on_points = this->CanShallowCopyPointField(NULL);
-    bool shallow_on_cells = this->CanShallowCopyCellField(NULL);
-    if(shallow_on_points && shallow_on_cells)
-      return true;
-    if(!shallow_on_points && !shallow_on_cells)
-      return false;
-    vtkErrorMacro("CanShallowCopy cannot answer : is it a point or a cell field?");
-    return false;
-    }
-
-  if(fop->GetParentFieldOverEntity()->GetParentStep()->GetParentField()
-    ->GetFieldType() == vtkMedField::PointField)
-    return this->CanShallowCopyPointField(fop);
-  else
-    return this->CanShallowCopyCellField(fop);
-}
-
-void vtkMedFamilyOnEntityOnProfile::ComputeIntersection(vtkMedFieldOnProfile* fop)
-{
-  int nodeOrCellSupport=this->GetFamilyOnEntity()->GetPointOrCell();
-  int fieldType;
-  if(fop)
-    {
-    fieldType = fop->GetParentFieldOverEntity()->GetParentStep()->
-                  GetParentField()->GetFieldType();
-    }
-  else
-    {
-    fieldType = (nodeOrCellSupport==vtkMedUtilities::OnPoint?vtkMedField::PointField:vtkMedField::CellField);
-    }
-  // Cell fields cannot match point supports
-  if(fieldType != vtkMedField::PointField
-     && nodeOrCellSupport == vtkMedUtilities::OnPoint)
-    {
-    this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::NoIntersection;
-    this->UseAllPoints = false;
-    }
-  else if(fieldType != vtkMedField::PointField
-     && nodeOrCellSupport ==vtkMedUtilities::OnCell)
-    {
-    this->ComputeCellFamilyVsCellProfileMatch();
-    }
-  else if(fieldType == vtkMedField::PointField
-     && nodeOrCellSupport ==vtkMedUtilities::OnPoint)
-    {
-    vtkMedProfile* profile = NULL;
-    if(fop != NULL)
-      {
-      profile = fop->GetProfile();
-      }
-    // point fields must share the same profile as the point support.
-    this->ComputePointFamilyVsPointProfileMatch();
-
-    }
-  else if(fieldType == vtkMedField::PointField
-     && nodeOrCellSupport == vtkMedUtilities::OnCell)
-    {
-    vtkMedProfile* profile = NULL;
-    if(fop != NULL)
-      {
-      profile = fop->GetProfile();
-      }
-    this->ComputeCellFamilyVsPointProfileMatch(profile);
-    }
-
-  this->MatchComputed = true;
-}
-
-int vtkMedFamilyOnEntityOnProfile::CanShallowCopyPointField(vtkMedFieldOnProfile* fop)
-{
-  vtkMedProfile* profile = (fop != NULL?fop->GetProfile(): NULL);
-  if(this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnCell)
-    {
-    if(this->PointProfileMatch.find(profile) == this->PointProfileMatch.end())
-      {
-      this->ComputeCellFamilyVsPointProfileMatch(profile);
-      }
-    int match = this->PointProfileMatch[profile];
-    return match
-        == vtkMedFamilyOnEntityOnProfile::ProfileEqualsSupport;
-    }
-  else
-    {
-    // this is a point support.
-    // The only case when there is shallow copy is if there is at most 1 family
-    // and the profile is shared.
-    if(this->Profile == profile &&
-       this->GetFamilyOnEntity()->GetEntityArray()
-        ->GetNumberOfFamilyOnEntity() <= 1)
-      {
-      return true;
-      }
-    else
-      {
-      return false;
-      }
-    }
-}
-
-int vtkMedFamilyOnEntityOnProfile::CanShallowCopyCellField(vtkMedFieldOnProfile* fop)
-{
-  vtkMedProfile* profile = (fop != NULL?fop->GetProfile(): NULL);
-  // cell fields cannot be mapped to cell supports
-  if(this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnPoint)
-    {
-    return false;
-    }
-
-  // this is a cell support.
-  if(this->Profile != profile)
-    {
-    return false;
-    }
-
-  // the only case I can shallow copy is if there is only one family
-  // defined on those cells.
-  if(this->Profile == NULL &&
-     this->GetFamilyOnEntity()->GetEntityArray()
-    ->GetNumberOfFamilyOnEntity() <= 1)
-    return true;
-
-  return false;
-}
-
-void  vtkMedFamilyOnEntityOnProfile::ComputeUsedPoints()
-{
-  this->MedToVTKPointIndexMap.clear();
-
-  //first test a few special cases where no heavy computing is necessary
-  vtkMedGrid* grid = this->FamilyOnEntity->GetParentGrid();
-  if(this->Profile == NULL)
-    {
-    // If there is no profile, the entity is on points and there
-    // at most 1 point family, then all points are used.
-    if(this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnPoint &&
-       this->FamilyOnEntity->GetEntityArray()->GetNumberOfFamilyOnEntity() <= 1)
-      {
-      this->UseAllPoints = true;
-      return;
-      }
-    // if there is no profile, the grid is structured, the entity is on cell
-    // and there is at most 1 family on his entity, then all points are used
-    if(vtkMedUnstructuredGrid::SafeDownCast(grid) == NULL &&
-       this->FamilyOnEntity->GetPointOrCell() == vtkMedUtilities::OnCell &&
-       this->FamilyOnEntity->GetEntityArray()->GetNumberOfFamilyOnEntity() <= 1)
-      {
-      this->UseAllPoints = true;
-      return;
-      }
-    }
-
-  vtkSmartPointer<vtkBitArray> flag = vtkSmartPointer<vtkBitArray>::New();
-  flag->SetNumberOfTuples(grid->GetNumberOfPoints());
-
-  // initialize the array to false
-  for(vtkIdType pid = 0; pid < flag->GetNumberOfTuples(); pid++)
-    flag->SetValue(pid, false);
-
-  // for each cell, flag the used points
-  if(this->Profile)
-    this->Profile->Load();
-
-  vtkMedIntArray* pids=(this->Profile!=NULL?this->Profile->GetIds():NULL);
-
-  med_int famId = this->FamilyOnEntity->GetFamily()->GetId();
-  vtkMedEntityArray* array = this->FamilyOnEntity->GetEntityArray();
-  vtkSmartPointer<vtkIdList> ids = vtkSmartPointer<vtkIdList>::New();
-
-  array->LoadConnectivity();
-
-  vtkIdType pflsize = (pids != NULL ? pids->GetNumberOfTuples():array->GetNumberOfEntity());
-  for(vtkIdType pindex=0; pindex<pflsize; pindex++)
-    {
-    med_int pid = (pids != NULL ? pids->GetValue(pindex)-1 : pindex);
-    med_int fid = array->GetFamilyId(pid);
-    if(famId==fid)
-      {
-      // this cell is of the family and on the profile.
-      // --> flag all vertices of this cell
-      array->GetCellVertices(pid, ids);
-      for(int id = 0; id<ids->GetNumberOfIds(); id++)
-        {
-        vtkIdType subid = ids->GetId(id);
-        if(subid < 0 || subid >= flag->GetNumberOfTuples())
-          {
-          vtkDebugMacro("invalid sub id : " << subid);
-          this->SetValid(0);
-          break;
-          }
-        flag->SetValue(subid, 1);
-        }
-      }
-    }
-
-  // now, the flag array contains all vertices used by this support
-  this->UseAllPoints = true;
-  for(vtkIdType pid = 0; pid<flag->GetNumberOfTuples(); pid++)
-    {
-    if(flag->GetValue(pid) == false)
-      {
-      this->UseAllPoints = false;
-      break;
-      }
-    }
-
-  if(!this->UseAllPoints)
-    {
-    // If all points are not used, I compute the index mapping
-    vtkIdType vtk_index = 0;
-
-    for(vtkIdType pid=0; pid < flag->GetNumberOfTuples(); pid++)
-      {
-      if(flag->GetValue(pid) == true)
-        {
-        this->MedToVTKPointIndexMap[pid] = vtk_index;
-        vtk_index++;
-        }
-      }
-    }
-}
-
-void vtkMedFamilyOnEntityOnProfile::ComputeCellFamilyVsCellProfileMatch()
-{
-  if(this->MatchComputed)
-    return;
-
-  // this computes the UseAllPoints flag.
-  this->ComputeUsedPoints();
-
-  if(this->Profile == NULL)
-    {
-    // If there is no profile, then the match is exact if and only
-    // if there is 1 cell family on this entity
-    if(this->FamilyOnEntity->GetEntityArray()->GetNumberOfFamilyOnEntity() == 1)
-      {
-      this->IntersectionStatus =
-          vtkMedFamilyOnEntityOnProfile::ProfileIncludedInFamily;
-      }
-    else
-      {
-      this->IntersectionStatus =
-          vtkMedFamilyOnEntityOnProfile::ProfileIntersectsFamily;
-      }
-    return;
-    }
-
-  this->Profile->Load();
-  vtkMedIntArray* pids=this->Profile->GetIds();
-
-  if(pids==NULL)
-    {
-    vtkErrorMacro("Could not load profile indices!");
-    this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::NotComputed;
-    this->UseAllPoints = false;
-    return;
-    }
-
-  med_int famId = this->GetFamilyOnEntity()->GetFamily()->GetId();
-  vtkIdType pindex=0;
-  vtkMedEntityArray* array=this->FamilyOnEntity->GetEntityArray();
-  bool profile_included = true;
-  bool profile_intersect = false;
-  for(int pindex=0; pindex<pids->GetNumberOfTuples(); pindex++)
-    {
-    med_int pid=pids->GetValue(pindex)-1;
-    med_int fid=array->GetFamilyId(pid);
-    if(famId==fid)
-      {// the current cell is on the familyand on the profile
-      // --> there is an overlap
-      profile_intersect = true;
-      }
-    else
-      {
-      // the cell is on the profile but not on the family --> no inclusion
-      profile_included=false;
-      }
-    }
-
-  if(profile_included && profile_intersect)
-    this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::ProfileIncludedInFamily;
-  else if(profile_intersect)
-    this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::ProfileIntersectsFamily;
-  else
-    this->IntersectionStatus = vtkMedFamilyOnEntityOnProfile::NoIntersection;
-}
-
-void vtkMedFamilyOnEntityOnProfile::
-    ComputeCellFamilyVsPointProfileMatch(vtkMedProfile* profile)
-{
-  // first test if the cache is already set
-  if(this->PointProfileMatch.find(profile) != this->PointProfileMatch.end())
-    return;
-
-  // this will compute the cell match cache, as well as the UseAllPoints flag.
-  this->ComputeCellFamilyVsCellProfileMatch();
-
-  if(profile == NULL)
-    {
-    // If there is no profile, then the match is at least partial.
-    // It is exact if and only
-    // if the cell family uses all points
-    int match =  (this->UseAllPoints? ProfileEqualsSupport : ProfileLargerThanSupport);
-    this->PointProfileMatch[profile] =
-        (this->UseAllPoints? ProfileEqualsSupport : ProfileLargerThanSupport);
-    return;
-    }
-
-  // if profile is not NULL and I use all points --> BadOrNoIntersection
-  if(this->UseAllPoints)
-    {
-    this->PointProfileMatch[profile] = BadOrNoIntersection;
-    }
-
-  profile->Load();
-
-  vtkMedIntArray* pids=profile->GetIds();
-
-  if(pids == NULL)
-    {
-    vtkErrorMacro("profile indices could not be loaded!");
-    this->PointProfileMatch[profile] = BadOrNoIntersection;
-    return;
-    }
-
-  med_int pindex = 0;
-  bool exact_match = true;
-  vtkIdType numberOfUsedPoints = pids->GetNumberOfTuples();
-  for(med_int pindex=0; pindex < pids->GetNumberOfTuples(); pindex++)
-    {
-    med_int id = pids->GetValue(pindex);
-    if(this->MedToVTKPointIndexMap.find(id-1) == this->MedToVTKPointIndexMap.end())
-      {
-      // The given point profile index is not used by this support.
-      // the superposition is at most partial.
-      exact_match = false;
-      numberOfUsedPoints--;
-      }
-    }
-
-  // if this profile is smaller than the number of points, I can't match
-  // the profile to this support
-  if(numberOfUsedPoints < this->MedToVTKPointIndexMap.size())
-    {
-    this->PointProfileMatch[profile] = BadOrNoIntersection;
-    }
-  else if(exact_match)
-    {
-    this->PointProfileMatch[profile] = ProfileEqualsSupport;
-    }
-  else
-    {
-    this->PointProfileMatch[profile] = ProfileLargerThanSupport;
-    }
-}
-
-void  vtkMedFamilyOnEntityOnProfile::ComputePointFamilyVsPointProfileMatch()
-{
-  if(this->MatchComputed)
-    return;
-
-  this->ComputeUsedPoints();
-
-  if(this->Profile == NULL)
-    {
-    // If there is no profile, then the match is exact if there is at most
-    // 1 point family on the grid
-    if(this->FamilyOnEntity->GetParentGrid()->GetParentMesh()
-      ->GetNumberOfPointFamily() <= 1)
-      {
-      this->IntersectionStatus = ProfileIncludedInFamily;
-      }
-    }
-
-  // there is a profile, we have to compute the match between the family and
-  // the profile
-  vtkMedFamilyOnEntity* foe = this->GetFamilyOnEntity();
-  vtkMedEntityArray* pea = foe->GetEntityArray();
-  vtkMedIntArray* pIds = NULL;
-
-  if(this->Profile)
-    {
-    this->Profile->Load();
-    pIds=this->Profile->GetIds();
-    }
-
-  if(pIds == NULL)
-    {
-    if(this->FamilyOnEntity->GetEntityArray()->GetNumberOfFamilyOnEntity() > 1)
-      {
-      this->IntersectionStatus =
-          vtkMedFamilyOnEntityOnProfile::ProfileIntersectsFamily;
-      }
-    else
-      {
-      this->IntersectionStatus =
-          vtkMedFamilyOnEntityOnProfile::ProfileIncludedInFamily;
-      }
-    return;
-    }
-
-  bool profile_intersects=false;
-  bool profile_included=true;
-  med_int famId=this->FamilyOnEntity->GetFamily()->GetId();
-  for(vtkIdType pindex=0; pindex<pIds->GetNumberOfTuples(); pindex++)
-    {
-    med_int pid=pIds->GetValue(pindex)-1;
-    med_int fid = pea->GetFamilyId(pid);
-   // med_int fid=grid->GetPointFamilyId(pid);
-    if(fid==famId)
-      {// the family of the current point is the good one
-      profile_intersects=true;
-      }
-    else
-      {
-      // we are on the profile and not on the family -->
-      // no exact match, but the the profile might be larger than the family.
-      profile_included=false;
-      }
-    }
-
-  if(!profile_intersects)
-    {
-    this->IntersectionStatus =
-        vtkMedFamilyOnEntityOnProfile::NoIntersection;
-    }
-  else if(profile_included)
-    {
-    this->IntersectionStatus =
-        vtkMedFamilyOnEntityOnProfile::ProfileIncludedInFamily;
-    }
-  else
-    {
-    this->IntersectionStatus =
-        vtkMedFamilyOnEntityOnProfile::ProfileIntersectsFamily;
-    }
-}
-
-vtkIdType vtkMedFamilyOnEntityOnProfile::GetVTKPointIndex(vtkIdType medCIndex)
-{
-  if(this->IntersectionStatus == NotComputed)
-    this->ComputeIntersection(NULL);
-
-  if(this->UseAllPoints)
-    return medCIndex;
-
-  if(this->MedToVTKPointIndexMap.find(medCIndex)
-    == this->MedToVTKPointIndexMap.end())
-    {
-    vtkDebugMacro("GetVTKPointIndex asked for "
-                  << medCIndex << " which has not been mapped");
-    return -1;
-    }
-
-  return this->MedToVTKPointIndexMap[medCIndex];
-}
-
-void vtkMedFamilyOnEntityOnProfile::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.h b/src/Plugins/MedReader/IO/vtkMedFamilyOnEntityOnProfile.h
deleted file mode 100644 (file)
index 2f9537c..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFamilyOnEntityOnProfile_h_
-#define __vtkMedFamilyOnEntityOnProfile_h_
-
-// Description :
-// This class represents the intersection between a family and an entity and
-// a cell profile.
-// This is the smallest partition of the the support in a med file.
-//
-// Fields on points are mapped on cell supports if and only if they
-// fully match the cell support.
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedUtilities.h"
-
-class vtkMedFamilyOnEntity;
-class vtkMedProfile;
-
-class vtkBitArray;
-
-class VTK_EXPORT vtkMedFamilyOnEntityOnProfile : public vtkObject
-{
-public :
-  static vtkMedFamilyOnEntityOnProfile* New();
-  vtkTypeMacro(vtkMedFamilyOnEntityOnProfile, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the family on entity of this support.
-  virtual void  SetFamilyOnEntity(vtkMedFamilyOnEntity*);
-  vtkGetObjectMacro(FamilyOnEntity, vtkMedFamilyOnEntity);
-
-  // Description:
-  // This is the profile of this support.
-  virtual void  SetProfile(vtkMedProfile*);
-  vtkGetObjectMacro(Profile, vtkMedProfile);
-
-  // Description:
-  // This flag informs on the intersection of the family on entity
-  // and the profile.
-  // The intersection can be :
-  // 0 --> not computed
-  // 1 --> exact superposition
-  // 2 --> partial superposition
-  // 3 --> no intersection.
-  enum eIntersectionState
-    {NotComputed = 0,
-    ProfileIncludedInFamily = 1,
-    ProfileIntersectsFamily = 2,
-    NoIntersection = 3};
-
-  vtkGetMacro(IntersectionStatus, eIntersectionState);
-  vtkGetMacro(UseAllPoints, bool);
-
-  // Description:
-  // This method computes the IntersectionStatus and the UseAllPoints flags.
-  virtual void  ComputeIntersection(vtkMedFieldOnProfile*);
-
-  int CanShallowCopyCellField(vtkMedFieldOnProfile* fop);
-  int CanShallowCopyPointField(vtkMedFieldOnProfile* fop);
-  int CanShallowCopy(vtkMedFieldOnProfile* fop);
-  int CanMapField(vtkMedFieldOnProfile* fop);
-
-  enum ePointProfileVsSupportMatch
-    {
-    Unknown = 0,
-    ProfileLargerThanSupport = 1,
-    ProfileEqualsSupport = 2,
-    BadOrNoIntersection = 3
-    };
-
-  // Description:
-  // returns the index to use for this support on the vtk grid
-  // from the index stored on the med file -1 (starting to 0)
-  vtkIdType GetVTKPointIndex(vtkIdType medCIndex);
-
-  // Description:
-  // returns if this point is used by this support.
-  bool KeepPoint(med_int index);
-
-  // Description:
-  // returns if this cell is used by this support. (only look at the family,
-  // not at the profile)
-  bool KeepCell(med_int index);
-
-  // Description:
-  // This flag is set to false when building the
-  // connectivity if it is not valid.
-  vtkGetMacro(Valid, int);
-  vtkSetMacro(Valid, int);
-
-protected:
-  vtkMedFamilyOnEntityOnProfile();
-  virtual ~vtkMedFamilyOnEntityOnProfile();
-
-  // Description:
-  // Compute the UseAllPoints and IntersectionStatus ivars, depending
-  // on the type of field and the type of support.
-  virtual void  ComputeCellFamilyVsCellProfileMatch();
-  virtual void  ComputePointFamilyVsPointProfileMatch();
-  virtual void  ComputeCellFamilyVsPointProfileMatch(vtkMedProfile*);
-
-  // this method compute the UseAllPoints flag, and the MedToVTKPointIndexMap
-  // if the flag is set to false.
-  virtual void  ComputeUsedPoints();
-
-  vtkMedFamilyOnEntity* FamilyOnEntity;
-  vtkMedProfile* Profile;
-  eIntersectionState IntersectionStatus;
-  bool UseAllPoints;
-  int FieldType;
-  med_geometry_type FieldGeometryType;
-
-  std::map<med_int, med_int> MedToVTKPointIndexMap;
-
-  std::map<vtkMedProfile*, ePointProfileVsSupportMatch> PointProfileMatch;
-
-  bool MatchComputed;
-  int Valid;
-
-private:
-  vtkMedFamilyOnEntityOnProfile(const vtkMedFamilyOnEntityOnProfile&);
-    // Not implemented.
-  void operator=(const vtkMedFamilyOnEntityOnProfile&); // Not implemented.
-};
-
-#endif //__vtkMedFamilyOnEntityOnProfile_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedField.cxx b/src/Plugins/MedReader/IO/vtkMedField.cxx
deleted file mode 100644 (file)
index 188a6ff..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedField.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-#include "vtkStringArray.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFieldOnProfile.h"
-#include "vtkMedInterpolation.h"
-#include "vtkMedFile.h"
-
-#include <string>
-#include <map>
-using namespace std;
-
-vtkCxxGetObjectVectorMacro(vtkMedField, Interpolation, vtkMedInterpolation);
-vtkCxxSetObjectVectorMacro(vtkMedField, Interpolation, vtkMedInterpolation);
-
-vtkCxxSetObjectMacro(vtkMedField, ParentFile, vtkMedFile);
-
-// vtkCxxRevisionMacro(vtkMedField, "$Revision$")
-vtkStandardNewMacro(vtkMedField)
-
-vtkMedField::vtkMedField()
-{
-  this->NumberOfComponent = -1;
-  this->DataType = MED_FLOAT64;
-  this->Name = NULL;
-  this->MeshName = NULL;
-  this->TimeUnit = NULL;
-  this->FieldStep = new vtkMedComputeStepMap<vtkMedFieldStep> ();
-  this->Unit = vtkStringArray::New();
-  this->ComponentName = vtkStringArray::New();
-  this->Interpolation = new vtkObjectVector<vtkMedInterpolation> ();
-  this->MedIterator = -1;
-  this->FieldType = UnknownFieldType;
-  this->ParentFile = NULL;
-  this->Local = 1;
-}
-
-vtkMedField::~vtkMedField()
-{
-  this->SetName(NULL);
-  this->SetMeshName(NULL);
-  this->SetTimeUnit(NULL);
-  delete this->FieldStep;
-  this->Unit->Delete();
-  this->ComponentName->Delete();
-}
-
-void vtkMedField::ComputeFieldType()
-{
-  this->FieldType = UnknownFieldType;
-
-  // look for the med_entity_type
-  // on which this field is.
-  for(int sid = 0; sid < this->GetNumberOfFieldStep(); sid++)
-    {
-    vtkMedFieldStep* step = this->GetFieldStep(sid);
-  
-    for(int eid = 0; eid < step->GetNumberOfFieldOverEntity(); eid++)
-      {
-      vtkMedFieldOverEntity* fieldOverEntity = step->GetFieldOverEntity(eid);
-      med_entity_type type = fieldOverEntity->GetEntity().EntityType;
-
-      if (type == MED_NODE)
-        {
-        this->FieldType |= PointField;
-        }
-      else if(type == MED_NODE_ELEMENT )
-        {
-        this->FieldType |= ElnoField;
-        }
-      else
-        {
-        for(int pid=0; pid<fieldOverEntity->GetNumberOfFieldOnProfile(); pid++)
-          {
-          vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(pid);
-          const char* locname = fop->GetLocalizationName();
-          if(strcmp(locname, MED_GAUSS_ELNO) == 0 )
-            {
-            this->FieldType = ElnoField;
-            }
-          else if(strcmp(locname, MED_NO_LOCALIZATION) != 0 )
-            {
-            this->FieldType |= QuadratureField;
-            }
-          else
-            {
-            this->FieldType |= CellField;
-            }
-          }
-        }
-      }
-    }
-    
-  if(this->FieldType == UnknownFieldType) 
-    this->FieldType = PointField;
-}
-
-int vtkMedField::HasManyFieldTypes()
-{
-  int numberOfTypes = 0;
-  numberOfTypes += (this->FieldType & vtkMedField::PointField) != 0;
-  numberOfTypes += (this->FieldType & vtkMedField::CellField) != 0;
-  numberOfTypes += (this->FieldType & vtkMedField::QuadratureField) != 0;
-  numberOfTypes += (this->FieldType & vtkMedField::ElnoField) != 0;
-
-  return numberOfTypes > 1;
-}
-
-int vtkMedField::GetFirstType()
-{
-  if((this->FieldType & vtkMedField::PointField) != 0)
-    return vtkMedField::PointField;
-
-  if((this->FieldType & vtkMedField::CellField) != 0)
-    return vtkMedField::CellField;
-
-  if((this->FieldType & vtkMedField::QuadratureField) != 0)
-    return vtkMedField::QuadratureField;
-
-  if((this->FieldType & vtkMedField::ElnoField) != 0)
-    return vtkMedField::ElnoField;
-}
-
-void  vtkMedField::ExtractFieldType(vtkMedField* otherfield, int type)
-{
-  this->SetName(otherfield->GetName());
-  this->SetLocal(otherfield->GetLocal());
-  this->SetMedIterator(otherfield->GetMedIterator());
-  this->SetDataType(otherfield->GetDataType());
-  this->SetMeshName(otherfield->GetMeshName());
-  this->SetTimeUnit(otherfield->GetTimeUnit());
-  this->SetParentFile(otherfield->GetParentFile());
-
-  this->SetNumberOfComponent(otherfield->GetNumberOfComponent());
-  for(int i=0; i< this->GetNumberOfComponent(); i++)
-    {
-    this->GetComponentName()->SetValue(i, otherfield->
-                                       GetComponentName()->GetValue(i));
-    }
-
-  this->AllocateNumberOfInterpolation(otherfield->GetNumberOfInterpolation());
-  for(int i=0; i<this->GetNumberOfInterpolation(); i++)
-    {
-    this->SetInterpolation(i, otherfield->GetInterpolation(i));
-    }
-
-  this->GetUnit()->SetNumberOfValues(
-      otherfield->GetUnit()->GetNumberOfValues());
-  for(int i=0; i<this->GetUnit()->GetNumberOfValues(); i++)
-    {
-    this->GetUnit()->SetValue(i, otherfield->GetUnit()->GetValue(i));
-    }
-
-  int nstep = otherfield->GetNumberOfFieldStep();
-  map<vtkMedFieldStep*, vtkMedFieldStep*> stepmap;
-  for(int stepid=0; stepid<nstep; stepid++)
-    {
-    vtkMedFieldStep* otherstep = otherfield->GetFieldStep(stepid);
-    vtkMedFieldStep* step = vtkMedFieldStep::New();
-    step->SetComputeStep(otherstep->GetComputeStep());
-    this->AddFieldStep(step);
-    step->Delete();
-
-    stepmap[otherstep] = step;
-
-    vtkMedFieldStep* previousstep = NULL;
-    if(stepmap.find(otherstep->GetPreviousStep()) != stepmap.end())
-      {
-      previousstep = stepmap[otherstep->GetPreviousStep()];
-      }
-    step->SetPreviousStep(previousstep);
-    step->SetParentField(this);
-    step->SetMeshComputeStep(otherstep->GetMeshComputeStep());
-
-    for(int eid=0; eid<otherstep->GetNumberOfFieldOverEntity(); eid++)
-      {
-      vtkMedFieldOverEntity* fieldOverEntity = otherstep->GetFieldOverEntity(eid);
-
-      if(type == vtkMedField::PointField)
-        {
-        if(fieldOverEntity->GetEntity().EntityType != MED_NODE)
-          {
-          continue;
-          }
-        step->AppendFieldOverEntity(fieldOverEntity);
-        otherstep->RemoveFieldOverEntity(fieldOverEntity);
-        fieldOverEntity->SetParentStep(step);
-        }
-      else if(type == vtkMedField::ElnoField)
-        {
-        if(fieldOverEntity->GetEntity().EntityType != MED_NODE_ELEMENT)
-          {
-          continue;
-          }
-
-        step->AppendFieldOverEntity(fieldOverEntity);
-        otherstep->RemoveFieldOverEntity(fieldOverEntity);
-        eid--;
-        fieldOverEntity->SetParentStep(step);
-        }
-      else
-        {
-        if(fieldOverEntity->GetEntity().EntityType == MED_NODE)
-          {
-          continue;
-          }
-        vtkMedFieldOverEntity* newfoe = vtkMedFieldOverEntity::New();
-        newfoe->SetEntity(fieldOverEntity->GetEntity());
-        newfoe->SetHasProfile(fieldOverEntity->GetHasProfile());
-        newfoe->SetParentStep(step);
-        step->AppendFieldOverEntity(newfoe);
-        newfoe->Delete();
-        for(int pid=0; pid<fieldOverEntity->GetNumberOfFieldOnProfile(); pid++)
-          {
-          vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(pid);
-          const char* locname = fop->GetLocalizationName();
-          if((type == vtkMedField::QuadratureField
-             && strcmp(locname, MED_NO_LOCALIZATION) != 0) ||
-             (type == vtkMedField::CellField
-             && strcmp(locname, MED_NO_LOCALIZATION) == 0 ))
-            {
-            newfoe->AppendFieldOnProfile(fop);
-            fieldOverEntity->RemoveFieldOnProfile(fop);
-            pid--;
-            fop->SetParentFieldOverEntity(newfoe);
-            }
-          }
-        if(fieldOverEntity->GetNumberOfFieldOnProfile() == 0)
-          {
-          otherstep->RemoveFieldOverEntity(fieldOverEntity);
-          eid--;
-          }
-        }
-      }
-    }
-
-  this->ComputeFieldType();
-  otherfield->ComputeFieldType();
-}
-
-void vtkMedField::SetNumberOfComponent(int ncomp)
-{
-  if (this->NumberOfComponent == ncomp)
-    return;
-
-  this->NumberOfComponent = ncomp;
-  this->GetUnit()->SetNumberOfValues(this->NumberOfComponent);
-  this->GetComponentName()->SetNumberOfValues(this->NumberOfComponent);
-
-  this->Modified();
-}
-
-void  vtkMedField::AddFieldStep(vtkMedFieldStep* step)
-{
-  this->FieldStep->AddObject(step->GetComputeStep(), step);
-}
-
-void  vtkMedField::ClearFieldStep()
-{
-  this->FieldStep->clear();
-}
-
-vtkMedFieldStep* vtkMedField::GetFieldStep(const vtkMedComputeStep& cs)
-{
-  return this->FieldStep->GetObject(cs);
-}
-
-vtkMedFieldStep* vtkMedField::FindFieldStep(const vtkMedComputeStep& cs,
-                                            int strategy)
-{
-  return this->FieldStep->FindObject(cs, strategy);
-}
-
-med_int vtkMedField::GetNumberOfFieldStep()
-{
-  return this->FieldStep->GetNumberOfObject();
-}
-
-vtkMedFieldStep* vtkMedField::GetFieldStep(med_int id)
-{
-  return this->FieldStep->GetObject(id);
-}
-
-void  vtkMedField::GatherFieldTimes(std::set<med_float>& times)
-{
-  this->FieldStep->GatherTimes(times);
-}
-
-void  vtkMedField::GatherFieldIterations(med_float time,
-                                         std::set<med_int>& iterations)
-{
-  this->FieldStep->GatherIterations(time, iterations);
-}
-
-void vtkMedField::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, MedIterator);
-  PRINT_IVAR(os, indent, NumberOfComponent);
-  PRINT_IVAR(os, indent, FieldType);
-  PRINT_IVAR(os, indent, DataType);
-  PRINT_IVAR(os, indent, Local);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedField.h b/src/Plugins/MedReader/IO/vtkMedField.h
deleted file mode 100644 (file)
index 81eb9ef..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedField_h_
-#define __vtkMedField_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-
-#include "vtkSmartPointer.h"
-
-#include <set>
-
-class vtkStringArray;
-
-class vtkMedInterpolation;
-class vtkMedFieldOverEntity;
-class vtkMedString;
-class vtkMedFieldStep;
-class vtkMedComputeStep;
-template <class T>
-class vtkMedComputeStepMap;
-class vtkMedFile;
-
-class VTK_EXPORT vtkMedField: public vtkObject
-{
-public:
-  static vtkMedField* New();
-  vtkTypeMacro(vtkMedField, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // The number of component of this field
-  virtual void  SetNumberOfComponent(int);
-  vtkGetMacro(NumberOfComponent, int);
-
-  // Description:
-  // The type of data stored in this field
-  vtkSetMacro(DataType, med_field_type);
-  vtkGetMacro(DataType, med_field_type);
-
-  // Description:
-  // The name of this field
-  vtkGetStringMacro(Name);
-  vtkSetStringMacro(Name);
-
-  // Description:
-  // The name of this mesh this field is on
-  vtkGetStringMacro(MeshName);
-  vtkSetStringMacro(MeshName);
-
-  // Description:
-  // The name of this mesh this field is on
-  vtkGetStringMacro(TimeUnit);
-  vtkSetStringMacro(TimeUnit);
-
-  // Description:
-  // The units of each component of this field
-  vtkGetObjectMacro(Unit, vtkStringArray);
-
-  // Description:
-  // The name of each component of this field
-  vtkGetObjectMacro(ComponentName, vtkStringArray);
-
-  // Description:
-  // add a cell type as support to this field
-  void  AddFieldStep(vtkMedFieldStep*);
-  void  ClearFieldStep();
-  vtkMedFieldStep* GetFieldStep(const vtkMedComputeStep&);
-  vtkMedFieldStep* FindFieldStep(const vtkMedComputeStep&, int);
-  med_int GetNumberOfFieldStep();
-  vtkMedFieldStep* GetFieldStep(med_int);
-  void  GatherFieldTimes(std::set<med_float>&);
-  void  GatherFieldIterations(med_float,std::set<med_int>&);
-
-  // Description:
-  // returns if the field is on point, cell, quadrature point or elno
-  //BTX
-  enum {
-    UnknownFieldType = 0x00,
-    PointField = 0x01,
-    CellField = 0x02,
-    QuadratureField = 0x04,
-    ElnoField = 0x08};
-  //ETX
-  //Description:
-  // returns the type of field this is. The returned code is and OR between
-  // the different possible types.
-  vtkGetMacro(FieldType, int);
-
-  // This computes the FieldType
-  // (currently, it does it by looking only at the first compute step)
-  virtual void  ComputeFieldType();
-
-  // Description:
-  // This returns true if the FieldType is composed of several types
-  virtual int HasManyFieldTypes();
-
-  // Description:
-  // returns the first support type this field is on.
-  virtual int GetFirstType();
-
-  // Description:
-  // This methods extracts from the other field all the fields that are
-  // on the given support type and add them to the current field.
-  // It also updates the other FieldType ivar.
-  virtual void  ExtractFieldType(vtkMedField* otherfield, int type);
-
-  // Description:
-  // The index of this field in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // if the mesh is local or not.
-  vtkSetMacro(Local, med_int);
-  vtkGetMacro(Local, med_int);
-
-  // Description:
-  // The interpolation functions associated with this field
-  vtkGetObjectVectorMacro(Interpolation, vtkMedInterpolation);
-  vtkSetObjectVectorMacro(Interpolation, vtkMedInterpolation);
-
-  // Description:
-  // This stores the file this field is stored on.
-  virtual void  SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-protected:
-  vtkMedField();
-  virtual ~vtkMedField();
-
-  vtkSetMacro(FieldType, int);
-
-  int NumberOfComponent;
-  med_field_type DataType;
-  med_int MedIterator;
-  med_int Local;
-  char* Name;
-  char* MeshName;
-  char* TimeUnit;
-  int FieldType;
-  vtkMedFile* ParentFile;
-
-  //BTX
-  vtkMedComputeStepMap<vtkMedFieldStep>* FieldStep;
-  vtkObjectVector<vtkMedInterpolation>* Interpolation;
-  //ETX
-
-  vtkStringArray* Unit;
-  vtkStringArray* ComponentName;
-
-private:
-  vtkMedField(const vtkMedField&); // Not implemented.
-  void operator=(const vtkMedField&); // Not implemented.
-
-};
-
-#endif //__vtkMedField_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldOnProfile.cxx b/src/Plugins/MedReader/IO/vtkMedFieldOnProfile.cxx
deleted file mode 100644 (file)
index 2dd8893..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFieldOnProfile.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkDataArray.h"
-
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedField.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedProfile.h"
-
-vtkCxxSetObjectMacro(vtkMedFieldOnProfile, Data, vtkDataArray);
-vtkCxxSetObjectMacro(vtkMedFieldOnProfile, Profile, vtkMedProfile);
-vtkCxxSetObjectMacro(vtkMedFieldOnProfile, ParentFieldOverEntity, vtkMedFieldOverEntity);
-
-// vtkCxxRevisionMacro(vtkMedFieldOnProfile, "$Revision$")
-vtkStandardNewMacro(vtkMedFieldOnProfile)
-
-vtkMedFieldOnProfile::vtkMedFieldOnProfile()
-{
-  this->MedIterator = -1;
-  this->ParentFieldOverEntity = NULL;
-  this->ProfileName = NULL;
-  this->ProfileSize = 0;
-  this->LocalizationName = NULL;
-  this->NumberOfIntegrationPoint = 0;
-  this->NumberOfValues = 0;
-  this->Data = NULL;
-  this->Profile = NULL;
-  this->SetProfileName(MED_NO_PROFILE);
-  this->SetLocalizationName(MED_NO_LOCALIZATION);
-}
-
-vtkMedFieldOnProfile::~vtkMedFieldOnProfile()
-{
-  this->SetProfileName(NULL);
-  this->SetLocalizationName(NULL);
-  this->SetParentFieldOverEntity(NULL);
-  this->SetData(NULL);
-}
-
-int vtkMedFieldOnProfile::GetHasProfile()
-{
-  cout << "Profile Name = " << this->ProfileName << endl;
-  return strcmp(this->ProfileName, MED_NO_PROFILE) != 0;
-}
-
-int vtkMedFieldOnProfile::IsLoaded()
-{
-  return this->Data!=NULL
-      && this->Data->GetNumberOfTuples() == this->NumberOfValues;
-}
-
-void  vtkMedFieldOnProfile::Load(med_storage_mode mode)
-{
-  this->ParentFieldOverEntity->GetParentStep()->GetParentField()
-      ->GetParentFile()->GetMedDriver()->LoadField(this, mode);
-}
-
-void vtkMedFieldOnProfile::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-
-  PRINT_IVAR(os, indent, MedIterator);
-  PRINT_IVAR(os, indent, ProfileSize);
-  PRINT_IVAR(os, indent, NumberOfIntegrationPoint);
-  PRINT_IVAR(os, indent, NumberOfValues);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldOnProfile.h b/src/Plugins/MedReader/IO/vtkMedFieldOnProfile.h
deleted file mode 100644 (file)
index 65ff84c..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFieldOnProfile_h_
-#define __vtkMedFieldOnProfile_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-#include"vtkMedFilter.h"
-
-class vtkMedFieldOverEntity;
-class vtkMedString;
-class vtkDataArray;
-class vtkMedProfile;
-
-class VTK_EXPORT vtkMedFieldOnProfile: public vtkObject
-{
-public:
-  static vtkMedFieldOnProfile* New();
-  vtkTypeMacro(vtkMedFieldOnProfile, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the iterator that is used while reading fromt he med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // This is the FieldOverEntity this profile is on
-  virtual void  SetParentFieldOverEntity(vtkMedFieldOverEntity*);
-  vtkGetObjectMacro(ParentFieldOverEntity, vtkMedFieldOverEntity);
-
-  // Description:
-  // This is the name of the profile used by this field.
-  vtkGetStringMacro(ProfileName);
-  vtkSetStringMacro(ProfileName);
-
-  // Description:
-  // This is the name of the localization used by this field on this profile.
-  vtkGetStringMacro(LocalizationName);
-  vtkSetStringMacro(LocalizationName);
-
-  // Description:
-  // This stores the size of the profile.
-  vtkSetMacro(ProfileSize, med_int);
-  vtkGetMacro(ProfileSize, med_int);
-
-  // Description:
-  // This stores the number of integration points for this localization.
-  vtkSetMacro(NumberOfIntegrationPoint, med_int);
-  vtkGetMacro(NumberOfIntegrationPoint, med_int);
-
-  // Description:
-  // The number of values of this field on this mesh
-  vtkSetMacro(NumberOfValues, med_int);
-  vtkGetMacro(NumberOfValues, med_int);
-
-  // Description:
-  // the Data that store the values read from file
-  virtual void  SetData(vtkDataArray*);
-  vtkGetObjectMacro(Data, vtkDataArray);
-
-  // Description:
-  // the Profile object associated witht he profile name.
-  virtual void  SetProfile(vtkMedProfile*);
-  vtkGetObjectMacro(Profile, vtkMedProfile);
-
-  // Description:
-  // returns true if the data has been loaded
-  int IsLoaded();
-
-  // Description:
-  // returns true if the profile name is not MED_NO_PROFILE
-  int GetHasProfile();
-
-  // Description:
-  // Load the actual data of this field
-  void  Load(med_storage_mode mode);
-
-  // Description:
-  // Get/Set of the MED Filter for parallel reading.
-  //void  SetFilter(const med_filter& filter){this->Filter = filter;}
-  //med_filter GetFilter(){return this->Filter;}
-  void  SetFilter(vtkMedFilter* filter){this->Filter = filter;}
-  vtkMedFilter* GetFilter(){return this->Filter;}
-protected:
-  vtkMedFieldOnProfile();
-  virtual ~vtkMedFieldOnProfile();
-
-  med_int MedIterator;
-  vtkMedFieldOverEntity *ParentFieldOverEntity;
-  char* ProfileName;
-  med_int ProfileSize;
-  char* LocalizationName;
-  med_int NumberOfIntegrationPoint;
-  med_int NumberOfValues;
-  vtkDataArray* Data;
-  vtkMedProfile* Profile;
-
-  //med_filter Filter;
-  vtkMedFilter *Filter;
-
-private:
-  vtkMedFieldOnProfile(const vtkMedFieldOnProfile&); // Not implemented.
-  void operator=(const vtkMedFieldOnProfile&); // Not implemented.
-
-};
-
-#endif //__vtkMedFieldOnProfile_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldOverEntity.cxx b/src/Plugins/MedReader/IO/vtkMedFieldOverEntity.cxx
deleted file mode 100644 (file)
index 70b48f0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFieldOverEntity.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedMesh.h"
-#include "vtkDataArray.h"
-#include "vtkMedFieldOnProfile.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedField.h"
-
-vtkCxxGetObjectVectorMacro(vtkMedFieldOverEntity, FieldOnProfile, vtkMedFieldOnProfile);
-vtkCxxSetObjectVectorMacro(vtkMedFieldOverEntity, FieldOnProfile, vtkMedFieldOnProfile);
-
-vtkCxxSetObjectMacro(vtkMedFieldOverEntity, ParentStep, vtkMedFieldStep);
-
-// vtkCxxRevisionMacro(vtkMedFieldOverEntity, "$Revision$")
-vtkStandardNewMacro(vtkMedFieldOverEntity)
-
-vtkMedFieldOverEntity::vtkMedFieldOverEntity()
-{
-  this->FieldOnProfile = new vtkObjectVector<vtkMedFieldOnProfile>();
-  this->HasProfile = false;
-  this->ParentStep = NULL;
-}
-
-vtkMedFieldOverEntity::~vtkMedFieldOverEntity()
-{
-  delete this->FieldOnProfile;
-  this->SetParentStep(NULL);
-}
-
-void vtkMedFieldOverEntity::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldOverEntity.h b/src/Plugins/MedReader/IO/vtkMedFieldOverEntity.h
deleted file mode 100644 (file)
index c86cc69..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFieldOverEntity_h_
-#define __vtkMedFieldOverEntity_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-
-#include "vtkMedSetGet.h"
-#include "vtkMedUtilities.h"
-
-class vtkMedFieldOnProfile;
-class vtkMedFieldStep;
-
-class VTK_EXPORT vtkMedFieldOverEntity: public vtkObject
-{
-public:
-  static vtkMedFieldOverEntity* New();
-  vtkTypeMacro(vtkMedFieldOverEntity, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // the support of the cells : one of
-  void  SetEntity(const vtkMedEntity& entity){this->Entity = entity;}
-  const vtkMedEntity& GetEntity(){return this->Entity;}
-
-  // Description:
-  // This is the vtkMedFieldStep that owns this vtkMedFieldOverEntity
-  virtual void  SetParentStep(vtkMedFieldStep*);
-  vtkGetObjectMacro(ParentStep, vtkMedFieldStep);
-
-  // Description:
-  // This array store for each profile the field over this profile
-  vtkGetObjectVectorMacro(FieldOnProfile, vtkMedFieldOnProfile);
-  vtkSetObjectVectorMacro(FieldOnProfile, vtkMedFieldOnProfile);
-
-  // Description:
-  // This flag is set during the information pass, and tells if
-  // there is a profile of not.
-  // Note that if there is no profile, a dummy vtkMedFieldOnProfile
-  // is created to store the actual data.
-  vtkGetMacro(HasProfile, int);
-  vtkSetMacro(HasProfile, int);
-
-protected:
-  vtkMedFieldOverEntity();
-  virtual ~vtkMedFieldOverEntity();
-
-  vtkMedFieldStep* ParentStep;
-
-  vtkMedEntity  Entity;
-
-  int HasProfile;
-
-  //BTX
-  vtkObjectVector<vtkMedFieldOnProfile>* FieldOnProfile;
-  //ETX
-
-private:
-  vtkMedFieldOverEntity(const vtkMedFieldOverEntity&); // Not implemented.
-  void operator=(const vtkMedFieldOverEntity&); // Not implemented.
-};
-
-#endif //__vtkMedFieldOverEntity_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldStep.cxx b/src/Plugins/MedReader/IO/vtkMedFieldStep.cxx
deleted file mode 100644 (file)
index a5b9147..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFieldStep.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedField.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-
-vtkCxxGetObjectVectorMacro(vtkMedFieldStep, FieldOverEntity, vtkMedFieldOverEntity);
-vtkCxxSetObjectVectorMacro(vtkMedFieldStep, FieldOverEntity, vtkMedFieldOverEntity);
-
-vtkCxxSetObjectMacro(vtkMedFieldStep, ParentField, vtkMedField);
-vtkCxxSetObjectMacro(vtkMedFieldStep, PreviousStep, vtkMedFieldStep);
-
-// vtkCxxRevisionMacro(vtkMedFieldStep, "$Revision$")
-vtkStandardNewMacro(vtkMedFieldStep)
-
-vtkMedFieldStep::vtkMedFieldStep()
-{
-  this->FieldOverEntity = new vtkObjectVector<vtkMedFieldOverEntity>();
-  this->PreviousStep = NULL;
-  this->ParentField = NULL;
-  this->MedIterator = -1;
-  this->EntityInfoLoaded = 0;
-}
-
-vtkMedFieldStep::~vtkMedFieldStep()
-{
-  delete this->FieldOverEntity;
-  this->SetPreviousStep(NULL);
-  this->SetParentField(NULL);
-}
-
-vtkMedFieldOverEntity* vtkMedFieldStep::GetFieldOverEntity(
-    const vtkMedEntity& entity)
-{
-  for(int id=0; id < this->GetNumberOfFieldOverEntity(); id++)
-    {
-    vtkMedFieldOverEntity* fieldOverEntity = this->GetFieldOverEntity(id);
-    if(fieldOverEntity->GetEntity() == entity)
-      return fieldOverEntity;
-    }
-  return NULL;
-}
-
-void  vtkMedFieldStep::LoadInformation()
-{
-  this->GetParentField()->GetParentFile()->GetMedDriver()->
-      ReadFieldStepInformation(this, true);
-}
-
-void vtkMedFieldStep::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_OBJECT_VECTOR(os, indent, FieldOverEntity);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFieldStep.h b/src/Plugins/MedReader/IO/vtkMedFieldStep.h
deleted file mode 100644 (file)
index d8f766f..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFieldStep_h_
-#define __vtkMedFieldStep_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-#include "vtkMedUtilities.h"
-
-class vtkMedString;
-class vtkMedMesh;
-class vtkDataArray;
-class vtkMedFieldOverEntity;
-class vtkMedField;
-
-class VTK_EXPORT vtkMedFieldStep: public vtkObject
-{
-public:
-  static vtkMedFieldStep* New();
-  vtkTypeMacro(vtkMedFieldStep, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This iterator is used when reading information from the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // The compute step of this field
-  void  SetComputeStep(const vtkMedComputeStep& cs)
-    {
-    this->ComputeStep = cs;
-    }
-  const vtkMedComputeStep& GetComputeStep() const
-    {
-    return this->ComputeStep;
-    }
-
-  // Description:
-  // The compute step of the mesh supporting this field at this step
-  void  SetMeshComputeStep(const vtkMedComputeStep& cs)
-    {
-    this->MeshComputeStep = cs;
-    }
-  const vtkMedComputeStep& GetMeshComputeStep() const
-    {
-    return this->MeshComputeStep;
-    }
-
-  // Description:
-  // Set the number of steps of this field over these cells.
-  vtkGetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
-  vtkSetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
-
-  // Description:
-  // returns the vtkMedFieldOverEntity for the given Type and Geometry;
-  virtual vtkMedFieldOverEntity*
-          GetFieldOverEntity(const vtkMedEntity&);
-
-  // Description:
-  // The parent field is the one that owns this step
-  virtual void  SetParentField(vtkMedField*);
-  vtkGetObjectMacro(ParentField, vtkMedField);
-
-  // Description:
-  // The parent field is the one that owns this step
-  virtual void  SetPreviousStep(vtkMedFieldStep*);
-  vtkGetObjectMacro(PreviousStep, vtkMedFieldStep);
-
-  virtual void  LoadInformation();
-
-  // Description:
-  // This flag is used to delay loading information on all entity as long as possible
-  vtkSetMacro(EntityInfoLoaded, med_int);
-  vtkGetMacro(EntityInfoLoaded, med_int);
-
-protected:
-  vtkMedFieldStep();
-  virtual ~vtkMedFieldStep();
-
-  int EntityInfoLoaded;
-  med_int MedIterator;
-  vtkMedComputeStep ComputeStep;
-  vtkMedComputeStep MeshComputeStep;
-  vtkMedField* ParentField;
-  vtkMedFieldStep* PreviousStep;
-
-  //BTX
-  vtkObjectVector<vtkMedFieldOverEntity>* FieldOverEntity;
-  //ETX
-
-private:
-  vtkMedFieldStep(const vtkMedFieldStep&); // Not implemented.
-  void operator=(const vtkMedFieldStep&); // Not implemented.
-};
-
-#endif //__vtkMedFieldStep_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFile.cxx b/src/Plugins/MedReader/IO/vtkMedFile.cxx
deleted file mode 100644 (file)
index e4ba27a..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFile.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkDataArraySelection.h"
-#include "vtkSmartPointer.h"
-
-#include "vtkMedMesh.h"
-#include "vtkMedField.h"
-#include "vtkMedProfile.h"
-#include "vtkMedLocalization.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedLink.h"
-#include "vtkMedDriver.h"
-#include "vtkMedFactory.h"
-#include "vtkMedStructElement.h"
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, Mesh, vtkMedMesh);
-vtkCxxSetObjectVectorMacro(vtkMedFile, Mesh, vtkMedMesh);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, Field, vtkMedField);
-vtkCxxSetObjectVectorMacro(vtkMedFile, Field, vtkMedField);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, Profile, vtkMedProfile);
-vtkCxxSetObjectVectorMacro(vtkMedFile, Profile, vtkMedProfile);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, Localization, vtkMedLocalization);
-vtkCxxSetObjectVectorMacro(vtkMedFile, Localization, vtkMedLocalization);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, Link, vtkMedLink);
-vtkCxxSetObjectVectorMacro(vtkMedFile, Link, vtkMedLink);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, StructElement, vtkMedStructElement);
-vtkCxxSetObjectVectorMacro(vtkMedFile, StructElement, vtkMedStructElement);
-
-vtkCxxGetObjectVectorMacro(vtkMedFile, SupportMesh, vtkMedMesh);
-vtkCxxSetObjectVectorMacro(vtkMedFile, SupportMesh, vtkMedMesh);
-
-vtkCxxSetObjectMacro(vtkMedFile, MedDriver, vtkMedDriver);
-
-//vtkCxxRevisionMacro(vtkMedFile, "$Revision$")
-vtkStandardNewMacro(vtkMedFile)
-
-vtkMedFile::vtkMedFile()
-{
-  this->Comment = NULL;
-  this->Mesh = new vtkObjectVector<vtkMedMesh> ();
-  this->Field = new vtkObjectVector<vtkMedField> ();
-  this->Profile = new vtkObjectVector<vtkMedProfile> ();
-  this->Localization = new vtkObjectVector<vtkMedLocalization> ();
-  this->Link = new vtkObjectVector<vtkMedLink> ();
-  this->StructElement = new vtkObjectVector<vtkMedStructElement>();
-  this->SupportMesh = new vtkObjectVector<vtkMedMesh>();
-  this->FileName = NULL;
-  this->MedDriver = NULL;
-  this->VersionMajor = -1;
-  this->VersionMinor = -1;
-  this->VersionRelease = -1;
-}
-
-vtkMedFile::~vtkMedFile()
-{
-  this->SetComment(NULL);
-  delete this->Mesh;
-  delete this->Field;
-  delete this->Profile;
-  delete this->Localization;
-  delete this->Link;
-  delete this->StructElement;
-  delete this->SupportMesh;
-  this->SetFileName(NULL);
-  this->SetMedDriver(NULL);
-}
-
-int vtkMedFile::CreateDriver()
-{
-  int major, minor, release;
-  vtkMedDriver* driver=vtkMedDriver::New();
-  driver->SetMedFile(this);
-  bool canRead=driver->CanReadFile();
-  if(!canRead)
-    {
-    driver->Delete();
-    this->SetMedDriver(NULL);
-    return 0;
-    }
-  driver->ReadFileVersion(&major, &minor, &release);
-  driver->Delete();
-  vtkMedFactory* factory=vtkMedFactory::New();
-  driver=factory->NewMedDriver(major, minor, release);
-  factory->Delete();
-  this->SetMedDriver(driver);
-  if (driver)
-    {
-    driver->SetMedFile(this);
-    return 1;
-    }
-  return 0;
-}
-
-void  vtkMedFile::ReadInformation()
-{
-  if(this->MedDriver == NULL)
-    {
-    if(!this->CreateDriver())
-      return;
-    }
-
-  // at this point, we know that we have a valid driver.
-  this->MedDriver->ReadFileInformation(this);
-}
-
-vtkMedMesh* vtkMedFile::GetMesh(const char* str)
-{
-  for (int m = 0; m < this->Mesh->size(); m++)
-    {
-    vtkMedMesh* mesh = this->Mesh->at(m);
-    if (strcmp(mesh->GetName(), str) == 0)
-      {
-      return mesh;
-      }
-    }
-  return NULL;
-}
-
-vtkMedProfile* vtkMedFile::GetProfile(const char* str)
-{
-  for (int profId = 0; profId < this->Profile->size(); profId++)
-    {
-    vtkMedProfile* profile = this->Profile->at(profId);
-    if (strcmp(profile->GetName(), str) == 0)
-      {
-      return profile;
-      }
-    }
-  return NULL;
-
-}
-
-vtkMedLocalization* vtkMedFile::GetLocalization(const char* str)
-{
-  for (int quadId = 0; quadId < this->Localization->size(); quadId++)
-    {
-    vtkMedLocalization* loc = this->Localization->at(quadId);
-    if (strcmp(loc->GetName(), str) == 0)
-      {
-      return loc;
-      }
-    }
-  return NULL;
-}
-
-vtkMedStructElement* vtkMedFile::GetStructElement(const vtkMedEntity& entity)
-{
-  if(entity.EntityType != MED_STRUCT_ELEMENT)
-    return NULL;
-
-  for(int selemit = 0; selemit < this->GetNumberOfStructElement(); selemit++)
-    {
-    vtkMedStructElement* structelem = this->GetStructElement(selemit);
-    if(structelem->GetGeometryType() == entity.GeometryType)
-      return structelem;
-    }
-  return NULL;
-}
-
-void vtkMedFile::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-
-  PRINT_OBJECT_VECTOR(os, indent, Mesh);
-  PRINT_OBJECT_VECTOR(os, indent, Field);
-  PRINT_OBJECT_VECTOR(os, indent, Profile);
-  PRINT_OBJECT_VECTOR(os, indent, Localization);
-  PRINT_OBJECT_VECTOR(os, indent, Link);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFile.h b/src/Plugins/MedReader/IO/vtkMedFile.h
deleted file mode 100644 (file)
index 0ffec23..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFile_h_
-#define __vtkMedFile_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-
-class vtkMedMesh;
-class vtkMedField;
-class vtkMedProfile;
-class vtkMedLocalization;
-class vtkMedLink;
-class vtkMedDriver;
-class vtkMedStructElement;
-class vtkMedEntity;
-
-class VTK_EXPORT vtkMedFile: public vtkObject
-{
-public:
-  static vtkMedFile* New();
-  vtkTypeMacro(vtkMedFile, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Set the file name to read from
-  vtkSetStringMacro(FileName);
-  vtkGetStringMacro(FileName);
-
-  // Description:
-  // This is the description of this file as stored in the med file.
-  vtkGetObjectMacro(MedDriver, vtkMedDriver);
-
-  // Description:
-  // This method tries to create a new driver for this file.
-  // It returns 1 on success, 0 on failure.
-  virtual int CreateDriver();
-
-  // Description:
-  // read information from this file, and create the meta data structure
-  virtual void  ReadInformation();
-
-  // Description:
-  // Container of the meshes.
-  vtkGetObjectVectorMacro(Mesh, vtkMedMesh);
-  vtkSetObjectVectorMacro(Mesh, vtkMedMesh);
-  virtual vtkMedMesh* GetMesh(const char*);
-
-  // Description:
-  // Container of the fields.
-  vtkGetObjectVectorMacro(Field, vtkMedField);
-  vtkSetObjectVectorMacro(Field, vtkMedField);
-
-  // Description:
-  // Container of the fields.
-  vtkGetObjectVectorMacro(Link, vtkMedLink);
-  vtkSetObjectVectorMacro(Link, vtkMedLink);
-
-  // Description:
-  // Container of the profiles.
-  vtkGetObjectVectorMacro(Profile, vtkMedProfile);
-  vtkSetObjectVectorMacro(Profile, vtkMedProfile);
-  virtual vtkMedProfile*  GetProfile(const char*);
-
-  // Description:
-  // Container of the quadrature definitions.
-  vtkGetObjectVectorMacro(Localization, vtkMedLocalization);
-  vtkSetObjectVectorMacro(Localization, vtkMedLocalization);
-  virtual vtkMedLocalization* GetLocalization(const char*);
-
-  // Description:
-  // This is the description of this file as stored in the med file.
-  vtkSetStringMacro(Comment);
-  vtkGetStringMacro(Comment);
-
-  // Description:
-  // Those 3 numbers describe the version of med used to create this file.
-  vtkSetMacro(VersionMajor, int);
-  vtkGetMacro(VersionMajor, int);
-  vtkSetMacro(VersionMinor, int);
-  vtkGetMacro(VersionMinor, int);
-  vtkSetMacro(VersionRelease, int);
-  vtkGetMacro(VersionRelease, int);
-
-  // Description:
-  // Get the structural elements models
-  vtkGetObjectVectorMacro(StructElement, vtkMedStructElement);
-  vtkSetObjectVectorMacro(StructElement, vtkMedStructElement);
-  vtkMedStructElement* GetStructElement(const vtkMedEntity&);
-
-  // Description:
-  // Get the support mesh informations
-  vtkGetObjectVectorMacro(SupportMesh, vtkMedMesh);
-  vtkSetObjectVectorMacro(SupportMesh, vtkMedMesh);
-
-protected:
-  vtkMedFile();
-  virtual ~vtkMedFile();
-
-  char * FileName;
-  vtkMedDriver* MedDriver;
-  virtual void  SetMedDriver(vtkMedDriver*);
-
-  int VersionMajor;
-  int VersionMinor;
-  int VersionRelease;
-
-  char* Comment;
-  //BTX
-  vtkObjectVector<vtkMedMesh>* Mesh;
-  vtkObjectVector<vtkMedField>* Field;
-  vtkObjectVector<vtkMedProfile>* Profile;
-  vtkObjectVector<vtkMedLocalization>* Localization;
-  vtkObjectVector<vtkMedLink>* Link;
-  vtkObjectVector<vtkMedStructElement>* StructElement;
-  vtkObjectVector<vtkMedMesh>* SupportMesh;
-  //ETX
-
-private:
-  vtkMedFile(const vtkMedFile&); // Not implemented.
-  void operator=(const vtkMedFile&); // Not implemented.
-};
-
-#endif //__vtkMedMetaData_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFilter.cxx b/src/Plugins/MedReader/IO/vtkMedFilter.cxx
deleted file mode 100644 (file)
index 9187d76..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFilter.h"
-
-#include "vtkObjectFactory.h"
-
-// vtkCxxRevisionMacro(vtkMedFilter, "$Revision$")
-vtkStandardNewMacro(vtkMedFilter)
-
-vtkMedFilter::vtkMedFilter()
-{
-  _start = 0;
-  _stride = 0;
-  _count = 0;
-  _blocksize = 0;
-  _lastblocksize = 0;
-}
-
-vtkMedFilter::~vtkMedFilter()
-{
-}
-
-void vtkMedFilter::SetFilterSizes( int start, int stride,
-    int count, int blocksize, int lastblocksize )
-{
-  _start = start;
-  _stride = stride;
-  _count = count;
-  _blocksize = blocksize;
-  _lastblocksize = lastblocksize;
-}
-
-void vtkMedFilter::GetFilterSizes( int& start, int& stride,
-    int& count, int& blocksize, int& lastblocksize )
-{
-  start = _start;
-  stride = _stride;
-  count = _count;
-  blocksize = _blocksize;
-  lastblocksize = _lastblocksize;
-}
-
-void vtkMedFilter::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFilter.h b/src/Plugins/MedReader/IO/vtkMedFilter.h
deleted file mode 100644 (file)
index 39772cc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFilter_h_
-#define __vtkMedFilter_h_
-
-#include "vtkObject.h"
-#include"vtkMed.h"
-
-class VTK_EXPORT vtkMedFilter : public vtkObject
-{
-public:
-  static vtkMedFilter* New();
-  vtkTypeMacro(vtkMedFilter, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  void SetFilterSizes( int , int , int , int , int );
-
-  void GetFilterSizes( int& , int& , int& , int& , int& );
-
-protected :
-  vtkMedFilter();
-  ~vtkMedFilter();
-
-  //med_filter Filter;
-    int  _start;
-    int  _stride;
-    int  _count;
-    int  _blocksize;
-    int  _lastblocksize;
-};
-
-#endif //__vtkMedFilter_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedFraction.cxx b/src/Plugins/MedReader/IO/vtkMedFraction.cxx
deleted file mode 100644 (file)
index d2851a6..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedFraction.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkIntArray.h"
-#include "vtkDoubleArray.h"
-
-// vtkCxxRevisionMacro(vtkMedFraction, "$Revision$")
-vtkStandardNewMacro(vtkMedFraction)
-
-vtkMedFraction::vtkMedFraction()
-{
-  this->Coefficients = vtkDoubleArray::New();
-  this->Powers = vtkIntArray::New();
-  this->DenominatorCoefficients = vtkDoubleArray::New();
-  this->DenominatorPowers = vtkIntArray::New();
-  this->NumberOfVariable = 0;
-}
-
-vtkMedFraction::~vtkMedFraction()
-{
-  this->Coefficients->Delete();
-  this->Powers->Delete();
-  this->DenominatorCoefficients->Delete();
-  this->DenominatorPowers->Delete();
-}
-
-vtkIntArray* vtkMedFraction::GetPowers()
-{
-  return this->Powers;
-}
-
-vtkDoubleArray* vtkMedFraction::GetCoefficients()
-{
-  return this->Coefficients;
-}
-
-vtkIntArray* vtkMedFraction::GetDenominatorPowers()
-{
-  return this->DenominatorPowers;
-}
-
-vtkDoubleArray* vtkMedFraction::GetDenominatorCoefficients()
-{
-  return this->DenominatorCoefficients;
-}
-
-void vtkMedFraction::SetNumberOfCoefficients(int ncoeff)
-{
-  this->Powers->SetNumberOfTuples(ncoeff);
-  this->Coefficients->SetNumberOfTuples(ncoeff);
-
-  int* powers = this->Powers->GetPointer(0);
-  memset(powers, 0, ncoeff*this->Powers->GetNumberOfComponents()*sizeof(int));
-
-  double* coeffs = this->Coefficients->GetPointer(0);
-  memset(powers, 0, ncoeff*sizeof(double));
-}
-
-void vtkMedFraction::SetNumberOfDenominatorCoefficients(int ncoeff)
-{
-  this->DenominatorPowers->SetNumberOfTuples(ncoeff);
-  this->DenominatorCoefficients->SetNumberOfTuples(ncoeff);
-
-  int* powers = this->DenominatorPowers->GetPointer(0);
-  memset(powers, 0,
-         ncoeff*this->DenominatorPowers->GetNumberOfComponents()*sizeof(int));
-
-  double* coeffs = this->DenominatorCoefficients->GetPointer(0);
-  memset(powers, 0, ncoeff*sizeof(double));
-}
-
-void vtkMedFraction::SetNumberOfVariable(int nbofvariable)
-{
-  int nvar;
-  if(nbofvariable <= 0)
-    {
-    nvar = 1;
-    }
-  else
-    {
-    nvar = nbofvariable;
-    }
-
-  this->Powers->SetNumberOfComponents(nvar);
-  this->DenominatorPowers->SetNumberOfComponents(nvar);
-
-  // force an allocation
-  this->Powers->SetNumberOfTuples(
-      this->Powers->GetNumberOfTuples());
-  int* powers = this->Powers->GetPointer(0);
-  memset(powers, 0,
-         nvar*this->Powers->GetNumberOfComponents()*sizeof(int));
-
-  this->DenominatorPowers->SetNumberOfTuples(
-      this->DenominatorPowers->GetNumberOfTuples());
-  int* denom_powers = this->DenominatorPowers->GetPointer(0);
-  memset(denom_powers, 0,
-         nvar*this->DenominatorPowers->GetNumberOfComponents()*sizeof(int));
-
-  this->NumberOfVariable = nbofvariable;
-}
-
-double vtkMedFraction::Evaluate(double* coord)
-{
-  if(this->Coefficients->GetNumberOfTuples() == 0)
-    {
-    return 0.0;
-    }
-
-  if(this->NumberOfVariable == 0)
-    {
-    return this->Coefficients->GetValue(0);
-    }
-
-  double res = 0.0;
-  for(int coeffid = 0; coeffid <
-      this->Coefficients->GetNumberOfTuples(); coeffid++)
-    {
-    double prod = this->Coefficients->GetValue(coeffid);
-    for(int varid=0; varid<this->NumberOfVariable; varid++)
-      {
-      prod *= pow(coord[varid],
-                  this->Powers->GetValue(
-                      this->NumberOfVariable*coeffid+varid));
-      }
-    res += prod;
-    }
-
-  double denom_res = 0.0;
-
-  if(this->DenominatorCoefficients->GetNumberOfTuples() == 0)
-    {
-    denom_res = 1.0;
-    }
-  else
-    {
-    for(int coeffid = 0; coeffid <
-        this->DenominatorCoefficients->GetNumberOfTuples(); coeffid++)
-      {
-      double prod = this->DenominatorCoefficients->GetValue(coeffid);
-      for(int varid=0; varid<this->NumberOfVariable; varid++)
-        {
-        prod *= pow(coord[varid],
-                    this->DenominatorPowers->GetValue(
-                        this->NumberOfVariable*coeffid+varid));
-        }
-      denom_res += prod;
-      }
-    }
-
-  return res / denom_res;
-}
-
-double vtkMedFraction::Evaluate1(double coord)
-{
-  if(this->NumberOfVariable != 1)
-    {
-    vtkErrorMacro("Evaluate1 can only be called if the NumberOfVariable is 1");
-    }
-
-  return this->Evaluate(&coord);
-}
-
-double vtkMedFraction::Evaluate2(double x, double y)
-{
-  if(this->NumberOfVariable != 2)
-    {
-    vtkErrorMacro("Evaluate2 can only be called if the NumberOfVariable is 2");
-    }
-
-  double coord[2] = {x, y};
-
-  return this->Evaluate(coord);
-}
-
-double vtkMedFraction::Evaluate3(double x, double y, double z)
-{
-  if(this->NumberOfVariable != 3)
-    {
-    vtkErrorMacro("Evaluate3 can only be called if the NumberOfVariable is 3");
-    }
-
-  double coord[3] = {x, y, z};
-
-  return this->Evaluate(coord);
-}
-
-void vtkMedFraction::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedFraction.h b/src/Plugins/MedReader/IO/vtkMedFraction.h
deleted file mode 100644 (file)
index 9f210b7..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedFraction_h_
-#define __vtkMedFraction_h_
-
-#include "vtkObject.h"
-
-class vtkIntArray;
-class vtkDoubleArray;
-
-class VTK_EXPORT vtkMedFraction : public vtkObject
-{
-public:
-  static vtkMedFraction* New();
-  vtkTypeMacro(vtkMedFraction, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // the powers of this polynomial function
-  // the number of components of this array is equal to the maximum degree
-  // and the number of tuples to the numner of coefficients
-  virtual vtkIntArray* GetPowers();
-
-  // Description:
-  // The coefficients of this polynomial function
-  virtual vtkDoubleArray* GetCoefficients();
-
-  // Description:
-  // the powers of this polynomial function
-  // the number of components of this array is equal to the maximum degree
-  // and the number of tuples to the numner of coefficients
-  virtual vtkIntArray* GetDenominatorPowers();
-
-  // Description:
-  // The coefficients of this polynomial function
-  virtual vtkDoubleArray* GetDenominatorCoefficients();
-
-  // Description:
-  // This sets the number of coefficients in this polynom
-  void  SetNumberOfCoefficients(int);
-
-  // Description:
-  // This sets the number of coefficients in this polynom
-  void  SetNumberOfDenominatorCoefficients(int);
-
-  // Description:
-  // This sets the maximum degree of this polynom.
-  // This also allocates the array to store the powers of this
-  // polynom
-  void  SetNumberOfVariable(int);
-  vtkGetMacro(NumberOfVariable, int);
-
-  // Description:
-  // Evaluate the value of this function at this point.
-  virtual double Evaluate(double*);
-  virtual double Evaluate1(double);
-  virtual double Evaluate2(double, double);
-  virtual double Evaluate3(double, double, double);
-
-protected :
-  vtkMedFraction();
-  ~vtkMedFraction();
-
-  vtkIntArray* Powers;
-  vtkDoubleArray* Coefficients;
-
-  vtkIntArray* DenominatorPowers;
-  vtkDoubleArray* DenominatorCoefficients;
-
-  int NumberOfVariable;
-
-private :
-    vtkMedFraction(const vtkMedFraction&); // Not implemented.
-    void operator=(const vtkMedFraction&); // Not implemented.
-};
-
-#endif //__vtkMedFraction_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedGrid.cxx b/src/Plugins/MedReader/IO/vtkMedGrid.cxx
deleted file mode 100644 (file)
index 17d7da1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedGrid.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedMesh.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedFamily.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-
-#include <set>
-using std::set;
-
-vtkCxxGetObjectVectorMacro(vtkMedGrid, EntityArray, vtkMedEntityArray);
-vtkCxxSetObjectVectorMacro(vtkMedGrid, EntityArray, vtkMedEntityArray);
-
-vtkCxxSetObjectMacro(vtkMedGrid, PointGlobalIds, vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedGrid, ParentMesh, vtkMedMesh);
-vtkCxxSetObjectMacro(vtkMedGrid, PreviousGrid, vtkMedGrid);
-
-// vtkCxxRevisionMacro(vtkMedGrid, "$Revision$")
-
-vtkMedGrid::vtkMedGrid()
-{
-  this->ParentMesh = NULL;
-  this->PointGlobalIds = NULL;
-  this->PreviousGrid = NULL;
-
-  this->CoordinateSystem = MED_CARTESIAN;
-  this->EntityArray = new vtkObjectVector<vtkMedEntityArray>();
-  this->UsePreviousCoordinates = false;
-}
-
-vtkMedGrid::~vtkMedGrid()
-{
-  this->SetPointGlobalIds(NULL);
-  this->SetParentMesh(NULL);
-  delete this->EntityArray;
-}
-
-int vtkMedGrid::IsPointGlobalIdsLoaded()
-{
-  return this->PointGlobalIds != NULL
-      && this->PointGlobalIds->GetNumberOfTuples()
-          == this->GetNumberOfPoints();
-}
-
-void  vtkMedGrid::ClearMedSupports()
-{
-  this->SetPointGlobalIds(NULL);
-}
-
-vtkMedEntityArray* vtkMedGrid::GetEntityArray(const vtkMedEntity& entity)
-{
-  for(int id = 0; id < this->EntityArray->size(); id++)
-    {
-    vtkMedEntityArray* array = this->EntityArray->at(id);
-    if(array->GetEntity() == entity)
-      return array;
-    }
-  return NULL;
-}
-
-void  vtkMedGrid::GatherMedEntities(std::set<vtkMedEntity>& entities)
-{
-  for(int id = 0; id < this->EntityArray->size(); id++)
-    {
-    vtkMedEntityArray* array = this->EntityArray->at(id);
-    entities.insert(array->GetEntity());
-    }
-}
-
-void vtkMedGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedGrid.h b/src/Plugins/MedReader/IO/vtkMedGrid.h
deleted file mode 100644 (file)
index bee5c77..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedGrid_h_
-#define __vtkMedGrid_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMedUtilities.h"
-#include "vtkMed.h"
-#include "vtkMedIntArray.h"
-
-class vtkMedString;
-class vtkMedFamilyOnEntity;
-class vtkMedIntArray;
-
-class VTK_EXPORT vtkMedGrid : public vtkObject
-{
-public :
-  vtkTypeMacro(vtkMedGrid, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This identifies the time and iteration of this grid
-  void  SetComputeStep(vtkMedComputeStep cs)
-    {
-    this->ComputeStep = cs;
-    }
-  vtkMedComputeStep  GetComputeStep()
-    {
-    return this->ComputeStep;
-    }
-
-  // Description:
-  // returns the number of points. Each sub class has to implement this method.
-  virtual med_int GetNumberOfPoints() = 0;
-
-  // Description:
-  // Initialize the global Ids of the first element of each MedEntityArray
-  virtual void  InitializeCellGlobalIds(){;}
-
-  // Description:
-  // this stores the array giving the family id for each point of this mesh.
-  //vtkGetObjectVectorMacro(PointFamilyData, vtkMedFamilyOnEntity);
-  //vtkSetObjectVectorMacro(PointFamilyData, vtkMedFamilyOnEntity);
-  //virtual vtkMedFamilyOnEntity* GetPointFamilyDataById(med_int id);
-
-  // Description:
-  // Gather the families that are present on this mesh nodes
-  //virtual void ComputePointFamilies();
-
-  // Description:
-  // this array contains the global ids of the points used by the grid.
-  virtual void  SetPointGlobalIds(vtkMedIntArray*);
-  vtkGetObjectMacro(PointGlobalIds, vtkMedIntArray);
-
-  // Description:
-  // this array contains the family ids of the points used by the grid.
-  //virtual void  SetPointFamilyIds(vtkMedIntArray*);
-  //vtkGetObjectMacro(PointFamilyIds, vtkMedIntArray);
-
-  // Description:
-  // The mesh that use this grid
-  virtual void  SetParentMesh(vtkMedMesh*);
-  vtkGetObjectMacro(ParentMesh, vtkMedMesh);
-
-  // Description:
-  // The mesh that use this grid
-  virtual void  SetPreviousGrid(vtkMedGrid*);
-  vtkGetObjectMacro(PreviousGrid, vtkMedGrid);
-
-  // Description:
-  // returns 1 if the global Ids array is set, and the
-  //  number of tuples matches the number of points
-  virtual int IsPointGlobalIdsLoaded();
-
-  // Description:
-  // clear the entity arrays storing the connectivity
-  virtual void  ClearMedSupports();
-
-  // Description:
-  // This is the coordinate system the grid live in.
-  vtkSetMacro(CoordinateSystem, med_axis_type);
-  vtkGetMacro(CoordinateSystem, med_axis_type);
-
-  // Description:
-  // This flag is set during the information loading, and tells if the
-  // coordinates of this grid at this step has changed from the previous step.
-  // if not, you should request the coordinates array from the previous grid
-  // instead of this one.
-  vtkSetMacro(UsePreviousCoordinates, bool);
-  vtkGetMacro(UsePreviousCoordinates, bool);
-
-  // Description:
-  // Add a cell array to this unstructured grid.
-  // each cell array represents a different cell type.
-  vtkGetObjectVectorMacro(EntityArray, vtkMedEntityArray);
-  vtkSetObjectVectorMacro(EntityArray, vtkMedEntityArray);
-
-  // Description:
-  // load the family ids using the driver
-  //void  LoadPointFamilyIds();
-
-  virtual void  LoadCoordinates() = 0;
-  virtual int  IsCoordinatesLoaded() = 0;
-
-  // Description:
-  // return the vtkMedEntityArray that match the Entity type, if any.
-  virtual vtkMedEntityArray* GetEntityArray(const vtkMedEntity&);
-
-  virtual double* GetCoordTuple(med_int index) = 0;
-
-  // Description:
-  // This will instanciate a new vtkDataSet object.
-  // The caller is responsible for deleting it.
-  virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*) = 0;
-  
-  //  Description:
-  // This utility method returns all vtkMedEntity types present in this grid
-  virtual void  GatherMedEntities(std::set<vtkMedEntity>& entities);
-
-protected:
-  vtkMedGrid();
-  virtual ~vtkMedGrid();
-
-  vtkMedComputeStep ComputeStep;
-  vtkMedIntArray* PointGlobalIds;
-  //vtkMedIntArray* PointFamilyIds;
-
-  vtkMedMesh* ParentMesh;
-
-  vtkMedGrid* PreviousGrid;
-
-  //BTX
-  //vtkObjectVector<vtkMedFamilyOnEntity>* PointFamilyData;
-  //ETX
-
-  bool UsePreviousCoordinates;
-  med_axis_type CoordinateSystem;
-  //BTX
-  vtkObjectVector<vtkMedEntityArray>* EntityArray;
-  //ETX
-
-private:
-  vtkMedGrid(const vtkMedGrid&); // Not implemented.
-  void operator=(const vtkMedGrid&); // Not implemented.
-
-};
-
-#endif //__vtkMedGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedGroup.cxx b/src/Plugins/MedReader/IO/vtkMedGroup.cxx
deleted file mode 100644 (file)
index f6075f3..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedGroup.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkMedUtilities.h"
-
-// vtkCxxRevisionMacro(vtkMedGroup, "$Revision$")
-vtkStandardNewMacro(vtkMedGroup)
-
-vtkMedGroup::vtkMedGroup()
-{
-  this->Name = NULL;
-  this->SetName(vtkMedUtilities::NoGroupName);
-}
-
-vtkMedGroup::~vtkMedGroup()
-{
-  this->SetName(NULL);
-}
-
-void vtkMedGroup::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedGroup.h b/src/Plugins/MedReader/IO/vtkMedGroup.h
deleted file mode 100644 (file)
index 23515bc..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedGroup_h_
-#define __vtkMedGroup_h_
-
-#include "vtkObject.h"
-
-class vtkMedString;
-
-class VTK_EXPORT vtkMedGroup : public vtkObject
-{
-public :
-  static vtkMedGroup* New();
-  vtkTypeMacro(vtkMedGroup, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the description of this file as stored in the med file.
-  vtkGetStringMacro(Name);
-  vtkSetStringMacro(Name);
-
-  // Description:
-  // This ivar says if this group contains point or cell families
-  // This value is either vtkMedUtilities::OnPoint or vtkMedUtilities::OnCell
-//  vtkSetMacro(PointOrCell, int);
-//  vtkGetMacro(PointOrCell, int);
-
-protected:
-  vtkMedGroup();
-  virtual ~vtkMedGroup();
-
-  char* Name;
-
-private:
-  vtkMedGroup(const vtkMedGroup&); // Not implemented.
-  void operator=(const vtkMedGroup&); // Not implemented.
-
-};
-
-#endif //__vtkMedGroup_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedIntArray.cxx b/src/Plugins/MedReader/IO/vtkMedIntArray.cxx
deleted file mode 100644 (file)
index 57d19e1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedIntArray.h"
-
-#include "vtkObjectFactory.h"
-
-//----------------------------------------------------------------------------
-// vtkCxxRevisionMacro(vtkMedIntArray, "$Revision$");
-vtkStandardNewMacro(vtkMedIntArray);
-
-//----------------------------------------------------------------------------
-vtkMedIntArray::vtkMedIntArray(vtkIdType numComp): Superclass(numComp)
-{
-}
-
-//----------------------------------------------------------------------------
-vtkMedIntArray::~vtkMedIntArray()
-{
-}
-
-//----------------------------------------------------------------------------
-void vtkMedIntArray::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os,indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedIntArray.h b/src/Plugins/MedReader/IO/vtkMedIntArray.h
deleted file mode 100644 (file)
index c56080c..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// .NAME vtkMedIntArray - dynamic, self-adjusting array of med_int
-// .SECTION Description
-// vtkMedIntArray is an array of values of type med_int.
-// It provides methods for insertion and retrieval of values and will
-// automatically resize itself to hold new data.
-// If the med_int type is the same as the vtkIdType,
-// this class inherits from the
-// vtkIdType array, allowing safe shallow copies.
-
-#ifndef __vtkMedIntArray_h
-#define __vtkMedIntArray_h
-
-#include "vtkMedUtilities.h"
-#include "vtkMed.h"
-
-#include "vtkMedIntArrayInternal.h"
-#include "vtkIdTypeArray.h"
-#include "vtkIntArray.h"
-
-//BTX
-template <class T1> struct med_int_vtkIdType_Traits : IsSameTraits<T1, med_int>
-{
-  typedef vtkMedIntArrayInternal Superclass;
-};
-
-template <> struct med_int_vtkIdType_Traits<med_int>
-  : IsSameTraits<med_int, med_int>
-{
-  typedef vtkIdTypeArray Superclass;
-};
-typedef med_int_vtkIdType_Traits<vtkIdType>::Superclass
-  vtkMedIntArraySuperclass;
-//ETX
-
-class VTK_EXPORT vtkMedIntArray
-//BTX
-: public vtkMedIntArraySuperclass
-//ETX
-{
-public :
-  static vtkMedIntArray* New();
-  vtkTypeMacro(vtkMedIntArray,vtkMedIntArraySuperclass);
-  void PrintSelf(ostream& os, vtkIndent indent);
-protected:
-  vtkMedIntArray(vtkIdType numComp=1);
-  ~vtkMedIntArray();
-};
-
-#endif
diff --git a/src/Plugins/MedReader/IO/vtkMedIntArrayInternal.cxx b/src/Plugins/MedReader/IO/vtkMedIntArrayInternal.cxx
deleted file mode 100644 (file)
index 0c749b0..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// Instantiate superclass first to give the template a DLL interface.
-#include "vtkMed.h"
-
-#ifndef WIN32
-#include "vtkDataArrayTemplate.txx"
-VTK_DATA_ARRAY_TEMPLATE_INSTANTIATE(med_int);
-
-#include "vtkArrayIteratorTemplate.txx"
-VTK_ARRAY_ITERATOR_TEMPLATE_INSTANTIATE(med_int);
-#endif
-
-#define __vtkMedIntArrayInternal_cxx
-#include "vtkMedIntArrayInternal.h"
-
-#include "vtkObjectFactory.h"
-
-// vtkCxxRevisionMacro(vtkMedIntArrayInternal, "$Revision$");
-vtkStandardNewMacro(vtkMedIntArrayInternal);
-
-//----------------------------------------------------------------------------
-vtkMedIntArrayInternal::vtkMedIntArrayInternal(vtkIdType numComp): RealSuperclass(numComp)
-{
-}
-
-//----------------------------------------------------------------------------
-vtkMedIntArrayInternal::~vtkMedIntArrayInternal()
-{
-}
-
-//----------------------------------------------------------------------------
-void vtkMedIntArrayInternal::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->RealSuperclass::PrintSelf(os,indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedIntArrayInternal.h b/src/Plugins/MedReader/IO/vtkMedIntArrayInternal.h
deleted file mode 100644 (file)
index d8af200..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// .NAME vtkMedIntArrayInternal - dynamic, self-adjusting array of med_int
-// .SECTION Description
-// vtkMedIntArray is an array of values of type med_int.
-// It provides methods for insertion and retrieval of values and will
-// automatically resize itself to hold new data.
-
-#ifndef __vtkMedIntArrayInternal_h
-#define __vtkMedIntArrayInternal_h
-
-#include "vtkMed.h"
-
-// Tell the template header how to give our superclass a DLL interface.
-#if !defined(__vtkMedIntArrayInternal_cxx)
-# define VTK_DATA_ARRAY_TEMPLATE_TYPE med_int
-#endif
-
-#include "vtkDataArray.h"
-#include "vtkDataArrayTemplate.h" // Real Superclass
-
-// Fake the superclass for the wrappers.
-#define vtkDataArray vtkDataArrayTemplate<med_int>
-class VTK_EXPORT vtkMedIntArrayInternal : public vtkDataArray
-#undef vtkDataArray
-{
-public:
-  static vtkMedIntArrayInternal* New();
-  vtkTypeMacro(vtkMedIntArrayInternal,vtkDataArray);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Get the data type.
-  // This returns the
-  int GetDataType()
-    { if(sizeof(med_int) == sizeof(vtkIdType)) return VTK_ID_TYPE;
-      if(sizeof(med_int) == sizeof(int)) return VTK_INT;
-      if(sizeof(med_int) == sizeof(long)) return VTK_LONG;
-      return VTK_VOID;
-     }
-
-  // Description:
-  // Copy the tuple value into a user-provided array.
-  void GetTupleValue(vtkIdType i, med_int* tuple)
-    { this->RealSuperclass::GetTupleValue(i, tuple); }
-
-  // Description:
-  // Set the tuple value at the ith location in the array.
-  void SetTupleValue(vtkIdType i, const med_int* tuple)
-    { this->RealSuperclass::SetTupleValue(i, tuple); }
-
-  // Description:
-  // Insert (memory allocation performed) the tuple into the ith location
-  // in the array.
-  void InsertTupleValue(vtkIdType i, const med_int* tuple)
-    { this->RealSuperclass::InsertTupleValue(i, tuple); }
-
-  // Description:
-  // Insert (memory allocation performed) the tuple onto the end of the array.
-  vtkIdType InsertNextTupleValue(const med_int* tuple)
-    { return this->RealSuperclass::InsertNextTupleValue(tuple); }
-
-  // Description:
-  // Get the data at a particular index.
-  med_int GetValue(vtkIdType id)
-    { return this->RealSuperclass::GetValue(id); }
-
-  // Description:
-  // Set the data at a particular index. Does not do range checking. Make sure
-  // you use the method SetNumberOfValues() before inserting data.
-  void SetValue(vtkIdType id, med_int value)
-    { this->RealSuperclass::SetValue(id, value); }
-
-  // Description:
-  // Specify the number of values for this object to hold. Does an
-  // allocation as well as setting the MaxId ivar. Used in conjunction with
-  // SetValue() method for fast insertion.
-  void SetNumberOfValues(vtkIdType number)
-    { this->RealSuperclass::SetNumberOfValues(number); }
-
-  // Description:
-  // Insert data at a specified position in the array.
-  void InsertValue(vtkIdType id, med_int f)
-    { this->RealSuperclass::InsertValue(id, f); }
-
-  // Description:
-  // Insert data at the end of the array. Return its location in the array.
-  vtkIdType InsertNextValue(med_int f)
-    { return this->RealSuperclass::InsertNextValue(f); }
-
-  // Description:
-  // Get the address of a particular data index. Make sure data is allocated
-  // for the number of items requested. Set MaxId according to the number of
-  // data values requested.
-  med_int* WritePointer(vtkIdType id, vtkIdType number)
-    { return this->RealSuperclass::WritePointer(id, number); }
-
-  // Description:
-  // Get the address of a particular data index. Performs no checks
-  // to verify that the memory has been allocated etc.
-  med_int* GetPointer(vtkIdType id)
-    { return this->RealSuperclass::GetPointer(id); }
-
-  // Description:
-  // This method lets the user specify data to be held by the array.  The
-  // array argument is a pointer to the data.  size is the size of
-  // the array supplied by the user.  Set save to 1 to keep the class
-  // from deleting the array when it cleans up or reallocates memory.
-  // The class uses the actual array provided; it does not copy the data
-  // from the suppled array.
-  void SetArray(med_int* array, vtkIdType size, int save)
-    { this->RealSuperclass::SetArray(array, size, save); }
-  void SetArray(med_int* array, vtkIdType size, int save, int deleteMethod)
-    { this->RealSuperclass::SetArray(array, size, save, deleteMethod); }
-
-protected:
-  vtkMedIntArrayInternal(vtkIdType numComp=1);
-  ~vtkMedIntArrayInternal();
-
-private:
-  //BTX
-  typedef vtkDataArrayTemplate<med_int> RealSuperclass;
-  //ETX
-  vtkMedIntArrayInternal(const vtkMedIntArrayInternal&);  // Not implemented.
-  void operator=(const vtkMedIntArrayInternal&);  // Not implemented.
-};
-
-#endif
diff --git a/src/Plugins/MedReader/IO/vtkMedInterpolation.cxx b/src/Plugins/MedReader/IO/vtkMedInterpolation.cxx
deleted file mode 100644 (file)
index fddb066..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedInterpolation.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedFraction.h"
-
-// vtkCxxRevisionMacro(vtkMedInterpolation, "$Revision$")
-vtkStandardNewMacro(vtkMedInterpolation)
-
-vtkCxxGetObjectVectorMacro(vtkMedInterpolation, BasisFunction,
-                           vtkMedFraction);
-vtkCxxSetObjectVectorMacro(vtkMedInterpolation, BasisFunction,
-                           vtkMedFraction);
-
-vtkMedInterpolation::vtkMedInterpolation()
-{
-  this->GeometryType = MED_UNDEF_GEOTYPE;
-  this->IsCellNode = 1;
-  this->MaximumNumberOfCoefficient = 0;
-  this->MaximumDegree = 0;
-  this->NumberOfVariable = 0;
-  this->Name = NULL;
-  this->BasisFunction = new vtkObjectVector<vtkMedFraction>();
-}
-
-vtkMedInterpolation::~vtkMedInterpolation()
-{
-  delete this->BasisFunction;
-  this->SetName(NULL);
-}
-
-void vtkMedInterpolation::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedInterpolation.h b/src/Plugins/MedReader/IO/vtkMedInterpolation.h
deleted file mode 100644 (file)
index 0f27236..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedInterpolation_h_
-#define __vtkMedInterpolation_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedSetGet.h"
-
-class vtkMedString;
-class vtkMedFraction;
-
-class VTK_EXPORT vtkMedInterpolation : public vtkObject
-{
-public:
-  static vtkMedInterpolation* New();
-  vtkTypeMacro(vtkMedInterpolation, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // name of the interpolation function
-  vtkGetStringMacro(Name);
-  vtkSetStringMacro(Name);
-
-  // Description:
-  // This is the iterator that should be used to read this interpolation
-  // in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // Type geometrique des mailles
-  vtkSetMacro(GeometryType, med_geometry_type);
-  vtkGetMacro(GeometryType, med_geometry_type);
-
-  // Description:
-  // 1 if the basis functions are relative to the vertices of the cell.
-  vtkSetMacro(IsCellNode, int);
-  vtkGetMacro(IsCellNode, int);
-
-  // Description:
-  // Maximum degree of any coefficient of any basis function
-  vtkSetMacro(MaximumDegree, int);
-  vtkGetMacro(MaximumDegree, int);
-
-  // Description:
-  // Maximum number of coefficients for any basis function
-  vtkSetMacro(MaximumNumberOfCoefficient, int);
-  vtkGetMacro(MaximumNumberOfCoefficient, int);
-
-  // Description:
-  // Maximum number of coefficients for any basis function
-  vtkSetMacro(NumberOfVariable, int);
-  vtkGetMacro(NumberOfVariable, int);
-
-  // Description:
-  // The basis functions
-  vtkGetObjectVectorMacro(BasisFunction, vtkMedFraction);
-  vtkSetObjectVectorMacro(BasisFunction, vtkMedFraction);
-
-protected :
-  vtkMedInterpolation();
-  ~vtkMedInterpolation();
-
-  med_int MedIterator;
-  med_geometry_type GeometryType;
-  int IsCellNode;
-  int MaximumNumberOfCoefficient;
-  int MaximumDegree;
-  int NumberOfVariable;
-  char* Name;
-  vtkObjectVector<vtkMedFraction>* BasisFunction;
-};
-
-#endif //__vtkMedInterpolation_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedLink.cxx b/src/Plugins/MedReader/IO/vtkMedLink.cxx
deleted file mode 100644 (file)
index 1b320cb..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedLink.h"
-
-#include "vtkObjectFactory.h"
-
-#include "vtkMedUtilities.h"
-
-#include <string>
-using namespace std;
-
-// vtkCxxRevisionMacro(vtkMedLink, "$Revision$")
-vtkStandardNewMacro(vtkMedLink)
-
-vtkMedLink::vtkMedLink()
-{
-  this->MedIterator = -1;
-  this->MeshName = NULL;
-  this->Link = NULL;
-}
-
-vtkMedLink::~vtkMedLink()
-{
-  this->SetMeshName(NULL);
-  this->SetLink(NULL);
-}
-
-const char* vtkMedLink::GetFullLink(const char* originalFileName)
-{
-#ifdef _WIN32
-  static const char sep = '\\';
-#else
-  static const char sep = '/';
-#endif
-
-  if(this->Link == NULL)
-    {
-    return NULL;
-    }
-
-  // First test if the Link is a full path, then return it.
-  if(this->Link != NULL && this->Link[0] == sep)
-    {
-    return this->Link;
-    }
-
-  string name = string(originalFileName);
-  size_t pos = name.find_last_of(sep);
-  if(pos == string::npos)
-    {
-    return this->Link;
-    }
-
-  string clean_link = this->Link;
-  string to_remove = string(".") + sep;
-  int to_remove_size = to_remove.size();
-  while(clean_link.substr(0, to_remove_size) == to_remove)
-    clean_link = clean_link.substr(to_remove_size, string::npos);
-
-  string path = name.substr(0, pos+1);
-  this->FullLinkPath = path + clean_link;
-  return this->FullLinkPath.c_str();
-}
-
-void   vtkMedLink::SetMountedIterator(med_class what, med_int mit)
-{
-  this->MountedIterator[what] = mit;
-}
-
-med_int  vtkMedLink::GetMountedIterator(med_class what)
-{
-  if(this->MountedIterator.find(what) == this->MountedIterator.end())
-    return -1;
-
-  return this->MountedIterator[what];
-}
-
-void vtkMedLink::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, MedIterator);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedLink.h b/src/Plugins/MedReader/IO/vtkMedLink.h
deleted file mode 100644 (file)
index 9d994fa..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedLink_h_
-#define __vtkMedLink_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-
-#include <string>
-#include <map>
-
-class vtkMedString;
-
-class VTK_EXPORT vtkMedLink: public vtkObject
-{
-public:
-  static vtkMedLink* New();
-  vtkTypeMacro(vtkMedLink, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // the index of this field in the med file.
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // Set the name of the mesh linked to.
-  vtkSetStringMacro(MeshName);
-  vtkGetStringMacro(MeshName);
-
-  // Description:
-  // Set the name of the file this link points to.
-  vtkSetStringMacro(Link);
-  vtkGetStringMacro(Link);
-
-  // Description:
-  // returns the full path to the linked file.
-  // If the Link is already a full path, it is returned.
-  // If the directory is a relative path, the returned path is the
-  // concatenation of the directory where the
-  // original file is in and the Link.
-  const char* GetFullLink(const char* originalFileName);
-
-  // Description:
-  // this stores the iterator that should be used when unmounting this link
-  void  SetMountedIterator(med_class, med_int);
-  med_int GetMountedIterator(med_class);
-
-protected:
-  vtkMedLink();
-  virtual ~vtkMedLink();
-
-  med_int MedIterator;
-  char* MeshName;
-  char * Link;
-
-  std::string FullLinkPath;
-
-  // BTX
-  std::map<med_class, int> Status;
-  std::map<med_class, med_int> MountedIterator;
-  //ETX
-
-private:
-  vtkMedLink(const vtkMedLink&); // Not implemented.
-  void operator=(const vtkMedLink&); // Not implemented.
-
-};
-
-#endif //__vtkMedLink_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedLocalization.cxx b/src/Plugins/MedReader/IO/vtkMedLocalization.cxx
deleted file mode 100644 (file)
index 3406b8f..0000000
+++ /dev/null
@@ -1,701 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedLocalization.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkDoubleArray.h"
-#include "vtkIntArray.h"
-#include "vtkFunctionParser.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedSetGet.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedInterpolation.h"
-#include "vtkMedFraction.h"
-
-#include "med.h"
-
-// SEG2
-const static int SEG2_dim = 1;
-const static int SEG2_nnode = 2;
-static const int SEG2_aster2med[SEG2_nnode] =
-{0, 1};
-static const char* SEG2_varnames[SEG2_dim] = {"x"};
-static const char* SEG2_functions[SEG2_nnode] =
-{"1/2*(1-x)",
- "1/2*(1+x)"};
-
-// SEG3
-const static int SEG3_dim = 1;
-const static int SEG3_nnode = 3;
-static const int SEG3_aster2med[SEG3_nnode] =
-{0, 1, 2};
-static const char* SEG3_varnames[SEG3_dim] = {"x"};
-static const char* SEG3_functions[SEG3_nnode] =
-{"-1/2*(1-x)*x",
-  "1/2*(1+x)*x",
-  "(1+x)*(1-x)"};
-
-// SEG4
-const static int SEG4_dim = 1;
-const static int SEG4_nnode = 4;
-static const int SEG4_aster2med[SEG4_nnode] =
-{0, 1, 2, 3};
-static const char* SEG4_varnames[SEG4_dim] = {"x"};
-static const char* SEG4_functions[SEG4_nnode] =
-{"16/9*(1-x)*(x+1/3)*(x-1/3)",
-"-16/9*(1+x)*(1/3-x)*(x+1/3)",
-"16/27*(x-1)*(x+1)*(x-1/3)",
-"-16/27*(x-1)*(x+1)*(x+1/3)"};
-
-// TRIA3
-const static int TRIA3_dim = 2;
-const static int TRIA3_nnode = 3;
-static const int TRIA3_aster2med[TRIA3_nnode] =
-{0, 1, 2};
-static const char* TRIA3_varnames[TRIA3_dim] = {"x", "y"};
-static const char* TRIA3_functions[TRIA3_nnode] =
-{"1-x-y",
- "x",
- "y"};
-
-// TRIA6
-const static int TRIA6_dim = 2;
-const static int TRIA6_nnode = 6;
-static const int TRIA6_aster2med[TRIA6_nnode] =
-{0, 1, 2, 3, 4, 5};
-static const char* TRIA6_varnames[TRIA6_dim] = {"x", "y"};
-static const char* TRIA6_functions[TRIA6_nnode] =
-{"-(1-x-y)*(1-2*(1-x-y))",
- "-x*(1-2*x)",
- "-y*(1-2*y)",
- "4*x*(1-x-y)",
- "4*x*y",
- "4*y*(1-x-y)"};
-
-// TRIA7
-const static int TRIA7_dim = 2;
-const static int TRIA7_nnode = 7;
-static const int TRIA7_aster2med[TRIA7_nnode] =
-{0, 1, 2, 3, 4, 5, 6};
-static const char* TRIA7_varnames[TRIA7_dim] = {"x", "y"};
-static const char* TRIA7_functions[TRIA7_nnode] =
-{"1-3*(x+y)+2*(x*x+y*y)+7*x*y-3*x*y*(x+y)",
- "x*(-1+2*x+3*y-3*y*(x+y))",
- "y*(-1+2*x+3*y-3*x*(x+y))",
- "4*x*(1-x-4*y+3*y*(x+y))",
- "4*x*y*(-2+3*(x+y))",
- "4*y*(1-4*x-y+3*x*(x+y))",
- "27*x*y*(1-x-y)"};
-
-// QUAD4
-const static int QUAD4_dim = 2;
-const static int QUAD4_nnode = 4;
-static const int QUAD4_aster2med[QUAD4_nnode] =
-{0, 1, 2, 3};
-static const char* QUAD4_varnames[QUAD4_dim] = {"x", "y"};
-static const char* QUAD4_functions[QUAD4_nnode] =
-{"(1-x)*(1-y)/4",
- "(1+x)*(1-y)/4",
- "(1+x)*(1+y)/4",
- "(1-x)*(1+y)/4"};
-
-// QUAD8
-const static int QUAD8_dim = 2;
-const static int QUAD8_nnode = 8;
-static const int QUAD8_aster2med[QUAD8_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7};
-static const char* QUAD8_varnames[QUAD8_dim] = {"x", "y"};
-static const char* QUAD8_functions[QUAD8_nnode] =
-{"(1-x)*(1-y)*(-1-x-y)/4",
- "(1+x)*(1-y)*(-1+x-y)/4",
- "(1+x)*(1+y)*(-1+x+y)/4",
- "(1-x)*(1+y)*(-1-x+y)/4",
- "(1-x*x)*(1-y)/2",
- "(1+x)*(1-y*y)/2",
- "(1-x*x)*(1+y)/2",
- "(1-x)*(1-y*y)/2"};
-
-// QUAD9
-const static int QUAD9_dim = 2;
-const static int QUAD9_nnode = 9;
-static const int QUAD9_aster2med[QUAD9_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8};
-static const char* QUAD9_varnames[QUAD9_dim] = {"x", "y"};
-static const char* QUAD9_functions[QUAD9_nnode] =
-{"x*y*(x-1)*(y-1)/4",
- "x*y*(x+1)*(y-1)/4",
- "x*y*(x+1)*(y+1)/4",
- "x*y*(x-1)*(y+1)/4",
- "(1-x*x)*y*(y-1)/2",
- "x*(x+1)*(1-y*y)/2",
- "(1-x*x)*y*(y+1)/2",
- "x*(x-1)*(1-y*y)/2",
- "(1-x*x)*(1-y*y)"};
-
-// PENTA6
-const static int PENTA6_dim = 3;
-const static int PENTA6_nnode = 6;
-static const int PENTA6_aster2med[PENTA6_nnode] =
-{0, 1, 2, 3, 4, 5};
-static const char* PENTA6_varnames[PENTA6_dim] = {"x", "y", "z"};
-static const char* PENTA6_functions[PENTA6_nnode] =
-{"1/2*y*(1-x)",
- "1/2*z*(1-x)",
- "1/2*(1-y-z)*(1-x)",
- "1/2*y*(1+x)",
- "1/2*z*(1+x)",
- "1/2*(1-y-z)*(1+x)"};
-
-// PENTA15
-const static int PENTA15_dim = 3;
-const static int PENTA15_nnode = 15;
-static const int PENTA15_aster2med[PENTA15_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 9, 10, 11};
-static const char* PENTA15_varnames[PENTA15_dim] = {"x", "y", "z"};
-static const char* PENTA15_functions[PENTA15_nnode] =
-{"y*(1-x)*(2*y-2-x)/2",
- "z*(1-x)*(2*z-2-x)/2",
- "(x-1)*(1-y-z)*(x+2*y+2*z)/2",
- "y*(1+x)*(2*y-2+x)/2",
- "z*(1+x)*(2*z-2+x)/2",
- "(-x-1)*(1-y-z)*(-x+2*y+2*z)/2",
- "2*y*z*(1-x)",
- "2*z*(1-y-z)*(1-x)",
- "2*y*(1-y-z)*(1-x)",
- "2*y*z*(1+x)",
- "2*z*(1-y-z)*(1+x)",
- "2*y*(1-y-z)*(1+x)",
- "y*(1-x*x)",
- "z*(1-x*x)",
- "(1-y-z)*(1-x*x)"};
-
-
-// PENTA18
-const static int PENTA18_dim = 3;
-const static int PENTA18_nnode = 18;
-const static int PENTA18_aster2med[PENTA18_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 9, 10, 11, 15, 16, 17};
-static const char* PENTA18_varnames[PENTA18_dim] = {"x", "y", "z"};
-static const char* PENTA18_functions[PENTA18_nnode] =
-{"x*y*(x−1)*(2*y−1)/2",
- "x*z*(x−1)*(2*z−1)/2",
- "x*(x−1)*(zy−1)*(2*z2*y−1)/2",
- "x*y*(x1)*(2*y−1)/2",
- "x*z*(x1)*(2*z−1)/2",
- "x*(x1)*(zy−1)*(2*z2*y−1)/2",
- "2*x*y*z*(x−1)",
- "−2*x*z*(x−1)*(zy−1)",
- "−2*x*y*(x−1)*(zy−1)",
- "2*x*y*z*(x1)",
- "−2*x*z*(x1)*(zy−1)",
- "−2*x*y*(x1)*(zy−1)",
- "y*(1−x*x)*(2*y−1)",
- "z*(1−x*x)*(2*z−1)",
- "(1−x*x)*(zy−1)*(2*z2*y−1)",
- "4*y*z*(1−x*x)",
- "4*z*(x−1)*(zy−1)",
- "4*y*(x−1)*(zy−1)"};
-
-// HEXA8
-const static int HEXA8_dim = 3;
-const static int HEXA8_nnode = 8;
-static const int HEXA8_aster2med[HEXA8_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7};
-static const char* HEXA8_varnames[HEXA8_dim] = {"x", "y", "z"};
-static const char* HEXA8_functions[HEXA8_nnode] =
-{"1/8*(1-x)*(1-y)*(1-z)",
- "1/8*(1+x)*(1-y)*(1-z)",
- "1/8*(1+x)*(1+y)*(1-z)",
- "1/8*(1-x)*(1+y)*(1-z)",
- "1/8*(1-x)*(1-y)*(1+z)",
- "1/8*(1+x)*(1-y)*(1+z)",
- "1/8*(1+x)*(1+y)*(1+z)",
- "1/8*(1-x)*(1+y)*(1+z)"
-   };
-
-// HEXA20
-const static int HEXA20_dim = 3;
-const static int HEXA20_nnode = 20;
-static const int HEXA20_aster2med[HEXA20_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19, 12, 13, 14, 15};
-static const char* HEXA20_varnames[HEXA20_dim] = {"x", "y", "z"};
-static const char* HEXA20_functions[HEXA20_nnode] =
-{"1/8*(1-x)*(1-y)*(1-z)*(-2-x-y-z)",
- "1/8*(1+x)*(1-y)*(1-z)*(-2+x-y-z)",
- "1/8*(1+x)*(1+y)*(1-z)*(-2+x+y-z)",
- "1/8*(1-x)*(1+y)*(1-z)*(-2-x+y-z)",
- "1/8*(1-x)*(1-y)*(1+z)*(-2-x-y+z)",
- "1/8*(1+x)*(1-y)*(1+z)*(-2+x-y+z)",
- "1/8*(1+x)*(1+y)*(1+z)*(-2+x+y+z)",
- "1/8*(1-x)*(1+y)*(1+z)*(-2-x+y+z)",
- "1/4*(1-x*x)*(1-y)*(1-z)",
- "1/4*(1-y*y)*(1+x)*(1-z)",
- "1/4*(1-x*x)*(1+y)*(1-z)",
- "1/4*(1-y*y)*(1-x)*(1-z)",
- "1/4*(1-x*x)*(1-y)*(1+z)",
- "1/4*(1-y*y)*(1+x)*(1+z)",
- "1/4*(1-x*x)*(1+y)*(1+z)",
- "1/4*(1-y*y)*(1-x)*(1+z)",
- "1/4*(1-z*z)*(1-x)*(1-y)",
- "1/4*(1-z*z)*(1+x)*(1-y)",
- "1/4*(1-z*z)*(1+x)*(1+y)",
- "1/4*(1-z*z)*(1-x)*(1+y)"
-  };
-// HEXA27
-const static int HEXA27_dim = 3;
-const static int HEXA27_nnode = 27;
-static const int HEXA27_aster2med[HEXA27_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19, 12, 13, 14, 15, 24, 22,
- 21, 23, 20, 25, 26};
-static const char* HEXA27_varnames[HEXA27_dim] = {"x", "y", "z"};
-static const char* HEXA27_functions[HEXA27_nnode] =
-{"1/8*x*(x-1)*y*(y-1)*z*(z-1)",
- "1/8*x*(x+1)*y*(y-1)*z*(z-1)",
- "1/8*x*(x+1)*y*(y+1)*z*(z-1)",
- "1/8*x*(x-1)*y*(y+1)*z*(z-1)",
- "1/8*x*(x-1)*y*(y-1)*z*(z+1)",
- "1/8*x*(x+1)*y*(y-1)*z*(z+1)",
- "1/8*x*(x+1)*y*(y+1)*z*(z+1)",
- "1/8*x*(x-1)*y*(y+1)*z*(z+1)",
- "1/4*(1-x*x)*y*(y-1)*z*(z-1)",
- "1/4*x*(x+1)*(1-y*y)*z*(z-1)",
- "1/4*(1-x*x)*y*(y+1)*z*(z-1)",
- "1/4*x*(x-1)*(1-y*y)*z*(z-1)",
- "1/4*(1-x*x)*y*(y-1)*z*(z+1)",
- "1/4*x*(x+1)*(1-y*y)*z*(z+1)",
- "1/4*(1-x*x)*y*(y+1)*z*(z+1)",
- "1/4*x*(x-1)*(1-y*y)*z*(z+1)",
- "1/4*x*(x-1)*y*(y-1)*(1-z*z)",
- "1/4*x*(x+1)*y*(y-1)*(1-z*z)",
- "1/4*x*(x+1)*y*(y+1)*(1-z*z)",
- "1/4*x*(x-1)*y*(y+1)*(1-z*z)",
- "1/2*x*(x-1)*(1-y*y)*(1-z*z)",
- "1/2*x*(x+1)*(1-y*y)*(1-z*z)",
- "1/2*(1-x*x)*y*(y-1)*(1-z*z)",
- "1/2*(1-x*x)*y*(y+1)*(1-z*z)",
- "1/2*(1-x*x)*(1-y*y)*z*(z-1)",
- "1/2*(1-x*x)*(1-y*y)*z*(z+1)",
- "(1-x*x)*(1-y*y)*(1-z*z)"
-  };
-
-// TETRA4
-const static int TETRA4_dim = 3;
-const static int TETRA4_nnode = 4;
-static const int TETRA4_aster2med[TETRA4_nnode] =
-{0, 1, 2, 3};
-static const char* TETRA4_varnames[TETRA4_dim] = {"x", "y", "z"};
-static const char* TETRA4_functions[TETRA4_nnode] =
-{
-  "y",
-  "z",
-  "1-x-y-z",
-  "x"
-};
-
-// TETRA10
-const static int TETRA10_dim = 3;
-const static int TETRA10_nnode = 10;
-static const int TETRA10_aster2med[TETRA10_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-static const char* TETRA10_varnames[TETRA10_dim] = {"x", "y", "z"};
-static const char* TETRA10_functions[TETRA10_nnode] =
-{
-  "y*(2*y-1)",
-  "z*(2*z-1)",
-  "(1-x-y-z)*(1-2*x-2*y-2*z)",
-  "x*(2*x-1)",
-  "4*y*z",
-  "4*z*(1-x-y-z)",
-  "4*y*(1-x-y-z)",
-  "4*x*y",
-  "4*x*z",
-  "4*x*(1-x-y-z)"
-};
-
-// PYRA5
-const static int PYRA5_dim = 3;
-const static int PYRA5_nnode = 5;
-static const int PYRA5_aster2med[PYRA5_nnode] =
-{0, 1, 2, 3, 4};
-static const char* PYRA5_varnames[PYRA5_dim] = {"x", "y", "z"};
-static const char* PYRA5_functions[PYRA5_nnode] =
-{
-"(-x+y+z-1)*(-x-y+z-1)/(4*(1-z))",
-"(-x-y+z-1)*( x-y+z-1)/(4*(1-z))",
-"( x-y+z-1)*( x+y+z-1)/(4*(1-z))",
-"( x+y+z-1)*(-x+y+z-1)/(4*(1-z))",
-"z"
-};
-
-// PYRA13
-const static int PYRA13_dim = 3;
-const static int PYRA13_nnode = 13;
-static const int PYRA13_aster2med[PYRA13_nnode] =
-{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
-static const char* PYRA13_varnames[PYRA13_dim] = {"x", "y", "z"};
-static const char* PYRA13_functions[PYRA13_nnode] =
-{
-  "(-x+y+z-1)*(-x-y+z-1)*( x-1/2)/(2*(1-z))",
-  "(-x-y+z-1)*( x-y+z-1)*( y-1/2)/(2*(1-z))",
-  "( x-y+z-1)*( x+y+z-1)*(-x-1/2)/(2*(1-z))",
-  "( x+y+z-1)*(-x+y+z-1)*(-y-1/2)/(2*(1-z))",
-  "2*z*(z-1/2)",
-  "-(-x+y+z-1)*(-x-y+z-1)*( x-y+z-1)/(2*(1-z))",
-  "-(-x-y+z-1)*( x-y+z-1)*( x+y+z-1)/(2*(1-z))",
-  "-( x-y+z-1)*( x+y+z-1)*(-x+y+z-1)/(2*(1-z))",
-  "-( x+y+z-1)*(-x+y+z-1)*(-x-y+z-1)/(2*(1-z))",
-  "(-x+y+z-1)*(-x-y+z-1)*z/(1-z)",
-  "(-x-y+z-1)*( x-y+z-1)*z/(1-z)",
-  "( x-y+z-1)*( x+y+z-1)*z/(1-z)",
-  "( x+y+z-1)*(-x+y+z-1)*z/(1-z)"
-};
-
-vtkCxxSetObjectMacro(vtkMedLocalization, ParentFile, vtkMedFile);
-vtkCxxSetObjectMacro(vtkMedLocalization, Interpolation, vtkMedInterpolation);
-
-// vtkCxxRevisionMacro(vtkMedLocalization, "$Revision$")
-vtkStandardNewMacro(vtkMedLocalization)
-
-vtkMedLocalization::vtkMedLocalization()
-{
-  this->GeometryType = MED_NONE;
-  this->NumberOfQuadraturePoint = 0;
-  this->Weights = vtkDoubleArray::New();
-  this->PointLocalCoordinates = vtkDoubleArray::New();
-  this->QuadraturePointLocalCoordinates = vtkDoubleArray::New();
-  this->ShapeFunction = vtkDoubleArray::New();
-  this->Name = NULL;
-  this->SectionName = NULL;
-  this->InterpolationName = NULL;
-  this->MedIterator = -1;
-  this->ParentFile = NULL;
-  this->SpaceDimension = 3;
-  this->NumberOfCellInSection = 0;
-  this->SectionGeometryType = MED_NONE;
-  this->Interpolation = NULL;
-  this->ShapeFunctionIsBuilt = 0;
-}
-
-vtkMedLocalization::~vtkMedLocalization()
-{
-  this->SetName(NULL);
-  this->SetSectionName(NULL);
-  this->SetInterpolationName(NULL);
-  this->Weights->Delete();
-  this->PointLocalCoordinates->Delete();
-  this->QuadraturePointLocalCoordinates->Delete();
-  this->ShapeFunction->Delete();
-  this->SetInterpolation(NULL);
-
-}
-
-int vtkMedLocalization::GetSizeOfWeights()
-{
-  return this->NumberOfQuadraturePoint;
-}
-
-int vtkMedLocalization::GetSizeOfPointLocalCoordinates()
-{
-  return vtkMedUtilities::GetNumberOfPoint(this->GeometryType)
-      * vtkMedUtilities::GetDimension(this->GeometryType);
-}
-
-int vtkMedLocalization::GetSizeOfQuadraturePointLocalCoordinates()
-{
-  return this->NumberOfQuadraturePoint * vtkMedUtilities::GetDimension(
-      this->GeometryType);
-}
-
-int vtkMedLocalization::GetSizeOfShapeFunction()
-{
-  return this->NumberOfQuadraturePoint * vtkMedUtilities::GetNumberOfPoint(
-      this->GeometryType);
-}
-
-void vtkMedLocalization::BuildShapeFunction()
-{
-  if(this->ShapeFunctionIsBuilt)
-    return;
-
-  if(this->Interpolation == NULL)
-    {
-    // If there is no interpolation given for this localization,
-    // I build the default aster shape function
-
-    switch (this->GeometryType)
-    {
-      case MED_POINT1:
-        BuildPoint1();
-        return;
-      case MED_SEG2:
-        BuildAsterShapeFunction(SEG2_dim, SEG2_nnode,
-                           (const int *) SEG2_aster2med,
-                           (const char**)SEG2_varnames,
-                           (const char**)SEG2_functions);
-        break;
-      case MED_SEG3:
-        BuildAsterShapeFunction(SEG3_dim, SEG3_nnode,
-                           (const int *) SEG3_aster2med,
-                           (const char**)SEG3_varnames,
-                           (const char**)SEG3_functions);
-        break;
-      case MED_SEG4:
-        BuildAsterShapeFunction(SEG4_dim, SEG4_nnode,
-                           (const int *) SEG4_aster2med,
-                           (const char**)SEG4_varnames,
-                           (const char**)SEG4_functions);
-        break;
-      case MED_TRIA3:
-        BuildAsterShapeFunction(TRIA3_dim, TRIA3_nnode,
-                           (const int *) TRIA3_aster2med,
-                           (const char**)TRIA3_varnames,
-                           (const char**)TRIA3_functions);
-        break;
-      case MED_TRIA6:
-        BuildAsterShapeFunction(TRIA6_dim, TRIA6_nnode,
-                           (const int *) TRIA6_aster2med,
-                           (const char**)TRIA6_varnames,
-                           (const char**)TRIA6_functions);
-        break;
-      case MED_TRIA7:
-        BuildAsterShapeFunction(TRIA7_dim, TRIA7_nnode,
-                           (const int *) TRIA7_aster2med,
-                           (const char**)TRIA7_varnames,
-                           (const char**)TRIA7_functions);
-        break;
-      case MED_QUAD4:
-        BuildAsterShapeFunction(QUAD4_dim, QUAD4_nnode,
-                           (const int *) QUAD4_aster2med,
-                           (const char**)QUAD4_varnames,
-                           (const char**)QUAD4_functions);
-        break;
-      case MED_QUAD8:
-        BuildAsterShapeFunction(QUAD8_dim, QUAD8_nnode,
-                           (const int *) QUAD8_aster2med,
-                           (const char**)QUAD8_varnames,
-                           (const char**)QUAD8_functions);
-        break;
-      case MED_QUAD9:
-        BuildAsterShapeFunction(QUAD9_dim, QUAD9_nnode,
-                           (const int *) QUAD9_aster2med,
-                           (const char**)QUAD9_varnames,
-                           (const char**)QUAD9_functions);
-        break;
-      case MED_HEXA8:
-        BuildAsterShapeFunction(HEXA8_dim, HEXA8_nnode,
-                           (const int *) HEXA8_aster2med,
-                           (const char**)HEXA8_varnames,
-                           (const char**)HEXA8_functions);
-        break;
-      case MED_HEXA20:
-        BuildAsterShapeFunction(HEXA20_dim, HEXA20_nnode,
-                           (const int *) HEXA20_aster2med,
-                           (const char**)HEXA20_varnames,
-                           (const char**)HEXA20_functions);
-        break;
-      case MED_HEXA27:
-        BuildAsterShapeFunction(HEXA27_dim, HEXA27_nnode,
-                           (const int *) HEXA27_aster2med,
-                           (const char**)HEXA27_varnames,
-                           (const char**)HEXA27_functions);
-        break;
-      case MED_TETRA4:
-        BuildAsterShapeFunction(TETRA4_dim, TETRA4_nnode,
-                           (const int *) TETRA4_aster2med,
-                           (const char**)TETRA4_varnames,
-                           (const char**)TETRA4_functions);
-        break;
-      case MED_TETRA10:
-        BuildAsterShapeFunction(TETRA10_dim, TETRA10_nnode,
-                           (const int *) TETRA10_aster2med,
-                           (const char**)TETRA10_varnames,
-                           (const char**)TETRA10_functions);
-        break;
-      case MED_PENTA6:
-        BuildAsterShapeFunction(PENTA6_dim, PENTA6_nnode,
-                           (const int *) PENTA6_aster2med,
-                           (const char**)PENTA6_varnames,
-                           (const char**)PENTA6_functions);
-        break;
-      case MED_PENTA15:
-        BuildAsterShapeFunction(PENTA15_dim, PENTA15_nnode,
-                           (const int *) PENTA15_aster2med,
-                           (const char**)PENTA15_varnames,
-                           (const char**)PENTA15_functions);
-        break;
-      case MED_PYRA5:
-        BuildAsterShapeFunction(PYRA5_dim, PYRA5_nnode,
-                           (const int *) PYRA5_aster2med,
-                           (const char**)PYRA5_varnames,
-                           (const char**)PYRA5_functions);
-        break;
-      case MED_PYRA13:
-        BuildAsterShapeFunction(PYRA13_dim, PYRA13_nnode,
-                           (const int *) PYRA13_aster2med,
-                           (const char**)PYRA13_varnames,
-                           (const char**)PYRA13_functions);
-        break;
-      default:
-        vtkErrorMacro("ERROR in vtkMedLocalization::BuildShapeFunction. "
-                      << this->GeometryType
-                      << " : Cell geometry not supported !!! ");
-        return;
-      }
-    }
-  else
-    {
-    this->BuildShapeFunctionFromInterpolation();
-    }
-  this->ShapeFunctionIsBuilt = 1;
-}
-
-void  vtkMedLocalization::BuildShapeFunctionFromInterpolation()
-{
-  int nnodes = this->GeometryType % 100;
-  int dim = this->GeometryType / 100;
-  this->ShapeFunction->SetNumberOfValues(this->GetSizeOfShapeFunction());
-
-  int qpindex;
-  int nodeindex;
-
-  vtkMedFraction* func;
-
-  switch(dim)
-    {
-    case 0 :
-      this->ShapeFunction->SetValue(0, 1);
-      break;
-    default :
-      for(qpindex=0; qpindex < this->NumberOfQuadraturePoint; qpindex++ )
-        {
-        double *coord = new double[dim];
-        for(int dimid=0; dimid<dim; dimid++)
-          {
-          coord[dimid] = this->QuadraturePointLocalCoordinates
-                         ->GetValue((qpindex * dim)+dimid);
-          }
-
-        for(nodeindex=0; nodeindex < nnodes; nodeindex++)
-          {
-          func = this->Interpolation->GetBasisFunction(nodeindex);
-          this->ShapeFunction->SetValue(
-              qpindex*nnodes + nodeindex, func->Evaluate(coord));
-          }
-        }
-    }
-}
-
-void  vtkMedLocalization::BuildAsterShapeFunction(int dim,
-                                 int nnodes,
-                                 const int* aster2med,
-                                 const char** varnames,
-                                 const char** functions)
-{
-  this->ShapeFunction->SetNumberOfValues(
-      this->NumberOfQuadraturePoint * nnodes);
-
-  std::vector<vtkSmartPointer<vtkFunctionParser> > parsers;
-  parsers.resize(nnodes);
-  for(int nodeindex=0; nodeindex < nnodes; nodeindex++)
-    {
-    parsers[nodeindex] = vtkSmartPointer<vtkFunctionParser>::New();
-    parsers[nodeindex]->SetFunction(functions[nodeindex]);
-    }
-
-  for(int qpindex=0; qpindex < this->NumberOfQuadraturePoint; qpindex++ )
-    {
-
-    for(int nodeindex=0; nodeindex < nnodes; nodeindex++)
-      {
-      int mednodeindex = aster2med[nodeindex];
-      vtkFunctionParser* parser = parsers[mednodeindex];
-      for(int dimid=0; dimid<dim; dimid++)
-        {
-        const char* varname = varnames[dimid];
-        const double coord = this->QuadraturePointLocalCoordinates
-                             ->GetValue((qpindex * dim)+dimid);
-
-        parser->SetScalarVariableValue(varname, coord);
-        }
-
-      double w = parser->GetScalarResult();
-
-      this->ShapeFunction->SetValue(
-          qpindex*nnodes + mednodeindex, w);
-      }
-    }
-}
-
-void vtkMedLocalization::BuildPoint1()
-{
-  this->Weights->SetNumberOfValues(1);
-  this->ShapeFunction->SetNumberOfValues(1);
-  this->Weights->SetValue(0, 1);
-  this->ShapeFunction->SetValue(0, 1);
-}
-
-void vtkMedLocalization::BuildCenter(med_geometry_type geometry)
-{
-  this->GeometryType = geometry;
-  this->NumberOfQuadraturePoint = 1;
-  int npts = vtkMedUtilities::GetNumberOfPoint(this->GeometryType);
-  this->ShapeFunction->SetNumberOfValues(npts);
-  this->Weights->SetNumberOfValues(1);
-  for (int i = 0; i < npts; i++)
-    {
-    this->ShapeFunction->SetValue(i, 1.0 / (double) npts);
-    }
-  this->Weights->SetValue(0, 1);
-
-}
-
-void vtkMedLocalization::BuildELNO(med_geometry_type geometry)
-{
-  this->GeometryType = geometry;
-  this->NumberOfQuadraturePoint = vtkMedUtilities::GetNumberOfPoint(geometry);
-
-  int np2 = this->NumberOfQuadraturePoint * this->NumberOfQuadraturePoint;
-  this->ShapeFunction->SetNumberOfValues(np2);
-  this->Weights->SetNumberOfValues(this->NumberOfQuadraturePoint);
-
-  for (int i = 0; i < np2; i++)
-    {
-    this->ShapeFunction->SetValue(i, 0);
-    }
-  for (int i = 0; i < this->NumberOfQuadraturePoint; i++)
-    {
-    this->ShapeFunction->SetValue(i + i * this->NumberOfQuadraturePoint, 1.0);
-    }
-  double w = 1.0 / (double) this->NumberOfQuadraturePoint;
-  for (int i = 0; i < this->NumberOfQuadraturePoint; i++)
-    {
-    this->Weights->SetValue(i, w);
-    }
-}
-
-void vtkMedLocalization::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, GeometryType);
-  PRINT_IVAR(os, indent, NumberOfQuadraturePoint);
-  PRINT_IVAR(os, indent, MedIterator);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedLocalization.h b/src/Plugins/MedReader/IO/vtkMedLocalization.h
deleted file mode 100644 (file)
index c769e2f..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedLocalization_h_
-#define __vtkMedLocalization_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkSmartPointer.h"
-
-class vtkMedString;
-class vtkMedFile;
-class vtkDoubleArray;
-class vtkMedInterpolation;
-
-class VTK_EXPORT vtkMedLocalization : public vtkObject
-{
-public:
-  static vtkMedLocalization* New();
-  vtkTypeMacro(vtkMedLocalization, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the name of this definition
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // This is the name of this definition
-  vtkSetStringMacro(SectionName);
-  vtkGetStringMacro(SectionName);
-
-  // Description:
-  // This is the name of this definition
-  vtkSetStringMacro(InterpolationName);
-  vtkGetStringMacro(InterpolationName);
-
-  // Description:
-  // This is the type of cell geometry this definition is for.
-  vtkSetMacro(GeometryType, med_geometry_type);
-  vtkGetMacro(GeometryType, med_geometry_type);
-
-  // Description:
-  // This is the number of quadrature points in this definition.
-  vtkSetMacro(NumberOfQuadraturePoint, int);
-  vtkGetMacro(NumberOfQuadraturePoint, int);
-
-  // Description:
-  // The index of this field in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // The dimension of the space in which integration points are defined.
-  vtkSetMacro(SpaceDimension, med_int);
-  vtkGetMacro(SpaceDimension, med_int);
-
-  // Description:
-  // The number of cell in a section for structural elements
-  vtkGetMacro(NumberOfCellInSection, med_int);
-  vtkSetMacro(NumberOfCellInSection, med_int);
-
-  // Description:
-  // Type of cells that define the section, for structural elements.
-  vtkSetMacro(SectionGeometryType, med_geometry_type);
-  vtkGetMacro(SectionGeometryType, med_geometry_type);
-
-  // Description:
-  // get the raw pointers to the internal arrays.
-  // Those arrays are allocated in SecureResources,
-  // and cleared in ClearResources
-  vtkGetObjectMacro(Weights, vtkDoubleArray);
-  vtkGetObjectMacro(PointLocalCoordinates, vtkDoubleArray);
-  vtkGetObjectMacro(QuadraturePointLocalCoordinates, vtkDoubleArray);
-  vtkGetObjectMacro(ShapeFunction, vtkDoubleArray);
-
-  virtual int GetSizeOfWeights();
-  virtual int GetSizeOfPointLocalCoordinates();
-  virtual int GetSizeOfQuadraturePointLocalCoordinates();
-  virtual int GetSizeOfShapeFunction();
-
-  virtual void BuildShapeFunction();
-  virtual void  BuildELNO(med_geometry_type geometry);
-  virtual void  BuildCenter(med_geometry_type geometry);
-
-  virtual void  SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-  // Description:
-  // The interpolation is the function that define how the interpolate
-  // value at integration points from values at reference points (usually nodes)
-  virtual void  SetInterpolation(vtkMedInterpolation*);
-  vtkGetObjectMacro(Interpolation, vtkMedInterpolation);
-
-protected:
-  vtkMedLocalization();
-  virtual ~vtkMedLocalization();
-
-  med_int MedIterator;
-  med_geometry_type GeometryType;
-  int NumberOfQuadraturePoint;
-  med_int SpaceDimension;
-  med_int NumberOfCellInSection;
-  med_geometry_type SectionGeometryType;
-
-  vtkDoubleArray* Weights;
-  vtkDoubleArray* PointLocalCoordinates;
-  vtkDoubleArray* QuadraturePointLocalCoordinates;
-  vtkDoubleArray* ShapeFunction;
-
-  char* Name;
-  char* SectionName;
-  char* InterpolationName;
-
-  vtkMedFile* ParentFile;
-
-  vtkMedInterpolation* Interpolation;
-
-  int ShapeFunctionIsBuilt;
-
-  virtual void  BuildAsterShapeFunction(int dim,
-                                   int nnodes,
-                                   const int* med2aster,
-                                   const char** varnames,
-                                   const char** functions);
-
-  virtual void BuildPoint1();
-
-  virtual void  BuildShapeFunctionFromInterpolation();
-
-private:
-  vtkMedLocalization(const vtkMedLocalization&);
-     // Not implemented.
-  void operator=(const vtkMedLocalization&);
-     // Not implemented.
-};
-
-#endif //__vtkMedQuadratureDefinition_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedMesh.cxx b/src/Plugins/MedReader/IO/vtkMedMesh.cxx
deleted file mode 100644 (file)
index 65398d2..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedMesh.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-#include "vtkDataArray.h"
-
-#include "vtkMedFamily.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedGroup.h"
-#include "vtkMedGrid.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedFile.h"
-
-#include <sstream>
-
-vtkCxxGetObjectVectorMacro(vtkMedMesh, CellFamily, vtkMedFamily);
-vtkCxxSetObjectVectorMacro(vtkMedMesh, CellFamily, vtkMedFamily);
-vtkCxxGetObjectVectorMacro(vtkMedMesh, PointFamily, vtkMedFamily);
-vtkCxxSetObjectVectorMacro(vtkMedMesh, PointFamily, vtkMedFamily);
-
-vtkCxxGetObjectVectorMacro(vtkMedMesh, PointGroup, vtkMedGroup);
-vtkCxxSetObjectVectorMacro(vtkMedMesh, PointGroup, vtkMedGroup);
-vtkCxxGetObjectVectorMacro(vtkMedMesh, CellGroup, vtkMedGroup);
-vtkCxxSetObjectVectorMacro(vtkMedMesh, CellGroup, vtkMedGroup);
-
-vtkCxxSetObjectMacro(vtkMedMesh, ParentFile, vtkMedFile);
-
-// vtkCxxRevisionMacro(vtkMedMesh, "$Revision$")
-vtkStandardNewMacro(vtkMedMesh)
-
-vtkMedMesh::vtkMedMesh()
-{
-  this->GridStep = new vtkMedComputeStepMap<vtkMedGrid> ();
-  this->Name = NULL;
-  this->UniversalName = NULL;
-  this->Description = NULL;
-  this->TimeUnit = NULL;
-  this->CellFamily = new vtkObjectVector<vtkMedFamily> ();
-  this->PointFamily = new vtkObjectVector<vtkMedFamily> ();
-  this->PointGroup = new vtkObjectVector<vtkMedGroup> ();
-  this->CellGroup = new vtkObjectVector<vtkMedGroup> ();
-  this->AxisName = vtkStringArray::New();
-  this->AxisUnit = vtkStringArray::New();
-  this->AxisName->SetNumberOfValues(3);
-  this->AxisUnit->SetNumberOfValues(3);
-  this->MedIterator = -1;
-  this->MeshType = MED_UNDEF_MESH_TYPE;
-  this->StructuredGridType = MED_UNDEF_GRID_TYPE;
-  this->ParentFile = NULL;
-  this->AxisType = MED_CARTESIAN;
-  this->SortingType = MED_SORT_DTIT;
-  this->MeshDimension = 3;
-  this->SpaceDimension = 3;
-  this->IsSupportMesh = 0;
-}
-
-vtkMedMesh::~vtkMedMesh()
-{
-  this->SetName(NULL);
-  this->SetUniversalName(NULL);
-  this->SetDescription(NULL);
-  delete this->CellFamily;
-  delete this->PointFamily;
-  delete this->PointGroup;
-  delete this->CellGroup;
-  this->AxisName->Delete();
-  this->AxisUnit->Delete();
-  delete this->GridStep;
-}
-
-vtkMedGroup* vtkMedMesh::GetOrCreateGroup(int pointOrCell, const char* name)
-{
-  if(pointOrCell == vtkMedUtilities::OnCell)
-    {
-    for(int g = 0; g < this->CellGroup->size(); g++)
-      {
-      vtkMedGroup* group = this->CellGroup->at(g);
-      if(group != NULL && strcmp(name, group->GetName()) == 0)
-        {
-        return group;
-        }
-      }
-    vtkMedGroup* group = vtkMedGroup::New();
-    this->CellGroup->push_back(group);
-    //group->SetPointOrCell(vtkMedUtilities::OnCell);
-    group->SetName(name);
-    group->Delete();
-    return group;
-    }
-  else
-    {
-    for(int g = 0; g < this->PointGroup->size(); g++)
-      {
-      vtkMedGroup* group = this->PointGroup->at(g);
-      if(group != NULL && strcmp(name, group->GetName()) == 0)
-        {
-        return group;
-        }
-      }
-    vtkMedGroup* group = vtkMedGroup::New();
-    this->CellGroup->push_back(group);
-    //group->SetPointOrCell(vtkMedUtilities::OnPoint);
-    group->SetName(name);
-    group->Delete();
-    return group;
-    }
-  return NULL;
-}
-
-int vtkMedMesh::GetNumberOfFamily()
-{
-  return this->GetNumberOfCellFamily() + this->GetNumberOfPointFamily();
-}
-
-vtkMedFamily* vtkMedMesh::GetFamily(int index)
-{
-  if(index < 0)
-    return NULL;
-  if(index < this->GetNumberOfCellFamily())
-    return this->GetCellFamily(index);
-  else if(index < GetNumberOfFamily())
-    return this->GetPointFamily(index - this->GetNumberOfCellFamily());
-  else return NULL;
-}
-
-vtkMedFamily* vtkMedMesh::GetOrCreateCellFamilyById(med_int id)
-{
-  for(int i = 0; i < this->GetNumberOfCellFamily(); i++)
-    {
-    vtkMedFamily* family = this->GetCellFamily(i);
-    if(family->GetId() == id)
-      {
-      return family;
-      }
-    }
-  vtkMedFamily* family = vtkMedFamily::New();
-  family->SetId(id);
-  std::ostringstream sstr;
-  sstr << "UNDEFINED_CELL_FAMILY_" << id;
-  family->SetName(sstr.str().c_str());
-  family->SetPointOrCell(vtkMedUtilities::OnCell);
-  family->SetMedIterator(-1);
-  this->AppendCellFamily(family);
-  family->Delete();
-  return family;
-}
-
-void  vtkMedMesh::SetNumberOfAxis(int naxis)
-{
-  this->AxisName->SetNumberOfValues(naxis);
-  this->AxisUnit->SetNumberOfValues(naxis);
-}
-
-int  vtkMedMesh::GetNumberOfAxis()
-{
-  return this->AxisName->GetNumberOfValues();
-}
-
-vtkMedFamily* vtkMedMesh::GetOrCreatePointFamilyById(med_int id)
-{
-  for(int i = 0; i < this->GetNumberOfPointFamily(); i++)
-    {
-    vtkMedFamily* family = this->GetPointFamily(i);
-
-    if(family->GetId() == id)
-      return family;
-    }
-  vtkMedFamily* family = vtkMedFamily::New();
-  family->SetId(id);
-  std::ostringstream sstr;
-  sstr << "UNDEFINED_POINT_FAMILY_" << id;
-  family->SetName(sstr.str().c_str());
-  family->SetPointOrCell(vtkMedUtilities::OnPoint);
-  this->AppendPointFamily(family);
-  family->Delete();
-  return family;
-}
-
-void  vtkMedMesh::AddGridStep(vtkMedGrid* grid)
-{
-  this->GridStep->AddObject(grid->GetComputeStep(), grid);
-}
-
-void  vtkMedMesh::ClearGridStep()
-{
-  this->GridStep->clear();
-}
-
-vtkMedGrid* vtkMedMesh::GetGridStep(const vtkMedComputeStep& cs)
-{
-  return this->GridStep->GetObject(cs);
-}
-
-vtkMedGrid* vtkMedMesh::FindGridStep(const vtkMedComputeStep& cs,
-                                     int strategy)
-{
-  return this->GridStep->FindObject(cs, strategy);
-}
-
-void  vtkMedMesh::GatherGridTimes(std::set<med_float>& timeset)
-{
-  this->GridStep->GatherTimes(timeset);
-}
-
-void  vtkMedMesh::GatherGridIterations(med_float time,
-                                       std::set<med_int>& iterationset)
-{
-  this->GridStep->GatherIterations(time, iterationset);
-}
-
-void  vtkMedMesh::ClearMedSupports()
-{
-  med_int stepnb = this->GridStep->GetNumberOfObject();
-  for(med_int stepid = 0; stepid<stepnb; stepid++ )
-    {
-    vtkMedGrid* grid = this->GridStep->GetObject(stepid);
-    grid->ClearMedSupports();
-    }
-}
-
-med_int vtkMedMesh::GetNumberOfGridStep()
-{
-  return this->GridStep->GetNumberOfObject();
-}
-
-vtkMedGrid* vtkMedMesh::GetGridStep(med_int id)
-{
-  return this->GridStep->GetObject(id);
-}
-
-void  vtkMedMesh::GatherMedEntities(std::set<vtkMedEntity>& entities)
-{
-  vtkMedGrid* firstStep = this->GetGridStep(0);
-  if(firstStep == NULL)
-    return;
-  
-  firstStep->GatherMedEntities(entities);
-}
-
-void vtkMedMesh::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, MedIterator);
-  PRINT_OBJECT_VECTOR(os, indent, CellFamily);
-  PRINT_OBJECT_VECTOR(os, indent, PointFamily);
-  PRINT_OBJECT_VECTOR(os, indent, PointGroup);
-  PRINT_OBJECT_VECTOR(os, indent, CellGroup);
-
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedMesh.h b/src/Plugins/MedReader/IO/vtkMedMesh.h
deleted file mode 100644 (file)
index f17162c..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedMesh_h_
-#define __vtkMedMesh_h_
-
-#include "vtkObject.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-#include "vtkMedUtilities.h"
-
-class vtkMedGrid;
-class vtkMedFamily;
-class vtkMedGroup;
-class vtkMedString;
-class vtkMedIntArray;
-class vtkMedComputeStep;
-class vtkMedFile;
-class vtkStringArray;
-
-#include <set>
-
-class VTK_EXPORT vtkMedMesh: public vtkObject
-{
-public:
-  static vtkMedMesh* New();
-  vtkTypeMacro(vtkMedMesh, vtkObject);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // The name of the mesh in the med file.
-  vtkGetStringMacro(Name);
-  vtkSetStringMacro(Name);
-
-  // Description:
-  // The universal name of the mesh.
-  vtkGetStringMacro(UniversalName);
-  vtkSetStringMacro(UniversalName);
-
-  // Description:
-  // The name of the mesh in the med file.
-  vtkGetStringMacro(Description);
-  vtkSetStringMacro(Description);
-
-  // Description:
-  // The unit of the time steps.
-  vtkGetStringMacro(TimeUnit);
-  vtkSetStringMacro(TimeUnit);
-
-  // Description:
-  // The dimension of the space this mesh lives in
-  vtkSetMacro(SpaceDimension, med_int);
-  vtkGetMacro(SpaceDimension, med_int);
-
-  // Description:
-  // The dimension of this mesh
-  vtkSetMacro(MeshDimension, med_int);
-  vtkGetMacro(MeshDimension, med_int);
-
-  // Description:
-  // The type of grid used by this mesh
-  vtkSetMacro(MeshType, med_mesh_type);
-  vtkGetMacro(MeshType, med_mesh_type);
-
-  // Description:
-  // This stores how the compute steps should be iterated over
-  // either first by time or first by iteration
-  vtkSetMacro(SortingType, med_sorting_type);
-  vtkGetMacro(SortingType, med_sorting_type);
-
-  // Description:
-  // This is the type of the axis
-  // MED_CARTESIAN, MED_CYLINDRICAL, MED_SPHERICAL or MED_UNDEF_AXIS_TYPE
-  vtkSetMacro(AxisType, med_axis_type);
-  vtkGetMacro(AxisType, med_axis_type);
-
-  // Description:
-  // This is the type of the axis
-  // MED_CARTESIAN, MED_CYLINDRICAL, MED_SPHERICAL or MED_UNDEF_AXIS_TYPE
-  vtkSetMacro(StructuredGridType, med_grid_type);
-  vtkGetMacro(StructuredGridType, med_grid_type);
-
-  // Description:
-  // a mesh can be modified over time, so this stores the
-  // different compute steps of a given mesh
-  void  AddGridStep(vtkMedGrid*);
-  void  ClearGridStep();
-  vtkMedGrid* GetGridStep(const vtkMedComputeStep&);
-  vtkMedGrid* FindGridStep(const vtkMedComputeStep&, int);
-  med_int GetNumberOfGridStep();
-  vtkMedGrid* GetGridStep(med_int);
-  void  GatherGridTimes(std::set<med_float>&);
-  void  GatherGridIterations(med_float,std::set<med_int>&);
-
-  // Description:
-  // Container of the cell families in this mesh
-  vtkGetObjectVectorMacro(CellFamily, vtkMedFamily);
-  vtkSetObjectVectorMacro(CellFamily, vtkMedFamily);
-  virtual vtkMedFamily* GetOrCreateCellFamilyById(med_int);
-
-  // Description:
-  // Get the Point Families
-  vtkGetObjectVectorMacro(PointFamily, vtkMedFamily);
-  vtkSetObjectVectorMacro(PointFamily, vtkMedFamily);
-  virtual vtkMedFamily* GetOrCreatePointFamilyById(med_int);
-
-  int GetNumberOfFamily();
-  vtkMedFamily* GetFamily(int);
-
-  // Description:
-  // Container of the groups in this mesh
-  vtkGetObjectVectorMacro(PointGroup, vtkMedGroup);
-  vtkSetObjectVectorMacro(PointGroup, vtkMedGroup);
-  vtkGetObjectVectorMacro(CellGroup, vtkMedGroup);
-  vtkSetObjectVectorMacro(CellGroup, vtkMedGroup);
-  virtual vtkMedGroup*  GetOrCreateGroup(int pointOrCell, const char*);
-
-  // Description:
-  // this id is the id to use when reading the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // This stores the name of each axis
-  vtkGetObjectMacro(AxisName, vtkStringArray);
-
-  // Description:
-  // This stores the unit of each axis
-  vtkGetObjectMacro(AxisUnit, vtkStringArray);
-
-  // Description:
-  // This sets the number of axis of this mesh, and also allocates
-  // the arrays to store the name and unit of each axis.
-  void  SetNumberOfAxis(int);
-  int GetNumberOfAxis();
-
-  // Description:
-  // free the memory used by this mesh (coordinates, connectivity)
-  virtual void  ClearMedSupports();
-
-  // Description:
-  // The name of the mesh in the med file.
-  virtual void  SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-  // Description:
-  // This helper method fills the std::set with all vtkMedEntity types used in the first grid step
-  // MED specifies that all types must be present in the first step for a varying mesh to be valid
-  virtual void  GatherMedEntities(std::set<vtkMedEntity>& entities);
-
-protected:
-  vtkMedMesh();
-  virtual ~vtkMedMesh();
-
-  char* Name;
-  char* UniversalName;
-  char* Description;
-  char* TimeUnit;
-  med_int MedIterator;
-  med_int SpaceDimension;
-  med_int MeshDimension;
-  med_mesh_type MeshType;
-  med_sorting_type SortingType;
-  med_axis_type AxisType;
-  med_grid_type StructuredGridType;
-
-  vtkMedFile* ParentFile;
-
-  vtkObjectVector<vtkMedFamily>* CellFamily;
-  vtkObjectVector<vtkMedFamily>* PointFamily;
-
-  vtkObjectVector<vtkMedGroup>* PointGroup;
-  vtkObjectVector<vtkMedGroup>* CellGroup;
-
-  vtkStringArray* AxisName;
-  vtkStringArray* AxisUnit;
-
-  vtkMedComputeStepMap<vtkMedGrid>* GridStep;
-
-  bool IsSupportMesh;
-
-private:
-  vtkMedMesh(const vtkMedMesh&); // Not implemented.
-  void operator=(const vtkMedMesh&); // Not implemented.
-
-};
-
-#endif //__vtkMedMesh_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedPolarGrid.cxx b/src/Plugins/MedReader/IO/vtkMedPolarGrid.cxx
deleted file mode 100644 (file)
index d9721d4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedPolarGrid.h"
-
-#include "vtkObjectFactory.h"
-
-// vtkCxxRevisionMacro(vtkMedPolarGrid, "$Revision$")
-vtkStandardNewMacro(vtkMedPolarGrid)
-
-vtkMedPolarGrid::vtkMedPolarGrid()
-{
-}
-
-vtkMedPolarGrid::~vtkMedPolarGrid()
-{
-}
-
-void vtkMedPolarGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedPolarGrid.h b/src/Plugins/MedReader/IO/vtkMedPolarGrid.h
deleted file mode 100644 (file)
index c3ccb5a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedPolarGrid_h_
-#define __vtkMedPolarGrid_h_
-
-#include "vtkMedRegularGrid.h"
-
-class VTK_EXPORT vtkMedPolarGrid : public vtkMedRegularGrid
-{
-public :
-  static vtkMedPolarGrid* New();
-  vtkTypeMacro(vtkMedPolarGrid, vtkMedRegularGrid);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-protected:
-  vtkMedPolarGrid();
-  virtual ~vtkMedPolarGrid();
-
-private:
-  vtkMedPolarGrid(const vtkMedPolarGrid&); // Not implemented.
-  void operator=(const vtkMedPolarGrid&); // Not implemented.
-
-};
-
-#endif //__vtkMedPolarGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedProfile.cxx b/src/Plugins/MedReader/IO/vtkMedProfile.cxx
deleted file mode 100644 (file)
index 2623ae4..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedProfile.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedSetGet.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-
-vtkCxxSetObjectMacro(vtkMedProfile,Ids,vtkMedIntArray);
-vtkCxxSetObjectMacro(vtkMedProfile,ParentFile,vtkMedFile);
-
-// vtkCxxRevisionMacro(vtkMedProfile, "$Revision$");
-vtkStandardNewMacro(vtkMedProfile);
-
-vtkMedProfile::vtkMedProfile()
-{
-  this->NumberOfElement = 0;
-  this->Ids = NULL;
-  this->Name = NULL;
-  this->MedIterator = -1;
-  this->GeometryType = MED_NO_GEOTYPE;
-  this->ParentFile = NULL;
-}
-
-vtkMedProfile::~vtkMedProfile()
-{
-  this->SetName(NULL);
-  this->SetIds(NULL);
-}
-
-int vtkMedProfile::IsLoaded()
-{
-  return this->Ids != NULL && this->Ids->GetNumberOfComponents()
-      == 1 && this->Ids->GetNumberOfTuples() == this->NumberOfElement
-      && this->NumberOfElement > 0;
-}
-
-void  vtkMedProfile::Load()
-{
-  this->ParentFile->GetMedDriver()->LoadProfile(this);
-}
-
-void vtkMedProfile::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, NumberOfElement);
-  PRINT_IVAR(os, indent, MedIterator);
-  PRINT_OBJECT(os, indent, Ids);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedProfile.h b/src/Plugins/MedReader/IO/vtkMedProfile.h
deleted file mode 100644 (file)
index b1b3c98..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedProfile_h_
-#define __vtkMedProfile_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-
-class vtkMedIntArray;
-class vtkMedString;
-class vtkMedFile;
-
-class VTK_EXPORT vtkMedProfile : public vtkObject
-{
-public :
-  static vtkMedProfile* New();
-  vtkTypeMacro(vtkMedProfile, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the number of elements of this profile
-  vtkSetMacro(NumberOfElement, vtkIdType);
-  vtkGetMacro(NumberOfElement, vtkIdType);
-
-  // Description:
-  // The name of the profile in the file
-  vtkGetStringMacro(Name);
-  vtkSetStringMacro(Name);
-
-  // Description:
-  // Allocate and clear memory of this profil.
-  virtual void  SetIds(vtkMedIntArray*);
-  vtkGetObjectMacro(Ids, vtkMedIntArray);
-
-  // Description:
-  // return true if the index array is not null and the size match
-  virtual int IsLoaded();
-
-  // Description:
-  // The index of this field in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // Load the profile ids
-  void  Load();
-
-  // Description:
-  // this is the file where this Profile is stored
-  virtual void  SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-protected:
-  vtkMedProfile();
-  virtual ~vtkMedProfile();
-
-  med_int MedIterator;
-  vtkIdType NumberOfElement;
-  vtkMedIntArray* Ids;
-  char* Name;
-  med_geometry_type GeometryType;
-  vtkMedFile* ParentFile;
-
-private:
-  vtkMedProfile(const vtkMedProfile&); // Not implemented.
-  void operator=(const vtkMedProfile&); // Not implemented.
-
-};
-
-#endif //__vtkMedProfil_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedReader.cxx b/src/Plugins/MedReader/IO/vtkMedReader.cxx
deleted file mode 100644 (file)
index 4e45660..0000000
+++ /dev/null
@@ -1,3158 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedReader.h"
-
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFamily.h"
-#include "vtkMedGroup.h"
-#include "vtkMedMesh.h"
-#include "vtkMedUnstructuredGrid.h"
-#include "vtkMedCurvilinearGrid.h"
-#include "vtkMedRegularGrid.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedField.h"
-#include "vtkMedFieldStep.h"
-#include "vtkMedFieldOverEntity.h"
-#include "vtkMedProfile.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedLocalization.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedFieldOnProfile.h"
-#include "vtkMedSelection.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-#include "vtkMedLink.h"
-#include "vtkMedInterpolation.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedConstantAttribute.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMutableDirectedGraph.h"
-#include "vtkStringArray.h"
-#include "vtkDataSetAttributes.h"
-#include "vtkUnsignedCharArray.h"
-#include "vtkInformation.h"
-#include "vtkInformationVector.h"
-#include "vtkSmartPointer.h"
-#include "vtkVariantArray.h"
-#include "vtkMultiBlockDataSet.h"
-#include "vtkExecutive.h"
-#include "vtkStreamingDemandDrivenPipeline.h"
-#include "vtkMultiTimeStepAlgorithm.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkMath.h"
-#include "vtkPointData.h"
-#include "vtkCellData.h"
-#include "vtkFieldData.h"
-#include "vtkInformationQuadratureSchemeDefinitionVectorKey.h"
-#include "vtkQuadratureSchemeDefinition.h"
-#include "vtkCellType.h"
-#include "vtkCellArray.h"
-#include "vtkDoubleArray.h"
-#include "vtkConfigure.h"
-#include "vtkMultiProcessController.h"
-#include "vtkCommunicator.h"
-
-#include "vtkSMDoubleVectorProperty.h"
-#include "vtkInformationDataObjectKey.h"
-
-#include <deque>
-#include <map>
-#include <string>
-#include <sstream>
-#include <vector>
-#include <list>
-#include <set>
-#include <algorithm>
-using namespace std;
-
-struct VTKField
-{
-  vtkSmartPointer<vtkDataArray> DataArray;
-  vtkSmartPointer<vtkDataArray> Vectors;
-  vtkSmartPointer<vtkIdTypeArray> QuadratureIndexArray;
-};
-
-class vtkMedListOfFieldSteps : public std::list<vtkMedFieldStep*>
-{};
-
-typedef int LocalizationKey;
-
-class vtkMedReader::vtkMedReaderInternal
-{
-public:
-  int NumberOfPieces;
-  int CurrentPieceNumber;
-  int GhostLevel;
-  double UpdateTimeStep;
-  vtkTimeStamp FileNameMTime;
-  vtkTimeStamp MetaDataMTime;
-  vtkTimeStamp GroupSelectionMTime;
-  vtkTimeStamp FamilySelectionMTime;
-  int SILUpdateStamp;
-  int RealAnimationMode;
-  vtkMedSelection* Families;
-
-  // this stores the aggregation of all compute steps from
-  // both meshes and fields.
-  std::map<med_float, std::set<med_int> > GlobalComputeStep;
-
-  // Store the vtkMutableDirectedGraph that represents links between family, groups and cell types
-  vtkMutableDirectedGraph* SIL;
-
-  // this map is used to keep clean data sets in the cache, without any field.
-  // for each support, store the vtkDataSet
-  map<vtkMedFamilyOnEntityOnProfile*, vtkSmartPointer<vtkDataSet> > DataSetCache;
-
-  // this is the current dataset for the given support.
-  map<vtkMedFamilyOnEntityOnProfile*, vtkDataSet*> CurrentDataSet;
-
-  // for each support, cache the VTK arrays that correspond to a given field at the given step.
-  map<vtkMedFamilyOnEntityOnProfile*, map<vtkMedFieldOnProfile*, VTKField> > FieldCache;
-  //map<vtkMedFamilyOnEntity*, map<vtkMedFieldOnProfile*, bool> > FieldMatchCache;
-
-  // This list keep tracks of all the currently selected supports
-  set<vtkMedFamilyOnEntityOnProfile*> UsedSupports;
-
-  // this map keeps for each support, the quadrature offset array so that
-  // different fields on the same support can use
-  // the same offset array, provided they use the same gauss points definitions
-  map<vtkMedFamilyOnEntityOnProfile*,
-      map<LocalizationKey, vtkSmartPointer<vtkIdTypeArray> > >
-      QuadratureOffsetCache;
-
-  map<vtkMedFamilyOnEntityOnProfile*,
-      map<vtkMedFieldOnProfile*, LocalizationKey> > QuadOffsetKey;
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> > MedFiles;
-
-  vtkMedReaderInternal()
-  {
-    this->SIL=vtkMutableDirectedGraph::New();
-    this->SILUpdateStamp=-1;
-    this->RealAnimationMode=vtkMedReader::PhysicalTime;
-    this->Families=vtkMedSelection::New();
-    this->FamilySelectionMTime.Modified();
-    this->GroupSelectionMTime.Modified();
-  }
-  ~vtkMedReaderInternal()
-  {
-    this->SIL->Delete();
-    this->Families->Delete();
-  }
-
-  void ClearSupportCache(vtkMedFamilyOnEntityOnProfile* foep)
-  {
-    //this->Med2VTKPointIndex.erase(foep);
-    this->QuadratureOffsetCache.erase(foep);
-    //this->FieldMatchCache.erase(foe);
-    this->FieldCache.erase(foep);
-    this->CurrentDataSet.erase(foep);
-    this->DataSetCache.erase(foep);
-  }
-
-  vtkIdType GetChild(vtkIdType parent, const vtkStdString childName)
-  {
-    vtkStringArray* names=vtkStringArray::SafeDownCast(
-        this->SIL->GetVertexData()->GetArray("Names"));
-    if(names==NULL)
-      return -1;
-    vtkIdType nedges=this->SIL->GetOutDegree(parent);
-    for(vtkIdType id=0; id<nedges; id++)
-      {
-      vtkOutEdgeType edge=this->SIL->GetOutEdge(parent, id);
-      if(names->GetValue(edge.Target)==childName)
-        return edge.Target;
-      }
-    return -1;
-  }
-
-  vtkIdType GetGroupId(const char* key)
-  {
-    std::string meshname, celltypename, groupname;
-    vtkMedUtilities::SplitGroupKey(key, meshname, celltypename, groupname);
-    vtkIdType root=GetChild(0, "SIL");
-    if(root==-1)
-      return -1;
-    vtkIdType mesh=GetChild(root, meshname);
-    if(mesh==-1)
-      return -1;
-    vtkIdType type=GetChild(mesh, celltypename);
-    if(type==-1)
-      return -1;
-    return GetChild(type, groupname);
-
-  }
-
-};
-
-//vtkCxxRevisionMacro(vtkMedReader, "$Revision$");
-vtkStandardNewMacro(vtkMedReader);
-
-vtkMedReader::vtkMedReader()
-{
-  this->FileName=NULL;
-  this->SetNumberOfInputPorts(0);
-  this->PointFields=vtkMedSelection::New();
-  this->CellFields=vtkMedSelection::New();
-  this->QuadratureFields=vtkMedSelection::New();
-  this->ElnoFields=vtkMedSelection::New();
-  this->Entities=vtkMedSelection::New();
-  this->Groups=vtkMedSelection::New();
-  this->Frequencies=vtkMedSelection::New();
-  this->AnimationMode=Default;
-  this->TimeIndexForIterations=0;
-  this->CacheStrategy=CacheGeometry;
-  this->Internal=new vtkMedReaderInternal;
-  this->TimePrecision=0.00001;
-  this->AvailableTimes=vtkDoubleArray::New();
-  this->GenerateVectors = 0;
-}
-
-vtkMedReader::~vtkMedReader()
-{
-  this->SetFileName(NULL);
-  this->PointFields->Delete();
-  this->CellFields->Delete();
-  this->QuadratureFields->Delete();
-  this->ElnoFields->Delete();
-  this->Entities->Delete();
-  this->Groups->Delete();
-  this->Frequencies->Delete();
-  delete this->Internal;
-  this->AvailableTimes->Delete();
-}
-
-int vtkMedReader::GetSILUpdateStamp()
-{
-  return this->Internal->SILUpdateStamp;
-}
-
-void vtkMedReader::SetFileName(const char* fname)
-{
-  int modified=0;
-  if(fname==this->FileName)
-    return;
-  if(fname&&this->FileName&&!strcmp(fname, this->FileName))
-    return;
-  modified=1;
-  if(this->FileName)
-    delete[] this->FileName;
-  if (fname)
-    {
-    size_t fnl=strlen(fname)+1;
-    char* dst=new char[fnl];
-    const char* src=fname;
-    this->FileName=dst;
-    do
-      {
-      *dst++=*src++;
-      }
-    while (--fnl);
-    }
-  else
-    {
-    this->FileName=0;
-    }
-  if (modified)
-    {
-    this->Modified();
-    this->Internal->MedFiles.clear();
-    this->Internal->FileNameMTime.Modified();
-    }
-}
-
-int vtkMedReader::CanReadFile(const char* fname)
-{
-  // the factory give a driver only when it can read the file version,
-  // or it returns a NULL pointer.
-  vtkSmartPointer<vtkMedFile> file=vtkSmartPointer<vtkMedFile>::New();
-  file->SetFileName(fname);
-
-  if(!file->CreateDriver())
-    return 0;
-
-  return 1;
-}
-
-int vtkMedReader::RequestInformation(vtkInformation *request,
-    vtkInformationVector **inputVector, vtkInformationVector *outputVector)
-{
-  vtkInformation* outInfo = outputVector->GetInformationObject(0);
-  outInfo->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(),-1);
-
-  if(this->Internal->MetaDataMTime <= this->Internal->FileNameMTime)
-    {
-    this->ClearCaches(Initialize);
-
-    vtkMedFile* file=vtkMedFile::New();
-    file->SetFileName(this->FileName);
-    this->Internal->MedFiles[this->FileName] = file;
-    file->Delete();
-
-    std::list<vtkMedFile*> file_stack;
-    file_stack.push_back(file);
-
-    // if the file cannot create a driver, this means that the filename is not
-    // valid, or that I do not know how to read this file.
-    while (file_stack.size() > 0)
-      {
-      vtkMedFile* file = file_stack.front();
-      file_stack.pop_front();
-      // This reads information from disk
-      file->ReadInformation();
-
-      // add all files linked to in the current file to the files to read.
-      for (int linkid=0; linkid<file->GetNumberOfLink(); linkid++)
-        {
-        vtkMedLink* link = file->GetLink(linkid);
-        const char* filename = link->GetFullLink(file->GetFileName());
-        if(this->Internal->MedFiles.find(filename) == this->Internal->MedFiles.end())
-          {
-          vtkMedFile* newfile = vtkMedFile::New();
-          newfile->SetFileName(filename);
-          this->Internal->MedFiles[filename] = newfile;
-          file_stack.push_back(newfile);
-          newfile->Delete();
-          }
-        }
-      }
-
-    // This computes some meta information, like which field use which
-    // support, but do not read large data from disk.
-    this->LinkMedInfo();
-
-    // This computes the initial global id of each cell type.
-    this->InitializeCellGlobalIds();
-
-    this->ClearSelections();
-
-    this->BuildSIL(this->Internal->SIL);
-    this->Internal->SILUpdateStamp++;
-
-    this->GatherComputeSteps();
-
-    this->Internal->MetaDataMTime.Modified();
-    }
-
-  outInfo->Set(vtkDataObject::SIL(), this->Internal->SIL);
-  request->AppendUnique(vtkExecutive::KEYS_TO_COPY(),
-                        vtkDataObject::SIL());
-  request->AppendUnique(vtkExecutive::KEYS_TO_COPY(),
-                        vtkMedUtilities::BLOCK_NAME());
-  this->AdvertiseTime(outInfo);
-  return 1;
-}
-
-int vtkMedReader::RequestData(vtkInformation *request,
-    vtkInformationVector **inputVector, vtkInformationVector *outputVector)
-{
-  if(this->FileName==NULL)
-    {
-    vtkWarningMacro( << "FileName must be set and meta data loaded");
-    return 0;
-    }
-
-  vtkInformation *info=outputVector->GetInformationObject(0);
-
-  vtkMultiBlockDataSet *output=vtkMultiBlockDataSet::SafeDownCast(info->Get(
-      vtkDataObject::DATA_OBJECT()));
-
-  if (info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES()))
-    {
-    this->Internal->NumberOfPieces=info->Get(
-        vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES());
-    }
-  else
-    {
-    vtkMultiProcessController* controller =
-          vtkMultiProcessController::GetGlobalController();
-    if(controller)
-      {
-      this->Internal->NumberOfPieces=controller->GetNumberOfProcesses();
-      }
-    else
-      {
-      this->Internal->NumberOfPieces = 1;
-      }
-    }
-  if (info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER()))
-    {
-    this->Internal->CurrentPieceNumber=info->Get(
-        vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER());
-    }
-  else
-    {
-    this->Internal->CurrentPieceNumber=0;
-    vtkMultiProcessController* controller =
-            vtkMultiProcessController::GetGlobalController();
-    if(controller)
-      {
-      this->Internal->CurrentPieceNumber= controller->GetLocalProcessId();
-      }
-    else
-      {
-      this->Internal->CurrentPieceNumber=0;
-      }
-    }
-
-  if (info->Has(
-      vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS()))
-    {
-    this->Internal->GhostLevel=info->Get(
-        vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_GHOST_LEVELS());
-    }
-  else
-    {
-    this->Internal->GhostLevel=0;
-    }
-
-  //vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()
-  /* if (info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
-    {
-    this->Internal->UpdateTimeStep=info->Get(
-        vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS())[0];
-    }
-  else
-    {
-    this->Internal->UpdateTimeStep=0;
-    } */
-
-  if (info->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP()))
-    {
-    this->Internal->UpdateTimeStep=info->Get(
-        vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
-    }
-  else
-    {
-    this->Internal->UpdateTimeStep=0;
-    }
-
-  this->InitializeParallelRead();
-  output->Initialize();
-
-  this->ChooseRealAnimationMode();
-
-  std::list<vtkMedDriver::FileOpen> openlist;
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    openlist.push_back(vtkMedDriver::FileOpen(file->GetMedDriver()));
-    fileit++;
-    }
-
-  // clear the dataset cache of unneeded geometry
-  this->ClearCaches(StartRequest);
-
-  // This call create the vtkMedSupports, but do not create the corresponding vtkDataSet;
-  this->CreateMedSupports();
-  this->ClearCaches(AfterCreateMedSupports);
-  // This call creates the actual vtkDataSet that corresponds to each support
-  int supportId = 0;
-  int progress=0;
-  int maxprogress=2*this->Internal->UsedSupports.size();
-  supportId = 0;
-  int it_counter = 0;
-  for(set<vtkMedFamilyOnEntityOnProfile*>::iterator it=
-      this->Internal->UsedSupports.begin(); it
-      !=this->Internal->UsedSupports.end(); it++)
-    {
-    ostringstream sstr;
-    vtkMedFamilyOnEntityOnProfile* foep = *it;
-    sstr<<"Support : "<<vtkMedUtilities::SimplifyName(
-        foep->GetFamilyOnEntity()->GetFamily()->GetName());
-    this->SetProgressText(sstr.str().c_str());
-    int doBuildSupportField = 1;
-    it_counter++;
-    this->BuildVTKSupport(foep, doBuildSupportField);
-    this->UpdateProgress((float) progress/((float) maxprogress-1));
-    progress++;
-    supportId++;
-    }
-
-  this->ClearCaches(EndBuildVTKSupports);
-  // This call maps the fields to the supports
-  for(set<vtkMedFamilyOnEntityOnProfile*>::iterator it=
-      this->Internal->UsedSupports.begin(); it
-      !=this->Internal->UsedSupports.end(); it++)
-    {
-    vtkMedFamilyOnEntityOnProfile* foep = *it;
-    if((foep->GetValid() == 0) && (this->Internal->NumberOfPieces == 1))
-      continue;
-    ostringstream sstr;
-    sstr<<"Loading fields on "<<vtkMedUtilities::SimplifyName(
-        foep->GetFamilyOnEntity()->GetFamily()->GetName());
-    this->SetProgressText(sstr.str().c_str());
-    int doMapField = 1;
-    this->MapFieldsOnSupport(*it, doMapField);
-    this->UpdateProgress((float) progress/((float) maxprogress-1));
-    progress++;
-    supportId++;
-    }
-
-  // This call clean up caches (what is actually done depends of the CacheStrategy)
-  this->ClearCaches(EndRequest);
-  return 1;
-}
-
-void vtkMedReader::InitializeCellGlobalIds()
-{
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    fileit++;
-    for(int m=0; m<file->GetNumberOfMesh(); m++)
-      {
-      vtkMedMesh* mesh = file->GetMesh(m);
-      med_int nstep = mesh->GetNumberOfGridStep();
-      for(med_int stepid=0; stepid<nstep; stepid++)
-        {
-        vtkMedGrid* grid = mesh->GetGridStep(stepid);
-        grid->InitializeCellGlobalIds();
-        }
-      }
-    }
-}
-
-// Method to create the filters for the MED parallel read functions
-// It is defined here as we have all information for initialization
-void vtkMedReader::InitializeParallelRead()
-{
-  // If there is only one process for reading no need to enter here
-  if (this->Internal->NumberOfPieces <= 1)
-    {
-    return;
-    }
-
-  // FIRST: Generate filters for the cells
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-  meshfit = this->Internal->MedFiles.begin();
-  while(meshfit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* meshfile = meshfit->second;
-    meshfit++;
-    med_idt pFileID = meshfile->GetMedDriver()->GetParallelFileId();
-
-    for(int mid=0; mid<meshfile->GetNumberOfMesh(); mid++)
-      {
-      vtkMedMesh* mesh = meshfile->GetMesh(mid);
-      for(int gid=0; gid<mesh->GetNumberOfGridStep(); gid++)
-        {
-        vtkMedGrid* grid = mesh->GetGridStep(gid);
-        // read point family data and create EntityArrays
-
-        for(int eid=0; eid < grid->GetNumberOfEntityArray(); eid++)
-         {
-          vtkMedEntityArray* array = grid->GetEntityArray(eid);
-
-          // Next continue is to avoid to create filters for the
-          // points, at the moment we charge the points in all nodes
-          if (array->GetEntity().GeometryType == MED_POINT1) // !MED_NODE
-            continue;
-
-          med_int nbofconstituentpervalue = vtkMedUtilities::GetNumberOfNodes(
-                                            array->GetEntity().GeometryType);
-          if (nbofconstituentpervalue == -1)
-            vtkErrorMacro("Still not implemented for MED_POLYGON and MED_POLYHEDRON"); // Ã  gerer
-
-          // Calculating block sizes
-          int nEntity = array->GetNumberOfEntity();
-          int block_size = ( nEntity / this->Internal->NumberOfPieces );
-          med_size    start  = block_size * this->Internal->CurrentPieceNumber + 1;
-          med_size    stride = block_size;
-          med_size    count  = 1;
-          med_size    blocksize = block_size;
-          med_size    lastblocksize = (nEntity % this->Internal->NumberOfPieces);
-          if ((this->Internal->NumberOfPieces ==
-              this->Internal->CurrentPieceNumber+1) && (lastblocksize != 0))
-            {
-            blocksize += lastblocksize;
-            stride    += lastblocksize;
-            }
-          lastblocksize = 0;
-
-          vtkMedFilter *filter = vtkMedFilter::New();
-          filter->SetFilterSizes( start, stride, count, blocksize, lastblocksize );
-          array->SetFilter(filter);
-         }//entity array
-        }// grid step
-      }//mesh
-    }//mesh file
-
-  // SECOND: Filters for the Fields
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit;
-  // link the FieldOnProfile with the profiles
-  fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* fieldfile = fieldfileit->second;
-    fieldfileit++;
-    med_idt pFileID = fieldfile->GetMedDriver()->GetParallelFileId();
-
-    for(int fid=0; fid<fieldfile->GetNumberOfField(); fid++)
-      {
-      vtkMedField* field = fieldfile->GetField(fid);
-
-      if (field->GetFieldType() == vtkMedField::CellField)
-      {
-      for(int sid = 0; sid< field->GetNumberOfFieldStep(); sid++)
-        {
-        vtkMedFieldStep* step = field->GetFieldStep(sid);
-
-        for(int foeid = 0; foeid < step->GetNumberOfFieldOverEntity(); foeid++)
-        // TODO : seul le premier pas de temps est dispo au debut
-          {
-          vtkMedFieldOverEntity* fieldOverEntity = step->GetFieldOverEntity(foeid);
-
-          for(int fopid = 0; fopid < fieldOverEntity->GetNumberOfFieldOnProfile(); fopid++)
-            {
-            vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(fopid);
-            // Here implement the filters as before:
-            // 1- Modify vtkMedFieldOnProfile to contain a filter
-            // 2- Create the filters here only if they are on CELLs (use GetFieldType)
-            med_int nbofconstituentpervalue = field->GetNumberOfComponent();
-
-            int nVectors = fop->GetNumberOfValues();
-
-            int block_size = ( nVectors / this->Internal->NumberOfPieces );
-            int    start  = block_size * this->Internal->CurrentPieceNumber + 1;
-            int    stride = block_size;
-            int    count  = 1;
-            int    blocksize = block_size;
-            int    lastblocksize = (nVectors % this->Internal->NumberOfPieces);
-            if ((this->Internal->NumberOfPieces ==
-                 this->Internal->CurrentPieceNumber+1) && (lastblocksize != 0))
-              {
-              blocksize += lastblocksize;
-              stride    += lastblocksize;
-              }
-            lastblocksize = 0;
-
-            vtkMedFilter *filter = vtkMedFilter::New();
-            filter->SetFilterSizes( start, stride, count, blocksize, lastblocksize );
-            fop->SetFilter(filter);
-            }
-          }
-        }
-      } // end IF
-      }
-    }
-
-}
-
-void  vtkMedReader::LinkMedInfo()
-{
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit;
-  // link the FieldOnProfile with the profiles
-  fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* fieldfile = fieldfileit->second;
-    fieldfileit++;
-
-    for(int fid=0; fid<fieldfile->GetNumberOfField(); fid++)
-      {
-      vtkMedField* field = fieldfile->GetField(fid);
-
-      for(int sid = 0; sid< field->GetNumberOfFieldStep(); sid++)
-        {
-        vtkMedFieldStep* step = field->GetFieldStep(sid);
-
-        for(int foeid = 0; foeid < step->GetNumberOfFieldOverEntity(); foeid++)
-          {
-          vtkMedFieldOverEntity* fieldOverEntity = step->GetFieldOverEntity(foeid);
-
-          for(int fopid = 0; fopid < fieldOverEntity->GetNumberOfFieldOnProfile(); fopid++)
-            {
-            vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(fopid);
-
-            std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-                profilefileit = this->Internal->MedFiles.begin();
-            while(profilefileit != this->Internal->MedFiles.end() && fop->GetProfile() == NULL)
-              {
-              vtkMedFile* profilefile = profilefileit->second;
-              profilefileit++;
-
-              for(int pid = 0; pid < profilefile->GetNumberOfProfile(); pid++)
-                {
-                vtkMedProfile *profile = profilefile->GetProfile(pid);
-                if(strcmp(profile->GetName(), fop->GetProfileName()) == 0)
-                  {
-                  fop->SetProfile(profile);
-                  break;
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-
-  // first, add a familyOnEntityOnProfile to all FamilyOnEntity with a NULL
-  // profile. This is used if no field is mapped to this support.
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      meshfit = this->Internal->MedFiles.begin();
-  while(meshfit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* meshfile = meshfit->second;
-    meshfit++;
-
-    for(int mid=0; mid<meshfile->GetNumberOfMesh(); mid++)
-      {
-      vtkMedMesh* mesh = meshfile->GetMesh(mid);
-
-      for(int gid=0; gid<mesh->GetNumberOfGridStep(); gid++)
-        {
-        vtkMedGrid* grid = mesh->GetGridStep(gid);
-        // read point family data and create EntityArrays
-
-        for(int eid=0; eid < grid->GetNumberOfEntityArray(); eid++)
-          {
-          vtkMedEntityArray* array = grid->GetEntityArray(eid);
-
-          for(int fid=0; fid < array->GetNumberOfFamilyOnEntity(); fid++)
-            {
-            vtkMedFamilyOnEntity* foe = array->GetFamilyOnEntity(fid);
-            if(foe->GetFamilyOnEntityOnProfile((vtkMedProfile*)NULL) == NULL)
-              {
-              vtkMedFamilyOnEntityOnProfile* foep =
-                  vtkMedFamilyOnEntityOnProfile::New();
-              foep->SetFamilyOnEntity(foe);
-              foep->SetProfile(NULL);
-              foe->AddFamilyOnEntityOnProfile(foep);
-              foep->Delete();
-              }
-            }//family on entity
-          }//entity array
-        }// grid step
-      }//mesh
-    }//mesh file
-
-  fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* fieldfile = fieldfileit->second;
-    fieldfileit++;
-
-    for(int fieldid=0; fieldid < fieldfile->GetNumberOfField(); fieldid++)
-      {
-      vtkMedField* field = fieldfile->GetField(fieldid);
-
-      for(int fstepid=0; fstepid < field->GetNumberOfFieldStep(); fstepid++)
-        {
-        vtkMedFieldStep* step = field->GetFieldStep(fstepid);
-
-        vtkMedComputeStep meshcs = step->GetMeshComputeStep();
-
-        for(int foeid=0; foeid<step->GetNumberOfFieldOverEntity() ;foeid++)
-          {
-          vtkMedFieldOverEntity* fieldOverEntity = step->GetFieldOverEntity(foeid);
-          const vtkMedEntity& fieldentity = fieldOverEntity->GetEntity();
-
-          for (int fopid = 0;
-               fopid < fieldOverEntity->GetNumberOfFieldOnProfile(); fopid++)
-            {
-            vtkMedFieldOnProfile* fop =
-                fieldOverEntity->GetFieldOnProfile(fopid);
-
-            std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-                meshfileit = this->Internal->MedFiles.begin();
-            while(meshfileit != this->Internal->MedFiles.end())
-              {
-              vtkMedFile* meshfile = meshfileit->second;
-              meshfileit++;
-
-              if(field->GetLocal() == 1 && (meshfile != fieldfile))
-                continue;
-
-              for(int mid=0; mid<meshfile->GetNumberOfMesh(); mid++)
-                {
-                vtkMedMesh* mesh = meshfile->GetMesh(mid);
-
-                // the field must be on this mesh.
-                if(strcmp(mesh->GetName(),
-                          field->GetMeshName()) != 0)
-                  continue;
-
-                vtkMedGrid* grid = mesh->GetGridStep(meshcs);
-                if(grid == NULL)
-                  {
-                  vtkErrorMacro("the field " << field->GetName()
-                                << " at step iteration:"
-                                << step->GetComputeStep().IterationIt
-                                << " and time "
-                                << step->GetComputeStep().TimeIt
-                                << " uses mesh at step "
-                                << meshcs.TimeIt << " " << meshcs.IterationIt
-                                << "which does not exists!");
-                  continue;
-                  }
-
-                for(int eid=0; eid < grid->GetNumberOfEntityArray(); eid++)
-                  {
-                  vtkMedEntityArray* array = grid->GetEntityArray(eid);
-
-                  // if the support is on points,
-                  // the field must also be on points
-                  if(array->GetEntity().EntityType == MED_NODE &&
-                     fieldentity.EntityType != MED_NODE)
-                    continue;
-
-                  if(array->GetEntity().EntityType != MED_NODE &&
-                     fieldentity.EntityType == MED_NODE)
-                    continue;
-
-                  // for fields not on points, the geometry type
-                  // of the support must match
-                  if(array->GetEntity().EntityType != MED_NODE &&
-                     array->GetEntity().GeometryType != fieldentity.GeometryType)
-                    continue;
-
-                  for(int fid = 0; fid < array->GetNumberOfFamilyOnEntity(); fid++)
-                    {
-                    vtkMedFamilyOnEntity* foe = array->GetFamilyOnEntity(fid);
-                    if(foe->GetFamilyOnEntityOnProfile(fop->GetProfile()) == NULL)
-                      {
-                      vtkMedFamilyOnEntityOnProfile* foep =
-                          vtkMedFamilyOnEntityOnProfile::New();
-                      foep->SetProfile(fop->GetProfile());
-                      foep->SetFamilyOnEntity(foe);
-                      foe->AddFamilyOnEntityOnProfile(foep);
-                      foep->Delete();
-                      }
-                    // also add the family on entity with no profile.
-                    if(foe->GetFamilyOnEntityOnProfile((vtkMedProfile*)NULL) == NULL)
-                      {
-                      vtkMedFamilyOnEntityOnProfile* foep =
-                          vtkMedFamilyOnEntityOnProfile::New();
-                      foep->SetProfile(NULL);
-                      foep->SetFamilyOnEntity(foe);
-                      foe->AddFamilyOnEntityOnProfile(foep);
-                      foep->Delete();
-                      }
-                    }//familyOnEntity
-                  }//entityArray
-                }//mesh
-              }//mesh file
-            }//field on profile
-          }//fieldOverEntity
-        }//fiedstep
-      }// fieldid
-    }//fieldfileit
-
-  // Now, link localizations and interpolations
-  fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* fieldfile = fieldfileit->second;
-    fieldfileit++;
-
-    for(int locid = 0; locid < fieldfile->GetNumberOfLocalization(); locid++)
-      {
-      vtkMedLocalization* loc = fieldfile->GetLocalization(locid);
-
-      for(int fid = 0; fid < fieldfile->GetNumberOfField() &&
-                    loc->GetInterpolation() == NULL; fid++)
-        {
-        vtkMedField* field = fieldfile->GetField(fid);
-        for(int interpid = 0; interpid < field->GetNumberOfInterpolation();
-        interpid++)
-          {
-          vtkMedInterpolation* interp = field->GetInterpolation(interpid);
-          if(strcmp(loc->GetInterpolationName(),
-                    interp->GetName()) == 0)
-            {
-            loc->SetInterpolation(interp);
-            break;
-            }
-          }
-        }
-      }
-    }
-
-  // now that the interpolation is set, build the  shape functions.
-  fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* fieldfile = fieldfileit->second;
-    fieldfileit++;
-
-    for(int locid = 0; locid < fieldfile->GetNumberOfLocalization(); locid++)
-      {
-      vtkMedLocalization* loc = fieldfile->GetLocalization(locid);
-      loc->BuildShapeFunction();
-      }
-    }
-
-  // set the supportmesh pointer in the structural element
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    fileit++;
-
-    for(int structelemit = 0;
-        structelemit < file->GetNumberOfStructElement();
-        structelemit++)
-      {
-      vtkMedStructElement* structElem =
-          file->GetStructElement(structelemit);
-
-      for(int supportmeshit = 0;
-          supportmeshit < file->GetNumberOfSupportMesh();
-          supportmeshit++)
-        {
-        vtkMedMesh* supportMesh =
-            file->GetSupportMesh(supportmeshit);
-
-        if(strcmp(supportMesh->GetName(), structElem->GetName()) == 0 )
-          {
-          structElem->SetSupportMesh(supportMesh);
-          break;
-          }
-        }
-      }
-    }
-
-  // set the pointer to the profile used by the constant attributes
-  fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-  {
-  vtkMedFile* file = fileit->second;
-  fileit++;
-
-  for(int structelemit = 0;
-      structelemit < file->GetNumberOfStructElement();
-      structelemit++)
-    {
-    vtkMedStructElement* structElem =
-        file->GetStructElement(structelemit);
-
-    for(int cstattit = 0; cstattit < structElem->GetNumberOfConstantAttribute(); cstattit++)
-      {
-      vtkMedConstantAttribute* cstatt = structElem->GetConstantAttribute(cstattit);
-
-      for(int profit = 0;
-          profit < file->GetNumberOfProfile();
-          profit++)
-        {
-        vtkMedProfile* profile =
-            file->GetProfile(profit);
-
-        if(strcmp(profile->GetName(), cstatt->GetProfileName()) == 0 )
-          {
-          cstatt->SetProfile(profile);
-          break;
-          }
-        }
-      }
-    }
-  }
-
-  meshfit = this->Internal->MedFiles.begin();
-  while(meshfit != this->Internal->MedFiles.end())
-  {
-  vtkMedFile* meshfile = meshfit->second;
-  meshfit++;
-
-  for(int mid=0; mid<meshfile->GetNumberOfMesh(); mid++)
-    {
-    vtkMedMesh* mesh = meshfile->GetMesh(mid);
-
-    for(int gid=0; gid<mesh->GetNumberOfGridStep(); gid++)
-      {
-      vtkMedGrid* grid = mesh->GetGridStep(gid);
-      // read point family data and create EntityArrays
-
-      for(int eid=0; eid < grid->GetNumberOfEntityArray(); eid++)
-        {
-        vtkMedEntityArray* array = grid->GetEntityArray(eid);
-        if(array->GetEntity().EntityType != MED_STRUCT_ELEMENT)
-          continue;
-
-        for(int structelemit = 0; structelemit < meshfile->GetNumberOfStructElement(); structelemit++)
-          {
-          vtkMedStructElement* structelem = meshfile->GetStructElement(structelemit);
-          if(structelem->GetGeometryType() == array->GetEntity().GeometryType)
-            {
-            array->SetStructElement(structelem);
-            break;
-            }
-          }
-        }
-      }
-    }
-  }
-}
-
-int vtkMedReader::GetFrequencyArrayStatus(const char* name)
-{
-  return this->Frequencies->GetKeyStatus(name);
-}
-
-void vtkMedReader::SetFrequencyArrayStatus(const char* name, int status)
-{
-  if(this->Frequencies->GetKeyStatus(name) == status)
-    {
-    return;
-    }
-
-  this->Frequencies->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-int vtkMedReader::GetNumberOfFrequencyArrays()
-{
-  return this->Frequencies->GetNumberOfKey();
-}
-
-const char* vtkMedReader::GetFrequencyArrayName(int index)
-{
-  return this->Frequencies->GetKey(index);
-}
-
-struct compTimes
-{
-  bool operator()(pair<double, int> i, pair<double, int> j)
-  {
-    if(i.first!=j.first)
-      return (i.first<j.first);
-    return i.second<j.second;
-  }
-};
-
-vtkDoubleArray* vtkMedReader::GetAvailableTimes()
-{
-  this->AvailableTimes->Initialize();
-  this->AvailableTimes->SetNumberOfComponents(1);
-
-  std::set<std::string> newFrequencies;
-
-  int tid = 0;
-  std::map<med_float, std::set<med_int> >::iterator it =
-      this->Internal->GlobalComputeStep.begin();
-  while(it != this->Internal->GlobalComputeStep.end())
-    {
-    double time = it->first;
-    this->AvailableTimes->InsertNextValue(time);
-    string name = vtkMedUtilities::GetModeKey(tid, time, this->Internal->GlobalComputeStep.size()-1);
-    this->Frequencies->AddKey(name.c_str());
-    newFrequencies.insert(name);
-    tid++;
-    it++;
-    }
-
-  // now check if old frequencies have been removed
-  for(int f = 0; f < this->Frequencies->GetNumberOfKey(); f++)
-    {
-    const char* name = this->Frequencies->GetKey(f);
-    if(newFrequencies.find(name) == newFrequencies.end())
-      {
-      this->Frequencies->RemoveKeyByIndex(f);
-      f--;
-      }
-    }
-
-  return this->AvailableTimes;
-}
-
-void vtkMedReader::ChooseRealAnimationMode()
-{
-  if(this->AnimationMode!=Default)
-    {
-    this->Internal->RealAnimationMode=this->AnimationMode;
-    return;
-    }
-
-  // if there is exactly one physical time and more than one iteration
-  // set the animation mode to iteration, else default to physical time.
-  if (this->Internal->GlobalComputeStep.size() == 1 &&
-      this->Internal->GlobalComputeStep[0].size() > 1)
-    {
-    this->Internal->RealAnimationMode=Iteration;
-    return;
-    }
-
-  this->Internal->RealAnimationMode=PhysicalTime;
-}
-
-int vtkMedReader::GetEntityStatus(const vtkMedEntity& entity)
-{
-  if (entity.EntityType==MED_NODE)
-    return 1;
-  if(entity.EntityType == MED_DESCENDING_FACE
-     || entity.EntityType == MED_DESCENDING_EDGE)
-    return 0;
-
-  return this->Entities->GetKeyStatus(vtkMedUtilities::EntityKey(entity).c_str());
-}
-
-int vtkMedReader::GetFamilyStatus(vtkMedMesh* mesh, vtkMedFamily* family)
-{
-  if(!mesh||!family)
-    return 0;
-
-  if(this->Internal->GroupSelectionMTime > this->Internal->FamilySelectionMTime)
-    {
-    this->SelectFamiliesFromGroups();
-    }
-
-  int status =  this->Internal->Families->GetKeyStatus(vtkMedUtilities::FamilyKey(
-      mesh->GetName(), family->GetPointOrCell(),
-      family->GetName()).c_str());
-
-  return status;
-}
-
-int vtkMedReader::IsMeshSelected(vtkMedMesh* mesh)
-{
-  for(int fam=0; fam<mesh->GetNumberOfPointFamily(); fam++)
-    {
-    if(this->GetFamilyStatus(mesh, mesh->GetPointFamily(fam))!=0)
-      return 1;
-    }
-
-  for(int fam=0; fam<mesh->GetNumberOfCellFamily(); fam++)
-    {
-    if(this->GetFamilyStatus(mesh, mesh->GetCellFamily(fam))!=0)
-      return 1;
-    }
-  return 0;
-}
-
-void vtkMedReader::GatherComputeSteps()
-{
-  this->Internal->GlobalComputeStep.clear();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fieldfileit->second;
-    fieldfileit++;
-
-    // first loop over all fields to gather their compute steps
-    for(int fieldId=0; fieldId<file->GetNumberOfField(); fieldId++)
-      {
-      vtkMedField* field=file->GetField(fieldId);
-
-      for(int stepId=0; stepId<field->GetNumberOfFieldStep(); stepId++)
-        {
-        vtkMedFieldStep* step=field->GetFieldStep(stepId);
-        const vtkMedComputeStep& cs = step->GetComputeStep();
-        this->Internal->GlobalComputeStep[cs.TimeOrFrequency].insert(cs.IterationIt);
-        }
-      }//fields
-
-    // then loop over all meshes to gather their grid steps too.
-    // for meshes, do not add the MED_UNDEF_DT time
-    for(int meshId=0; meshId<file->GetNumberOfMesh(); meshId++)
-      {
-      vtkMedMesh* mesh=file->GetMesh(meshId);
-
-      for(int stepId=0; stepId<mesh->GetNumberOfGridStep(); stepId++)
-        {
-        vtkMedGrid* grid=mesh->GetGridStep(stepId);
-        const vtkMedComputeStep& cs = grid->GetComputeStep();
-        if(cs.TimeOrFrequency != MED_UNDEF_DT || cs.TimeIt != MED_NO_DT)
-          {
-          this->Internal->GlobalComputeStep[cs.TimeOrFrequency].insert(cs.IterationIt);
-          }
-        }
-      }//mesh
-    }
-  if(this->Internal->GlobalComputeStep.size() == 0)
-    {
-    this->Internal->GlobalComputeStep[MED_UNDEF_DT].insert(MED_NO_IT);
-    }
-}
-
-int vtkMedReader::IsFieldSelected(vtkMedField* field)
-{
-  return this->IsPointFieldSelected(field)||this->IsCellFieldSelected(field)
-      ||this->IsQuadratureFieldSelected(field) || this->IsElnoFieldSelected(field);
-}
-
-int vtkMedReader::IsPointFieldSelected(vtkMedField* field)
-{
-  return field->GetFieldType()==vtkMedField::PointField
-      &&this->GetPointFieldArrayStatus(vtkMedUtilities::SimplifyName(
-          field->GetName()).c_str());
-}
-
-int vtkMedReader::IsCellFieldSelected(vtkMedField* field)
-{
-  return field->GetFieldType()==vtkMedField::CellField
-      &&this->GetCellFieldArrayStatus(vtkMedUtilities::SimplifyName(
-          field->GetName()).c_str());
-}
-
-vtkMedProfile* vtkMedReader::GetProfile(const char* pname)
-{
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    fileit++;
-    vtkMedProfile* profile = file->GetProfile(pname);
-    if(profile != NULL)
-      return profile;
-    }
-  return NULL;
-}
-
-vtkMedLocalization* vtkMedReader::GetLocalization(const char* lname)
-{
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    fileit++;
-    vtkMedLocalization* loc = file->GetLocalization(lname);
-    if(loc != NULL)
-      return loc;
-    }
-  return NULL;
-
-}
-
-int vtkMedReader::GetLocalizationKey(vtkMedFieldOnProfile* fop)
-{
-  vtkMedLocalization* def=this->GetLocalization(fop->GetLocalizationName());
-
-  // This is not a quadrature field with explicit definition.
-  // There are two possible cases : either the intergration point is
-  // at the center of the cell
-  //1 quadrature point at the cell center
-  int nloc = 0;
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fileit = this->Internal->MedFiles.begin();
-  while(fileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fileit->second;
-    fileit++;
-
-    if(def && def->GetParentFile() == file)
-      return nloc + def->GetMedIterator() - 1;
-
-    nloc += file->GetNumberOfLocalization();
-    }
-
-  // center of a cell
-  if(fop->GetNumberOfIntegrationPoint()==1)
-    return nloc + 1 + fop->GetParentFieldOverEntity()->GetEntity().GeometryType;
-
-  // or it is an elno field (field stored on nodes of the cells,
-  // but with discontinuities at the vertices)
-  return -fop->GetParentFieldOverEntity()->GetEntity().GeometryType;//ELNO
-}
-
-int vtkMedReader::IsQuadratureFieldSelected(vtkMedField* field)
-{
-  return field->GetFieldType()==vtkMedField::QuadratureField
-      &&this->GetQuadratureFieldArrayStatus(vtkMedUtilities::SimplifyName(
-          field->GetName()).c_str());
-}
-
-int vtkMedReader::IsElnoFieldSelected(vtkMedField* field)
-{
-  return field->GetFieldType()==vtkMedField::ElnoField
-      &&this->GetElnoFieldArrayStatus(vtkMedUtilities::SimplifyName(
-          field->GetName()).c_str());
-}
-
-// Description:
-// Give the animation steps to the pipeline
-void vtkMedReader::AdvertiseTime(vtkInformation* info)
-{
-  this->ChooseRealAnimationMode();
-
-  if(this->Internal->RealAnimationMode==PhysicalTime)
-    {
-    // I advertise the union of all times available
-    // in all selected fields and meshes
-    set<double> timeset;
-
-    std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-        fieldfileit = this->Internal->MedFiles.begin();
-    while(fieldfileit != this->Internal->MedFiles.end())
-      {
-      vtkMedFile* file = fieldfileit->second;
-      fieldfileit++;
-
-      // first loop over all fields to gather their compute steps
-      for(int fieldId=0; fieldId<file->GetNumberOfField(); fieldId++)
-        {
-        vtkMedField* field=file->GetField(fieldId);
-
-        if(!this->IsFieldSelected(field))
-          continue;
-
-        field->GatherFieldTimes(timeset);
-        }//fields
-
-      // then loop over all meshes to gather their grid steps too.
-      for(int meshId=0; meshId<file->GetNumberOfMesh(); meshId++)
-        {
-        vtkMedMesh* mesh=file->GetMesh(meshId);
-
-        if(!this->IsMeshSelected(mesh))
-          continue;
-
-        mesh->GatherGridTimes(timeset);
-        }//meshes
-      }
-
-    if(timeset.size() > 0)
-      {
-      // remove MED_UNDEF_DT if there are other time step
-      if(timeset.size() > 1)
-        timeset.erase(MED_UNDEF_DT);
-
-      vector<double> times;
-      set<double>::iterator it = timeset.begin();
-      while(it != timeset.end())
-        {
-        times.push_back(*it);
-        it++;
-        }
-      sort(times.begin(), times.end());
-
-      info->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &times[0],
-          times.size());
-      double timeRange[2];
-      timeRange[0]=times[0];
-      timeRange[1]=times[times.size()-1];
-      info->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), &timeRange[0],
-          2);
-      }
-    else
-      {
-      info->Remove(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
-      info->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
-      }
-    }
-  else if(this->Internal->RealAnimationMode==Iteration)
-    {
-    // I advertise the union of all iterations available at the given
-    // Time for all selected fields.
-    set<med_int> iterationsets;
-    med_float time = MED_UNDEF_DT;
-    if(this->TimeIndexForIterations >= 0 &&
-       this->TimeIndexForIterations <
-       this->AvailableTimes->GetNumberOfTuples())
-      {
-      time = this->AvailableTimes->
-                     GetValue((vtkIdType)this->TimeIndexForIterations);
-      }
-
-    std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-        fieldfileit = this->Internal->MedFiles.begin();
-    while(fieldfileit != this->Internal->MedFiles.end())
-      {
-      vtkMedFile* file = fieldfileit->second;
-      fieldfileit++;
-
-      for(int fieldId=0; fieldId<file->GetNumberOfField(); fieldId++)
-        {
-        vtkMedField* field=file->GetField(fieldId);
-        if(!this->IsFieldSelected(field))
-          continue;
-
-        field->GatherFieldIterations(time, iterationsets);
-        }
-      // then loop over all meshes to gather their grid steps too.
-      for(int meshId=0; meshId<file->GetNumberOfMesh(); meshId++)
-        {
-        vtkMedMesh* mesh=file->GetMesh(meshId);
-
-        if(!this->IsMeshSelected(mesh))
-          continue;
-
-        mesh->GatherGridIterations(time, iterationsets);
-        }//meshes
-      }
-
-    if(iterationsets.size()>0)
-      {
-      // remove MED_NO_IT if there are other available iterations.
-      if(iterationsets.size()>1)
-        iterationsets.erase(MED_NO_IT);
-
-      vector<double> iterations;
-      set<med_int>::iterator it=iterationsets.begin();
-      while(it!=iterationsets.end())
-        {
-        iterations.push_back((double)*it);
-        it++;
-        }
-      sort(iterations.begin(), iterations.end());
-      info->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &iterations[0],
-          iterations.size());
-      double timeRange[2];
-      timeRange[0]=iterations[0];
-      timeRange[1]=iterations[iterations.size()-1];
-      info->Set(vtkStreamingDemandDrivenPipeline::TIME_RANGE(), &timeRange[0],
-          2);
-      }
-    else
-      {
-      info->Remove(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
-      info->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
-      }
-    }
-  else
-    {
-    info->Remove(vtkStreamingDemandDrivenPipeline::TIME_STEPS());
-    info->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
-    }
-}
-
-vtkIdType vtkMedReader::GetFrequencyIndex(double freq)
-{
-  return this->AvailableTimes->LookupValue(freq);
-}
-
-int vtkMedReader::RequestDataObject(vtkInformation* request,
-    vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
-{
-  vtkInformation *info = outputVector->GetInformationObject(0);
-  if (vtkMultiBlockDataSet::SafeDownCast(
-      info->Get(vtkDataObject::DATA_OBJECT())))
-    {
-    // The output is already created
-    return 1;
-    }
-  else
-    {
-    vtkMultiBlockDataSet* output=vtkMultiBlockDataSet::New();
-    this->GetExecutive()->SetOutputData(0, output);
-    output->Delete();
-    this->GetOutputPortInformation(0)->Set(vtkDataObject::DATA_EXTENT_TYPE(),
-        output->GetExtentType());
-    }
-  return 1;
-}
-
-void vtkMedReader::ClearSelections()
-{
-  this->PointFields->Initialize();
-  this->CellFields->Initialize();
-  this->QuadratureFields->Initialize();
-  this->ElnoFields->Initialize();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fieldfileit->second;
-    fieldfileit++;
-
-    for(int index=0; index < file->GetNumberOfField(); index++)
-      {
-      vtkMedField* field = file->GetField(index);
-      switch(field->GetFieldType())
-        {
-        case vtkMedField::PointField :
-        this->PointFields->AddKey(vtkMedUtilities::SimplifyName(
-              field->GetName()).c_str());
-        break;
-        case vtkMedField::CellField :
-        this->CellFields->AddKey(vtkMedUtilities::SimplifyName(
-              field->GetName()).c_str());
-        break;
-        case vtkMedField::QuadratureField :
-        this->QuadratureFields->AddKey(vtkMedUtilities::SimplifyName(
-              field->GetName()).c_str());
-        break;
-        case vtkMedField::ElnoField :
-        this->ElnoFields->AddKey(vtkMedUtilities::SimplifyName(
-              field->GetName()).c_str());
-        break;
-        }
-      }
-
-    this->Internal->Families->Initialize();
-    this->Groups->Initialize();
-    for(int meshIndex=0; meshIndex < file->GetNumberOfMesh(); meshIndex++)
-      {
-      vtkMedMesh* mesh = file->GetMesh(meshIndex);
-      for(int famIndex=0; famIndex<mesh->GetNumberOfPointFamily(); famIndex++)
-        {
-        vtkMedFamily* fam=mesh->GetPointFamily(famIndex);
-
-        int ng=fam->GetNumberOfGroup();
-        for(int gindex=0; gindex<ng; gindex++)
-          {
-          vtkMedGroup* group=fam->GetGroup(gindex);
-          string gname=vtkMedUtilities::GroupKey(mesh->GetName(),
-              fam->GetPointOrCell(), group->GetName());
-
-          this->Groups->AddKey(gname.c_str());
-          this->Groups->SetKeyStatus(gname.c_str(), 0);
-          }
-        }
-      for(int famIndex=0; famIndex<mesh->GetNumberOfCellFamily(); famIndex++)
-        {
-        vtkMedFamily* fam=mesh->GetCellFamily(famIndex);
-
-        int ng=fam->GetNumberOfGroup();
-        for(int gindex=0; gindex<ng; gindex++)
-          {
-          vtkMedGroup* group=fam->GetGroup(gindex);
-          string gname=vtkMedUtilities::GroupKey(mesh->GetName(),
-              fam->GetPointOrCell(), group->GetName());
-
-          this->Groups->AddKey(gname.c_str());
-          this->Groups->SetKeyStatus(gname.c_str(), 1);
-          }
-        }
-      }
-    this->Internal->GroupSelectionMTime.Modified();
-
-    for(int meshIndex=0; meshIndex< file->GetNumberOfMesh(); meshIndex++)
-      {
-      if(file->GetMesh(meshIndex)->GetNumberOfGridStep() == 0)
-        continue;
-
-      vtkMedGrid* grid=file->GetMesh(meshIndex)->GetGridStep(0);
-
-      for(int entityIndex=0; entityIndex<grid->GetNumberOfEntityArray();
-        entityIndex++)
-        {
-        vtkMedEntityArray* array=grid->GetEntityArray(entityIndex);
-        string name=vtkMedUtilities::EntityKey(array->GetEntity());
-        this->Entities->AddKey(name.c_str());
-        }
-      }
-    }
-  this->Modified();
-}
-
-void vtkMedReader::SelectFamiliesFromGroups()
-{
-  this->Internal->Families->Initialize();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      meshfileit = this->Internal->MedFiles.begin();
-  while(meshfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = meshfileit->second;
-    meshfileit++;
-
-    for(int meshIndex=0; meshIndex < file->GetNumberOfMesh(); meshIndex++)
-      {
-      vtkMedMesh* mesh = file->GetMesh(meshIndex);
-      for(int famIndex=0; famIndex<mesh->GetNumberOfFamily(); famIndex++)
-        {
-        vtkMedFamily* fam=mesh->GetFamily(famIndex);
-        string name=vtkMedUtilities::FamilyKey(mesh->GetName(),
-            fam->GetPointOrCell(), fam->GetName());
-
-        this->Internal->Families->SetKeyStatus(name.c_str(), 0);
-
-        for(int gindex=0; gindex<fam->GetNumberOfGroup(); gindex++)
-          {
-          vtkMedGroup* group=fam->GetGroup(gindex);
-          string gname=vtkMedUtilities::GroupKey(mesh->GetName(),
-              fam->GetPointOrCell(), group->GetName());
-          int state=this->Groups->GetKeyStatus(gname.c_str());
-
-          if(state)
-            {
-            this->SetFamilyStatus(name.c_str(), 1);
-            }
-          }
-        }
-      }
-  }
-
-  this->Internal->FamilySelectionMTime.Modified();
-}
-
-int vtkMedReader::GetNumberOfPointFieldArrays()
-{
-  return this->PointFields->GetNumberOfKey();
-}
-
-const char*
-vtkMedReader::GetPointFieldArrayName(int index)
-{
-  return this->PointFields->GetKey(index);
-}
-
-int vtkMedReader::GetPointFieldArrayStatus(const char* name)
-{
-  return this->PointFields->GetKeyStatus(name);
-}
-
-void vtkMedReader::SetPointFieldArrayStatus(const char* name, int status)
-{
-  if(this->PointFields->KeyExists(name)&&this->PointFields->GetKeyStatus(
-      name)==status)
-    return;
-
-  this->PointFields->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-int vtkMedReader::GetNumberOfCellFieldArrays()
-{
-  return this->CellFields->GetNumberOfKey();
-}
-
-const char*
-vtkMedReader::GetCellFieldArrayName(int index)
-{
-  return this->CellFields->GetKey(index);
-}
-
-int vtkMedReader::GetCellFieldArrayStatus(const char* name)
-{
-  return this->CellFields->GetKeyStatus(name);
-}
-
-void vtkMedReader::SetCellFieldArrayStatus(const char* name, int status)
-{
-  if(this->CellFields->KeyExists(name)&&this->CellFields->GetKeyStatus(
-      name)==status)
-    return;
-
-  this->CellFields->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-int vtkMedReader::GetNumberOfQuadratureFieldArrays()
-{
-  return this->QuadratureFields->GetNumberOfKey();
-}
-
-const char* vtkMedReader::GetQuadratureFieldArrayName(int index)
-{
-  return this->QuadratureFields->GetKey(index);
-}
-
-int vtkMedReader::GetQuadratureFieldArrayStatus(const char* name)
-{
-  return this->QuadratureFields->GetKeyStatus(name);
-}
-
-void vtkMedReader::SetQuadratureFieldArrayStatus(const char* name, int status)
-{
-  if(this->QuadratureFields->KeyExists(name)
-      &&this->QuadratureFields->GetKeyStatus(name)==status)
-    return;
-
-  this->QuadratureFields->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-int vtkMedReader::GetNumberOfElnoFieldArrays()
-{
-  return this->ElnoFields->GetNumberOfKey();
-}
-
-const char* vtkMedReader::GetElnoFieldArrayName(int index)
-{
-  return this->ElnoFields->GetKey(index);
-}
-
-int vtkMedReader::GetElnoFieldArrayStatus(const char* name)
-{
-  return this->ElnoFields->GetKeyStatus(name);
-}
-
-void vtkMedReader::SetElnoFieldArrayStatus(const char* name, int status)
-{
-  if(this->ElnoFields->KeyExists(name)
-      &&this->ElnoFields->GetKeyStatus(name)==status)
-    return;
-
-  this->ElnoFields->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-void vtkMedReader::SetEntityStatus(const char* name, int status)
-{
-  if(this->Entities->KeyExists(name)&&this->Entities->GetKeyStatus(name)
-      ==status)
-    return;
-
-  this->Entities->SetKeyStatus(name, status);
-
-  this->Modified();
-}
-
-void vtkMedReader::SetFamilyStatus(const char* name, int status)
-{
-  if(this->Internal->Families->KeyExists(name)
-      &&this->Internal->Families->GetKeyStatus(name)==status)
-    return;
-
-  this->Internal->Families->SetKeyStatus(name, status);
-}
-
-void vtkMedReader::SetGroupStatus(const char* name, int status)
-{
-
-  if(this->Groups->KeyExists(name)&&this->Groups->GetKeyStatus(name)
-      ==status)
-    return;
-
-  this->Groups->SetKeyStatus(name, status);
-
-  this->Modified();
-
-  this->Internal->GroupSelectionMTime.Modified();
-}
-
-int vtkMedReader::GetGroupStatus(const char* key)
-{
-  return this->Groups->GetKeyStatus(key);
-}
-
-void vtkMedReader::AddQuadratureSchemeDefinition(vtkInformation* info,
-    vtkMedLocalization* loc)
-{
-  if(info==NULL||loc==NULL)
-    return;
-
-  vtkInformationQuadratureSchemeDefinitionVectorKey *key=
-      vtkQuadratureSchemeDefinition::DICTIONARY();
-
-  vtkQuadratureSchemeDefinition* def=vtkQuadratureSchemeDefinition::New();
-  int cellType=vtkMedUtilities::GetVTKCellType(loc->GetGeometryType());
-  def->Initialize(cellType, vtkMedUtilities::GetNumberOfPoint(
-      loc->GetGeometryType()), loc->GetNumberOfQuadraturePoint(),
-      (double*)loc->GetShapeFunction()->GetVoidPointer(0),
-      (double*)loc->GetWeights()->GetVoidPointer(0));
-  key->Set(info, def, cellType);
-  def->Delete();
-
-}
-
-void vtkMedReader::LoadConnectivity(vtkMedEntityArray* array)
-{
-  vtkMedGrid* grid = array->GetParentGrid();
-  array->LoadConnectivity();
-  if (array->GetConnectivity()==MED_NODAL||vtkMedUtilities::GetDimension(
-      array->GetEntity().GeometryType)<2
-      || grid->GetParentMesh()->GetMeshType() == MED_STRUCTURED_MESH)
-    return;
-
-  vtkMedEntity subentity;
-  subentity.EntityType = vtkMedUtilities::GetSubType(array->GetEntity().EntityType);
-
-  vtkMedUnstructuredGrid* ugrid = vtkMedUnstructuredGrid::SafeDownCast(grid);
-  if(ugrid == NULL)
-    return;
-
-  for(int index=0; index<vtkMedUtilities::GetNumberOfSubEntity(
-      array->GetEntity().GeometryType); index++)
-    {
-    subentity.GeometryType = vtkMedUtilities::GetSubGeometry(
-        array->GetEntity().GeometryType, index);
-    vtkMedEntityArray* subarray=ugrid->GetEntityArray(subentity);
-
-    if(subarray==NULL)
-      {
-      vtkErrorMacro("DESC connectivity used, but sub types do not exist in file.");
-      return;
-      }
-    subarray->LoadConnectivity();
-    }
-}
-
-vtkDataSet* vtkMedReader::CreateUnstructuredGridForPointSupport(
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkUnstructuredGrid* vtkgrid = vtkUnstructuredGrid::New();
-  foep->ComputeIntersection(NULL);
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-  vtkMedGrid* medgrid=foe->GetParentGrid();
-  vtkMedUnstructuredGrid* medugrid=vtkMedUnstructuredGrid::SafeDownCast(
-      medgrid);
-  vtkMedCurvilinearGrid* medcgrid=vtkMedCurvilinearGrid::SafeDownCast(
-      medgrid);
-
-  medgrid->LoadCoordinates();
-
-  vtkIdType npts=medgrid->GetNumberOfPoints();
-
-  bool shallowCopy= (medugrid != NULL || medcgrid!=NULL);
-  if(medgrid->GetParentMesh()->GetSpaceDimension()!=3)
-    {
-    shallowCopy=false;
-    }
-  else
-    {
-    shallowCopy = foep->CanShallowCopyPointField(NULL);
-    }
-
-  vtkDataArray* coords = NULL;
-
-  if(medugrid != NULL)
-    coords = medugrid->GetCoordinates();
-  if(medcgrid != NULL)
-    coords = medcgrid->GetCoordinates();
-
-
-  vtkIdType numberOfPoints;
-  vtkPoints* points=vtkPoints::New(coords->GetDataType());
-  vtkgrid->SetPoints(points);
-  points->Delete();
-
-  vtkIdTypeArray* pointGlobalIds=vtkIdTypeArray::New();
-  pointGlobalIds->SetName("MED_POINT_ID");
-  pointGlobalIds->SetNumberOfComponents(1);
-  vtkgrid->GetPointData()->SetGlobalIds(pointGlobalIds);
-  pointGlobalIds->Delete();
-
-  if (shallowCopy)
-    {
-    vtkgrid->GetPoints()->SetData(coords);
-    numberOfPoints=npts;
-
-    pointGlobalIds->SetNumberOfTuples(numberOfPoints);
-    vtkIdType* ptr=pointGlobalIds->GetPointer(0);
-    for(int pid=0; pid<numberOfPoints; pid++)
-      ptr[pid]=pid+1;
-    }
-  if(!shallowCopy)
-    {
-    vtkIdType currentIndex=0;
-
-    for(vtkIdType index=0; index<medgrid->GetNumberOfPoints(); index++)
-      {
-      if (!foep->KeepPoint(index))
-        {
-        continue;
-        }
-
-      double coord[3]={0.0, 0.0, 0.0};
-      double * tuple=medgrid->GetCoordTuple(index);
-      for(int dim=0; dim<medgrid->GetParentMesh()->GetSpaceDimension()&&dim<3; dim++)
-        {
-        coord[dim]=tuple[dim];
-        }
-      vtkgrid->GetPoints()->InsertPoint(currentIndex, coord);
-      pointGlobalIds->InsertNextValue(index+1);
-      currentIndex++;
-      }
-    vtkgrid->GetPoints()->Squeeze();
-    pointGlobalIds->Squeeze();
-    numberOfPoints=currentIndex;
-    }
-
-  // now create the VTK_VERTEX cells
-  for(vtkIdType id=0; id<numberOfPoints; id++)
-    {
-    vtkgrid->InsertNextCell(VTK_VERTEX, 1, &id);
-    }
-  vtkgrid->Squeeze();
-
-  // in this particular case, the global ids of the cells is the same as the global ids of the points.
-  vtkgrid->GetCellData()->SetGlobalIds(vtkgrid->GetPointData()->GetGlobalIds());
-
-  return vtkgrid;
-}
-
-vtkMedGrid* vtkMedReader::FindGridStep(vtkMedMesh* mesh)
-{
-  if(this->Internal->RealAnimationMode == vtkMedReader::PhysicalTime)
-    {
-    vtkMedComputeStep cs;
-    cs.TimeOrFrequency = this->Internal->UpdateTimeStep;
-    return mesh->FindGridStep(cs, vtkMedReader::PhysicalTime);
-    }
-  else if(this->Internal->RealAnimationMode == vtkMedReader::Modes)
-    {
-    vtkMedComputeStep cs;
-    cs.IterationIt = MED_NO_IT;
-    cs.TimeIt = MED_NO_DT;
-    cs.TimeOrFrequency = MED_NO_DT;
-    return mesh->FindGridStep(cs, vtkMedReader::Modes);
-    }
-  else // Iterations
-    {
-    vtkMedComputeStep cs;
-    // the time is set by choosing its index in the global
-    // array giving the available times : this->TimeIndexForIterations
-    cs.TimeOrFrequency = (med_int)this->AvailableTimes->GetValue(
-        (vtkIdType)this->TimeIndexForIterations);
-    // the iteration is asked by the pipeline
-    cs.IterationIt = (med_int)this->Internal->UpdateTimeStep;
-    return mesh->FindGridStep(cs, vtkMedReader::Iteration);
-    }
-  return NULL;
-}
-
-void vtkMedReader::CreateMedSupports()
-{
-  this->Internal->UsedSupports.clear();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      meshfileit = this->Internal->MedFiles.begin();
-  while(meshfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = meshfileit->second;
-    meshfileit++;
-
-    for(int meshIndex=0; meshIndex<file->GetNumberOfMesh(); meshIndex++)
-      {
-      vtkMedMesh* mesh = file->GetMesh(meshIndex);
-      vtkMedGrid* grid = this->FindGridStep(mesh);
-      if(grid == NULL)
-        continue;
-
-      for(int entityIndex=0; entityIndex<grid->GetNumberOfEntityArray();
-        entityIndex++)
-        {
-        vtkMedEntityArray* array=grid->GetEntityArray(entityIndex);
-        if(this->GetEntityStatus(array->GetEntity())==0)
-          {
-          continue;
-          }
-
-        file->GetMedDriver()->LoadFamilyIds(array);
-        for(int foeIndex=0; foeIndex<array->GetNumberOfFamilyOnEntity();
-          foeIndex++)
-          {
-          vtkMedFamilyOnEntity* foe=array->GetFamilyOnEntity(foeIndex);
-          vtkMedFamily* family=foe->GetFamily();
-          if(this->GetFamilyStatus(mesh, family)==0)
-            continue;
-
-          // now, I look over all non-point fields to see which profiles
-          // have to be used on points.
-          bool selectedSupport = false;
-
-          std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-              fieldfileit = this->Internal->MedFiles.begin();
-          while(fieldfileit != this->Internal->MedFiles.end())
-            {
-            vtkMedFile* fieldfile = fieldfileit->second;
-            fieldfileit++;
-
-            for(int fieldId=0; fieldId<fieldfile->GetNumberOfField(); fieldId++)
-              {
-              vtkMedField* field=fieldfile->GetField(fieldId);
-
-              if (!this->IsFieldSelected(field))
-                continue;
-
-              vtkMedListOfFieldSteps steps;
-
-              this->GatherFieldSteps(field, steps);
-
-              vtkMedListOfFieldSteps::iterator it=steps.begin();
-              while(it!=steps.end())
-                {
-                vtkMedFieldStep *step = *it;
-                step->LoadInformation();
-                it++;
-
-                for(int eid=0; eid<step->GetNumberOfFieldOverEntity(); eid++)
-                  {
-                  vtkMedFieldOverEntity* fieldOverEntity =
-                      step->GetFieldOverEntity(eid);
-
-                  for(int pid = 0; pid < fieldOverEntity->GetNumberOfFieldOnProfile(); pid++)
-                    {
-                    vtkMedFieldOnProfile* fop =
-                        fieldOverEntity->GetFieldOnProfile(pid);
-                    vtkMedProfile* prof = fop->GetProfile();
-                    vtkMedFamilyOnEntityOnProfile* foep =
-                        foe->GetFamilyOnEntityOnProfile(prof);
-                    if(foep != NULL)
-                      {
-                      this->Internal->UsedSupports.insert(foep);
-                      selectedSupport = true;
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          // If no field use this family on entity, I nevertheless create the
-          // support, with an empty profile.
-          if(!selectedSupport)
-            {
-            vtkMedFamilyOnEntityOnProfile* foep =
-                foe->GetFamilyOnEntityOnProfile((vtkMedProfile*)NULL);
-            if(foep == NULL)
-              {
-              foep = vtkMedFamilyOnEntityOnProfile::New();
-              foep->SetFamilyOnEntity(foe);
-              foep->SetProfile(NULL);
-              foe->AddFamilyOnEntityOnProfile(foep);
-              foep->Delete();
-              }
-            this->Internal->UsedSupports.insert(foep);
-            }
-          }
-        }
-      }
-  }
-}
-
-bool vtkMedReader::BuildVTKSupport(
-    vtkMedFamilyOnEntityOnProfile* foep,
-    int doBuildSupport)
-{
-
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-
-  int numProc = 1;
-  vtkMultiProcessController* controller = vtkMultiProcessController::GetGlobalController();
-  if (controller != NULL)
-    {
-    numProc = controller->GetNumberOfProcesses();
-    }
-
-  if ((foep->GetValid() == 0) && numProc == 1)
-    {
-    return false;
-    }
-
-  vtkMedGrid* grid=foe->GetParentGrid();
-
-  vtkMedEntityArray* array=foe->GetEntityArray();
-  vtkMedMesh* mesh=grid->GetParentMesh();
-  vtkSmartPointer<vtkStringArray> path = vtkSmartPointer<vtkStringArray>::New();
-  string meshName=vtkMedUtilities::SimplifyName(mesh->GetName());
-  path->InsertNextValue(meshName);
-  std::string finalName;
-
-  if(foe->GetPointOrCell()==vtkMedUtilities::OnPoint)
-    {
-    path->InsertNextValue(vtkMedUtilities::OnPointName);
-    finalName=vtkMedUtilities::SimplifyName(foe->GetFamily()->GetName());
-    }
-  else
-    {
-    path->InsertNextValue(vtkMedUtilities::OnCellName);
-    path->InsertNextValue(vtkMedUtilities::SimplifyName(foe->GetFamily()->GetName()));
-    finalName=vtkMedUtilities::EntityKey(array->GetEntity());
-    }
-
-  if(foep->GetProfile() != NULL)
-    {
-    path->InsertNextValue(finalName);
-    finalName = foep->GetProfile()->GetName();
-    }
-
-  ostringstream progressBarTxt;
-  for(int depth=0; depth<path->GetNumberOfValues(); depth++)
-    {
-    progressBarTxt<<path->GetValue(depth)<<" ";
-    }
-  progressBarTxt<<finalName;
-  SetProgressText(progressBarTxt.str().c_str());
-
-  vtkDataSet* cachedDataSet = NULL;
-  if(this->Internal->DataSetCache.find(foep)!=this->Internal->DataSetCache.end())
-    {
-    cachedDataSet = this->Internal->DataSetCache[foep];
-    }
-  else
-    {
-    vtkDataSet* dataset = NULL;
-    if(doBuildSupport)
-      {
-      if(foe->GetPointOrCell()==vtkMedUtilities::OnPoint)
-        {
-        dataset = this->CreateUnstructuredGridForPointSupport(foep);
-        }
-      else
-        {
-        dataset = foep->GetFamilyOnEntity()->GetParentGrid()->
-                  CreateVTKDataSet(foep);
-        }
-      }
-
-    if(dataset == NULL)
-      {
-      return false;
-      }
-
-    this->Internal->DataSetCache[foep]=dataset;
-    cachedDataSet = dataset;
-    if(dataset != NULL)
-      dataset->Delete();
-  }
-
-  vtkMultiBlockDataSet* root=vtkMedUtilities::GetParent(this->GetOutput(), path);
-  int nb=root->GetNumberOfBlocks();
-
-  if(cachedDataSet != NULL)
-    {
-    vtkDataSet* realDataSet=cachedDataSet->NewInstance();
-    root->SetBlock(nb, realDataSet);
-    realDataSet->Delete();
-
-    root->GetMetaData(nb)->Set(vtkCompositeDataSet::NAME(), finalName.c_str());
-    realDataSet->ShallowCopy(cachedDataSet);
-
-    this->Internal->DataSetCache[foep]=cachedDataSet;
-    this->Internal->CurrentDataSet[foep]=realDataSet;
-
-    path->InsertNextValue(finalName);
-    path->SetName("BLOCK_NAME");
-    realDataSet->GetFieldData()->AddArray(path);
-    realDataSet->GetInformation()->Remove(vtkMedUtilities::BLOCK_NAME());
-    for(int depth=0; depth<path->GetNumberOfValues(); depth++)
-      {
-      realDataSet->GetInformation()->Set(vtkMedUtilities::BLOCK_NAME(),
-                                         path->GetValue(depth), depth);
-      }
-    }
-}
-
-void vtkMedReader::MapFieldOnSupport(vtkMedFieldOnProfile* fop,
-                                     vtkMedFamilyOnEntityOnProfile* foep,
-                                     int doCreateField)
-{
-  bool cached = false;
-
-  if(this->Internal->FieldCache.find(foep)
-      !=this->Internal->FieldCache.end())
-    {
-    map<vtkMedFieldOnProfile*, VTKField>& fieldCache =
-        this->Internal->FieldCache[foep];
-    if(fieldCache.find(fop)!=fieldCache.end())
-      {
-      cached=true;
-      }
-    }
-
-  if(!cached)
-    {
-    this->CreateVTKFieldOnSupport(fop, foep, doCreateField);
-    }
-  this->SetVTKFieldOnSupport(fop, foep);
-}
-
-void vtkMedReader::MapFieldsOnSupport(vtkMedFamilyOnEntityOnProfile* foep,
-                                      int doCreateField)
-{
-  // now loop over all fields to map it to the created grids
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fieldfileit->second;
-    fieldfileit++;
-
-    for(int fieldId=0; fieldId<file->GetNumberOfField(); fieldId++)
-      {
-      vtkMedField* field=file->GetField(fieldId);
-    
-      if(strcmp(foep->GetFamilyOnEntity()->
-                GetParentGrid()->GetParentMesh()->GetName(),
-                field->GetMeshName()) != 0)
-        continue;
-
-      if(strcmp(foep->GetFamilyOnEntity()->
-                GetParentGrid()->GetParentMesh()->GetName(),
-                field->GetMeshName()) != 0)
-        continue;
-
-      if (!this->IsFieldSelected(field))
-        continue;
-      
-      vtkMedListOfFieldSteps steps;
-
-      this->GatherFieldSteps(field, steps);
-      
-      vtkMedListOfFieldSteps::iterator it=steps.begin();
-      while(it!=steps.end())
-        {
-        vtkMedFieldStep *step = *it;
-        step->LoadInformation();
-        it++;
-      
-        for(int eid=0; eid<step->GetNumberOfFieldOverEntity(); eid++)
-          {
-          vtkMedFieldOverEntity* fieldOverEntity = step->GetFieldOverEntity(eid);
-          for(int pid = 0; pid < fieldOverEntity->GetNumberOfFieldOnProfile(); pid++)
-            {
-            vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(pid);
-            if(foep->CanMapField(fop))
-              {
-              this->MapFieldOnSupport(fop, foep, doCreateField);
-              }
-            }
-          }
-        }
-      }
-    }
-}
-
-void vtkMedReader::GatherFieldSteps(vtkMedField* field,
-                                    vtkMedListOfFieldSteps& steps)
-{
-  if(this->Internal->RealAnimationMode == vtkMedReader::PhysicalTime)
-    {
-    vtkMedComputeStep cs;
-    cs.TimeOrFrequency = this->Internal->UpdateTimeStep;
-    vtkMedFieldStep* fs =
-        field->FindFieldStep(cs, vtkMedReader::PhysicalTime);
-    if(fs != NULL)
-      steps.push_back(fs);
-    }
-  else if(this->Internal->RealAnimationMode == vtkMedReader::Iteration)
-    {
-    vtkMedComputeStep cs;
-    cs.IterationIt = (med_int)this->Internal->UpdateTimeStep;
-    cs.TimeOrFrequency = (med_int)this->AvailableTimes->GetValue(
-        (vtkIdType)this->TimeIndexForIterations);
-    vtkMedFieldStep* fs =
-        field->FindFieldStep(cs, vtkMedReader::Iteration);
-    if(fs != NULL)
-      steps.push_back(fs);
-    }
-  else // modes
-    {
-    for(int modeid = 0; modeid < this->Frequencies->GetNumberOfKey(); modeid++)
-      {
-      if(this->Frequencies->GetKeyStatus(
-          this->Frequencies->GetKey(modeid)) == 0)
-        {
-        continue;
-        }
-
-      vtkMedComputeStep cs;
-      cs.TimeOrFrequency = this->AvailableTimes->GetValue(modeid);
-      vtkMedFieldStep* fs =
-          field->FindFieldStep(cs, vtkMedReader::PhysicalTime);
-      if(fs != NULL)
-        steps.push_back(fs);
-      }
-    }
-}
-
-void vtkMedReader::SetVTKFieldOnSupport(vtkMedFieldOnProfile* fop,
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-  vtkMedFieldOverEntity* fieldOverEntity = fop->GetParentFieldOverEntity();
-  vtkMedFieldStep* step = fieldOverEntity->GetParentStep();
-  vtkMedField* field = step->GetParentField();
-  
-  const vtkMedComputeStep& cs = step->GetComputeStep();
-
-  vtkDataSet* ds=this->Internal->CurrentDataSet[foep];
-  if (ds == NULL)
-    {
-  // ds == NULL could arrive is some cases when working in parallel
-  vtkWarningMacro( "--- vtkMedReader::SetVTKFieldOnSupport: ds is NULL !!");
-  return;
-    }
-
-  VTKField& vtkfield=this->Internal->FieldCache[foep][fop];
-
-  std::string name=vtkMedUtilities::SimplifyName(field->GetName());
-  std::string vectorname = name+"_Vector";
-  if(this->AnimationMode==Modes)
-    {
-    double freq = cs.TimeOrFrequency;
-    int index = this->GetFrequencyIndex(freq);
-    name += string(" ") + vtkMedUtilities::GetModeKey(index, freq,
-      this->AvailableTimes->GetNumberOfTuples()-1);
-    vectorname += string(" ") + vtkMedUtilities::GetModeKey(index, freq,
-      this->AvailableTimes->GetNumberOfTuples()-1);
-    }
-
-  vtkfield.DataArray->SetName(name.c_str());
-  vtkfield.DataArray->Squeeze();
-  if(vtkfield.Vectors != NULL)
-    {
-    vtkfield.Vectors->SetName(vectorname.c_str());
-    vtkfield.Vectors->Squeeze();
-    }
-  if(vtkfield.QuadratureIndexArray!=NULL)
-    {
-    vtkfield.QuadratureIndexArray->Squeeze();
-    }
-
-  if(foe->GetPointOrCell()==vtkMedUtilities::OnCell)
-    {
-    if(field->GetFieldType()==vtkMedField::PointField)
-      {
-      if(vtkfield.DataArray->GetNumberOfTuples()!=ds->GetNumberOfPoints())
-        {
-          vtkDebugMacro("the data array " << vtkfield.DataArray->GetName()
-                      << " do not have the good number of tuples");
-        return;
-        }
-      ds->GetPointData()->AddArray(vtkfield.DataArray);
-      if(vtkfield.Vectors != NULL && this->GenerateVectors)
-        {
-        ds->GetPointData()->AddArray(vtkfield.Vectors);
-        ds->GetPointData()->SetActiveVectors(vtkfield.Vectors->GetName());
-        }
-      switch (vtkfield.DataArray->GetNumberOfComponents())
-        {
-        case 1:
-        ds->GetPointData()->SetActiveScalars(vtkfield.DataArray->GetName());
-        break;
-        case 3:
-        ds->GetPointData()->SetActiveVectors(vtkfield.DataArray->GetName());
-        break;
-        }
-      // if the data set is only composed of VTK_VERTEX cells,
-      // and no field called with the same name exist on cells,
-      // map this field to cells too
-      if(foe->GetVertexOnly()==1&&ds->GetCellData()->GetArray(
-              vtkfield.DataArray->GetName())==NULL)
-        {
-        ds->GetCellData()->AddArray(vtkfield.DataArray);
-        if(vtkfield.Vectors != NULL && this->GenerateVectors)
-          {
-          ds->GetCellData()->AddArray(vtkfield.Vectors);
-          ds->GetCellData()->SetActiveVectors(vtkfield.Vectors->GetName());
-          }
-        switch (vtkfield.DataArray->GetNumberOfComponents())
-          {
-          case 1:
-          ds->GetCellData()->SetActiveScalars(vtkfield.DataArray->GetName());
-          break;
-          case 3:
-          ds->GetCellData()->SetActiveVectors(vtkfield.DataArray->GetName());
-          break;
-          }
-        }
-      }
-    if(field->GetFieldType()==vtkMedField::CellField)
-      {
-      if((this->Internal->NumberOfPieces == 1) && vtkfield.DataArray->GetNumberOfTuples()!=ds->GetNumberOfCells()  )
-        {
-        vtkDebugMacro("the data array " << vtkfield.DataArray->GetName()
-                      << " do not have the good number of tuples"
-                      << " ncell=" << ds->GetNumberOfCells()
-                      << " ntuple=" << vtkfield.DataArray->GetNumberOfTuples());
-        return;
-        }
-      // In case we are in parallel and our process does not contain the data
-      if(ds->GetNumberOfCells()==0)
-        {
-        return;
-        }
-      ds->GetCellData()->AddArray(vtkfield.DataArray);
-
-      if(vtkfield.Vectors != NULL && this->GenerateVectors)
-        {
-        ds->GetCellData()->AddArray(vtkfield.Vectors);
-        ds->GetCellData()->SetActiveVectors(vtkfield.Vectors->GetName());
-        }
-      switch (vtkfield.DataArray->GetNumberOfComponents())
-        {
-        case 1:
-        ds->GetCellData()->SetActiveScalars(vtkfield.DataArray->GetName());
-        break;
-        case 3:
-        ds->GetCellData()->SetActiveVectors(vtkfield.DataArray->GetName());
-        break;
-        }
-      // if the data set is only composed of VTK_VERTEX cells,
-      // and no field called with the same name exist on points,
-      // map this field to points too
-      if(foe->GetVertexOnly()==1 && ds->GetPointData()->GetArray(
-              vtkfield.DataArray->GetName())==NULL)
-        {
-        ds->GetPointData()->AddArray(vtkfield.DataArray);
-        if(vtkfield.Vectors != NULL && this->GenerateVectors)
-          {
-          ds->GetPointData()->AddArray(vtkfield.Vectors);
-          ds->GetPointData()->SetActiveVectors(vtkfield.Vectors->GetName());
-          }
-        switch (vtkfield.DataArray->GetNumberOfComponents())
-          {
-          case 1:
-          ds->GetPointData()->SetActiveScalars(vtkfield.DataArray->GetName());
-          break;
-          case 3:
-          ds->GetPointData()->SetActiveVectors(vtkfield.DataArray->GetName());
-          break;
-          }
-        }
-      }
-    if(field->GetFieldType()==vtkMedField::QuadratureField ||
-       field->GetFieldType()==vtkMedField::ElnoField )
-      {
-      vtkIdType ncells=ds->GetNumberOfCells();
-      vtkIdType nid=vtkfield.QuadratureIndexArray->GetNumberOfTuples();
-      vtkIdType nda=vtkfield.DataArray->GetNumberOfTuples();
-      if((nid!=ncells) && (this->Internal->NumberOfPieces == 1))
-        {
-        vtkDebugMacro(
-            "There should be as many quadrature index values as there are cells");
-        return;
-        }
-      else
-        {
-      if (ncells == 0)
-      {
-        vtkfield.DataArray->SetNumberOfTuples( 0 );
-        vtkfield.DataArray->Squeeze();
-      }
-      if (nid>ncells)  // PROBABLY NOT NECESSARY
-      {
-        vtkfield.QuadratureIndexArray->SetNumberOfTuples(ncells);
-        int nquad=fop->GetNumberOfIntegrationPoint();
-        vtkfield.DataArray->SetNumberOfTuples( nquad * ds->GetNumberOfCells() );
-        vtkfield.DataArray->Squeeze();
-      }
-        ds->GetFieldData()->AddArray(vtkfield.DataArray);
-        ds->GetCellData()->AddArray(vtkfield.QuadratureIndexArray);
-
-        nid=vtkfield.QuadratureIndexArray->GetNumberOfTuples();
-        nda=vtkfield.DataArray->GetNumberOfTuples();
-
-        if(vtkfield.Vectors != NULL && this->GenerateVectors)
-          {
-          ds->GetFieldData()->AddArray(vtkfield.Vectors);
-          }
-        }
-      }
-    }//support OnCell
-  else
-    {//support OnPoint
-    if(vtkfield.DataArray->GetNumberOfTuples()!=ds->GetNumberOfPoints())
-      {
-      vtkDebugMacro("the data array " << vtkfield.DataArray->GetName() << " do not have the good number of tuples");
-      return;
-      }
-    ds->GetPointData()->AddArray(vtkfield.DataArray);
-    if(vtkfield.Vectors != NULL && this->GenerateVectors)
-      {
-      ds->GetPointData()->AddArray(vtkfield.Vectors);
-      ds->GetPointData()->SetActiveVectors(vtkfield.Vectors->GetName());
-      }
-    switch (vtkfield.DataArray->GetNumberOfComponents())
-      {
-      case 1:
-      ds->GetPointData()->SetActiveScalars(vtkfield.DataArray->GetName());
-      break;
-      case 3:
-      ds->GetPointData()->SetActiveVectors(vtkfield.DataArray->GetName());
-      break;
-      }
-    // all the VTK_VERTEX created cells have the same order than the points,
-    // I can safely map the point array to the cells in this particular case.
-    ds->GetCellData()->AddArray(vtkfield.DataArray);
-    if(vtkfield.Vectors != NULL && this->GenerateVectors)
-      {
-      ds->GetCellData()->AddArray(vtkfield.Vectors);
-      ds->GetCellData()->SetActiveVectors(vtkfield.Vectors->GetName());
-      }
-    switch (vtkfield.DataArray->GetNumberOfComponents())
-      {
-      case 1:
-      ds->GetCellData()->SetActiveScalars(vtkfield.DataArray->GetName());
-      break;
-      case 3:
-      ds->GetCellData()->SetActiveVectors(vtkfield.DataArray->GetName());
-      break;
-      }
-    }
-}
-
-void vtkMedReader::InitializeQuadratureOffsets(vtkMedFieldOnProfile* fop,
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-
-  vtkMedFieldOverEntity* fieldOverEntity = fop->GetParentFieldOverEntity();
-  vtkMedFieldStep* step = fieldOverEntity->GetParentStep();
-  vtkMedField *field= step->GetParentField();
-
-  // then I compute the quadrature key if needed, and try to find the quadrature offsets.
-  if(this->Internal->QuadratureOffsetCache.find(foep)
-      ==this->Internal->QuadratureOffsetCache.end())
-    this->Internal->QuadratureOffsetCache[foep]=map<LocalizationKey,
-        vtkSmartPointer<vtkIdTypeArray> > ();
-
-  map<LocalizationKey, vtkSmartPointer<vtkIdTypeArray> >& quadOffsets=
-      this->Internal->QuadratureOffsetCache[foep];
-
-  LocalizationKey quadkey=this->GetLocalizationKey(fop);
-
-  if(quadOffsets.find(quadkey)!=quadOffsets.end())
-    {// the quadrature offset array has already been created
-    return;
-    }
-
-  vtkIdTypeArray* qoffsets=vtkIdTypeArray::New();
-  quadOffsets[quadkey]=qoffsets;
-  qoffsets->Delete();
-
-  ostringstream sstr;
-  if(field->GetFieldType() == vtkMedField::ElnoField)
-    {
-    qoffsets->GetInformation()->Set(vtkMedUtilities::ELNO(), 1);
-    sstr<<"ELNO";
-    }
-  else if(field->GetFieldType() == vtkMedField::QuadratureField)
-    {
-    qoffsets->GetInformation()->Set(vtkMedUtilities::ELGA(), 1);
-    sstr<<"ELGA";
-    }
-  else
-    {
-    sstr<<"QuadraturePointOffset";
-    }
-
-  qoffsets->SetName(sstr.str().c_str());
-
-  vtkSmartPointer<vtkMedLocalization> loc=
-      this->GetLocalization(fop->GetLocalizationName());
-
-  if(loc == NULL)
-    {
-    if(fop->GetNumberOfIntegrationPoint()==1)
-      {// cell-centered fields can be seen as quadrature fields with 1
-      // quadrature point at the center
-      vtkMedLocalization* center=vtkMedLocalization::New();
-      loc=center;
-      center->Delete();
-      center->BuildCenter(fieldOverEntity->GetEntity().GeometryType);
-      }
-    else if(loc == NULL && field->GetFieldType() == vtkMedField::ElnoField)
-      {// ELNO fields have no vtkMedLocalization,
-      // I need to create a dummy one
-      vtkMedLocalization* elnodef=vtkMedLocalization::New();
-      loc=elnodef;
-      elnodef->Delete();
-      elnodef->BuildELNO(fieldOverEntity->GetEntity().GeometryType);
-      }
-    else
-      {
-      vtkErrorMacro("Cannot find localization of quadrature field "
-                    << field->GetName());
-      }
-    }
-  this->AddQuadratureSchemeDefinition(qoffsets->GetInformation(), loc);
-}
-
-void vtkMedReader::CreateVTKFieldOnSupport(vtkMedFieldOnProfile* fop,
-    vtkMedFamilyOnEntityOnProfile* foep, int doCreateField)
-{
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-  vtkMedFieldOverEntity* fieldOverEntity = fop->GetParentFieldOverEntity();
-  vtkMedFieldStep* step = fieldOverEntity->GetParentStep();
-  vtkMedField* field = step->GetParentField();
-
-  if(vtkMedUnstructuredGrid::SafeDownCast(
-      foep->GetFamilyOnEntity()->GetParentGrid()) != NULL)
-    {
-    fop->Load(MED_COMPACT_STMODE);
-    }
-  else
-    {
-    fop->Load(MED_GLOBAL_STMODE);
-    }
-
-  vtkMedIntArray* profids=NULL;
-
-  vtkMedProfile* profile=fop->GetProfile();
-
-  if(profile)
-    {
-    profile->Load();
-    profids=profile->GetIds();
-    }//has profile
-
-  VTKField& vtkfield=this->Internal->FieldCache[foep][fop];
-
-  bool shallowok = true;
-
-  // for structured grid, the values are loaded globally, and cells which are
-  // not on the profile or not on the family are blanked out.
-  // shallow copy is therefore always possible
-  if(vtkMedUnstructuredGrid::SafeDownCast(
-      foep->GetFamilyOnEntity()->GetParentGrid()) != NULL)
-    {
-    shallowok = foep->CanShallowCopy(fop);
-    }
-
-  if(shallowok)
-    {
-    vtkfield.DataArray = fop->GetData();
-    }
-  else
-    {
-    vtkDataArray* data=vtkMedUtilities::NewArray(field->GetDataType());
-    vtkfield.DataArray=data;
-    data->Delete();
-    vtkfield.DataArray->SetNumberOfComponents(field->GetNumberOfComponent());
-    }
-
-  for(int comp=0; comp<field->GetNumberOfComponent(); comp++)
-    {
-    vtkfield.DataArray->SetComponentName(comp, vtkMedUtilities::SimplifyName(
-        field->GetComponentName()->GetValue(comp)).c_str());
-    }
-
-  bool createOffsets=false;
-  if(field->GetFieldType()==vtkMedField::QuadratureField ||
-     field->GetFieldType()==vtkMedField::ElnoField )
-    {
-    this->InitializeQuadratureOffsets(fop, foep);
-
-    LocalizationKey quadKey = this->GetLocalizationKey(fop);
-    vtkfield.QuadratureIndexArray
-        =this->Internal->QuadratureOffsetCache[foep][quadKey];
-    vtkDataSet* ds = this->Internal->CurrentDataSet[foep];
-
-    vtkfield.DataArray->GetInformation()->Set(
-        vtkQuadratureSchemeDefinition::QUADRATURE_OFFSET_ARRAY_NAME(),
-        vtkfield.QuadratureIndexArray->GetName());
-    vtkfield.QuadratureIndexArray->GetInformation()->Set(
-        vtkAbstractArray::GUI_HIDE(), 1);
-
-    if(vtkfield.QuadratureIndexArray->GetNumberOfTuples()
-        !=ds->GetNumberOfCells())
-      {
-      vtkfield.QuadratureIndexArray->SetNumberOfTuples(0);
-      createOffsets=true;
-      }
-    }
-
-  if(!doCreateField)
-    return;
-
-  if(shallowok)
-    {
-    // build the quadrature offset array if needed
-    if(createOffsets)
-      {
-      vtkIdType noffsets;
-      int nquad=fop->GetNumberOfIntegrationPoint();
-      noffsets=fop->GetData()->GetNumberOfTuples()/nquad;
-
-      vtkDataSet* ds=this->Internal->CurrentDataSet[foep];
-      if(noffsets!=ds->GetNumberOfCells())
-        {
-        vtkErrorMacro(
-            "number of quadrature offsets (" << noffsets << ") must "
-            << "match the number of cells (" << ds->GetNumberOfCells() << ")!");
-        }
-
-      vtkfield.QuadratureIndexArray->SetNumberOfTuples(noffsets);
-      for(vtkIdType id=0; id<noffsets; id++)
-        {
-        vtkfield.QuadratureIndexArray->SetValue(id, nquad*id);
-        }
-      }
-
-    }
-  else if(foe->GetPointOrCell() == vtkMedUtilities::OnCell
-     && field->GetFieldType() != vtkMedField::PointField)
-    {
-    // Cell-centered field on cell support
-    int nquad = 1;
-    if (field->GetFieldType()==vtkMedField::QuadratureField ||
-        field->GetFieldType()==vtkMedField::ElnoField)
-      {
-      nquad=fop->GetNumberOfIntegrationPoint();
-      }
-    vtkMedIntArray* profids=NULL;
-    if (profile)
-      {
-      profids=profile->GetIds();
-      }
-    vtkIdType maxIndex=fop->GetData()->GetNumberOfTuples();
-    maxIndex/=nquad;
-    vtkIdType quadIndex = 0;
-
-    for (vtkIdType id = 0; id<maxIndex; id++)
-      {
-      vtkIdType realIndex = (profids!=NULL ? profids->GetValue(id)-1 : id);
-      if (!foep->KeepCell(realIndex))
-        continue;
-
-      if (field->GetFieldType()==vtkMedField::QuadratureField ||
-          field->GetFieldType()==vtkMedField::ElnoField)
-        {
-        for (int q = 0; q<nquad; q++)
-          {
-          vtkfield.DataArray->InsertNextTuple(nquad*realIndex+q,
-              fop->GetData());
-          }
-        if (createOffsets)
-          {
-          vtkfield.QuadratureIndexArray->InsertNextValue(quadIndex);
-          quadIndex+=nquad;
-          }
-        }
-      else
-        {
-        vtkfield.DataArray->InsertNextTuple(id, fop->GetData());
-        }
-      }//copy all tuples
-    vtkfield.DataArray->Squeeze();
-    vtkDataSet* ds = this->Internal->CurrentDataSet[foep];
-    }
-  else if(foe->GetPointOrCell() == vtkMedUtilities::OnCell
-     && field->GetFieldType() == vtkMedField::PointField)
-    {// point field on cell support
-    vtkMedIntArray* profids=NULL;
-
-    vtkMedProfile* profile=fop->GetProfile();
-
-    if(profile)
-      {
-      profile->Load();
-
-      profids=profile->GetIds();
-      }//has profile
-
-    vtkIdType maxId=fop->GetData()->GetNumberOfTuples();
-
-    for(vtkIdType id=0; id<maxId; id++)
-      {
-      // if I have a profile, then I should insert the value at the position given in the profile.
-      vtkIdType destIndex;
-      if(profids!=NULL)
-        {
-        destIndex=profids->GetValue(id)-1; // -1 because med indices start at 1
-        }
-      else
-        {
-        destIndex=id;
-        }
-
-      if(!foep->KeepPoint(destIndex))
-        continue;
-      // if I use the med2VTKIndex, then the index to insert
-      // this value is given by the map.
-      destIndex = foep->GetVTKPointIndex(destIndex);
-      vtkfield.DataArray->InsertTuple(destIndex, id, fop->GetData());
-      }
-    vtkfield.DataArray->Squeeze();
-    }// point field on cell support
-  else if(foe->GetPointOrCell() == vtkMedUtilities::OnPoint &&
-     field->GetFieldType() == vtkMedField::PointField)
-    {//support OnPoint
-
-    vtkIdType maxId = fop->GetData()->GetNumberOfTuples();
-
-    for(vtkIdType id=0; id<maxId; id++)
-      {
-      vtkIdType realIndex=id;
-      if(profids!=NULL)
-        {
-        realIndex=profids->GetValue(id)-1; // -1 because med indices start at 1
-        }
-
-      if(!foep->KeepPoint(realIndex))
-        continue;
-
-      vtkfield.DataArray->InsertNextTuple(fop->GetData()->GetTuple(realIndex));
-      }
-    vtkfield.DataArray->Squeeze();
-    }// support on point
-
-  // now generate the vector field if asked for
-  if(this->GenerateVectors)
-    {
-    int ncomp = vtkfield.DataArray->GetNumberOfComponents();
-    if(ncomp > 1 && ncomp != 3)
-      {
-      vtkDataArray* vectors = vtkfield.DataArray->NewInstance();
-      vectors->SetNumberOfComponents(3);
-      vectors->SetNumberOfTuples(vtkfield.DataArray->GetNumberOfTuples());
-      vtkfield.Vectors = vectors;
-      vectors->Delete();
-
-      vectors->CopyInformation(vtkfield.DataArray->GetInformation());
-
-      if(ncomp < 3)
-        vectors->SetComponentName(2, "Z");
-      else
-        vectors->SetComponentName(2, vtkfield.DataArray->GetComponentName(2));
-
-      vectors->SetComponentName(1, vtkfield.DataArray->GetComponentName(1));
-      vectors->SetComponentName(0, vtkfield.DataArray->GetComponentName(0));
-
-      int tuplesize = (ncomp > 3? ncomp: 3);
-      double* tuple = new double[tuplesize];
-      for(int tid=0; tid<tuplesize; tid++)
-        {
-        tuple[tid] = 0.0;
-        }
-
-      for(vtkIdType id=0; id < vtkfield.DataArray->GetNumberOfTuples(); id++)
-        {
-        vtkfield.DataArray->GetTuple(id, tuple);
-        vectors->SetTuple(id, tuple);
-        }
-      }
-    }
-}
-
-int vtkMedReader::HasMeshAnyCellSelectedFamily(vtkMedMesh* mesh)
-{
-  int nfam = mesh->GetNumberOfCellFamily();
-  for (int famid = 0; famid<nfam; famid++)
-    {
-    vtkMedFamily* fam = mesh->GetFamily(famid);
-    if (fam->GetPointOrCell()!=vtkMedUtilities::OnCell||!this->GetFamilyStatus(
-        mesh, fam))
-      continue;
-    return true;
-    }
-  return false;
-}
-
-int vtkMedReader::HasMeshAnyPointSelectedFamily(vtkMedMesh* mesh)
-{
-  int nfam = mesh->GetNumberOfCellFamily();
-  for (int famid = 0; famid<nfam; famid++)
-    {
-    vtkMedFamily* fam = mesh->GetFamily(famid);
-    if (fam->GetPointOrCell()!=vtkMedUtilities::OnPoint
-        ||!this->GetFamilyStatus(mesh, fam))
-      continue;
-    return true;
-    }
-  return false;
-}
-
-void vtkMedReader::BuildSIL(vtkMutableDirectedGraph* sil)
-{
-  if(sil==NULL)
-    return;
-
-  sil->Initialize();
-
-  vtkSmartPointer<vtkVariantArray> childEdge=
-      vtkSmartPointer<vtkVariantArray>::New();
-  childEdge->InsertNextValue(0);
-
-  vtkSmartPointer<vtkVariantArray> crossEdge=
-      vtkSmartPointer<vtkVariantArray>::New();
-  crossEdge->InsertNextValue(1);
-
-  // CrossEdge is an edge linking hierarchies.
-  vtkUnsignedCharArray* crossEdgesArray=vtkUnsignedCharArray::New();
-  crossEdgesArray->SetName("CrossEdges");
-  sil->GetEdgeData()->AddArray(crossEdgesArray);
-  crossEdgesArray->Delete();
-  /*vtk*/std::deque</*vtk*/std::string> names;
-
-  // Now build the hierarchy.
-  vtkIdType rootId=sil->AddVertex();
-  names.push_back("SIL");
-
-  // Add a global entry to encode global names for the families
-  vtkIdType globalFamilyRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Families");
-
-  // Add a global entry to encode global names for the families
-  vtkIdType globalGroupRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Groups");
-
-  // Add the groups subtree
-  vtkIdType groupsRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("GroupTree");
-
-  // Add a global entry to encode names for the cell types
-  vtkIdType globalEntityRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("Entity");
-
-  // Add the cell types subtree
-  vtkIdType entityTypesRoot=sil->AddChild(rootId, childEdge);
-  names.push_back("EntityTree");
-
-  // this is the map that keep added cell types
-  map<vtkMedEntity, vtkIdType> entityMap;
-  map<med_entity_type, vtkIdType> typeMap;
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      meshfileit = this->Internal->MedFiles.begin();
-  while(meshfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = meshfileit->second;
-    meshfileit++;
-
-    int numMeshes=file->GetNumberOfMesh();
-    for(int meshIndex=0; meshIndex<numMeshes; meshIndex++)
-      {
-      vtkMedMesh* mesh = file->GetMesh(meshIndex);
-      vtkMedGrid* grid = this->FindGridStep(mesh);
-
-      if(grid == NULL)
-        continue;
-
-      // add all entities
-      for(int entityIndex=0; entityIndex<grid->GetNumberOfEntityArray(); entityIndex++)
-        {
-        vtkMedEntityArray* array=grid->GetEntityArray(entityIndex);
-        vtkMedEntity entity = array->GetEntity();
-
-        if(entityMap.find(entity)==entityMap.end())
-          {
-          vtkIdType entityGlobalId=sil->AddChild(globalEntityRoot, childEdge);
-          names.push_back(vtkMedUtilities::EntityKey(entity));
-
-          vtkIdType typeId;
-          if(typeMap.find(entity.EntityType)==typeMap.end())
-            {
-            typeId=sil->AddChild(entityTypesRoot, childEdge);
-            names.push_back(vtkMedUtilities::EntityName(entity.EntityType));
-            typeMap[entity.EntityType]=typeId;
-            }
-          else
-            {
-            typeId=typeMap[entity.EntityType];
-            }
-          vtkIdType entityId=sil->AddChild(typeId, childEdge);
-          names.push_back(entity.GeometryName);
-
-          sil->AddEdge(entityId, entityGlobalId, crossEdge);
-
-          entityMap[entity]=entityId;
-          }
-        }
-
-      vtkIdType meshGroup = sil->AddChild(groupsRoot, childEdge);
-      names.push_back(vtkMedUtilities::SimplifyName(mesh->GetName()));
-
-      // add the two OnPoint and OnCell entries, for groups and for families
-      vtkIdType meshCellGroups = sil->AddChild(meshGroup, childEdge);
-      names.push_back(vtkMedUtilities::OnCellName);
-
-      vtkIdType meshPointGroups = sil->AddChild(meshGroup, childEdge);
-      names.push_back(vtkMedUtilities::OnPointName);
-
-      // this maps will keep all added groups on nodes/cells of this mesh
-      map<string, vtkIdType> nodeGroupMap;
-      map<string, vtkIdType> cellGroupMap;
-
-      // add all families
-      for(int famIndex=0; famIndex<mesh->GetNumberOfFamily(); famIndex++)
-        {
-        vtkMedFamily* family=mesh->GetFamily(famIndex);
-
-        vtkIdType globalFamilyId = sil->AddChild(globalFamilyRoot, childEdge);
-        names.push_back(vtkMedUtilities::FamilyKey(mesh->GetName(),
-                                                   family->GetPointOrCell(),
-                                                   family->GetName()));
-
-        // family with Id 0 is both on cell and on points, so add it to both
-        map<string, vtkIdType> & groupMap=(family->GetPointOrCell()
-            ==vtkMedUtilities::OnPoint? nodeGroupMap: cellGroupMap);
-
-        vtkIdType groupRootId =
-            (family->GetPointOrCell()==vtkMedUtilities::OnPoint?
-             meshPointGroups : meshCellGroups);
-
-        // add all the groups of this family
-        for(vtkIdType groupIndex=0; groupIndex<family->GetNumberOfGroup();
-          groupIndex++)
-          {
-          vtkMedGroup* group=family->GetGroup(groupIndex);
-
-          vtkIdType familyGroupId = sil->AddChild(globalFamilyId, childEdge);
-          names.push_back(vtkMedUtilities::FamilyKey(
-              mesh->GetName(), family->GetPointOrCell(),
-              family->GetName()));
-
-          vtkIdType groupGlobalId;
-          if(groupMap.find(group->GetName())==groupMap.end())
-            {
-            vtkIdType groupLocalId;
-            groupLocalId=sil->AddChild(groupRootId, childEdge);
-            names.push_back(vtkMedUtilities::SimplifyName(group->GetName()));
-
-            groupGlobalId=sil->AddChild(globalGroupRoot, childEdge);
-            names.push_back(vtkMedUtilities::GroupKey(
-                mesh->GetName(), family->GetPointOrCell(),
-                group->GetName()));
-            groupMap[group->GetName()]=groupGlobalId;
-
-            sil->AddEdge(groupLocalId, groupGlobalId, crossEdge);
-            }
-          vtkIdType groupId = groupMap[group->GetName()];
-          sil->AddEdge(familyGroupId, groupId, childEdge);
-
-          }//groupIndex
-        }//famIndex
-      }//meshIndex
-    }// file iterator
-
-  // This array is used to assign names to nodes.
-  vtkStringArray* namesArray=vtkStringArray::New();
-  namesArray->SetName("Names");
-  namesArray->SetNumberOfTuples(sil->GetNumberOfVertices());
-  sil->GetVertexData()->AddArray(namesArray);
-  namesArray->Delete();
-  /*vtk*/std::deque</*vtk*/std::string>::iterator iter;
-  vtkIdType cc;
-  for(cc=0, iter=names.begin(); iter!=names.end(); ++iter, ++cc)
-    {
-    namesArray->SetValue(cc, (*iter).c_str());
-    }
-}
-
-void vtkMedReader::ClearMedSupports()
-{
-  this->Internal->DataSetCache.clear();
-  //this->Internal->Med2VTKPointIndex.clear();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      meshfileit = this->Internal->MedFiles.begin();
-  while(meshfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = meshfileit->second;
-    meshfileit++;
-    int numMeshes=file->GetNumberOfMesh();
-    for(int meshIndex=0; meshIndex<numMeshes; meshIndex++)
-      {
-      vtkMedMesh* mesh=file->GetMesh(meshIndex);
-      mesh->ClearMedSupports();
-      }
-
-    int numProf = file->GetNumberOfProfile();
-    for (int prof = 0; prof<numProf; prof++)
-      {
-      vtkMedProfile* profile = file->GetProfile(prof);
-      if (profile->GetIds()!=NULL)
-        profile->GetIds()->Initialize();
-      }
-    }
-}
-
-void vtkMedReader::ClearMedFields()
-{
-  this->Internal->FieldCache.clear();
-  this->Internal->QuadOffsetKey.clear();
-  this->Internal->QuadratureOffsetCache.clear();
-
-  std::map<std::string, vtkSmartPointer<vtkMedFile> >::iterator
-      fieldfileit = this->Internal->MedFiles.begin();
-  while(fieldfileit != this->Internal->MedFiles.end())
-    {
-    vtkMedFile* file = fieldfileit->second;
-    fieldfileit++;
-
-    int numFields=file->GetNumberOfField();
-    for(int ff=0; ff<numFields; ff++)
-      {
-      vtkMedField* field=file->GetField(ff);
-      int nstep=field->GetNumberOfFieldStep();
-      for(int sid=0; sid<nstep; sid++)
-        {
-        vtkMedFieldStep* step = field->GetFieldStep(sid);
-        for(int id=0; id<step->GetNumberOfFieldOverEntity(); id++)
-          {
-          vtkMedFieldOverEntity * fieldOverEntity=step->GetFieldOverEntity(id);
-          for(int pid = 0; pid < fieldOverEntity->GetNumberOfFieldOnProfile(); pid++)
-            {
-            vtkMedFieldOnProfile* fop = fieldOverEntity->GetFieldOnProfile(pid);
-            if(fop->GetData() != NULL)
-              fop->SetData(NULL);
-            }
-          }
-        }
-      }
-    }
-}
-
-void vtkMedReader::ClearCaches(int when)
-{
-  switch(when)
-  {
-    case Initialize:
-      this->Internal->CurrentDataSet.clear();
-      this->Internal->DataSetCache.clear();
-      this->Internal->FieldCache.clear();
-      this->Internal->UsedSupports.clear();
-      this->Internal->QuadratureOffsetCache.clear();
-      this->Internal->QuadOffsetKey.clear();
-      //this->Internal->Med2VTKPointIndex.clear();
-      break;
-    case StartRequest:
-      this->Internal->CurrentDataSet.clear();
-      this->Internal->UsedSupports.clear();
-      if(this->CacheStrategy==CacheNothing)
-        {
-        this->ClearMedSupports();
-        this->ClearMedFields();
-        }
-      else if(this->CacheStrategy==CacheGeometry)
-        {
-        this->ClearMedFields();
-        }
-      break;
-    case AfterCreateMedSupports:
-      // TODO : clear the unused supports and associated cached datasets and fields
-      break;
-    case EndBuildVTKSupports:
-      break;
-    case EndRequest:
-      if(this->CacheStrategy==CacheNothing)
-        {
-        this->ClearMedSupports();
-        this->ClearMedFields();
-        }
-      else if(this->CacheStrategy==CacheGeometry && this->AnimationMode != Modes)
-        {
-        this->ClearMedFields();
-        }
-      break;
-  }
-}
-
-void vtkMedReader::PrintSelf(ostream& os, vtkIndent indent)
-{
-  PRINT_STRING(os, indent, FileName);
-  PRINT_IVAR(os, indent, AnimationMode);
-  PRINT_IVAR(os, indent, TimeIndexForIterations);
-  PRINT_OBJECT(os, indent, PointFields);
-  PRINT_OBJECT(os, indent, CellFields);
-  PRINT_OBJECT(os, indent, QuadratureFields);
-  PRINT_OBJECT(os, indent, ElnoFields);
-  PRINT_OBJECT(os, indent, Groups);
-  PRINT_OBJECT(os, indent, Entities);
-  PRINT_IVAR(os, indent, CacheStrategy);
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedReader.h b/src/Plugins/MedReader/IO/vtkMedReader.h
deleted file mode 100644 (file)
index 471e253..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedReader_h_
-#define __vtkMedReader_h_
-
-#include "vtkMultiBlockDataSetAlgorithm.h"
-#include "vtkMedSetGet.h"
-#include <map>
-
-class vtkMedFile;
-class vtkMedDriver;
-class vtkMedSelection;
-class vtkMedFieldOverEntity;
-class vtkMedFieldStep;
-class vtkMedField;
-class vtkMedMesh;
-class vtkMedFamily;
-class vtkMedLocalization;
-class vtkMedEntityArray;
-class vtkMedFamilyOnEntity;
-class vtkMedFamilyOnEntityOnProfile;
-class vtkMedProfile;
-class vtkMedComputeStep;
-class vtkMedGrid;
-class vtkMedFieldOnProfile;
-class vtkMedListOfFieldSteps;
-class vtkMedEntity;
-
-class vtkUnstructuredGrid;
-class vtkUnsignedCharArray;
-class vtkIdList;
-class vtkDoubleArray;
-class vtkFieldData;
-class vtkInformationDataObjectKey;
-class vtkMutableDirectedGraph;
-class vtkDataSet;
-
-class VTK_EXPORT vtkMedReader: public vtkMultiBlockDataSetAlgorithm
-{
-public:
-  static vtkMedReader* New();
-  vtkTypeMacro(vtkMedReader, vtkMultiBlockDataSetAlgorithm);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Set the file name to read from
-  virtual void SetFileName(const char*);
-  vtkGetStringMacro(FileName)
-
-  // Description:
-  // Is the given file a MED file?
-  virtual int CanReadFile(const char* fname);
-
-  // Description:
-  // Get the file extensions for this format.
-  // Returns a string with a space separated list of extensions in
-  // the format .extension
-  virtual const char*
-  GetFileExtensions()
-  {
-    return ".med .rmed";
-  }
-
-  // Description:
-  // Return a descriptive name for the file format that might be
-  // useful in a GUI.
-  virtual const char*
-  GetDescriptiveName()
-  {
-    return "MED file (Modele d'Echange de Donnees)";
-  }
-
-  // Description:
-  // use these methods to enable/disable point arrays
-  virtual int GetPointFieldArrayStatus(const char* name);
-  virtual void SetPointFieldArrayStatus(const char* name, int status);
-  virtual int GetNumberOfPointFieldArrays();
-  virtual const char* GetPointFieldArrayName(int);
-
-  // Description:
-  // use these methods to enable/disable cell arrays
-  virtual int GetCellFieldArrayStatus(const char* name);
-  virtual void SetCellFieldArrayStatus(const char* name, int status);
-  virtual int GetNumberOfCellFieldArrays();
-  virtual const char* GetCellFieldArrayName(int);
-
-  // Description:
-  // use these methods to enable/disable quadrature arrays
-  virtual int GetQuadratureFieldArrayStatus(const char* name);
-  virtual void SetQuadratureFieldArrayStatus(const char* name, int status);
-  virtual int GetNumberOfQuadratureFieldArrays();
-  virtual const char* GetQuadratureFieldArrayName(int);
-
-  // Description:
-  // use these methods to enable/disable quadrature arrays
-  virtual int GetElnoFieldArrayStatus(const char* name);
-  virtual void SetElnoFieldArrayStatus(const char* name, int status);
-  virtual int GetNumberOfElnoFieldArrays();
-  virtual const char* GetElnoFieldArrayName(int);
-
-  // Description:
-  // use this method to enable/disable cell types
-  // the key is encoded with the vtkMedUtilities::EntityKey method
-  // which returns a string
-  // CELL_TYPE/MED_ENTITE_MAILLAGE/MED_GEOMETRIE_ELEMENT
-  virtual void SetEntityStatus(const char* key, int flag);
-  virtual int GetEntityStatus(const vtkMedEntity&);
-
-  // Description:
-  // use this method to enable/disable a family support
-  // the key is formatted by the vtkMedUtilities::FamilyKey method which
-  // returns a string
-  // GROUP/MESH_NAME/OnPoint/FAMILY_NAME or MESH_NAME/OnCell/FAMILY_NAME
-  virtual void SetGroupStatus(const char* key, int flag);
-  virtual int GetGroupStatus(const char* key);
-
-  // Description:
-  // the animation mode modify the way the reader answers time requests from
-  // the pipeline.
-  // Default (0) : this is PhysicalTime if there are times, or Iterations
-  // if there are only iterations
-  // PhysicalTime (1) : the reader aggregates all physical times available
-  // in the file.
-  // for a given time t, the reader will return for each field the
-  // ComputeStep with the highest time inferior
-  // to t, and with the highest iteration.
-  // Iteration (2) : you need to also set the TimeIndexForIterations field.
-  // In this case, the reader will understand
-  // time requests has a request to iterate over iterations for the given time.
-  // Modes (3) : the reader will output the selected fields at all selected
-  // frequencies, and will output a fake TimeRange of -PI/+PI.
-  // Use the *FrequencyArray* interface to select them.
-  //BTX
-  enum eAnimationMode
-  {
-    Default=0, PhysicalTime=1, Iteration=2, Modes=3
-  };
-  //ETX
-  vtkSetMacro(AnimationMode, int);
-  vtkGetMacro(AnimationMode, int);
-
-  // Description:
-  // in med files, the ComputeSteps are defined by a
-  // pair <iteration, physicalTime>.
-  // the TimeIndexForIterations ivar is used only if the TimeMode is
-  // Iteration.
-  // it fixes the PhysicalTime index when iterating over iterations : only
-  // iterations with the corresponding physical time will be iterated over.
-  // The index given here is an index into the AvailableTimes array
-  // that is returned be the GetAvailableTimes Method.
-  vtkSetMacro(TimeIndexForIterations, double);
-  vtkGetMacro(TimeIndexForIterations, double);
-
-  // Description:
-  // use these methods to enable/disable a given frequency for modal analysis
-  virtual int GetFrequencyArrayStatus(const char* name);
-  virtual void SetFrequencyArrayStatus(const char* name, int status);
-  virtual int GetNumberOfFrequencyArrays();
-  virtual const char* GetFrequencyArrayName(int);
-
-  // Description:
-  // returns the available physical times. Use this to get the times when in
-  // iteration mode.
-  virtual vtkDoubleArray* GetAvailableTimes();
-
-  // Description:
-  // Build the graph used to pass information to the client on the supports
-  virtual void BuildSIL(vtkMutableDirectedGraph*);
-
-  // Description:
-  // Every time the SIL is updated a this will return a different value.
-  virtual int GetSILUpdateStamp();
-
-  // Description:
-  // reset the selection arrays without having to rebuild the SIL.
-  virtual void ClearSelections();
-
-  // Description:
-  // The CacheStrategy indicates to the reader if it
-  // should cache some of the arrays.
-  //BTX
-  enum eCacheStrategy
-  {
-    CacheNothing, CacheGeometry, CacheGeometryAndFields
-  };
-  //ETX
-  vtkSetMacro(CacheStrategy, int)
-  vtkGetMacro(CacheStrategy, int)
-
-  // Description :
-  // release arrays read from MED (point coordinates, profile ids, family ids)
-  void ClearMedSupports();
-
-  // Description :
-  // release arrays read from MED (fields)
-  void ClearMedFields();
-
-  // Description:
-  // If this flag is set, the reader will output a vector field for each
-  // field in the file that has 2 or more components by extracting the
-  // first 3 compoenents
-  vtkSetMacro(GenerateVectors, int);
-  vtkGetMacro(GenerateVectors, int);
-
-protected:
-  vtkMedReader();
-  virtual ~vtkMedReader();
-
-  // Description:
-  // This is called by the superclass.
-  virtual int RequestDataObject(vtkInformation*, vtkInformationVector**,
-      vtkInformationVector*);
-
-  // Description:
-  // This is called by the superclass.
-  virtual int RequestInformation(vtkInformation*, vtkInformationVector**,
-      vtkInformationVector*);
-
-  // Description:
-  // This is called by the superclass.
-  virtual int RequestData(vtkInformation*, vtkInformationVector**,
-      vtkInformationVector*);
-
-  // Description:
-  // Gather all compute steps in the fields
-  virtual void GatherComputeSteps();
-
-  // Description:
-  // Give the animation steps to the pipeline
-  virtual void AdvertiseTime(vtkInformation*);
-
-  // Description:
-  // returns 1 if at least one the families of this mesh is selected,
-  // 0 otherwise.
-  virtual int IsMeshSelected(vtkMedMesh*);
-
-  // Description:
-  // returns if the field is selected.
-  virtual int IsFieldSelected(vtkMedField*);
-  virtual int IsPointFieldSelected(vtkMedField*);
-  virtual int IsCellFieldSelected(vtkMedField*);
-  virtual int IsQuadratureFieldSelected(vtkMedField*);
-  virtual int IsElnoFieldSelected(vtkMedField*);
-
-  virtual void AddQuadratureSchemeDefinition(vtkInformation*,
-      vtkMedLocalization*);
-
-  //BTX
-  enum
-  {
-    Initialize,
-    StartRequest,
-    AfterCreateMedSupports,
-    EndBuildVTKSupports,
-    EndRequest
-  };
-  //ETX
-  virtual void ClearCaches(int when);
-
-  virtual void CreateMedSupports();
-
-  virtual bool BuildVTKSupport(vtkMedFamilyOnEntityOnProfile*,
-                               int doBuildSupport);
-
-  virtual void MapFieldsOnSupport(vtkMedFamilyOnEntityOnProfile* foe,
-                                  int doMapField);
-
-  virtual void CreateVTKFieldOnSupport(vtkMedFieldOnProfile*,
-                                       vtkMedFamilyOnEntityOnProfile*,
-                                       int doCreateField);
-
-  virtual void MapFieldOnSupport(vtkMedFieldOnProfile*,
-                                 vtkMedFamilyOnEntityOnProfile*,
-                                 int doCreateField);
-
-  // Description:
-  // Necessary call for the initialization of the filters used for the MED
-  // library in their parallel reads
-  virtual void InitializeParallelRead();
-
-  // Description:
-  // This method is called after all info from all med files are read.
-  // it links information coming from different files :
-  // for instance, it creates the vtkMedFamilyOnEntityOnProfile instances
-  // to link mesh and field.
-  virtual void  LinkMedInfo();
-
-  virtual vtkMedProfile* GetProfile(const char*);
-
-  virtual vtkMedLocalization* GetLocalization(const char*);
-
-  virtual int GetLocalizationKey(vtkMedFieldOnProfile*);
-
-  virtual void InitializeQuadratureOffsets(vtkMedFieldOnProfile*,
-                                           vtkMedFamilyOnEntityOnProfile*);
-
-  virtual void SetVTKFieldOnSupport(vtkMedFieldOnProfile*,
-                                    vtkMedFamilyOnEntityOnProfile*);
-
-  // Description:
-  // returns the current grid to use for this mesh.
-  vtkMedGrid* FindGridStep(vtkMedMesh* mesh);
-
-  virtual void  GatherFieldSteps(vtkMedField*, vtkMedListOfFieldSteps&);
-
-  // Description:
-  // returns the index of the given frequency in the AvailableTimes array.
-  vtkIdType GetFrequencyIndex(double);
-
-  virtual void ChooseRealAnimationMode();
-
-  // Description :
-  // Load the connectivity of this entities, and also those of the
-  // sub-entities in the case of non nodal connectivity.
-  virtual void LoadConnectivity(vtkMedEntityArray*);
-
-  virtual void InitializeCellGlobalIds();
-
-  // Description :
-  // returns 1 if any point/cell family of this mesh is selected.
-  int HasMeshAnyCellSelectedFamily(vtkMedMesh*);
-  int HasMeshAnyPointSelectedFamily(vtkMedMesh*);
-
-  // Description:
-  // use this method to enable/disable a family support
-  // the key is formatted by the vtkMedUtilities::FamilyKey method which
-  // returns a string
-  // FAMILY/MESH_NAME/OnPoint/FAMILY_NAME or MESH_NAME/OnCell/FAMILY_NAME
-  virtual void SetFamilyStatus(const char* key, int flag);
-  virtual int GetFamilyStatus(vtkMedMesh*, vtkMedFamily*);
-
-  // Description:
-  // This is a helper function that is called when requesting a family status
-  // if a group status has been set after the last family status update.
-  virtual void SelectFamiliesFromGroups();
-
-  // Description:
-  // Instanciate a new vtkDataSet and initialize it to the points
-  // of this support.
-  vtkDataSet* CreateUnstructuredGridForPointSupport(
-      vtkMedFamilyOnEntityOnProfile* foep);
-
-  // Field selections
-  vtkMedSelection* PointFields;
-  vtkMedSelection* CellFields;
-  vtkMedSelection* QuadratureFields;
-  vtkMedSelection* ElnoFields;
-
-  // Support selection
-  vtkMedSelection* Entities;
-  vtkMedSelection* Groups;
-
-  // name of the file to read from
-  char* FileName;
-
-  // time management
-  int AnimationMode;
-  double TimeIndexForIterations;
-  vtkDoubleArray* AvailableTimes;
-  double TimePrecision;
-  vtkMedSelection* Frequencies;
-
-  int CacheStrategy;
-  int GenerateVectors;
-
-  //BTX
-  class vtkMedReaderInternal;
-  vtkMedReaderInternal* Internal;
-  //ETX
-
-private:
-  vtkMedReader(const vtkMedReader&); // Not implemented.
-  void operator=(const vtkMedReader&); // Not implemented.
-};
-
-#endif //__vtkMedReader_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedRegularGrid.cxx b/src/Plugins/MedReader/IO/vtkMedRegularGrid.cxx
deleted file mode 100644 (file)
index 799d2b3..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedRegularGrid.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkDataArray.h"
-#include "vtkStructuredGrid.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedMesh.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedProfile.h"
-#include "vtkMedFamily.h"
-
-vtkCxxGetObjectVectorMacro(vtkMedRegularGrid, AxisCoordinate, vtkDataArray);
-vtkCxxSetAbstractObjectVectorMacro(vtkMedRegularGrid, AxisCoordinate, vtkDataArray);
-
-// vtkCxxRevisionMacro(vtkMedRegularGrid, "$Revision$")
-vtkStandardNewMacro(vtkMedRegularGrid)
-
-vtkMedRegularGrid::vtkMedRegularGrid()
-{
-  this->AxisCoordinate = new vtkObjectVector<vtkDataArray>();
-}
-
-vtkMedRegularGrid::~vtkMedRegularGrid()
-{
-  delete this->AxisCoordinate;
-}
-
-void vtkMedRegularGrid::SetDimension(med_int dim)
-{
-  if(dim < 0)
-    dim = 0;
-  this->AxisSize.resize(dim);
-  this->SetNumberOfAxisCoordinate(dim);
-}
-
-int vtkMedRegularGrid::GetDimension()
-{
-  return this->AxisSize.size();
-}
-
-void  vtkMedRegularGrid::SetAxisSize(int axis, med_int size)
-{
-  if(axis < 0)
-    return;
-
-  if(axis >= this->GetDimension())
-    {
-    this->SetDimension(axis+1);
-    }
-
-  this->AxisSize[axis] = size;
-}
-
-med_int vtkMedRegularGrid::GetAxisSize(int dim)
-{
-  if(dim < 0 || dim >= this->AxisSize.size())
-    return 0;
-  return this->AxisSize[dim];
-}
-
-med_int vtkMedRegularGrid::GetNumberOfPoints()
-{
-  med_int npts = 1;
-  for(int dim = 0; dim < this->AxisSize.size(); dim++)
-    {
-    npts *= this->AxisSize[dim];
-    }
-  return npts;
-}
-
-void  vtkMedRegularGrid::LoadCoordinates()
-{
-  this->GetParentMesh()->GetParentFile()->GetMedDriver()->LoadCoordinates(this);
-}
-
-int vtkMedRegularGrid::IsCoordinatesLoaded()
-{
-  bool res =  this->GetDimension() == this->AxisSize.size() &&
-      this->GetDimension() == this->AxisCoordinate->size();
-
-  if(!res)
-    return 0;
-
-  med_int nloadedcoords = 1;
-  for(int axis=0; axis < this->GetDimension(); axis++)
-    {
-    vtkDataArray* axiscoords = this->GetAxisCoordinate(axis);
-    if(axiscoords != NULL)
-      nloadedcoords *= axiscoords->GetNumberOfTuples();
-    else
-      nloadedcoords = 0;
-    }
-  return nloadedcoords == this->GetNumberOfPoints();
-}
-
-double* vtkMedRegularGrid::GetCoordTuple(med_int index)
-{
-  this->CoordTuple[0] = 0;
-  this->CoordTuple[1] = 0;
-  this->CoordTuple[2] = 0;
-  med_int prevmod = 1;
-  for(int axis=0; axis < this->GetDimension(); axis++)
-    {
-    med_int modulo = prevmod * this->AxisSize[axis];
-    med_int axisindex = (index % modulo) / prevmod;
-    prevmod = modulo;
-    vtkDataArray* coords = this->GetAxisCoordinate(axis);
-    this->CoordTuple[axis] = coords->
-                             GetTuple1(axisindex);
-    }
-
-  return this->CoordTuple;
-}
-
-vtkDataSet* vtkMedRegularGrid::CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkStructuredGrid* vtkgrid = vtkStructuredGrid::New();
-
-  vtkPoints* points = vtkPoints::New();
-  vtkgrid->SetPoints(points);
-  points->Delete();
-
-  vtkIdType dims[3] = {this->GetAxisSize(0),
-                    this->GetAxisSize(1),
-                    this->GetAxisSize(2)};
-
-  for(int dim=0; dim<3; dim++)
-    dims[dim] = (dims[dim] >= 1 ? dims[dim] : 1);
-
-  vtkgrid->SetDimensions(dims[0], dims[1], dims[2]);
-
-  this->LoadCoordinates();
-
-  if(this->GetAxisCoordinate(0) == NULL)
-    {
-    vtkgrid->Delete();
-    return NULL;
-    }
-
-  vtkDataArray* coords = vtkMedUtilities::NewCoordArray();
-  coords->SetNumberOfComponents(3);
-  coords->SetNumberOfTuples(this->GetNumberOfPoints());
-  vtkgrid->GetPoints()->SetData(coords);
-  coords->Delete();
-
-  med_int npts;
-  double coord[3] = {0, 0, 0};
-
-  npts = this->GetNumberOfPoints();
-  for(med_int id=0; id<npts; id++)
-    {
-    double * tuple = this->GetCoordTuple(id);
-    for(int dim=0; dim<this->GetDimension(); dim++)
-      {
-      coord[dim] = tuple[dim];
-      }
-    coords->SetTuple(id, coord);
-    }
-
-  if(foep->GetProfile() != NULL)
-    {
-    foep->GetProfile()->Load();
-    vtkMedIntArray* pids = foep->GetProfile()->GetIds();
-    med_int previd = -1;
-    for(med_int pid=0; pid<pids->GetNumberOfTuples(); pid++)
-      {
-      med_int id = pids->GetValue(pid) - 1;
-      for(med_int theid=previd+1; theid<id; theid++)
-        {
-        vtkgrid->BlankCell(theid);
-        }
-
-      previd = id;
-      }
-    }
-
-  if(foep->GetFamilyOnEntity()->GetEntityArray()->GetNumberOfFamilyOnEntity() > 1)
-    {
-    med_int famid = foep->GetFamilyOnEntity()->GetFamily()->GetId();
-    vtkMedEntityArray* ea = foep->GetFamilyOnEntity()->GetEntityArray();
-    for(med_int id=0; id<vtkgrid->GetNumberOfCells(); id++)
-      {
-      if(ea->GetFamilyId(id) != famid)
-        vtkgrid->BlankCell(id);
-      }
-    }
-  return vtkgrid;
-}
-
-void vtkMedRegularGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedRegularGrid.h b/src/Plugins/MedReader/IO/vtkMedRegularGrid.h
deleted file mode 100644 (file)
index cd0d0cf..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedRegularGrid_h_
-#define __vtkMedRegularGrid_h_
-
-#include "vtkMedGrid.h"
-#include "vtkMed.h"
-#include "vtkMedSetGet.h"
-
-#include <vector>
-
-class vtkDataArray;
-
-class VTK_EXPORT vtkMedRegularGrid : public vtkMedGrid
-{
-public :
-  static vtkMedRegularGrid* New();
-  vtkTypeMacro(vtkMedRegularGrid, vtkMedGrid)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // Container of the families in this mesh
-  vtkGetObjectVectorMacro(AxisCoordinate, vtkDataArray);
-  vtkSetAbstractObjectVectorMacro(AxisCoordinate, vtkDataArray);
-
-  // Description:
-  // overloaded to set the number of coordinates arrays.
-  // Do not allocate each array.
-  virtual void  SetDimension(med_int);
-  virtual int GetDimension();
-
-  // Description:
-  // the size of each dimension of the grid.
-  // SetDimension has to have been called before
-  virtual void  SetAxisSize(int axis, med_int size);
-  virtual med_int GetAxisSize(int dim);
-
-  // Description:
-  // returns the number of points of this grid.
-  virtual med_int GetNumberOfPoints();
-
-  virtual void  LoadCoordinates();
-
-  virtual double* GetCoordTuple(med_int index);
-
-  virtual int IsCoordinatesLoaded();
-
-  virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
-
-protected:
-  vtkMedRegularGrid();
-  virtual ~vtkMedRegularGrid();
-
-  double CoordTuple[3];
-
-  std::vector<med_int> AxisSize;
-  //BTX
-  vtkObjectVector<vtkDataArray>* AxisCoordinate;
-  //ETX
-
-private:
-  vtkMedRegularGrid(const vtkMedRegularGrid&); // Not implemented.
-  void operator=(const vtkMedRegularGrid&); // Not implemented.
-
-};
-
-#endif //__vtkMedRegularGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedSelection.cxx b/src/Plugins/MedReader/IO/vtkMedSelection.cxx
deleted file mode 100644 (file)
index 0c0a38d..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedSelection.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkStringArray.h"
-
-#include <map>
-#include <string>
-#include <vector>
-using namespace std;
-
-class vtkMedSelectionInternals
-{
-public :
-  map< string, bool > Status;
-  vector< string > Keys;
-};
-
-// vtkCxxRevisionMacro(vtkMedSelection, "$Revision$")
-vtkStandardNewMacro(vtkMedSelection)
-
-vtkMedSelection::vtkMedSelection()
-{
-  this->Internals = new vtkMedSelectionInternals();
-}
-
-vtkMedSelection::~vtkMedSelection()
-{
-  delete this->Internals;
-}
-
-void  vtkMedSelection::Initialize()
-{
-  this->Internals->Status.clear();
-  this->Internals->Keys.clear();
-}
-
-void  vtkMedSelection::AddKey(const char* key)
-{
-  if(this->Internals->Status.find(key) != this->Internals->Status.end())
-    {
-    return ;
-    }
-  this->Internals->Keys.push_back(key);
-  this->Internals->Status[key] = 1;
-}
-
-void  vtkMedSelection::SetKeyStatus(const char* key, int status)
-{
-  if(this->Internals->Status.find(key) == this->Internals->Status.end())
-    {
-    this->AddKey(key);
-    }
-  this->Internals->Status[key] = status;
-}
-
-int vtkMedSelection::GetKeyStatus(const char* key)
-{
-  if(this->Internals->Status.find(key) == this->Internals->Status.end())
-    {
-    return 0;
-    }
-  return this->Internals->Status[key];
-}
-
-const char* vtkMedSelection::GetKey(int index)
-{
-  if(index < 0  || index >= this->Internals->Keys.size())
-    {
-    return NULL;
-    }
-  return this->Internals->Keys[index].c_str();
-}
-
-int vtkMedSelection::GetNumberOfKey()
-{
-  return this->Internals->Keys.size();
-}
-
-int vtkMedSelection::KeyExists(const char *key)
-{
-  return this->Internals->Status.find(key)
-      != this->Internals->Status.end();
-}
-
-void  vtkMedSelection::RemoveKeyByIndex(int index)
-{
-  if(index < 0  || index >= this->Internals->Keys.size())
-    {
-    return;
-    }
-  string name = this->Internals->Keys[index];
-  this->Internals->Status.erase(name);
-  this->Internals->Keys.erase(this->Internals->Keys.begin() + index);
-}
-
-void vtkMedSelection::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedSelection.h b/src/Plugins/MedReader/IO/vtkMedSelection.h
deleted file mode 100644 (file)
index b3c9896..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedSelection_h_
-#define __vtkMedSelection_h_
-
-#include "vtkObject.h"
-
-class vtkMedSelectionInternals;
-
-class VTK_EXPORT vtkMedSelection : public vtkObject
-{
-public :
-  static vtkMedSelection* New();
-  vtkTypeMacro(vtkMedSelection, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  virtual void  Initialize();
-
-  virtual void  AddKey(const char*);
-
-  virtual void  SetKeyStatus(const char* name, int status);
-
-  virtual int GetKeyStatus(const char* name);
-
-  virtual const char* GetKey(int index);
-
-  virtual int GetNumberOfKey();
-
-  virtual int KeyExists(const char* name);
-
-  virtual void  RemoveKeyByIndex(int index);
-
-protected:
-  vtkMedSelection();
-  virtual ~vtkMedSelection();
-
- vtkMedSelectionInternals* Internals;
-
-private:
-  vtkMedSelection(const vtkMedSelection&); // Not implemented.
-  void operator=(const vtkMedSelection&); // Not implemented.
-
-};
-
-#endif //__vtkMedSelection_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedSetGet.h b/src/Plugins/MedReader/IO/vtkMedSetGet.h
deleted file mode 100644 (file)
index 73e07cc..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _vtkMedSetGet_h_
-#define _vtkMedSetGet_h_
-
-//BTX
-template <class T> class vtkObjectVector;
-template <class T> class vtkList;
-template <class T> class vtkMedComputeStepMap;
-
-#define vtkGetObjectVectorMacro(name, type)\
-  virtual type* Get##name (int index);\
-  virtual vtkIdType GetNumberOf##name ();
-
-#define vtkSetObjectVectorMacro(name, type)\
-  virtual void  AllocateNumberOf##name (vtkIdType size);\
-  virtual void  Set##name (vtkIdType index, type* obj);\
-  virtual void  Append##name (type* obj);\
-  virtual void  Remove##name (type* obj);
-
-#define vtkSetAbstractObjectVectorMacro(name, type)\
-  virtual void SetNumberOf##name (vtkIdType size);\
-  virtual void Set##name (vtkIdType index, type* obj);\
-  virtual void Append##name (type* obj);
-
-#define vtkCxxGetObjectVectorMacro(class, name, type)\
-  type* class::Get##name (int index)\
-  {\
-    if(index < 0 || index >= this->name->size())\
-      return NULL;\
-    return this->name->at(index);\
-  }\
-  vtkIdType class::GetNumberOf##name ()\
-  {\
-    return this->name->size();\
-  }
-
-#define vtkCxxSetObjectVectorMacro(class, name, type)\
-  void  class::AllocateNumberOf##name (vtkIdType size)\
-  {\
-    if(this->name->size() == size)\
-      return;\
-    if(size <= 0 )\
-      this->name->clear();\
-    else\
-      this->name->resize(size);\
-    for(vtkIdType _ii=0; _ii<this->name->size(); _ii++)\
-      {\
-        this->name->at(_ii) = vtkSmartPointer< type > ::New();\
-      }\
-    this->Modified();\
-  }\
-  void class::Set##name (vtkIdType index, type* obj)\
-  {\
-    if(index < 0 || index >= this->name->size())\
-    {\
-      vtkWarningMacro("has not been allocated before setting value" );\
-      return;\
-    }\
-    if( this->name->at(index) == obj)\
-      return;\
-    this->name->at(index) = obj; \
-    this->Modified();\
-  }\
-  void  class::Append##name (type* obj)\
-  {\
-    this->name->resize(this->name->size()+1);\
-    this->name->at(this->name->size()-1) = obj;\
-    this->Modified();\
-  }\
-  void  class::Remove##name (type* obj)\
-  {\
-    vtkIdType index=0;\
-    for(index=0; index < this->name->size(); index++)\
-     {\
-       if(this->name->at(index) == obj) break;\
-     }\
-    if(index == this->name->size()) return;\
-    for(vtkIdType id=index; id < this->name->size()-1; id++)\
-      {\
-        this->name->at(id) = this->name->at(id+1);\
-      }\
-    this->name->resize(this->name->size()-1);\
-    this->Modified();\
-  }
-
-#define vtkCxxSetAbstractObjectVectorMacro(class, name, type)\
-  void  class::SetNumberOf##name (vtkIdType size)\
-  {\
-    if(this->name->size() == size)\
-      return;\
-    if(size <= 0 )\
-      this->name->clear();\
-    else\
-      this->name->resize(size);\
-    this->Modified();\
-  }\
-  void class::Set##name (vtkIdType index, type* obj)\
-  {\
-    if(index < 0 || index >= this->name->size())\
-    {\
-      vtkWarningMacro("has not been allocated before setting value" );\
-      return;\
-    }\
-    if( this->name->at(index) == obj)\
-      return;\
-    this->name->at(index) = obj; \
-    this->Modified();\
-  }\
-  void  class::Append##name (type* obj)\
-  {\
-    this->name->resize(this->name->size()+1);\
-    this->name->at(this->name->size()-1) = obj;\
-    this->Modified();\
-  }
-
-//ETX
-
-#endif
diff --git a/src/Plugins/MedReader/IO/vtkMedStructElement.cxx b/src/Plugins/MedReader/IO/vtkMedStructElement.cxx
deleted file mode 100644 (file)
index caf05ac..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedStructElement.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedVariableAttribute.h"
-#include "vtkMedConstantAttribute.h"
-#include "vtkMedFile.h"
-#include "vtkMedMesh.h"
-
-#include <map>
-#include <string>
-#include <vector>
-using namespace std;
-
-vtkCxxGetObjectVectorMacro(vtkMedStructElement, VariableAttribute, vtkMedVariableAttribute);
-vtkCxxSetObjectVectorMacro(vtkMedStructElement, VariableAttribute, vtkMedVariableAttribute);
-vtkCxxGetObjectVectorMacro(vtkMedStructElement, ConstantAttribute, vtkMedConstantAttribute);
-vtkCxxSetObjectVectorMacro(vtkMedStructElement, ConstantAttribute, vtkMedConstantAttribute);
-
-vtkCxxSetObjectMacro(vtkMedStructElement, ParentFile, vtkMedFile);
-vtkCxxSetObjectMacro(vtkMedStructElement, SupportMesh, vtkMedMesh);
-
-// vtkCxxRevisionMacro(vtkMedStructElement, "$Revision$")
-vtkStandardNewMacro(vtkMedStructElement)
-
-vtkMedStructElement::vtkMedStructElement()
-{
-  this->MedIterator = -1;
-  this->Name = NULL;
-  this->GeometryType = MED_UNDEF_GEOTYPE;
-  this->ModelDimension = 0;
-  this->SupportMeshName = NULL;
-  this->SupportMesh = NULL;
-  this->SupportEntityType = MED_UNDEF_ENTITY_TYPE;
-  this->SupportNumberOfNode = 0;
-  this->SupportNumberOfCell = 0;
-  this->SupportGeometryType = MED_UNDEF_GEOTYPE;
-  this->AnyProfile = MED_FALSE;
-  this->VariableAttribute = new vtkObjectVector<vtkMedVariableAttribute>();
-  this->ConstantAttribute = new vtkObjectVector<vtkMedConstantAttribute>();
-  this->ParentFile = NULL;
-}
-
-vtkMedStructElement::~vtkMedStructElement()
-{
-  this->SetName(NULL);
-  this->SetSupportMeshName(NULL);
-  this->SetParentFile(NULL);
-  this->SetSupportMesh(NULL);
-  delete this->VariableAttribute;
-  delete this->ConstantAttribute;
-}
-
-void  vtkMedStructElement::LoadVariableAttributes(vtkMedEntityArray* array)
-{
-  for(int varattit = 0; varattit < this->GetNumberOfVariableAttribute(); varattit++)
-    {
-    vtkMedVariableAttribute* varatt = this->GetVariableAttribute(varattit);
-    varatt->Load(array);
-    }
-}
-
-int vtkMedStructElement::GetConnectivitySize()
-{
-  if(strcmp(this->Name, MED_PARTICLE_NAME) == 0
-     || this->SupportEntityType != MED_CELL)
-    return this->SupportNumberOfNode;
-
-  return this->SupportNumberOfCell *
-      vtkMedUtilities::GetNumberOfPoint(this->SupportGeometryType);
-}
-
-void vtkMedStructElement::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedStructElement.h b/src/Plugins/MedReader/IO/vtkMedStructElement.h
deleted file mode 100644 (file)
index 1f91b78..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedStructElement_h_
-#define __vtkMedStructElement_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedSetGet.h"
-
-class vtkMedVariableAttribute;
-class vtkMedConstantAttribute;
-class vtkMedFile;
-class vtkMedMesh;
-class vtkMedEntityArray;
-
-class VTK_EXPORT vtkMedStructElement : public vtkObject
-{
-public :
-  static vtkMedStructElement* New();
-  vtkTypeMacro(vtkMedStructElement, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // The iterator to identify this struct element model in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // This is the name of this structural element model
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // The Geometry type this structural elements lies on.
-  vtkSetMacro(GeometryType, med_geometry_type);
-  vtkGetMacro(GeometryType, med_geometry_type);
-
-  // Description:
-  // The dimension of this structural elements model
-  vtkSetMacro(ModelDimension, med_int);
-  vtkGetMacro(ModelDimension, med_int);
-
-  // Description:
-  // The name of the support mesh used by this structural element model
-  vtkSetStringMacro(SupportMeshName);
-  vtkGetStringMacro(SupportMeshName);
-
-  // Description:
-  // This is the support mesh instance, corresponding to the above name.
-  virtual void  SetSupportMesh(vtkMedMesh*);
-  vtkGetObjectMacro(SupportMesh, vtkMedMesh);
-
-  // Description:
-  // The type of entity contained in the support mesh
-  vtkSetMacro(SupportEntityType, med_entity_type);
-  vtkGetMacro(SupportEntityType, med_entity_type);
-
-  // Description:
-  // The number of nodes of the support mesh
-  vtkSetMacro(SupportNumberOfNode, med_int);
-  vtkGetMacro(SupportNumberOfNode, med_int);
-
-  // Description:
-  // The number of cells in the support mesh.
-  vtkSetMacro(SupportNumberOfCell, med_int);
-  vtkGetMacro(SupportNumberOfCell, med_int);
-
-  // Description:
-  // The geometry type of the cells in the support mesh
-  vtkSetMacro(SupportGeometryType, med_geometry_type);
-  vtkGetMacro(SupportGeometryType, med_geometry_type);
-
-  // Description:
-  // This boolean is set to true if the attributes are given on a profile
-  vtkSetMacro(AnyProfile, med_bool);
-  vtkGetMacro(AnyProfile, med_bool);
-
-  // Description:
-  // Get the Variable Attributes
-  vtkGetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
-  vtkSetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
-
-  // Description:
-  // Get the Constant Attributes
-  vtkGetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
-  vtkSetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
-
-  // Description:
-  // The file this structural element model is stored in.
-  virtual void SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-  // Description:
-  // This method will use the driver to load the data for this compute step
-  // for all variable attributes from disk.
-  virtual void  LoadVariableAttributes(vtkMedEntityArray*);
-
-  // Description:
-  // returns the size of the connectivity for one structural element.
-  // for MED_PARTICLE elements, it returns the number of nodes
-  // if SupportEntityType == MED_CELL, it returns the number of cells in the
-  // support mesh * the number of node for each cell.
-  // else it returns the number of nodes in the support mesh.
-  virtual int GetConnectivitySize();
-
-protected:
-  vtkMedStructElement();
-  virtual ~vtkMedStructElement();
-
-  med_int MedIterator;
-  char *Name;
-  med_geometry_type GeometryType;
-  med_int ModelDimension;
-  char *SupportMeshName;
-  med_entity_type SupportEntityType;
-  med_int SupportNumberOfNode;
-  med_int SupportNumberOfCell;
-  med_geometry_type SupportGeometryType;
-  med_bool AnyProfile;
-
-  vtkMedFile* ParentFile;
-  vtkMedMesh* SupportMesh;
-
-  vtkObjectVector<vtkMedVariableAttribute>* VariableAttribute;
-  vtkObjectVector<vtkMedConstantAttribute>* ConstantAttribute;
-
-private:
-  vtkMedStructElement(const vtkMedStructElement&); // Not implemented.
-  void operator=(const vtkMedStructElement&); // Not implemented.
-
-};
-
-#endif //__vtkMedStructElement_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedSupportMesh.cxx b/src/Plugins/MedReader/IO/vtkMedSupportMesh.cxx
deleted file mode 100644 (file)
index 8e3074e..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedSupportMesh.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedFile.h"
-
-#include "vtkStringArray.h"
-
-#include <map>
-#include <string>
-#include <vector>
-using namespace std;
-
-vtkCxxSetObjectMacro(vtkMedSupportMesh, ParentFile, vtkMedFile);
-
-// vtkCxxRevisionMacro(vtkMedSupportMesh, "$Revision$")
-vtkStandardNewMacro(vtkMedSupportMesh)
-
-vtkMedSupportMesh::vtkMedSupportMesh()
-{
-  this->MedIterator = -1;
-  this->Name = NULL;
-  this->ParentFile = NULL;
-  this->AxisName = vtkStringArray::New();
-  this->AxisUnit = vtkStringArray::New();
-  this->Description = NULL;
-  this->AxisType = MED_UNDEF_AXIS_TYPE;
-  this->SpaceDimension = 0;
-  this->MeshDimension = 0;
-}
-
-vtkMedSupportMesh::~vtkMedSupportMesh()
-{
-  this->SetName(NULL);
-  this->SetDescription(NULL);
-  this->SetParentFile(NULL);
-  this->AxisName->Delete();
-  this->AxisUnit->Delete();
-}
-
-void vtkMedSupportMesh::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedSupportMesh.h b/src/Plugins/MedReader/IO/vtkMedSupportMesh.h
deleted file mode 100644 (file)
index 3dabb84..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedSupportMesh_h_
-#define __vtkMedSupportMesh_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedSetGet.h"
-
-class vtkStringArray;
-class vtkMedFile;
-
-class VTK_EXPORT vtkMedSupportMesh : public vtkObject
-{
-public :
-  static vtkMedSupportMesh* New();
-  vtkTypeMacro(vtkMedSupportMesh, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // The iterator to identify this struct element model in the med file
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // This is the name of this structural element model
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // This is the dsecription of this structural element model
-  vtkSetStringMacro(Description);
-  vtkGetStringMacro(Description);
-
-  // Description:
-  // The dimension of this support mesh lives in
-  vtkSetMacro(SpaceDimension, med_int);
-  vtkGetMacro(SpaceDimension, med_int);
-
-  // Description:
-  // The dimension of this support mesh model
-  vtkSetMacro(MeshDimension, med_int);
-  vtkGetMacro(MeshDimension, med_int);;
-
-  // Description:
-  // The dimension of this support mesh model
-  vtkSetMacro(AxisType, med_axis_type);
-  vtkGetMacro(AxisType, med_axis_type);;
-
-  // Description:
-  // The file this support mesh is stored in.
-  virtual void SetParentFile(vtkMedFile*);
-  vtkGetObjectMacro(ParentFile, vtkMedFile);
-
-  // Dsecription:
-  // This array stores the units of the axis
-  vtkGetObjectMacro(AxisName, vtkStringArray);
-
-  // Description:
-  // This array store the units of thi support mesh for each axis
-  vtkGetObjectMacro(AxisUnit, vtkStringArray);
-
-protected:
-  vtkMedSupportMesh();
-  virtual ~vtkMedSupportMesh();
-
-  med_int MedIterator;
-  med_int SpaceDimension;
-  med_int MeshDimension;
-  char *Name;
-  char *Description;
-  med_axis_type AxisType;
-  vtkStringArray *AxisName;
-  vtkStringArray *AxisUnit;
-
-  vtkMedFile* ParentFile;
-
-private:
-  vtkMedSupportMesh(const vtkMedSupportMesh&); // Not implemented.
-  void operator=(const vtkMedSupportMesh&); // Not implemented.
-
-};
-
-#endif //__vtkMedSupportMesh_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.cxx b/src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.cxx
deleted file mode 100644 (file)
index 18c9e58..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedUnstructuredGrid.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSmartPointer.h"
-#include "vtkDataArray.h"
-#include "vtkUnstructuredGrid.h"
-#include "vtkPointData.h"
-#include "vtkCellData.h"
-#include "vtkIdList.h"
-#include "vtkCellType.h"
-#include "vtkInformation.h"
-
-#include "vtkMedUtilities.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedMesh.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedProfile.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedVariableAttribute.h"
-
-#include "vtkMultiProcessController.h"
-
-vtkCxxSetObjectMacro(vtkMedUnstructuredGrid,Coordinates,vtkDataArray);
-
-// vtkCxxRevisionMacro(vtkMedUnstructuredGrid, "$Revision$")
-vtkStandardNewMacro(vtkMedUnstructuredGrid)
-
-vtkMedUnstructuredGrid::vtkMedUnstructuredGrid()
-{
-  this->Coordinates = NULL;
-  this->NumberOfPoints = 0;
-}
-
-vtkMedUnstructuredGrid::~vtkMedUnstructuredGrid()
-{
-  this->SetCoordinates(NULL);
-}
-
-int vtkMedUnstructuredGrid::IsCoordinatesLoaded()
-{
-  return this->Coordinates != NULL && this->Coordinates->GetNumberOfTuples()
-     == this->NumberOfPoints;
-}
-
-void  vtkMedUnstructuredGrid::InitializeCellGlobalIds()
-{
-  vtkIdType ncells = 0;
-  
-  for(int id = 0; id < this->EntityArray->size(); id++)
-    {
-    vtkMedEntityArray* array = this->EntityArray->at(id);
-    
-    if(array == NULL)
-      continue;
-    
-    if(array->GetEntity().EntityType == MED_NODE)
-      continue;
-    
-    array->SetInitialGlobalId(ncells + 1);
-    ncells += array->GetNumberOfEntity();
-    }
-}
-
-void  vtkMedUnstructuredGrid::ClearMedSupports()
-{
-  this->Superclass::ClearMedSupports();
-  for(int id = 0; id < this->EntityArray->size(); id++)
-    {
-    vtkMedEntityArray* array = this->EntityArray->at(id);
-    array->Initialize();
-    }
-}
-
-void  vtkMedUnstructuredGrid::LoadCoordinates()
-{
-  this->GetParentMesh()->GetParentFile()->GetMedDriver()->LoadCoordinates(this);
-}
-
-double* vtkMedUnstructuredGrid::GetCoordTuple(med_int index)
-{
-  return this->Coordinates->GetTuple(index);
-}
-
-vtkDataSet* vtkMedUnstructuredGrid::CreateVTKDataSet(
-    vtkMedFamilyOnEntityOnProfile* foep)
-{
-  vtkMultiProcessController* controller =
-      vtkMultiProcessController::GetGlobalController();
-
-  vtkMedFamilyOnEntity* foe = foep->GetFamilyOnEntity();
-  vtkMedEntityArray* array = foe->GetEntityArray();
-  if(foep->GetValid() == 0)
-    {
-    return NULL;
-    }
-
-  vtkUnstructuredGrid* vtkugrid = vtkUnstructuredGrid::New();
-
-  // now we copy all the flagged nodes in the grid, shallow copy if possible
-  bool shallowCopyPoints=true;
-
-  if(this->GetParentMesh()->GetSpaceDimension()!=3)
-    {
-    shallowCopyPoints=false;
-    }
-
-  shallowCopyPoints = shallowCopyPoints && foep->CanShallowCopyPointField(NULL);
-
-  foe->GetParentGrid()->LoadCoordinates();
-
-  vtkIdType numberOfPoints;
-  vtkPoints* points=vtkPoints::New(this->GetCoordinates()->GetDataType());
-  vtkugrid->SetPoints(points);
-  points->Delete();
-
-  vtkIdTypeArray* pointGlobalIds=vtkIdTypeArray::New();
-  pointGlobalIds->SetName("MED_POINT_ID");
-  pointGlobalIds->SetNumberOfComponents(1);
-  vtkugrid->GetPointData()->SetGlobalIds(pointGlobalIds);
-  pointGlobalIds->Delete();
-
-  vtkIdTypeArray* cellGlobalIds=vtkIdTypeArray::New();
-  cellGlobalIds->SetName("MED_CELL_ID");
-  cellGlobalIds->SetNumberOfComponents(1);
-  vtkugrid->GetCellData()->SetGlobalIds(cellGlobalIds);
-  cellGlobalIds->Delete();
-
-  if (shallowCopyPoints)
-    {
-    vtkugrid->GetPoints()->SetDataType(this->GetCoordinates()->GetDataType());
-    vtkugrid->GetPoints()->SetData(this->GetCoordinates());
-    // add global ids
-    numberOfPoints=this->GetNumberOfPoints();
-    pointGlobalIds->SetNumberOfTuples(numberOfPoints);
-    vtkIdType* ptr=pointGlobalIds->GetPointer(0);
-    for(int pid=0; pid<numberOfPoints; pid++)
-      ptr[pid]=pid+1;
-    }
-  else
-    {
-    vtkIdType currentIndex=0;
-    for(vtkIdType index=0; index<this->GetNumberOfPoints(); index++)
-      {
-      if(!foep->KeepPoint(index))
-        continue;
-
-      double coord[3]={0.0, 0.0, 0.0};
-      double * tuple=this->GetCoordinates()->GetTuple(index);
-      for(int dim=0; dim<this->GetParentMesh()->GetSpaceDimension()&&dim<3; dim++)
-        {
-        coord[dim]=tuple[dim];
-        }
-      vtkugrid->GetPoints()->InsertPoint(currentIndex, coord);
-      pointGlobalIds->InsertNextValue(index+1);
-      currentIndex++;
-      }
-    vtkugrid->GetPoints()->Squeeze();
-    pointGlobalIds->Squeeze();
-    numberOfPoints=currentIndex;
-    }
-
-  vtkMedStructElement* structelem = NULL;
-  int vtkType = VTK_EMPTY_CELL;
-  int nsupportcell = 1;
-  vtkSmartPointer<vtkIdTypeArray> supportIndex = vtkSmartPointer<vtkIdTypeArray>::New();
-  supportIndex->SetName("STRUCT_ELEMENT_INDEX");
-  supportIndex->SetNumberOfComponents(2);
-  supportIndex->GetInformation()->Set(vtkMedUtilities::STRUCT_ELEMENT_INDEX(), 1);
-  supportIndex->GetInformation()->Set(vtkAbstractArray::GUI_HIDE(), 1);
-  supportIndex->SetComponentName(0, "GLOBAL_ID");
-  supportIndex->SetComponentName(1, "LOCAL_ID");
-
-  if(array->GetEntity().EntityType == MED_STRUCT_ELEMENT)
-    {
-    structelem = array->GetStructElement();
-    if(structelem == NULL)
-      {
-      foep->SetValid(0);
-      }
-    else
-      {
-      vtkType = vtkMedUtilities::GetVTKCellType(
-          structelem->GetSupportGeometryType());
-      nsupportcell = structelem->GetSupportNumberOfCell();
-      if(structelem->GetSupportEntityType() != MED_CELL
-         || strcmp(structelem->GetName(), MED_PARTICLE_NAME) == 0)
-        {
-        // Special case : the support connectivity is implicit
-        // (for particles)
-        // map this to points
-        vtkType = VTK_VERTEX;
-        nsupportcell = structelem->GetSupportNumberOfNode();
-        }
-
-      vtkugrid->GetInformation()->Set(vtkMedUtilities::STRUCT_ELEMENT(), structelem);
-      std::cout << "structelem->GetNumberOfVariableAttribute() = " << structelem->GetNumberOfVariableAttribute() << std::endl;
-      for(int varattid = 0; varattid<structelem->GetNumberOfVariableAttribute(); varattid++)
-        {
-        vtkMedVariableAttribute* varatt = structelem->GetVariableAttribute(varattid);
-        varatt->Load(array);
-        vtkAbstractArray* values = array->GetVariableAttributeValue(varatt);
-        vtkugrid->GetFieldData()->AddArray(values);
-        }
-      vtkugrid->GetCellData()->AddArray(supportIndex);
-      }
-    }
-  else
-    {
-    vtkType = vtkMedUtilities::GetVTKCellType(
-        array->GetEntity().GeometryType);
-    }
-
-  vtkSmartPointer<vtkIdList> pts = vtkSmartPointer<vtkIdList>::New();
-  vtkSmartPointer<vtkIdList> vtkpts = vtkSmartPointer<vtkIdList>::New();
-  vtkIdType intialGlobalId = array->GetInitialGlobalId();
-  vtkMedIntArray* pids = (foep->GetProfile()!=NULL?
-                           foep->GetProfile()->GetIds() : NULL);
-  vtkIdType maxId = (pids!=NULL?
-                     pids->GetNumberOfTuples():
-                     array->GetNumberOfEntity());
-
-  int valid = foep->GetValid();
-  if (controller != NULL)
-    if (controller->GetNumberOfProcesses() > 1)
-    valid = 1;
-
-  for (vtkIdType pindex = 0; pindex<maxId && valid; pindex++)
-    {
-    vtkIdType realIndex = (pids!=NULL?
-                           pids->GetValue(pindex)-1:
-                           pindex);
-
-    if (!foep->KeepCell(realIndex))
-      continue;
-
-    array->GetCellVertices(realIndex, pts);
-
-    for(int sid = 0; sid < nsupportcell; sid++)
-      {
-      cellGlobalIds->InsertNextValue(intialGlobalId+pindex);
-      }
-
-    // The supportIndex array has 2 component, the first to give the index
-    // of the med cell in the variable attributes array, the second to give
-    // the index of the cell in the n cells composing the structural element
-    if(array->GetEntity().EntityType == MED_STRUCT_ELEMENT)
-      {
-      for(int sid = 0; sid < nsupportcell; sid++)
-        {
-        supportIndex->InsertNextTuple2(pindex, sid);
-        }
-      }
-
-    if (array->GetEntity().GeometryType==MED_POLYHEDRON)
-      {
-      if(vtkMedUtilities::FormatPolyhedronForVTK(foep, pindex, pts))
-        {
-        vtkugrid->InsertNextCell(VTK_POLYHEDRON, pts);
-        }
-      else
-        {
-        foep->SetValid(0);
-        vtkugrid->Delete();
-        return NULL;
-        }
-      }
-    else
-      {
-      vtkpts->Initialize();
-      vtkpts->SetNumberOfIds(pts->GetNumberOfIds());
-
-      for(vtkIdType node=0; node<pts->GetNumberOfIds(); node++)
-        {
-        vtkIdType pid = pts->GetId(node);
-        vtkIdType ptid=foep->GetVTKPointIndex(pid);
-        if(ptid < 0 || ptid >= vtkugrid->GetNumberOfPoints())
-          {
-          vtkDebugMacro("Index error, this cell"  <<
-                        " is not on this profile");
-#ifndef MedReader_HAVE_PARALLEL_INFRASTRUCTURE
-          vtkugrid->Delete();
-          foep->SetValid(0);
-          return NULL;
-#else
-          return vtkugrid;
-#endif
-          }
-        vtkpts->SetId(vtkMedUtilities::MedToVTKIndex(vtkType, node), ptid);
-        }
-
-      // for strutural elements, insert nsupportcell instead of only one
-      if(nsupportcell > 1)
-        {
-        vtkIdType npts = vtkpts->GetNumberOfIds() / nsupportcell;
-        for(int sid=0; sid < nsupportcell; sid++)
-          {
-          vtkIdType* ptids = vtkpts->GetPointer(sid * npts);
-          vtkugrid->InsertNextCell(vtkType, npts, ptids);
-          }
-        }
-      else
-        {
-        vtkugrid->InsertNextCell(vtkType, vtkpts);
-        }
-      }
-    }
-
-  if(vtkugrid->GetNumberOfCells() == vtkugrid->GetNumberOfPoints())
-    {
-    for(int fieldId = 0; fieldId < vtkugrid->GetFieldData()->GetNumberOfArrays(); fieldId++)
-      {
-      vtkDataArray* fieldData = vtkugrid->GetFieldData()->GetArray(fieldId);
-    
-      if(fieldData->GetNumberOfTuples() == vtkugrid->GetNumberOfCells())
-        {
-        vtkugrid->GetPointData()->AddArray(fieldData);
-        }
-      else
-        {
-        vtkDataArray* real_fieldData = fieldData->NewInstance();
-        real_fieldData->SetName(fieldData->GetName());
-        real_fieldData->SetNumberOfComponents(fieldData->GetNumberOfComponents());
-
-        for(vtkIdType cellId = 0; cellId < vtkugrid->GetNumberOfPoints(); cellId++)
-          {
-          vtkIdType supportId = static_cast<int>(supportIndex->GetTuple2(cellId)[0]);
-          real_fieldData->InsertNextTuple(fieldData->GetTuple(supportId));
-          }
-
-        vtkugrid->GetPointData()->AddArray(real_fieldData);
-        real_fieldData->Delete();
-        }
-      }
-    }
-
-  return vtkugrid;
-}
-
-void vtkMedUnstructuredGrid::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-  PRINT_IVAR(os, indent, NumberOfPoints);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.h b/src/Plugins/MedReader/IO/vtkMedUnstructuredGrid.h
deleted file mode 100644 (file)
index 85ee87c..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedUnstructuredGrid_h_
-#define __vtkMedUnstructuredGrid_h_
-
-#include "vtkMedGrid.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-
-class vtkDataArray;
-class vtkMedEntityArray;
-class vtkMedString;
-
-class VTK_EXPORT vtkMedUnstructuredGrid : public vtkMedGrid
-{
-public :
-  static vtkMedUnstructuredGrid* New();
-  vtkTypeMacro(vtkMedUnstructuredGrid, vtkMedGrid);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // this array contains the coordinates of the points used by this grid.
-  virtual void SetCoordinates(vtkDataArray*);
-  vtkGetObjectMacro(Coordinates, vtkDataArray);
-
-  // Description:
-  // returns true if the Coordinate array is set and corresponds
-  // to the number of points
-  virtual int IsCoordinatesLoaded();
-
-  // Description:
-  // Initialize the global Ids of the first element of each MedEntityArray
-  virtual void  InitializeCellGlobalIds();
-
-  // Description:
-  // Free the memory associated with this grid.
-  virtual void  ClearMedSupports();
-
-  // Description:
-  // Set the number of points in the grid.
-  // no allocation is performed at this points, you have to allocate the Points
-  // array manually.
-  vtkSetMacro(NumberOfPoints, med_int);
-  vtkGetMacro(NumberOfPoints, med_int);
-
-  virtual void  LoadCoordinates();
-
-  virtual double* GetCoordTuple(med_int index);
-
-  virtual vtkDataSet* CreateVTKDataSet(vtkMedFamilyOnEntityOnProfile*);
-
-protected:
-  vtkMedUnstructuredGrid();
-  virtual ~vtkMedUnstructuredGrid();
-
-  vtkDataArray* Coordinates;
-
-  med_int NumberOfPoints;
-
-private:
-  vtkMedUnstructuredGrid(const vtkMedUnstructuredGrid&); // Not implemented.
-  void operator=(const vtkMedUnstructuredGrid&); // Not implemented.
-};
-
-#endif //__vtkMedUnstructuredGrid_h_
diff --git a/src/Plugins/MedReader/IO/vtkMedUtilities.cxx b/src/Plugins/MedReader/IO/vtkMedUtilities.cxx
deleted file mode 100644 (file)
index 898d046..0000000
+++ /dev/null
@@ -1,890 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedUtilities.h"
-
-#include "vtkMedMesh.h"
-#include "vtkMedFamily.h"
-#include "vtkMedGroup.h"
-#include "vtkMedFamilyOnEntityOnProfile.h"
-#include "vtkMedFamilyOnEntity.h"
-#include "vtkMedEntityArray.h"
-#include "vtkMedIntArray.h"
-#include "vtkMedGrid.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkInformation.h"
-#include "vtkDoubleArray.h"
-#include "vtkIntArray.h"
-#include "vtkLongLongArray.h"
-#include "vtkLongArray.h"
-#include "vtkIdTypeArray.h"
-#include "vtkCellType.h"
-#include "vtkIdList.h"
-#include "vtkMutableDirectedGraph.h"
-#include "vtkStringArray.h"
-#include "vtkDataSetAttributes.h"
-#include "vtkOutEdgeIterator.h"
-#include "vtkInformationIntegerKey.h"
-#include "vtkInformationStringVectorKey.h"
-#include "vtkInformationObjectBaseKey.h"
-
-#include <sstream>
-using namespace std;
-char vtkMedUtilities::Separator='/';
-
-const char* vtkMedUtilities::NoGroupName="No Group";
-const char* vtkMedUtilities::OnPointName="OnPoint";
-const char* vtkMedUtilities::OnCellName="OnCell";
-
-const int MED_TRIA_CHILD_TO_PARENT_INDEX[3][3]=
-    {{0, 1, 3}, {1, 2, 4}, {2, 0, 5}};
-
-const int MED_QUAD_CHILD_TO_PARENT_INDEX[4][3]=
-    {{0, 1, 4}, {1, 2, 5}, {2, 3, 6}, {3, 0, 7}};
-
-const int MED_TETRA_CHILD_TO_PARENT_INDEX[4][6]=
-    {{0, 1, 2, 4, 5, 6},
-     {0, 3, 1, 7, 8, 4},
-     {1, 3, 2, 8, 9, 5},
-     {2, 3, 0, 9, 7, 6}};
-
-const int MED_HEXA_CHILD_TO_PARENT_INDEX[6][8]=
-  {{0, 1, 2, 3, 8, 9, 10, 11},
-   {4, 7, 6, 5, 15, 14, 13, 12},
-   {0, 4, 5, 1, 16, 12, 17, 8},
-   {1, 5, 6, 2, 17, 13, 18, 9},
-   {2, 6, 7, 3, 18, 14, 19, 10},
-   {3, 7, 4, 0, 19, 15, 16, 11}};
-
-const int MED_PYRA_CHILD_TO_PARENT_INDEX[5][8]=
-  {{0, 1, 2, 3, 5, 6, 7, 8},
-   {0, 4, 1, -1, 9, 10, 5, -1},
-   {1, 4, 2, -1, 10, 11, 6, -1},
-   {2, 4, 3, -1, 11, 12, 7, -1},
-   {3, 4, 0, -1, 12, 9, 8, -1}};
-
-const int MED_PENTA_CHILD_TO_PARENT_INDEX[5][8]=
-  {{0, 1, 2, -1, 6, 7, 8, -1},
-   {3, 5, 4, -1, 11, 10, 9, -1},
-   {0, 3, 4, 1, 12, 9, 13, 6},
-   {1, 4, 5, 2, 13, 10, 14, 7},
-   {2, 5, 3, 0, 14, 11, 12, 8}};
-
-vtkInformationKeyMacro(vtkMedUtilities, ELNO, Integer);
-vtkInformationKeyMacro(vtkMedUtilities, ELGA, Integer);
-vtkInformationKeyMacro(vtkMedUtilities, BLOCK_NAME, StringVector);
-vtkInformationKeyMacro(vtkMedUtilities, STRUCT_ELEMENT, ObjectBase);
-vtkInformationKeyMacro(vtkMedUtilities, STRUCT_ELEMENT_INDEX, Integer);
-
-vtkDataArray* vtkMedUtilities::NewCoordArray()
-{
-  return vtkMedUtilities::NewArray(MED_FLOAT64);
-}
-
-vtkDataArray* vtkMedUtilities::NewArray(med_field_type type)
-{
-  switch(type)
-  {
-    case MED_FLOAT64:
-      if(sizeof(double)==8 && sizeof(med_float)==8)
-        return vtkDoubleArray::New();
-      vtkGenericWarningMacro("double type do not match med_float, aborting")
-      return NULL;
-    case MED_INT32:
-      if(sizeof(vtkIdType)==4)
-        return vtkIdTypeArray::New();
-      if(sizeof(int)==4)
-        return vtkIntArray::New();
-      if(sizeof(long)==4)
-        return vtkLongArray::New();
-      vtkGenericWarningMacro("No vtk type matches MED_INT32, aborting")
-      return NULL;
-    case MED_INT64:
-      if(sizeof(vtkIdType)==8)
-        return vtkIdTypeArray::New();
-      if(sizeof(long)==8)
-        return vtkLongArray::New();
-      if(sizeof(long long)==8)
-        return vtkLongLongArray::New();
-      vtkGenericWarningMacro("No vtk type matches MED_INT64, aborting")
-      ;
-      return NULL;
-    case MED_INT:
-      if(sizeof(med_int)==4)
-        return vtkMedUtilities::NewArray(MED_INT32);
-      if(sizeof(med_int)==8)
-        return vtkMedUtilities::NewArray(MED_INT64);
-      vtkGenericWarningMacro("No vtk type matches MED_INT, aborting")
-      return NULL;
-    default:
-      vtkGenericWarningMacro("the array type is not known, aborting.")
-      return NULL;
-  }
-}
-
-vtkAbstractArray* vtkMedUtilities::NewArray(med_attribute_type type)
-{
-  switch(type)
-    {
-    case MED_ATT_FLOAT64 :
-      if(sizeof(double) == sizeof(med_float))
-        return vtkDoubleArray::New();
-      vtkGenericWarningMacro("double type do not match med_float, aborting");
-      return NULL;
-    case MED_ATT_INT :
-      if(sizeof(vtkIdType) == sizeof(med_int))
-        return vtkIdTypeArray::New();
-      if(sizeof(int) == sizeof(med_int))
-        return vtkIntArray::New();
-      if(sizeof(long) == sizeof(med_int))
-        return vtkLongArray::New();
-      if(sizeof(long long) == sizeof(med_int))
-        return vtkLongLongArray::New();
-      vtkGenericWarningMacro("med_int type does not match known VTK type, aborting");
-      return NULL;
-    case MED_ATT_NAME :
-      return vtkStringArray::New();
-    }
-  return NULL;
-}
-
-const char* vtkMedUtilities::GeometryName(med_geometry_type geometry)
-{
-  switch(geometry)
-  {
-    case MED_POINT1:
-      return "MED_POINT1";
-    case MED_SEG2:
-      return "MED_SEG2";
-    case MED_SEG3:
-      return "MED_SEG3";
-    case MED_SEG4:
-      return "MED_SEG4";
-    case MED_TRIA3:
-      return "MED_TRIA3";
-    case MED_QUAD4:
-      return "MED_QUAD4";
-    case MED_TRIA6:
-      return "MED_TRIA6";
-    case MED_TRIA7:
-      return "MED_TRIA7";
-    case MED_QUAD8:
-      return "MED_QUAD8";
-    case MED_QUAD9:
-      return "MED_QUAD9";
-    case MED_TETRA4:
-      return "MED_TETRA4";
-    case MED_PYRA5:
-      return "MED_PYRA5";
-    case MED_PENTA6:
-      return "MED_PENTA6";
-    case MED_HEXA8:
-      return "MED_HEXA8";
-    case MED_TETRA10:
-      return "MED_TETRA10";
-    case MED_OCTA12:
-      return "MED_OCTA12";
-    case MED_PYRA13:
-      return "MED_PYRA13";
-    case MED_PENTA15:
-      return "MED_PENTA15";
-    case MED_HEXA20:
-      return "MED_HEXA20";
-    case MED_HEXA27:
-      return "MED_HEXA27";
-    case MED_POLYGON:
-      return "MED_POLYGON";
-    case MED_POLYHEDRON:
-      return "MED_POLYHEDRON";
-    case MED_NO_GEOTYPE:
-      return "MED_NO_GEOTYPE";
-    default:
-      return "UNKNOWN_GEOMETRY";
-  }
-}
-
-const char* vtkMedUtilities::EntityName(med_entity_type type)
-{
-  switch(type)
-    {
-    case MED_CELL:
-      return "MED_CELL";
-    case MED_DESCENDING_FACE:
-      return "MED_DESCENDING_FACE";
-    case MED_DESCENDING_EDGE:
-      return "MED_DESCENDING_EDGE";
-    case MED_NODE:
-      return "MED_NODE";
-    case MED_NODE_ELEMENT:
-      return "MED_NODE_ELEMENT";
-    case MED_STRUCT_ELEMENT:
-      return "MED_STRUCT_ELEMENT";
-    case MED_UNDEF_ENTITY_TYPE:
-      return "MED_UNDEF_ENTITY_TYPE";
-    default:
-      return "UNKNOWN_ENTITY_TYPE ";
-  }
-}
-
-const char* vtkMedUtilities::ConnectivityName(med_connectivity_mode conn)
-{
-  switch(conn)
-    {
-    case MED_NODAL:
-      return "MED_NODAL";
-    case MED_DESCENDING:
-      return "MED_DESCENDING";
-    case MED_NO_CMODE:
-      return "MED_NO_CMODE";
-    default:
-      return "UNKNOWN_CONNECTIVITY_MODE";
-  }
-}
-
-const std::string vtkMedUtilities::SimplifyName(const char* medName)
-{
-  ostringstream sstr;
-  bool underscore=false;
-  bool space=false;
-  int l=strlen(medName);
-  for(int cc=0; cc<l; cc++)
-    {
-    if(medName[cc]==' ')
-      {
-      space=true;
-      continue;
-      }
-    else if(medName[cc]=='_')
-      {
-      underscore=true;
-      continue;
-      }
-    else
-      {
-      if(underscore||space)
-        sstr<<'_';
-      underscore=false;
-      space=false;
-      sstr<<medName[cc];
-      }
-    }
-  return sstr.str();
-}
-
-const std::string vtkMedUtilities::FamilyKey(const char* meshName,
-    int pointOrCell, const char* familyName)
-{
-  ostringstream sstr;
-  sstr<<"FAMILY"<<Separator<<SimplifyName(meshName)<<Separator;
-  if(pointOrCell==OnCell)
-    sstr<<vtkMedUtilities::OnCellName;
-  else
-    sstr<<vtkMedUtilities::OnPointName;
-  sstr<<Separator<<SimplifyName(familyName);
-  return sstr.str();
-}
-
-const std::string vtkMedUtilities::GroupKey(const char* meshName,
-    int pointOrCell, const char* groupName)
-{
-  ostringstream sstr;
-  sstr << "GROUP" << vtkMedUtilities::Separator
-      << vtkMedUtilities::SimplifyName(meshName)
-      << vtkMedUtilities::Separator;
-  if(pointOrCell==OnCell)
-    sstr << vtkMedUtilities::OnCellName;
-  else
-    sstr << vtkMedUtilities::OnPointName;
-  if(groupName==NULL)
-    sstr << vtkMedUtilities::Separator
-        << vtkMedUtilities::NoGroupName;
-  else
-    sstr << vtkMedUtilities::Separator
-        << vtkMedUtilities::SimplifyName(groupName);
-
-  return sstr.str();
-}
-
-const std::string vtkMedUtilities::EntityKey(const vtkMedEntity& entity)
-{
-  ostringstream sstr;
-  sstr << "CELL_TYPE" << Separator << EntityName(entity.EntityType)
-      << Separator<<entity.GeometryName;
-  return sstr.str();
-}
-
-int vtkMedUtilities::GetNumberOfPoint(med_geometry_type geometry)
-{
-  return geometry%100;
-}
-
-int vtkMedUtilities::GetDimension(med_geometry_type geometry)
-{
-  return geometry/100;
-}
-
-int vtkMedUtilities::GetVTKCellType(med_geometry_type geometry)
-{
-
-  switch(geometry)
-  {
-    case MED_POINT1:
-      return VTK_VERTEX;
-    case MED_SEG2:
-      return VTK_LINE;
-    case MED_SEG3:
-      return VTK_QUADRATIC_EDGE;
-    case MED_SEG4:
-      return VTK_CUBIC_LINE;
-    case MED_TRIA3:
-      return VTK_TRIANGLE;
-    case MED_QUAD4:
-      return VTK_QUAD;
-    case MED_TRIA6:
-      return VTK_QUADRATIC_TRIANGLE;
-    case MED_TRIA7:
-      return VTK_BIQUADRATIC_TRIANGLE;
-    case MED_QUAD8:
-      return VTK_QUADRATIC_QUAD;
-    case MED_QUAD9:
-      return VTK_BIQUADRATIC_QUAD;
-    case MED_TETRA4:
-      return VTK_TETRA;
-    case MED_PYRA5:
-      return VTK_PYRAMID;
-    case MED_PENTA6:
-      return VTK_WEDGE;
-    case MED_HEXA8:
-      return VTK_HEXAHEDRON;
-    case MED_TETRA10:
-      return VTK_QUADRATIC_TETRA;
-    case MED_OCTA12:
-      return VTK_HEXAGONAL_PRISM;
-    case MED_PYRA13:
-      return VTK_QUADRATIC_PYRAMID;
-    case MED_PENTA15:
-      return VTK_QUADRATIC_WEDGE;
-    case MED_HEXA20:
-      return VTK_QUADRATIC_HEXAHEDRON;
-    case MED_HEXA27:
-      return VTK_TRIQUADRATIC_HEXAHEDRON;
-    case MED_POLYGON:
-      return VTK_POLYGON;
-    case MED_POLYHEDRON:
-      return VTK_POLYHEDRON;
-    case MED_NO_GEOTYPE:
-      return VTK_EMPTY_CELL;
-    default:
-      vtkGenericWarningMacro("No vtk type matches " << geometry << ", aborting")
-      ;
-      return VTK_EMPTY_CELL;
-  }
-}
-
-int vtkMedUtilities::MedToVTKIndex(int vtktype, int node)
-{
-  if(vtktype != VTK_TRIQUADRATIC_HEXAHEDRON)
-    return node;
-
-  static int VTK_TRIQUADRATIC_HEXAHEDRON_MED_TO_VTK_INDEX[27] =
-    {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
-     24, 22, 21, 23, 20, 25, 26};
-
-  return VTK_TRIQUADRATIC_HEXAHEDRON_MED_TO_VTK_INDEX[node % 27] + static_cast<int>(27 * floor((double)node / 27));
-}
-
-int vtkMedUtilities::GetNumberOfNodes(med_geometry_type geometry)
-{
-  switch(geometry)
-  {
-    case MED_POINT1:
-      return 1;
-    case MED_SEG2:
-      return 2;
-    case MED_SEG3:
-      return 3;
-    case MED_SEG4:
-      return 4;
-    case MED_TRIA3:
-      return 3;
-    case MED_QUAD4:
-      return 4;
-    case MED_TRIA6:
-      return 6;
-    case MED_TRIA7:
-      return 7;
-    case MED_QUAD8:
-      return 8;
-    case MED_QUAD9:
-      return 9;
-    case MED_TETRA4:
-      return 4;
-    case MED_PYRA5:
-      return 5;
-    case MED_PENTA6:
-      return 5;
-    case MED_HEXA8:
-      return 8;
-    case MED_TETRA10:
-      return 10;
-    case MED_OCTA12:
-      return 12;
-    case MED_PYRA13:
-      return 13;
-    case MED_PENTA15:
-      return 15;
-    case MED_HEXA20:
-      return 20;
-    case MED_HEXA27:
-      return 27;
-    case MED_POLYGON:
-      return -1;
-    case MED_POLYHEDRON:
-      return -1;
-    case MED_NO_GEOTYPE:
-      return 0;
-    default:
-      vtkGenericWarningMacro("No vtk type matches "
-                             << vtkMedUtilities::GeometryName(geometry)
-                             << ", aborting");
-      return -1;
-  }
-}
-
-int vtkMedUtilities::GetNumberOfSubEntity(med_geometry_type geometry)
-{
-  switch(geometry)
-  {
-    case MED_POINT1:
-      return 0;
-    case MED_SEG2:
-      return 2;
-    case MED_SEG3:
-      return 3;
-    case MED_SEG4:
-      return 4;
-    case MED_TRIA3:
-      return 3;
-    case MED_QUAD4:
-      return 4;
-    case MED_TRIA6:
-      return 3;
-    case MED_TRIA7:
-      return 3;
-    case MED_QUAD8:
-      return 4;
-    case MED_QUAD9:
-      return 4;
-    case MED_TETRA4:
-      return 4;
-    case MED_PYRA5:
-      return 5;
-    case MED_PENTA6:
-      return 5;
-    case MED_HEXA8:
-      return 6;
-    case MED_TETRA10:
-      return 4;
-    case MED_OCTA12:
-      return 8;
-    case MED_PYRA13:
-      return 5;
-    case MED_PENTA15:
-      return 5;
-    case MED_HEXA20:
-      return 6;
-    case MED_HEXA27:
-      return 6;
-    case MED_POLYGON:
-      return -1;
-    case MED_POLYHEDRON:
-      return -1;
-    case MED_NO_GEOTYPE:
-      return 0;
-    default:
-      vtkGenericWarningMacro("No vtk type matches "
-                             << geometry
-                             << ", aborting");
-      return -1;
-  }
-}
-
-med_entity_type vtkMedUtilities::GetSubType(med_entity_type type)
-{
-  switch(type)
-    {
-    case MED_CELL:
-      return MED_DESCENDING_FACE;
-    case MED_DESCENDING_FACE:
-      return MED_DESCENDING_EDGE;
-    case MED_DESCENDING_EDGE:
-      return MED_NODE;
-    default:
-      return MED_NODE;
-    }
-}
-
-med_geometry_type vtkMedUtilities::GetSubGeometry(
-    med_geometry_type geometry, int index)
-{
-  switch(geometry)
-  {
-    case MED_SEG2:
-      return MED_POINT1;
-    case MED_SEG3:
-      return MED_POINT1;
-    case MED_SEG4:
-      return MED_POINT1;
-
-    case MED_TRIA3:
-      return MED_SEG2;
-    case MED_TRIA6:
-      return MED_SEG3;
-    case MED_TRIA7:
-      return MED_SEG3;
-
-    case MED_QUAD4:
-      return MED_SEG2;
-    case MED_QUAD8:
-      return MED_SEG3;
-    case MED_QUAD9:
-      return MED_SEG3;
-
-    case MED_TETRA4:
-      return MED_TRIA3;
-    case MED_TETRA10:
-      return MED_TRIA6;
-
-    case MED_PYRA5:
-      {
-      if(index==0)
-        return MED_QUAD4;
-      return MED_TRIA3;
-      }
-    case MED_PYRA13:
-      {
-      if(index==0)
-        return MED_QUAD8;
-      else
-        return MED_TRIA6;
-      }
-
-    case MED_PENTA6:
-      {
-      if(index==0||index==1)
-        return MED_TRIA3;
-      else
-        return MED_QUAD4;
-      }
-    case MED_PENTA15:
-      {
-      if(index==0||index==1)
-        return MED_TRIA6;
-      else
-        return MED_QUAD8;
-      }
-
-    case MED_HEXA8:
-      return MED_QUAD4;
-    case MED_HEXA20:
-      return MED_QUAD8;
-    case MED_HEXA27:
-      return MED_QUAD9;
-    default:
-      return MED_NONE;
-  }
-}
-
-int vtkMedUtilities::FormatPolyhedronForVTK(
-    vtkMedFamilyOnEntityOnProfile* foep, vtkIdType index,
-    vtkIdList* ids )
-{
-  vtkMedEntityArray* array = foep->GetFamilyOnEntity()->GetEntityArray();
-  vtkMedIntArray* conn = array->GetConnectivityArray();
-  vtkMedIntArray* faceIndex = array->GetFaceIndex();
-  vtkMedIntArray* nodeIndex = array->GetNodeIndex();
-  med_int start = faceIndex->GetValue(index)-1;
-  med_int end = faceIndex->GetValue(index+1)-1;
-
-  // The format for the Polyhedrons is:
-  //(numCellFaces, numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)
-  ids->Reset();
-
-  if (array->GetConnectivity()==MED_NODAL)
-    {
-    ids->InsertNextId(end-start-1);
-    for (int ff = start; ff<end; ff++)
-      {
-      med_int fstart = nodeIndex->GetValue(ff)-1;
-      med_int fend = nodeIndex->GetValue(ff+1)-1;
-      ids->InsertNextId(fend-fstart);
-      for (med_int pt = fstart; pt<fend; pt++)
-        {
-        vtkIdType realIndex = foep->GetVTKPointIndex(conn->GetValue(pt)-1);
-        if(realIndex < 0)
-          {
-          vtkGenericWarningMacro("this polyhedron is not on this profile");
-          foep->SetValid(0);
-          return 0;
-          }
-        ids->InsertNextId(realIndex);
-        }
-      }
-    }
-
-  if (array->GetConnectivity()==MED_DESCENDING)
-    {
-    ids->InsertNextId(end-start);
-    vtkSmartPointer<vtkIdList> subIds = vtkSmartPointer<vtkIdList>::New();
-
-    for (int i = 0 ; i<nodeIndex->GetSize(); i++)
-      {
-      int numPoints =
-          vtkMedUtilities::GetNumberOfSubEntity(nodeIndex->GetValue(i));
-      ids->InsertNextId(numPoints);
-
-      vtkMedEntity entity;
-      entity.EntityType = MED_DESCENDING_FACE;
-      entity.GeometryType = nodeIndex->GetValue(i);
-
-      vtkMedEntityArray* theFaces =
-          array->GetParentGrid()->GetEntityArray(entity);
-
-      theFaces->GetCellVertices(conn->GetValue(i)-1, subIds);
-
-      for (int j = 0 ; j< numPoints; j++)
-        {
-        vtkIdType realIndex = foep->GetVTKPointIndex(subIds->GetId(j));
-        if(realIndex < 0)
-          {
-          vtkGenericWarningMacro("this polyhedron is not on this profile");
-          return 0;
-          }
-        ids->InsertNextId(realIndex);
-        }
-      }
-    }
-  return 1;
-}
-
-void vtkMedUtilities::SplitGroupKey(const char* name, std::string& mesh,
-    std::string& entity, std::string& group)
-{
-  std::string remain;
-  remain=name;
-  mesh="*";
-  entity="*";
-  group="*";
-  std::string header="*";
-
-  if(remain=="*")
-    {
-    return;
-    }
-  std::string::size_type pos;
-  // First get the header, which must be "GROUP"
-  pos=remain.find_first_of(vtkMedUtilities::Separator);
-  header=remain.substr(0, pos);
-  remain=remain.substr(pos+1, remain.size()-pos-1);
-
-  // then get the mesh name
-  pos=remain.find_first_of(vtkMedUtilities::Separator);
-  mesh=remain.substr(0, pos);
-  if(mesh=="*"||pos==remain.size()-1)
-    return;
-  remain=remain.substr(pos+1, remain.size()-pos-1);
-
-  // then the entity name (OnPoint or OnCell)
-  pos=remain.find_first_of(vtkMedUtilities::Separator);
-  entity=remain.substr(0, pos);
-  if(entity=="*"||pos==remain.size()-1)
-    return;
-
-  // then the group
-  group=remain.substr(pos+1, remain.size()-pos-1);
-}
-
-int vtkMedUtilities::GetParentNodeIndex(med_geometry_type parentGeometry,
-    int subEntityIndex, int subEntityNodeIndex)
-{
-  switch(parentGeometry)
-  {
-    case MED_TRIA3:
-    case MED_TRIA6:
-    case MED_TRIA7:
-      return MED_TRIA_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-    case MED_QUAD4:
-    case MED_QUAD8:
-    case MED_QUAD9:
-      return MED_QUAD_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-    case MED_TETRA4:
-    case MED_TETRA10:
-      return MED_TETRA_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-    case MED_PYRA5:
-    case MED_PYRA13:
-      return MED_PYRA_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-    case MED_PENTA6:
-    case MED_PENTA15:
-      return MED_PENTA_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-    case MED_HEXA8:
-    case MED_HEXA20:
-    case MED_HEXA27:
-      return MED_HEXA_CHILD_TO_PARENT_INDEX[subEntityIndex][subEntityNodeIndex];
-  }
-  return -1;
-}
-
-void vtkMedUtilities::ProjectConnectivity(med_geometry_type parentGeometry,
-    vtkIdList* parentIds, vtkIdList* subEntityIds, int subEntityIndex, bool invert)
-{
-  for(int subEntityNodeIndex=0; subEntityNodeIndex
-      <subEntityIds->GetNumberOfIds(); subEntityNodeIndex++)
-    {
-    int realIndex = subEntityNodeIndex;
-    if(invert)
-      realIndex = subEntityIds->GetNumberOfIds() - subEntityNodeIndex - 1;
-    parentIds->SetId(GetParentNodeIndex(parentGeometry, subEntityIndex,
-        subEntityNodeIndex), subEntityIds->GetId(realIndex));
-    }
-}
-
-std::string vtkMedUtilities::GetModeKey(int index, double frequency, int maxindex)
-{
-  std::ostringstream key;
-  key<<"[";
-  if(maxindex > 0)
-    {
-      int maxdecim = (int)floor(log(1.0*maxindex)/log(10.0));
-    int decim = 0;
-    if(index > 0)
-      {
-        decim = (int)floor(log(1.0*index)/log(10.0));
-      }
-    for(int i=decim; i<maxdecim; i++)
-      {
-      key << "0";
-      }
-    }
-
-  key<<index<<"] "<<frequency;
-  return key.str();
-}
-
-int vtkMedUtilities::GetModeFromKey(const char* key, int& index,
-    double& frequency)
-{
-  const std::string k(key);
-  size_t index_start=k.find("[");
-  size_t index_end=k.find("]");
-  const string index_string=k.substr(index_start, index_end);
-  stringstream indexsstr;
-  indexsstr<<index_string;
-  indexsstr>>index;
-  const string freq_string=k.substr(index_end+1, string::npos);
-  stringstream freqsstr;
-  freqsstr<<freq_string;
-  freqsstr>>frequency;
-  return 1;
-}
-
-vtkMultiBlockDataSet* vtkMedUtilities::GetParent(vtkMultiBlockDataSet* root,
-                                vtkStringArray* path)
-{
-    vtkMultiBlockDataSet* output=root;
-    vtkMultiBlockDataSet* parent=output;
-    for(int depth = 0; depth<path->GetNumberOfValues(); depth++)
-      {
-      vtkStdString parentName = path->GetValue(depth);
-      bool found=false;
-      for(int blockId=0; blockId<parent->GetNumberOfBlocks(); blockId++)
-        {
-        vtkInformation* metaData=parent->GetMetaData(blockId);
-        if(metaData->Has(vtkCompositeDataSet::NAME()))
-          {
-          const char* blockName=metaData->Get(vtkCompositeDataSet::NAME());
-          if(parentName==blockName &&
-              vtkMultiBlockDataSet::SafeDownCast(
-                  parent->GetBlock(blockId))!=NULL)
-            {
-            parent=vtkMultiBlockDataSet::SafeDownCast(parent->GetBlock(blockId));
-            found=true;
-            break;
-            }
-          }
-        }
-      if (!found)
-        {
-        // If I am here, it means that I did not find any block with the good name, create one
-        int nb=parent->GetNumberOfBlocks();
-        vtkMultiBlockDataSet* block=vtkMultiBlockDataSet::New();
-        parent->SetBlock(nb, block);
-        block->Delete();
-        parent->GetMetaData(nb)->Set(vtkCompositeDataSet::NAME(),
-            parentName.c_str());
-        parent=block;
-        }
-      }
-    return parent;
-}
-
-int vtkMedUtilities::SizeOf(med_attribute_type type)
-{
-  switch(type)
-    {
-    case MED_ATT_FLOAT64 : return sizeof(med_float);
-    case MED_ATT_INT : return sizeof(med_int);
-    case MED_ATT_NAME : return MED_NAME_SIZE * sizeof(char);
-    }
-  return 0;
-}
-
-bool operator==(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1)
-{
-  return cs0.IterationIt == cs1.IterationIt && cs0.TimeIt == cs1.TimeIt;
-}
-
-bool operator!=(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1)
-{
-  return cs0.IterationIt != cs1.IterationIt || cs0.TimeIt != cs1.TimeIt;
-}
-
-bool operator<(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1)
-{
-  if(cs0.IterationIt != cs1.IterationIt)
-    return cs0.IterationIt < cs1.IterationIt;
-  return cs0.TimeIt < cs1.TimeIt;
-}
-
-bool operator==(const vtkMedEntity& e0, const vtkMedEntity& e1)
-{
-  return e0.EntityType == e1.EntityType && e0.GeometryType == e1.GeometryType;
-}
-
-bool operator!=(const vtkMedEntity& e0, const vtkMedEntity& e1)
-{
-  return e0.EntityType != e1.EntityType || e0.GeometryType != e1.GeometryType;
-}
-
-bool operator<(const vtkMedEntity& e0, const vtkMedEntity& e1)
-{
-  if(e0.EntityType != e1.EntityType)
-    return e0.EntityType < e1.EntityType;
-  return e0.GeometryType < e1.GeometryType;
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedUtilities.h b/src/Plugins/MedReader/IO/vtkMedUtilities.h
deleted file mode 100644 (file)
index 6d4e167..0000000
+++ /dev/null
@@ -1,468 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _vtkMedUtilities_h_
-#define _vtkMedUtilities_h_
-
-#include "vtkObject.h"
-#include "vtkSmartPointer.h"
-#include "vtkMultiBlockDataSet.h"
-#include "vtkStringArray.h"
-#include "vtkMedSetGet.h"
-#include "vtkMed.h"
-#include "vtkMedReader.h"
-
-#include <utility>
-#include <string>
-#include <vector>
-#include <list>
-#include <set>
-#include <map>
-
-class vtkDataArray;
-class vtkMedMesh;
-class vtkMedFamily;
-class vtkMedGroup;
-class vtkIdList;
-class vtkMutableDirectedGraph;
-class vtkInformationIntegerKey;
-class vtkInformationObjectBaseKey;
-
-//BTX
-class vtkMedComputeStep
-{
-public :
-  med_int IterationIt;
-  med_int TimeIt;
-  med_float TimeOrFrequency;
-
-  vtkMedComputeStep()
-    {
-    this->IterationIt = MED_NO_IT;
-    this->TimeIt = MED_NO_DT;
-    this->TimeOrFrequency = MED_UNDEF_DT;
-    }
-};
-
-bool operator==(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1);
-bool operator!=(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1);
-bool operator<(const vtkMedComputeStep& cs0, const vtkMedComputeStep& cs1);
-
-class vtkMedEntity
-{
-public :
-
-  vtkMedEntity() : EntityType(MED_NODE),
-                     GeometryType(MED_NONE)
-    {
-    }
-
-  vtkMedEntity(med_entity_type type, med_geometry_type geometry) :
-      EntityType(type),
-      GeometryType(geometry)
-    {
-    }
-
-  ~vtkMedEntity()
-    {
-    }
-
-  vtkMedEntity(const vtkMedEntity& entity) :
-      EntityType(entity.EntityType),
-      GeometryType(entity.GeometryType)
-    {
-    this->GeometryName = entity.GeometryName;
-    }
-
-  void operator=(const vtkMedEntity& entity)
-    {
-    this->EntityType = entity.EntityType;
-    this->GeometryType = entity.GeometryType;
-    this->GeometryName = entity.GeometryName;
-    }
-
-  med_entity_type EntityType;
-  med_geometry_type GeometryType;
-  std::string GeometryName;
-};
-
-bool operator==(const vtkMedEntity& cs0, const vtkMedEntity& cs1);
-bool operator!=(const vtkMedEntity& cs0, const vtkMedEntity& cs1);
-bool operator<(const vtkMedEntity& cs0, const vtkMedEntity& cs1);
-//ETX
-
-class VTK_EXPORT vtkMedUtilities
-{
-public:
-  static vtkInformationIntegerKey* ELNO();
-  static vtkInformationIntegerKey* ELGA();
-  static vtkInformationStringVectorKey* BLOCK_NAME();
-  static vtkInformationObjectBaseKey* STRUCT_ELEMENT();
-  static vtkInformationIntegerKey* STRUCT_ELEMENT_INDEX();
-
-  // Description:
-  // return an array to store the coordinates of nodes.
-  // the  type of the elements is the same as the one in the med file
-  static vtkDataArray* NewCoordArray();
-
-  // Description:
-  // returns an array to store data of a given type.
-  // the type corresponds to med types.
-  static vtkDataArray* NewArray(med_field_type type);
-  static vtkAbstractArray* NewArray(med_attribute_type type);
-
-  //BTX
-  enum
-  {
-    OnPoint, OnCell
-  };
-  //ETX
-
-  //BTX
-  // Description:
-  // returns a name for the given med_geometry_type
-  static const char* GeometryName(med_geometry_type geometry);
-
-  // Description:
-  // returns a name for the given med_geometry_type
-  static const char* EntityName(med_entity_type type);
-
-  // Description:
-  // returns a name for the given med_connectivity_mode
-  static const char* ConnectivityName(med_connectivity_mode conn);
-
-  static const std::string SimplifyName(const char* medName);
-
-  static const std::string FamilyKey(const char* meshName, int pointOrCell,
-      const char* familyName);
-  static const std::string GroupKey(const char* meshName, int pointOrCell,
-      const char* groupName);
-
-  static const std::string EntityKey(const vtkMedEntity&);
-
-  static int GetNumberOfPoint(med_geometry_type geometry);
-  static int GetDimension(med_geometry_type geometry);
-
-  // returns the VTK cell type (as described in the vtkCellType.h file)
-  // corresponding to the given med_geometry_type
-  static int GetVTKCellType(med_geometry_type geometry);
-
-  // returns the number of sub entity : the number of faces for cells,
-  // the number of edges for faces, the number of nodes for edges
-  static int GetNumberOfSubEntity(med_geometry_type geometry);
-
-  // returns the number of Nodes
-  static int GetNumberOfNodes(med_geometry_type geometry);
-  //ETX
-
-  static med_entity_type GetSubType(med_entity_type type);
-  static med_geometry_type GetSubGeometry(med_geometry_type geometry,
-      int index);
-
-  static int GetParentNodeIndex(med_geometry_type parentGeometry,
-      int subEntityIndex, int subEntityNodeIndex);
-
-  // Description :
-  // Project the ids gathered in the sub entity to the parent entity.
-  // used for MED_DESC connectivity.
-  // Rem : no check is performed, and do not work for
-  // MED_POLYHEDRE and MED_POLYGON
-  static void ProjectConnectivity(med_geometry_type parentGeometry,
-      vtkIdList* parentIds, vtkIdList* subEntityIds, int subEntityIndex,
-      bool invert);
-
-  static char Separator;
-
-  static const char* NoGroupName;
-  static const char* OnCellName;
-  static const char* OnPointName;
-
-  //BTX
-  static void SplitGroupKey(const char* name, /*vtkstd::*/std::string& mesh,
-      /*vtkstd::*/std::string& entity, /*vtkstd::*/std::string& group);
-
-  static std::string GetModeKey(int index, double frequency, int maxindex);
-  static int  GetModeFromKey(const char*, int& index, double& frequency);
-
-  static int MedToVTKIndex(int vtktype, int node);
-
-  static vtkMultiBlockDataSet* GetParent(vtkMultiBlockDataSet* root,
-                                  vtkStringArray* path);
-
-  // Description:
-  // Format the id list so that it respects the VTK format for polyhedrons :
-  // numfaces, npts_face0, pt0, ... npts_face1, pt1 ....
-  static int  FormatPolyhedronForVTK(vtkMedFamilyOnEntityOnProfile*,
-                               vtkIdType, vtkIdList*);
-
-  static int SizeOf(med_attribute_type type);
-  //ETX
-};
-
-//BTX
-
-template<class T>
-class vtkObjectVector: public std::vector<vtkSmartPointer<T> >
-{
-};
-
-template<class T>
-class vtkMedComputeStepMap: public
-    std::map<med_int, std::map<med_int, vtkSmartPointer<T> > >
-{
-public :
-  void  AddObject(const vtkMedComputeStep& cs, T* obj)
-    {
-    (*this)[cs.TimeIt][cs.IterationIt] = obj;
-    this->TimeIt[cs.TimeOrFrequency] = cs.TimeIt;
-    }
-
-  T* GetObject(const vtkMedComputeStep& cs)
-    {
-    if(this->find(cs.TimeIt) == this->end())
-      return NULL;
-
-    std::map<med_int, vtkSmartPointer<T> >& itmap = (*this)[cs.TimeIt];
-
-    if(itmap.find(cs.IterationIt) == itmap.end())
-      return NULL;
-
-    return itmap[cs.IterationIt];
-    }
-
-  med_int GetNumberOfObject()
-    {
-    med_int nb = 0;
-    typename vtkMedComputeStepMap<T>::iterator it = this->begin();
-    while(it != this->end())
-      {
-      nb += it->second.size();
-      it++;
-      }
-    return nb;
-    }
-
-  T* GetObject(med_int id)
-    {
-    med_int nb = 0;
-    if(id < 0)
-      return NULL;
-
-    typename vtkMedComputeStepMap<T>::iterator it = this->begin();
-    while(it != this->end())
-      {
-      std::map<med_int, vtkSmartPointer<T> >& itmap = it->second;
-      nb += itmap.size();
-      if(id < nb)
-        {
-        typename std::map<med_int, vtkSmartPointer<T> >::iterator iterationit =
-            itmap.begin();
-        for(int ii=0; ii<nb-id-1; ii++)
-          iterationit++;
-        return iterationit->second;
-        }
-      it++;
-      }
-    return NULL;
-    }
-
-  T* FindObject(const vtkMedComputeStep& cs, int strategy)
-    {
-    // first test if the given compute step is present
-    T* obj = this->GetObject(cs);
-    if(obj != NULL)
-      return obj;
-
-    if(this->size() == 0)
-      return NULL;
-
-    // let us first find the iterator that corresponds to the given time
-    med_int timeit = this->FindTimeIterator(cs.TimeOrFrequency, cs.TimeIt);
-
-    std::map<med_int, vtkSmartPointer<T> >& itmap =
-        (*this)[timeit];
-
-    if(itmap.size() == 0)
-      return NULL;
-
-    if(strategy == vtkMedReader::PhysicalTime
-       || strategy == vtkMedReader::Modes)
-      {
-      // in this strategies, we return the last iteration for each time.
-      return itmap.rbegin()->second;
-      }
-    else if(strategy == vtkMedReader::Iteration)
-      {
-      // in this case, we look for the real iteration
-      typename std::map<med_int, vtkSmartPointer<T> >::iterator iterationit
-          = itmap.lower_bound(cs.IterationIt);
-
-      // if this is not exactly the same step and if this is not the first
-      // step, rool back one step to choose the one just before the asked time.
-      if(iterationit->first != cs.IterationIt && iterationit != itmap.begin())
-        iterationit--;
-
-      // the time iterator asked for is higher than all times,
-      // let us pick the last one.
-      if(iterationit == itmap.end())
-        iterationit--;
-
-      return iterationit->second;
-      }
-    }
-
-  void  GatherTimes(std::set<med_float>& times)
-    {
-    typename std::map<med_float, med_int>::iterator it
-        = this->TimeIt.begin();
-    while(it != this->TimeIt.end())
-      {
-      times.insert(it->first);
-      it++;
-      }
-    }
-
-  void  GatherIterations(med_float time, std::set<med_int>& iterations)
-    {
-    med_int timeit = this->FindTimeIterator(time, -1);
-    if(timeit == -1)
-      return;
-
-    std::map<med_int, vtkSmartPointer<T> >& itmap =
-        (*this)[timeit];
-
-    typename std::map<med_int, vtkSmartPointer<T> >::iterator it =
-        itmap.begin();
-
-    while(it != itmap.end())
-      {
-      iterations.insert(it->first);
-      it++;
-      }
-    }
-
-protected :
-
-  med_int FindTimeIterator(med_float time, med_int defaultit)
-    {
-    if(this->TimeIt.size() == 0)
-      return defaultit;
-
-    typename std::map<med_float, med_int>::iterator it
-        = this->TimeIt.lower_bound(time);
-
-    // if this is not exactly the same step and if this is not the first step,
-    // rool back one step to choose the one just before the asked time.
-    if(it->first != time && it != this->TimeIt.begin())
-      it--;
-
-    // if the time iterator asked for is higher than all times,
-    // let us pick the last one.
-    if(it == this->TimeIt.end())
-      it--;
-
-    return it->second;
-    }
-
-  std::map<med_float, med_int> TimeIt;
-};
-
-template<class T>
-class vtkList: public std::list<T>
-{
-};
-
-template<class T1, class T2>
-struct IsSameTraits
-{
-  static const bool IsSame()
-  {
-    return false;
-  }
-};
-
-template<class T1>
-struct IsSameTraits<T1, T1>
-{
-  static const bool IsSame()
-  {
-    return true;
-  }
-};
-
-#define PRINT_IVAR(os, indent, name) \
-  os << indent << #name << " : "  << name << endl;
-
-#define PRINT_STRING(os, indent, name) \
-  os << indent << #name << " : "  << ( name ? name : "(void)") << endl;
-
-#define PRINT_OBJECT(os, indent, name) \
-  os << indent << #name << " : " ;\
-  if(name != NULL) \
-  {\
-    os << endl;\
-    name->PrintSelf(os, indent.GetNextIndent());\
-  }\
-  else os << "(NULL)" << endl;
-
-#define PRINT_VECTOR(os, indent, name, size) \
-{\
-  os << indent << #name << " : (";\
-  for(vtkIdType _index = 0; _index<size; _index++)\
-    {\
-    os << name[_index];\
-    if(_index < size-1)\
-      os << ", ";\
-    }\
-  os << ")" << endl;\
-}
-
-#define PRINT_OBJECT_VECTOR(os, indent, name) \
-{\
-  os << indent << #name;\
-  os << endl;\
-  vtkIdType _size = name->size();\
-  for(vtkIdType _index = 0; _index < _size; _index++)\
-  {\
-  os << indent << #name << _index << " : " << endl;\
-  if(name->at(_index) != NULL)\
-    name->at(_index)->PrintSelf(os, indent.GetNextIndent());\
-  else\
-    os << indent.GetNextIndent() << "(NULL)" << endl;\
-  }\
-}
-
-#define PRINT_STRING_VECTOR(os, indent, name)\
-{\
-  os << indent << #name << ": ";\
-  for(int _comp = 0; _comp<this->name->size(); _comp++)\
-    {\
-    os << this->name->at(_comp)->GetString();\
-    if(_comp < this->name->size()-1)\
-      os << ", ";\
-    }\
-  os << endl;\
-}
-
-#define PRINT_MED_STRING(os, indent, name)\
-  os << indent << #name << ": " << this->name->GetString() << endl; \
-
-//ETX
-
-#endif
diff --git a/src/Plugins/MedReader/IO/vtkMedVariableAttribute.cxx b/src/Plugins/MedReader/IO/vtkMedVariableAttribute.cxx
deleted file mode 100644 (file)
index 7b025a4..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkMedVariableAttribute.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkMedUtilities.h"
-#include "vtkMedStructElement.h"
-#include "vtkMedFile.h"
-#include "vtkMedDriver.h"
-
-#include <map>
-#include <string>
-#include <vector>
-using namespace std;
-
-// vtkCxxRevisionMacro(vtkMedVariableAttribute, "$Revision$")
-vtkStandardNewMacro(vtkMedVariableAttribute);
-
-vtkCxxSetObjectMacro(vtkMedVariableAttribute, ParentStructElement, vtkMedStructElement);
-
-vtkMedVariableAttribute::vtkMedVariableAttribute()
-{
-  this->Name = NULL;
-  this->AttributeType = MED_ATT_UNDEF;
-  this->NumberOfComponent = 0;
-  this->ParentStructElement = NULL;
-}
-
-vtkMedVariableAttribute::~vtkMedVariableAttribute()
-{
-  this->SetName(NULL);
-  this->SetParentStructElement(NULL);
-}
-
-void  vtkMedVariableAttribute::Load(vtkMedEntityArray* array)
-{
-  this->GetParentStructElement()->GetParentFile()->GetMedDriver()->LoadVariableAttribute(this, array);
-}
-
-void vtkMedVariableAttribute::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/IO/vtkMedVariableAttribute.h b/src/Plugins/MedReader/IO/vtkMedVariableAttribute.h
deleted file mode 100644 (file)
index a7db7a3..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef __vtkMedVariableAttribute_h_
-#define __vtkMedVariableAttribute_h_
-
-#include "vtkObject.h"
-#include "vtkMed.h"
-#include "vtkMedSetGet.h"
-
-class vtkAbstractArray;
-class vtkMedStructElement;
-class vtkMedEntityArray;
-
-class VTK_EXPORT vtkMedVariableAttribute : public vtkObject
-{
-public :
-  static vtkMedVariableAttribute* New();
-  vtkTypeMacro(vtkMedVariableAttribute, vtkObject)
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  // Description:
-  // This is the name of this attribute
-  vtkSetStringMacro(Name);
-  vtkGetStringMacro(Name);
-
-  // Description:
-  // The iterator in the med file of this constant attribute
-  vtkSetMacro(MedIterator, med_int);
-  vtkGetMacro(MedIterator, med_int);
-
-  // Description:
-  // The Geometry type this structural elements lies on.
-  vtkSetMacro(AttributeType, med_attribute_type);
-  vtkGetMacro(AttributeType, med_attribute_type);
-
-  // Description:
-  // The dimension of this structural elements model
-  vtkSetMacro(NumberOfComponent, med_int);
-  vtkGetMacro(NumberOfComponent, med_int);
-
-  // Description:
-  // The Structural element on which lies this attribute
-  virtual void  SetParentStructElement(vtkMedStructElement*);
-  vtkGetObjectMacro(ParentStructElement, vtkMedStructElement);
-
-  // Description:
-  // Load the values associated with this attribute for the given entity array;
-  void  Load(vtkMedEntityArray*);
-
-protected:
-  vtkMedVariableAttribute();
-  virtual ~vtkMedVariableAttribute();
-
-  char *Name;
-  med_int MedIterator;
-  med_attribute_type AttributeType;
-  med_int NumberOfComponent;
-
-  vtkMedStructElement* ParentStructElement;
-
-private:
-  vtkMedVariableAttribute(const vtkMedVariableAttribute&); // Not implemented.
-  void operator=(const vtkMedVariableAttribute&); // Not implemented.
-};
-
-#endif //__vtkMedVariableAttribute_h_
diff --git a/src/Plugins/MedReader/ParaViewPlugin/CMakeLists.txt b/src/Plugins/MedReader/ParaViewPlugin/CMakeLists.txt
deleted file mode 100644 (file)
index 49f81b1..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-# add include indirectories to the vtk files in this plugin.
-include_directories(
-  ${MedReader_SOURCE_DIR}/IO
-  ${MedReader_BINARY_DIR}/IO)
-
-
-SET(SM_SRCS
-    vtkSMMedGroupSelectionDomain.cxx
-    )
-
-IF(PARAVIEW_BUILD_QT_GUI)
-
-    QT4_WRAP_UI(CLIENT_UI_SRCS
-        Resources/UI/MedReaderPanel.ui
-        Resources/UI/ExtractGroupPanel.ui
-    )
-
-    # create a plugin that implements an object panel for the reader
-    SET(CLIENT_SRCS
-        pqMedReaderPanel.cxx
-        pqExtractGroupPanel.cxx
-    )
-
-    QT4_WRAP_CPP(MOC_SRCS
-        pqMedReaderPanel.h
-        pqExtractGroupPanel.h
-    )
-
-    ADD_PARAVIEW_OBJECT_PANEL(MEDREADER_IFACES MEDREADER_IFACE_SRCS
-        CLASS_NAME pqMedReaderPanel
-        XML_NAME MedReader
-        XML_GROUP sources
-    )
-        
-    ADD_PARAVIEW_OBJECT_PANEL(EXTRACTGROUP_IFACES EXTRACTGROUP_IFACE_SRCS
-        CLASS_NAME pqExtractGroupPanel
-        XML_NAME ExtractGroup
-        XML_GROUP filters
-    )
-    
-    # create the med reader plugin itself
-    ADD_PARAVIEW_PLUGIN(MedReaderPlugin "4.0"
-        SERVER_MANAGER_SOURCES ${SM_SRCS}
-        SERVER_MANAGER_XML Resources/MedReaderServer.xml
-        GUI_INTERFACES ${MEDREADER_IFACES} ${EXTRACTGROUP_IFACES}
-        GUI_RESOURCES Resources/pqMedReader.qrc
-        GUI_SOURCES ${CLIENT_SRCS}
-              ${CLIENT_UI_SRCS}
-              ${MOC_SRCS}
-              ${MEDREADER_IFACE_SRCS}
-              ${EXTRACTGROUP_IFACE_SRCS}
-        CS_KITS
-            # this is the same name as the name in module.cmake file IO
-            # directory.
-            vtkMedReader
-    )
-        
-ELSE(PARAVIEW_BUILD_QT_GUI)
-          
-    # create the med reader plugin itself
-    ADD_PARAVIEW_PLUGIN(MedReaderPlugin "4.0"
-        SERVER_MANAGER_SOURCES ${SM_SRCS}
-        SERVER_MANAGER_XML Resources/MedReaderServer.xml
-        CS_KITS
-            # this is the same name as the name in module.cmake file IO
-            # directory.
-            vtkMedReader
-    )
-    
-ENDIF(PARAVIEW_BUILD_QT_GUI)
-
-TARGET_LINK_LIBRARIES(MedReaderPlugin vtkMedReader vtkMedReaderCS)
-
-# Install
-INSTALL(
-    TARGETS MedReaderPlugin
-    RUNTIME DESTINATION lib/paraview
-    LIBRARY DESTINATION lib/paraview
-    ARCHIVE DESTINATION lib/paraview
-)
-
-
-
-
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqCellData16.png b/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqCellData16.png
deleted file mode 100755 (executable)
index 8a6f2a6..0000000
Binary files a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqCellData16.png and /dev/null differ
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png b/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png
deleted file mode 100644 (file)
index e461810..0000000
Binary files a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqElnoData16.png and /dev/null differ
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqPointData16.png b/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqPointData16.png
deleted file mode 100755 (executable)
index 50367ea..0000000
Binary files a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqPointData16.png and /dev/null differ
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png b/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png
deleted file mode 100755 (executable)
index ff6e199..0000000
Binary files a/src/Plugins/MedReader/ParaViewPlugin/Resources/Icons/pqQuadratureData16.png and /dev/null differ
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderClient.xml b/src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderClient.xml
deleted file mode 100644 (file)
index fccdf42..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<ParaViewReaders>
-    <Reader name="MedReader"
-            extensions="med rmed"
-            file_description="MED Files">
-    </Reader>
-    <Filter name="ExtractGroup"/>
-</ParaViewReaders>
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderServer.xml b/src/Plugins/MedReader/ParaViewPlugin/Resources/MedReaderServer.xml
deleted file mode 100644 (file)
index 97a4e37..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-<ServerManagerConfiguration>
-  <ProxyGroup
-    name="sources">
-    <SourceProxy
-      name="MedReader"
-      class="vtkMedReader"
-      label="MED Reader">
-
-      <StringVectorProperty
-        name="FileName"
-        command="SetFileName"
-        number_of_elements="1"
-        animateable="0">
-        <FileListDomain
-          name="files" />
-        <Documentation>
-          This property specifies the file name for the MED reader.
-        </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="CellFieldsArrayInfo"
-        information_only="1">
-        <ArraySelectionInformationHelper
-          attribute_name="CellField" />
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="CellFieldsArrayStatus"
-        command="SetCellFieldArrayStatus"
-        label="Cell Arrays"
-        number_of_elements="0"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="CellFieldsArrayInfo">
-        <ArraySelectionDomain
-          name="array_list">
-          <RequiredProperties>
-            <Property
-              name="CellFieldsArrayInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </ArraySelectionDomain>
-        <Documentation>
-          This property lists which cell-centered arrays to read.
-       </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="PointFieldsArrayInfo"
-        information_only="1">
-        <ArraySelectionInformationHelper
-          attribute_name="PointField" />
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="PointFieldsArrayStatus"
-        command="SetPointFieldArrayStatus"
-        number_of_elements="0"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="PointFieldsArrayInfo"
-        label="Point Arrays">
-        <ArraySelectionDomain
-          name="array_list">
-          <RequiredProperties>
-            <Property
-              name="PointFieldsArrayInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </ArraySelectionDomain>
-        <Documentation>
-          This property lists which point-centered arrays to read.
-       </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="QuadratureFieldsArrayInfo"
-        information_only="1">
-        <ArraySelectionInformationHelper
-          attribute_name="QuadratureField" />
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="QuadratureFieldsArrayStatus"
-        command="SetQuadratureFieldArrayStatus"
-        number_of_elements="0"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="QuadratureFieldsArrayInfo"
-        label="Quadrature Point Arrays">
-        <ArraySelectionDomain
-          name="array_list">
-          <RequiredProperties>
-            <Property
-              name="QuadratureFieldsArrayInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </ArraySelectionDomain>
-        <Documentation>
-          This property lists which integration-point-centered arrays to read.
-       </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="ElnoFieldsArrayInfo"
-        information_only="1">
-        <ArraySelectionInformationHelper
-          attribute_name="ElnoField" />
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="ElnoFieldsArrayStatus"
-        command="SetElnoFieldArrayStatus"
-        number_of_elements="0"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="ElnoFieldsArrayInfo"
-        label="Elno Point Arrays">
-        <ArraySelectionDomain
-          name="array_list">
-          <RequiredProperties>
-            <Property
-              name="ElnoFieldsArrayInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </ArraySelectionDomain>
-        <Documentation>
-          This property lists which integration-point-centered arrays to read.
-       </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="Entity"
-        label="Entity"
-        command="SetEntityStatus"
-        number_of_elements="2"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="EntityInfo">
-        <SILDomain
-          name="array_list"
-          subtree="Entity">
-          <RequiredProperties>
-            <Property
-              name="EntityInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </SILDomain>
-        <Hints>
-          <!--
-            This overrides the GUI's default mechanism to not set the default value for this property using the domain
-            when the proxy is created
-          -->
-          <NoDefault />
-        </Hints>
-        <Documentation>
-          This property can be used to select the cell types to load.
-          Example : ['MED_CELL/MED_TRIA3']
-        </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="EntityInfo"
-        information_only="1">
-        <SILInformationHelper
-          timestamp_command="GetSILUpdateStamp"
-          subtree="Entity">
-        </SILInformationHelper>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="Groups"
-        label="Groups"
-        command="SetGroupStatus"
-        number_of_elements="2"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="GroupInfo">
-        <MedGroupSelectionDomain
-          name="array_list"
-          subtree="Groups">
-          <RequiredProperties>
-            <Property
-              name="GroupInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </MedGroupSelectionDomain>
-        <Documentation>
-          Set the groups on cells to be loaded.
-          Example : SetGroups(['GROUP/MAILLAGE/OnCell/GROUP_NAME',
-            'GROUP/MAILLAGE/OnPoints/GROUP_NAME']).
-        </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="GroupInfo"
-        information_only="1">
-        <SILInformationHelper
-          timestamp_command="GetSILUpdateStamp"
-          subtree="Groups">
-        </SILInformationHelper>
-      </StringVectorProperty>
-
-      <IntVectorProperty
-        name="SILUpdateStamp"
-        command="GetSILUpdateStamp"
-        information_only="1">
-        <SimpleIntInformationHelper />
-        <Documentation>
-          Information property indicating the update stamp of the SIL. Every
-          time the SIL is rebuild, this
-          time stamp is changed.
-        </Documentation>
-      </IntVectorProperty>
-
-      <IntVectorProperty
-        name="AnimationMode"
-        command="SetAnimationMode"
-        number_of_elements="1"
-        default_values="0">
-        <EnumerationDomain
-          name="enum">
-          <Entry value="0" text="Default" />
-          <Entry value="1" text="Times" />
-          <Entry value="2" text="Iterations" />
-          <Entry value="3" text="Modes" />
-        </EnumerationDomain>
-        <Documentation>
-          The animation modes defines how the animation controls of ParaView
-          browse the computing steps available in the med file.
-          Default : It is the same as "Times" if there is any time defined
-          in the med file.
-          It is the same as "Iteration" if there is no times but iterations.
-          Times : The reader advertise the availbale times in the med file.
-          If there are multiple iterations for a given time,
-          the reader will load the last one.
-          Iterations : You also have to specify the TimeIndexForIterations
-          parameter. The reader will then advertise iterations at the given
-          time index.
-          Modes : This mode is made for modal analysis post-processing : all
-          selected frequencies (use the FrequencyArrayStatus property)
-          are loaded so that the user can easily switch from
-          a frequency to another.
-          The reader reports no time but a time range of -PI/PI.
-        </Documentation>
-      </IntVectorProperty>
-
-      <DoubleVectorProperty
-        name="AvailableTimes"
-        command="GetAvailableTimes"
-        number_of_elements="2"
-        default_values="0 0"
-        information_only="1">
-        <DoubleArrayInformationHelper />
-      </DoubleVectorProperty>
-
-      <IntVectorProperty
-        name="TimeIndexForIterations"
-        command="SetTimeIndexForIterations"
-        number_of_elements="1"
-        default_values="0.0">
-      </IntVectorProperty>
-
-      <DoubleVectorProperty
-        name="TimestepValues"
-        repeatable="1"
-        information_only="1">
-        <TimeStepsInformationHelper />
-        <Documentation>
-          Available timestep values.
-        </Documentation>
-      </DoubleVectorProperty>
-
-      <StringVectorProperty
-        name="FrequencyArrayInfo"
-        information_only="1">
-        <ArraySelectionInformationHelper
-          attribute_name="Frequency" />
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="FrequencyArrayStatus"
-        command="SetFrequencyArrayStatus"
-        number_of_elements="0"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="FrequencyArrayInfo"
-        label="Frequencies">
-        <ArraySelectionDomain
-          name="array_list">
-          <RequiredProperties>
-            <Property
-              name="FrequencyArrayInfo"
-              function="ArrayList" />
-          </RequiredProperties>
-        </ArraySelectionDomain>
-        <Documentation>
-          This property lists which frequencies are in the med file for
-          modal analysis.
-       </Documentation>
-      </StringVectorProperty>
-
-      <IntVectorProperty
-        name="CacheStrategy"
-        command="SetCacheStrategy"
-        number_of_elements="1"
-        default_values="2">
-        <EnumerationDomain name="enum">
-          <Entry value="0" text="Nothing" />
-          <Entry value="1" text="Geometry" />
-          <Entry value="2" text="All" />
-        </EnumerationDomain>
-        <Documentation>
-          Set the strategy to cache data read from the disk.
-          0 : Nothing. The reader tries to minimize the memory footprint,
-            but will read data very often from the disk. Choose this if your
-            dataset is large and memory is an issue.
-          1 : Geometry. The reader will cache the geometry, but not field
-            values. A each time change, field values will be re-read from
-            disk. Good if your dataset fits in memory but not your time steps.
-          2 : All (Default). The reader will keep all the geometry and fields
-            read from disk over time. Choose this if memory is not an issue.
-        </Documentation>
-      </IntVectorProperty>
-
-      <IntVectorProperty
-        name="GenerateVectors"
-        command="SetGenerateVectors"
-        number_of_elements="1"
-        default_values="1">
-        <BooleanDomain name="bool"/>
-        <Documentation>
-          If this flag is set, the reader will generate a vector field for
-          each field in the file that has 2 or more components.
-          If the field has 2 components, a third compoenent with the value
-          0 will be added.
-          If the field has more than 3 components, the first 3 components will
-          be extracted.
-        </Documentation>
-      </IntVectorProperty>
-
-    </SourceProxy>
-  </ProxyGroup>
-
-  <ProxyGroup
-    name="filters">
-    <SourceProxy
-      name="ExtractGroup"
-      class="vtkExtractGroup"
-      label="Extract Group">
-
-     <InputProperty
-        name="Input"
-        command="SetInputConnection">
-           <ProxyGroupDomain name="groups">
-             <Group name="sources"/>
-             <Group name="filters"/>
-           </ProxyGroupDomain>
-           <DataTypeDomain name="input_type">
-             <DataType value="vtkMultiBlockDataSet"/>
-           </DataTypeDomain>
-           <Documentation>
-             This property specifies the input to the Level Scalars filter.
-           </Documentation>
-     </InputProperty>
-
-      <StringVectorProperty
-        name="Entity"
-        label="Cell Type"
-        command="SetEntityStatus"
-        number_of_elements="2"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="EntityInfo">
-        <SILDomain
-          name="array_list"
-          subtree="Entity">
-          <RequiredProperties>
-            <Property name="EntityInfo" function="ArrayList" />
-          </RequiredProperties>
-        </SILDomain>
-        <Hints>
-          <!--
-            This overrides the GUI's default mechanism to not set the default
-            value for this property using the domain
-            when the proxy is created
-          -->
-          <NoDefault />
-        </Hints>
-        <Documentation>
-          This property can be used to select the cell types to load.
-          Example : ['MED_MAILLE/MED_TRIA3']
-        </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="EntityInfo"
-        information_only="1">
-        <SILInformationHelper
-          timestamp_command="GetSILUpdateStamp"
-          subtree="Entitys">
-        </SILInformationHelper>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="Groups"
-        label="Groups"
-        command="SetGroupStatus"
-        number_of_elements="2"
-        repeat_command="1"
-        number_of_elements_per_command="2"
-        element_types="2 0"
-        information_property="GroupInfo">
-        <MedGroupSelectionDomain
-          name="array_list"
-          subtree="Groups">
-          <RequiredProperties>
-            <Property name="GroupInfo" function="ArrayList" />
-          </RequiredProperties>
-        </MedGroupSelectionDomain>
-
-        <Documentation>
-          Set the groups on cells to be loaded.
-          Example : SetGroups(['GROUP/MAILLAGE/OnCell/GROUP_NAME',
-            'GROUP/MAILLAGE/OnPoints/GROUP_NAME']).
-        </Documentation>
-      </StringVectorProperty>
-
-      <StringVectorProperty
-        name="GroupInfo"
-        information_only="1">
-        <SILInformationHelper
-          timestamp_command="GetSILUpdateStamp"
-          subtree="Groups">
-        </SILInformationHelper>
-      </StringVectorProperty>
-
-      <IntVectorProperty
-        name="SILUpdateStamp"
-        command="GetSILUpdateStamp"
-        information_only="1">
-        <SimpleIntInformationHelper />
-        <Documentation>
-          Information property indicating the update stamp of the SIL. Every
-          time the SIL is rebuild, this
-          time stamp is changed.
-        </Documentation>
-      </IntVectorProperty>
-
-      <IntVectorProperty
-        name="PruneOutput"
-        command="SetPruneOutput"
-        number_of_elements="1"
-        default_values="1">
-        <BooleanDomain name="bool" />
-        <Documentation>
-          If set to true, this filter will prune the empty parts in the output.
-          If not, empty datasets will be kept.
-        </Documentation>
-      </IntVectorProperty>
-
-    </SourceProxy>
-    <SourceProxy
-      name="GenerateStructuralElement"
-      class="vtkGenerateStructElement"
-      label="Generate Structural Element">
-
-     <InputProperty
-        name="Input"
-        command="SetInputConnection">
-           <ProxyGroupDomain name="groups">
-             <Group name="sources"/>
-             <Group name="filters"/>
-           </ProxyGroupDomain>
-           <DataTypeDomain name="input_type">
-             <DataType value="vtkUnstructuredGrid"/>
-           </DataTypeDomain>
-           <Documentation>
-             This property specifies the input to the Generate Structural Element filter.
-           </Documentation>
-     </InputProperty>
-
-    </SourceProxy>
-  </ProxyGroup>
-</ServerManagerConfiguration>
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui b/src/Plugins/MedReader/ParaViewPlugin/Resources/UI/ExtractGroupPanel.ui
deleted file mode 100644 (file)
index 5913a23..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ExtractGroupPanel</class>
- <widget class="QWidget" name="ExtractGroupPanel">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>649</width>
-    <height>786</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <property name="margin">
-    <number>9</number>
-   </property>
-   <item row="0" column="0" colspan="2">
-    <widget class="QGroupBox" name="geometryGroupBox">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>1</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Supports</string>
-     </property>
-     <layout class="QVBoxLayout">
-      <property name="spacing">
-       <number>6</number>
-      </property>
-      <property name="margin">
-       <number>9</number>
-      </property>
-      <item>
-       <widget class="QTabWidget" name="tabWidget">
-        <property name="enabled">
-         <bool>true</bool>
-        </property>
-        <property name="currentIndex">
-         <number>1</number>
-        </property>
-        <widget class="QWidget" name="groupTab">
-         <attribute name="title">
-          <string>Group</string>
-         </attribute>
-         <layout class="QVBoxLayout" name="verticalLayout">
-          <item>
-           <widget class="pqTreeView" name="Groups">
-            <property name="minimumSize">
-             <size>
-              <width>0</width>
-              <height>100</height>
-             </size>
-            </property>
-            <property name="selectionMode">
-             <enum>QAbstractItemView::ExtendedSelection</enum>
-            </property>
-            <property name="rootIsDecorated">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="cellTypesTab">
-         <attribute name="title">
-          <string>Cell Type</string>
-         </attribute>
-         <layout class="QHBoxLayout" name="horizontalLayout_2">
-          <item>
-           <widget class="pqTreeView" name="Entity">
-            <property name="minimumSize">
-             <size>
-              <width>0</width>
-              <height>100</height>
-             </size>
-            </property>
-            <property name="selectionMode">
-             <enum>QAbstractItemView::ExtendedSelection</enum>
-            </property>
-            <property name="rootIsDecorated">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QCheckBox" name="PruneOutput">
-     <property name="text">
-      <string>Prune Output</string>
-     </property>
-     <property name="checked">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>pqTreeView</class>
-   <extends>QTreeView</extends>
-   <header>pqTreeView.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
- <designerdata>
-  <property name="gridDeltaX">
-   <number>10</number>
-  </property>
-  <property name="gridDeltaY">
-   <number>10</number>
-  </property>
-  <property name="gridSnapX">
-   <bool>false</bool>
-  </property>
-  <property name="gridSnapY">
-   <bool>false</bool>
-  </property>
-  <property name="gridVisible">
-   <bool>true</bool>
-  </property>
- </designerdata>
-</ui>
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/UI/MedReaderPanel.ui b/src/Plugins/MedReader/ParaViewPlugin/Resources/UI/MedReaderPanel.ui
deleted file mode 100644 (file)
index 4faaa55..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MedReaderPanel</class>
- <widget class="QWidget" name="MedReaderPanel">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>649</width>
-    <height>839</height>
-   </rect>
-  </property>
-  <property name="sizePolicy">
-   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-    <horstretch>0</horstretch>
-    <verstretch>0</verstretch>
-   </sizepolicy>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <property name="margin">
-    <number>9</number>
-   </property>
-   <item row="0" column="0" colspan="3">
-    <widget class="QGroupBox" name="geometryGroupBox">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>1</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Supports</string>
-     </property>
-     <layout class="QVBoxLayout">
-      <property name="spacing">
-       <number>6</number>
-      </property>
-      <property name="margin">
-       <number>9</number>
-      </property>
-      <item>
-       <widget class="QTabWidget" name="tabWidget">
-        <property name="enabled">
-         <bool>true</bool>
-        </property>
-        <property name="currentIndex">
-         <number>1</number>
-        </property>
-        <widget class="QWidget" name="groupTab">
-         <attribute name="title">
-          <string>Group</string>
-         </attribute>
-         <layout class="QVBoxLayout" name="verticalLayout">
-          <item>
-           <widget class="pqTreeView" name="Groups">
-            <property name="minimumSize">
-             <size>
-              <width>0</width>
-              <height>100</height>
-             </size>
-            </property>
-            <property name="selectionMode">
-             <enum>QAbstractItemView::ExtendedSelection</enum>
-            </property>
-            <property name="rootIsDecorated">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-        <widget class="QWidget" name="entityTab">
-         <attribute name="title">
-          <string>Cell Type</string>
-         </attribute>
-         <layout class="QHBoxLayout" name="horizontalLayout_2">
-          <item>
-           <widget class="pqTreeView" name="Entity">
-            <property name="minimumSize">
-             <size>
-              <width>0</width>
-              <height>100</height>
-             </size>
-            </property>
-            <property name="selectionMode">
-             <enum>QAbstractItemView::ExtendedSelection</enum>
-            </property>
-            <property name="rootIsDecorated">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="0">
-    <widget class="QGroupBox" name="fieldsGroupBox">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-       <horstretch>0</horstretch>
-       <verstretch>1</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Fields</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_4">
-      <property name="spacing">
-       <number>6</number>
-      </property>
-      <property name="margin">
-       <number>9</number>
-      </property>
-      <item>
-       <widget class="pqTreeWidget" name="Variables">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>100</height>
-         </size>
-        </property>
-        <property name="rootIsDecorated">
-         <bool>false</bool>
-        </property>
-        <column>
-         <property name="text">
-          <string>Variables</string>
-         </property>
-        </column>
-       </widget>
-      </item>
-      <item>
-       <widget class="QCheckBox" name="GenerateVectors">
-        <property name="text">
-         <string>Generate Vectors</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="1" column="1">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>0</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="4" column="0" rowspan="2">
-    <widget class="QGroupBox" name="timeGroupBox">
-     <property name="title">
-      <string>Animation</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_3">
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout_3">
-        <item>
-         <widget class="QLabel" name="AnimationModeLabel">
-          <property name="text">
-           <string>Animation Mode</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="AnimationModeCombo"/>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <layout class="QHBoxLayout" name="TimeLayout">
-        <item>
-         <widget class="QLabel" name="TimeLabel">
-          <property name="text">
-           <string>Time</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="TimeCombo"/>
-        </item>
-       </layout>
-      </item>
-      <item>
-       <widget class="pqTreeWidget" name="Modes">
-        <property name="minimumSize">
-         <size>
-          <width>0</width>
-          <height>100</height>
-         </size>
-        </property>
-        <property name="rootIsDecorated">
-         <bool>false</bool>
-        </property>
-        <column>
-         <property name="text">
-          <string>Modes</string>
-         </property>
-        </column>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="5" column="1">
-    <spacer>
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>0</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="6" column="0">
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>Cache</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout">
-        <item>
-         <widget class="QLabel" name="strategyLabel">
-          <property name="text">
-           <string>Strategy</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="CacheStrategy"/>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>pqTreeWidget</class>
-   <extends>QTreeWidget</extends>
-   <header>pqTreeWidget.h</header>
-  </customwidget>
-  <customwidget>
-   <class>pqTreeView</class>
-   <extends>QTreeView</extends>
-   <header>pqTreeView.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
- <designerdata>
-  <property name="gridDeltaX">
-   <number>10</number>
-  </property>
-  <property name="gridDeltaY">
-   <number>10</number>
-  </property>
-  <property name="gridSnapX">
-   <bool>false</bool>
-  </property>
-  <property name="gridSnapY">
-   <bool>false</bool>
-  </property>
-  <property name="gridVisible">
-   <bool>true</bool>
-  </property>
- </designerdata>
-</ui>
diff --git a/src/Plugins/MedReader/ParaViewPlugin/Resources/pqMedReader.qrc b/src/Plugins/MedReader/ParaViewPlugin/Resources/pqMedReader.qrc
deleted file mode 100644 (file)
index bb1f914..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
-    <qresource prefix="/ParaViewResources">
-        <file>Icons/pqCellData16.png</file>
-        <file>Icons/pqPointData16.png</file>
-        <file>Icons/pqQuadratureData16.png</file>
-        <file>MedReaderClient.xml</file>
-        <file>Icons/pqElnoData16.png</file>
-    </qresource>
-</RCC>
diff --git a/src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.cxx b/src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.cxx
deleted file mode 100644 (file)
index 6ee8bd4..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "pqExtractGroupPanel.h"
-#include "ui_ExtractGroupPanel.h"
-
-#include "vtkProcessModule.h"
-#include "vtkMultiBlockDataSet.h"
-#include "vtkInformation.h"
-#include "vtkIntArray.h"
-#include "vtkSMDoubleVectorProperty.h"
-#include "vtkSMIntVectorProperty.h"
-#include "vtkSMStringVectorProperty.h"
-#include "vtkSMProxy.h"
-#include "vtkEventQtSlotConnect.h"
-#include "vtkPVSILInformation.h"
-#include "vtkGraph.h"
-#include "vtkSMPropertyHelper.h"
-#include "vtkStringArray.h"
-#include "vtkDataSetAttributes.h"
-
-#include "vtkMedUtilities.h"
-
-#include "pqTreeWidget.h"
-#include "pqTreeWidgetItemObject.h"
-#include "pqSMAdaptor.h"
-#include "pqProxy.h"
-#include "pqPropertyManager.h"
-#include "pqSILModel.h"
-#include "pqProxySILModel.h"
-#include "pqTreeViewSelectionHelper.h"
-#include "pqTreeWidgetSelectionHelper.h"
-#include "pqPropertyLinks.h"
-
-#include <QHeaderView>
-
-class pqExtractGroupPanel::pqUI : public QObject, public Ui::ExtractGroupPanel
-{
-public:
-  pqUI(pqExtractGroupPanel* p) :
-    QObject(p)
-  {
-    this->VTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
-    this->SILUpdateStamp = -1;
-  }
-
-  ~pqUI()
-  {
-  }
-
-  pqSILModel SILModel;
-  vtkSmartPointer<vtkEventQtSlotConnect> VTKConnect;
-  pqPropertyLinks Links;
-  pqProxySILModel* entityModel;
-  pqProxySILModel* groupModel;
-  int SILUpdateStamp;
-};
-
-pqExtractGroupPanel::pqExtractGroupPanel(pqProxy* object_proxy, QWidget* p) :
-  Superclass(object_proxy, p)
-{
-  this->UI = new pqUI(this);
-  this->UI->setupUi(this);
-
-  pqProxySILModel* proxyModel;
-
-  // connect groups to groupsRoot
-  proxyModel = new pqProxySILModel("GroupTree", &this->UI->SILModel);
-  proxyModel->setSourceModel(&this->UI->SILModel);
-  this->UI->Groups->setModel(proxyModel);
-  this->UI->Groups->setHeaderHidden(true);
-
-  this->UI->groupModel = new pqProxySILModel("Groups", &this->UI->SILModel);
-  this->UI->groupModel->setSourceModel(&this->UI->SILModel);
-
-  // connect cell types to "EntityRoot"
-  proxyModel = new pqProxySILModel("EntityTree", &this->UI->SILModel);
-  proxyModel->setSourceModel(&this->UI->SILModel);
-  this->UI->Entity->setModel(proxyModel);
-  this->UI->Entity->setHeaderHidden(true);
-
-  this->UI->entityModel = new pqProxySILModel("Entity", &this->UI->SILModel);
-  this->UI->entityModel->setSourceModel(&this->UI->SILModel);
-
-  this->updateSIL();
-
-  this->UI->Groups->header()->setStretchLastSection(true);
-  this->UI->Entity->header()->setStretchLastSection(true);
-
-  this->linkServerManagerProperties();
-
-  QList<pqTreeWidget*> treeWidgets = this->findChildren<pqTreeWidget*> ();
-  foreach (pqTreeWidget* tree, treeWidgets)
-      {
-      new pqTreeWidgetSelectionHelper(tree);
-      }
-
-  QList<pqTreeView*> treeViews = this->findChildren<pqTreeView*> ();
-  foreach (pqTreeView* tree, treeViews)
-      {
-      new pqTreeViewSelectionHelper(tree);
-      }
-
-  this->connect(this->UI->groupModel, SIGNAL(valuesChanged()),
-                this, SLOT(setModified()));
-  this->connect(this->UI->entityModel, SIGNAL(valuesChanged()),
-                this, SLOT(setModified()));
-
-  this->UI->tabWidget->setCurrentIndex(0);
-
-  this->UI->VTKConnect->Connect(this->proxy(),
-      vtkCommand::UpdateInformationEvent, this, SLOT(updateSIL()));
-
-}
-
-pqExtractGroupPanel::~pqExtractGroupPanel()
-{
-}
-
-void pqExtractGroupPanel::linkServerManagerProperties()
-{
-  this->UI->Links.addPropertyLink(this->UI->groupModel, "values",
-      SIGNAL(valuesChanged()), this->proxy(), this->proxy()->GetProperty(
-          "Groups"));
-
-  this->UI->Links.addPropertyLink(this->UI->entityModel, "values",
-      SIGNAL(valuesChanged()), this->proxy(), this->proxy()->GetProperty(
-          "Entity"));
-
-  this->Superclass::linkServerManagerProperties();
-
-}
-
-void pqExtractGroupPanel::updateSIL()
-{
-/* VSR???????? 
-//<<<<<<< HEAD:ParaViewPlugin/pqExtractGroupPanel.cxx
-
-  this->proxy()->UpdatePropertyInformation(
-      this->proxy()->GetProperty("SILUpdateStamp"));
-//=======
-//>>>>>>> medparallel:ParaViewPlugin/pqExtractGroupPanel.cxx
-*/
-  vtkSMProxy* reader = this->referenceProxy()->getProxy();
-  reader->UpdatePropertyInformation(reader->GetProperty("SILUpdateStamp"));
-
-  int stamp = vtkSMPropertyHelper(reader, "SILUpdateStamp").GetAsInt();
-  if (stamp != this->UI->SILUpdateStamp)
-    {
-    this->UI->SILUpdateStamp = stamp;
-    vtkPVSILInformation* info = vtkPVSILInformation::New();
-    reader->GatherInformation(info);
-    this->UI->SILModel.update(info->GetSIL());
-
-    this->UI->Groups->expandAll();
-    this->UI->Entity->expandAll();
-
-    info->Delete();
-    }
-
-}
diff --git a/src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.h b/src/Plugins/MedReader/ParaViewPlugin/pqExtractGroupPanel.h
deleted file mode 100644 (file)
index 537bbcd..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _pqExtractGroupPanel_h
-#define _pqExtractGroupPanel_h
-
-#include "pqNamedObjectPanel.h"
-
-#include <QTreeWidget>
-class pqTreeWidgetItemObject;
-
-class vtkSMProperty;
-
-class pqExtractGroupPanel: public pqNamedObjectPanel
-{
-Q_OBJECT
-  typedef pqNamedObjectPanel Superclass;
-public:
-  /// constructor
-  pqExtractGroupPanel(pqProxy* proxy, QWidget* p = NULL);
-  /// destructor
-  ~pqExtractGroupPanel();
-
-public slots:
-  // accept changes made by this panel
-  //virtual void accept();
-  // reset changes made by this panel
-  //virtual void reset();
-
-protected slots:
-
-  void updateSIL();
-
-protected:
-  /// populate widgets with properties from the server manager
-  virtual void linkServerManagerProperties();
-
-  class pqUI;
-  pqUI* UI;
-};
-
-#endif
-
diff --git a/src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.cxx b/src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.cxx
deleted file mode 100644 (file)
index 037183b..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "pqMedReaderPanel.h"
-#include "ui_MedReaderPanel.h"
-
-#include "vtkProcessModule.h"
-#include "vtkMultiBlockDataSet.h"
-#include "vtkInformation.h"
-#include "vtkIntArray.h"
-#include "vtkSMDoubleVectorProperty.h"
-#include "vtkSMIntVectorProperty.h"
-#include "vtkSMStringVectorProperty.h"
-#include "vtkSMProxy.h"
-#include "vtkEventQtSlotConnect.h"
-#include "vtkPVSILInformation.h"
-#include "vtkGraph.h"
-#include "vtkSMPropertyHelper.h"
-#include "vtkStringArray.h"
-#include "vtkDataSetAttributes.h"
-#include "vtkMedReader.h"
-
-#include "vtkMedUtilities.h"
-
-#include "pqTreeWidgetItemObject.h"
-#include "pqSMAdaptor.h"
-#include "pqProxy.h"
-#include "pqPropertyManager.h"
-#include "pqSILModel.h"
-#include "pqProxySILModel.h"
-#include "pqTreeViewSelectionHelper.h"
-#include "pqTreeWidgetSelectionHelper.h"
-#include "pqPropertyLinks.h"
-
-#include <QHeaderView>
-
-class pqMedReaderPanel::pqUI: public QObject, public Ui::MedReaderPanel
-{
-public:
-  pqUI(pqMedReaderPanel* p) :
-    QObject(p)
-  {
-    this->VTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
-    this->SILUpdateStamp = -1;
-  }
-
-  ~pqUI()
-  {
-  }
-
-  pqSILModel SILModel;
-  vtkSmartPointer<vtkEventQtSlotConnect> VTKConnect;
-  pqPropertyLinks Links;
-  QMap<QTreeWidgetItem*, QString> TreeItemToPropMap;
-  pqProxySILModel* entityModel;
-  pqProxySILModel* groupModel;
-  int SILUpdateStamp;
-};
-
-pqMedReaderPanel::pqMedReaderPanel(pqProxy* object_proxy, QWidget* p) :
-  Superclass(object_proxy, p)
-{
-  this->UI = new pqUI(this);
-  this->UI->setupUi(this);
-
-  pqProxySILModel* proxyModel;
-
-  // connect groups to groupsRoot
-  proxyModel = new pqProxySILModel("GroupTree", &this->UI->SILModel);
-  proxyModel->setSourceModel(&this->UI->SILModel);
-  this->UI->Groups->setModel(proxyModel);
-  this->UI->Groups->setHeaderHidden(true);
-
-  this->UI->groupModel = new pqProxySILModel("Groups", &this->UI->SILModel);
-  this->UI->groupModel->setSourceModel(&this->UI->SILModel);
-
-  // connect cell types to "EntityRoot"
-  proxyModel = new pqProxySILModel("EntityTree", &this->UI->SILModel);
-  proxyModel->setSourceModel(&this->UI->SILModel);
-  this->UI->Entity->setModel(proxyModel);
-  this->UI->Entity->setHeaderHidden(true);
-
-  this->UI->entityModel = new pqProxySILModel("Entity", &this->UI->SILModel);
-  this->UI->entityModel->setSourceModel(&this->UI->SILModel);
-
-  this->updateSIL();
-
-  this->UI->Groups->header()->setStretchLastSection(true);
-  this->UI->Entity->header()->setStretchLastSection(true);
-
-  this->linkServerManagerProperties();
-
-  QList<pqTreeWidget*> treeWidgets = this->findChildren<pqTreeWidget*> ();
-  foreach (pqTreeWidget* tree, treeWidgets)
-      {
-      new pqTreeWidgetSelectionHelper(tree);
-      }
-
-  QList<pqTreeView*> treeViews = this->findChildren<pqTreeView*> ();
-  foreach (pqTreeView* tree, treeViews)
-      {
-      new pqTreeViewSelectionHelper(tree);
-      }
-
-  this->connect(this->UI->groupModel, SIGNAL(valuesChanged()),
-                this, SLOT(setModified()));
-  this->connect(this->UI->entityModel, SIGNAL(valuesChanged()),
-                this, SLOT(setModified()));
-  this->connect(this->UI->TimeCombo, SIGNAL(currentIndexChanged(int)),
-                this, SLOT(setModified()));
-  this->connect(this->UI->GenerateVectors, SIGNAL(stateChanged(int)),
-                this, SLOT(setModified()));
-
-  this->UI->tabWidget->setCurrentIndex(0);
-
-  this->UI->VTKConnect->Connect(this->proxy(),
-      vtkCommand::UpdateInformationEvent, this, SLOT(updateSIL()));
-}
-
-pqMedReaderPanel::~pqMedReaderPanel()
-{
-}
-
-void pqMedReaderPanel::addSelectionsToTreeWidget(const QString& prop,
-    QTreeWidget* tree, PixmapType pix)
-{
-  vtkSMProperty* SMProperty = this->proxy()->GetProperty(prop.toAscii().data());
-  QList<QVariant> SMPropertyDomain;
-  SMPropertyDomain = pqSMAdaptor::getSelectionPropertyDomain(SMProperty);
-  int j;
-  for(j = 0; j < SMPropertyDomain.size(); j++)
-    {
-    QString varName = SMPropertyDomain[j].toString();
-    this->addSelectionToTreeWidget(varName, varName, tree, pix, prop, j);
-    }
-}
-
-void pqMedReaderPanel::addSelectionToTreeWidget(const QString& name,
-    const QString& realName, QTreeWidget* tree, PixmapType pix,
-    const QString& prop, int propIdx)
-{
-  static QPixmap pixmaps[] = {
-    QPixmap(":/ParaViewResources/Icons/pqPointData16.png"),
-    QPixmap(":/ParaViewResources/Icons/pqCellData16.png"),
-    QPixmap(":/ParaViewResources/Icons/pqQuadratureData16.png"),
-    QPixmap(":/ParaViewResources/Icons/pqElnoData16.png") };
-
-  vtkSMProperty* SMProperty = this->proxy()->GetProperty(prop.toAscii().data());
-
-  if(!SMProperty || !tree)
-    {
-    return;
-    }
-
-  QList<QString> strs;
-  strs.append(name);
-  pqTreeWidgetItemObject* item;
-  item = new pqTreeWidgetItemObject(tree, strs);
-  item->setData(0, Qt::ToolTipRole, name);
-  if(pix >= 0)
-    {
-    item->setData(0, Qt::DecorationRole, pixmaps[pix]);
-    }
-  item->setData(0, Qt::UserRole, QString("%1 %2").arg((int) pix).arg(realName));
-  this->propertyManager()->registerLink(item, "checked",
-      SIGNAL(checkedStateChanged(bool)), this->proxy(), SMProperty, propIdx);
-
-  this->UI->TreeItemToPropMap[item] = prop;
-}
-
-void pqMedReaderPanel::linkServerManagerProperties()
-{
-  this->UI->Links.addPropertyLink(this->UI->groupModel, "values",
-      SIGNAL(valuesChanged()), this->proxy(), this->proxy()->GetProperty(
-          "Groups"));
-
-  this->UI->Links.addPropertyLink(this->UI->entityModel, "values",
-      SIGNAL(valuesChanged()), this->proxy(), this->proxy()->GetProperty(
-          "Entity"));
-
-  this->UI->Links.addPropertyLink(this->UI->GenerateVectors, "checked",
-      SIGNAL(toggled(bool)), this->proxy(), this->proxy()->GetProperty(
-          "GenerateVectors"));
-
-  this->Superclass::linkServerManagerProperties();
-
-  // do the point variables
-  this->addSelectionsToTreeWidget("PointFieldsArrayStatus",
-      this->UI->Variables, PM_POINT);
-  // do the cell variables
-  this->addSelectionsToTreeWidget("CellFieldsArrayStatus", this->UI->Variables,
-      PM_CELL);
-  // do the quadrature variables
-  this->addSelectionsToTreeWidget("QuadratureFieldsArrayStatus",
-      this->UI->Variables, PM_QUADRATURE);
-
-  // do the Elno variables
-  this->addSelectionsToTreeWidget("ElnoFieldsArrayStatus",
-      this->UI->Variables, PM_ELNO);
-  this->setupAnimationModeWidget();
-}
-
-void pqMedReaderPanel::setupAnimationModeWidget()
-{
-  this->UI->AnimationModeCombo->clear();
-  QList<QVariant> modes = pqSMAdaptor::getEnumerationPropertyDomain(
-      this->proxy()->GetProperty("AnimationMode"));
-  for(int mode = 0; mode < modes.size(); mode++)
-    {
-    QString modeName = modes[mode].toString();
-    this->UI->AnimationModeCombo->addItem(modeName);
-    }
-
-  this->UI->Links.addPropertyLink(this->UI->AnimationModeCombo, "currentIndex",
-      SIGNAL(currentIndexChanged(int)), this->proxy(),
-      this->proxy()->GetProperty("AnimationMode"));
-
-  this->connect(this->UI->AnimationModeCombo,
-      SIGNAL(currentIndexChanged(int)), this, SLOT(animationModeChanged(int)));
-
-  this->UI->Links.addPropertyLink(this->UI->TimeCombo, "currentIndex",
-      SIGNAL(currentIndexChanged(int)), this->proxy(),
-      this->proxy()->GetProperty("TimeIndexForIterations"));
-
-  this->addSelectionsToTreeWidget("FrequencyArrayStatus",
-      this->UI->Modes, PM_NONE);
-
-  vtkSMPropertyHelper helper(this->proxy(), "AnimationMode");
-  int mode = helper.GetAsInt(0);
-  this->animationModeChanged(mode);
-  this->updateAvailableTimes();
-}
-
-void pqMedReaderPanel::animationModeChanged(int mode)
-{
-  if(mode == vtkMedReader::Default || mode == vtkMedReader::PhysicalTime)
-    {
-    this->UI->TimeCombo->hide();
-    this->UI->TimeLabel->hide();
-    this->UI->Modes->hide();
-    }
-  else if(mode == vtkMedReader::Iteration)
-    {
-    this->UI->TimeCombo->show();
-    this->UI->TimeLabel->show();
-    this->UI->Modes->hide();
-    }
-  else // vtkMedReader::Modes
-    {
-    this->UI->TimeCombo->hide();
-    this->UI->TimeLabel->hide();
-    this->UI->Modes->show();
-    }
-  vtkSMPropertyHelper(this->proxy(), "AnimationMode").Set(mode);
-  this->proxy()->UpdateVTKObjects();
-  this->setModified();
-}
-
-void pqMedReaderPanel::updateAvailableTimes()
-{
-  vtkSMDoubleVectorProperty* prop = vtkSMDoubleVectorProperty::SafeDownCast(
-      this->proxy()->GetProperty("AvailableTimes"));
-
-  this->proxy()->UpdatePropertyInformation(prop);
-
-  //prop->GetInformationHelper()->UpdateProperty(
-  //    vtkProcessModuleConnectionManager::GetRootServerConnectionID(),
-  //    vtkProcessModule::DATA_SERVER,
-  //    this->proxy()->GetID(),
-  //    prop);
-
-  this->UI->TimeCombo->clear();
-  double *aux = prop->GetElements();
-
-  for(int tid = 0; tid < prop->GetNumberOfElements(); tid++)
-    {
-    this->UI->TimeCombo->addItem( QString::number(aux[tid]) );
-    }
-
-}
-
-void pqMedReaderPanel::updateSIL()
-{
-  vtkSMProxy* reader = this->referenceProxy()->getProxy();
-  reader->UpdatePropertyInformation(reader->GetProperty("SILUpdateStamp"));
-
-  int stamp = vtkSMPropertyHelper(reader, "SILUpdateStamp").GetAsInt();
-  if (stamp != this->UI->SILUpdateStamp)
-    {
-    this->UI->SILUpdateStamp = stamp;
-    vtkPVSILInformation* info = vtkPVSILInformation::New();
-    reader->GatherInformation(info);
-    this->UI->SILModel.update(info->GetSIL());
-
-    this->UI->Groups->expandAll();
-    this->UI->Entity->expandAll();
-
-    info->Delete();
-    }
-
-  /*
-  this->proxy()->UpdatePropertyInformation(
-      this->proxy()->GetProperty("SILUpdateStamp"));
-
-  int stamp = vtkSMPropertyHelper(this->proxy(), "SILUpdateStamp").GetAsInt();
-  if(stamp != this->UI->SILUpdateStamp)
-    {
-    this->UI->SILUpdateStamp = stamp;
-
-    vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
-    vtkPVSILInformation* info = vtkPVSILInformation::New();
-    pm->GatherInformation(this->proxy()->GetConnectionID(),
-        vtkProcessModule::DATA_SERVER, info, this->proxy()->GetID());
-
-    this->UI->SILModel.update(info->GetSIL());
-
-    this->UI->Groups->expandAll();
-    this->UI->Entity->expandAll();
-
-    info->Delete();
-    }*/
-}
diff --git a/src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.h b/src/Plugins/MedReader/ParaViewPlugin/pqMedReaderPanel.h
deleted file mode 100644 (file)
index 22e38cd..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _pqMedReaderPanel_h
-#define _pqMedReaderPanel_h
-
-#include "pqNamedObjectPanel.h"
-
-#include <QTreeWidget>
-class pqTreeWidgetItemObject;
-
-class vtkSMProperty;
-
-class pqMedReaderPanel: public pqNamedObjectPanel
-{
-Q_OBJECT
-  typedef pqNamedObjectPanel Superclass;
-public:
-  /// constructor
-  pqMedReaderPanel(pqProxy* proxy, QWidget* p = NULL);
-  /// destructor
-  ~pqMedReaderPanel();
-
-protected slots:
-  void animationModeChanged(int mode);
-
-  // void timeComboChanged(int timeStep);
-
-  void updateSIL();
-
-protected:
-  /// populate widgets with properties from the server manager
-  virtual void linkServerManagerProperties();
-
-  enum PixmapType
-  {
-    PM_NONE = -1,
-    PM_POINT,
-    PM_CELL,
-    PM_QUADRATURE,
-    PM_ELNO
-  };
-
-  void addSelectionsToTreeWidget(const QString& prop,
-      QTreeWidget* tree, PixmapType pix);
-
-  void addSelectionToTreeWidget(const QString& name,
-      const QString& realName, QTreeWidget* tree, PixmapType pix,
-      const QString& prop, int propIdx);
-
-  void setupAnimationModeWidget();
-  void updateAvailableTimes();
-
-  class pqUI;
-  pqUI* UI;
-};
-
-#endif
diff --git a/src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.cxx b/src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.cxx
deleted file mode 100644 (file)
index 35e4fa2..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "vtkSMMedGroupSelectionDomain.h"
-
-#include "vtkObjectFactory.h"
-#include "vtkSMStringVectorProperty.h"
-#include "vtkStringList.h"
-
-#include <string>
-using std::string;
-
-vtkStandardNewMacro(vtkSMMedGroupSelectionDomain);
-
-vtkSMMedGroupSelectionDomain::vtkSMMedGroupSelectionDomain()
-{
-}
-
-vtkSMMedGroupSelectionDomain::~vtkSMMedGroupSelectionDomain()
-{
-}
-
-int vtkSMMedGroupSelectionDomain::SetDefaultValues(vtkSMProperty* prop)
-{
-  vtkSMStringVectorProperty* svp = vtkSMStringVectorProperty::SafeDownCast(prop);
-  if(!svp || this->GetNumberOfRequiredProperties() == 0)
-    {
-    return this->Superclass::SetDefaultValues(prop);
-    }
-
-  // info property has default values
-  vtkSMStringVectorProperty* isvp = vtkSMStringVectorProperty::SafeDownCast(
-    prop->GetInformationProperty());
-  if (isvp)
-    {
-    vtkStringList* proplist = vtkStringList::New();
-    svp->SetNumberOfElements(0);
-    svp->SetNumberOfElementsPerCommand(2);
-    for(int id=0; id<isvp->GetNumberOfElements(); id++)
-      {
-      string elem = isvp->GetElement(id);
-      proplist->AddString(elem.c_str());
-      if(elem.find("/OnCell/") != string::npos)
-        {
-        proplist->AddString("1");
-        }
-      else
-        {
-        proplist->AddString("0");
-        }
-      }
-    svp->SetElements(proplist);
-    proplist->Delete();
-    }
-
-  return 1;
-}
-
-void vtkSMMedGroupSelectionDomain::PrintSelf(ostream& os, vtkIndent indent)
-{
-  this->Superclass::PrintSelf(os, indent);
-}
diff --git a/src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.h b/src/Plugins/MedReader/ParaViewPlugin/vtkSMMedGroupSelectionDomain.h
deleted file mode 100644 (file)
index f9c9d46..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2010-2013  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// .NAME vtkSMMedGroupSelectionDompain - domain used to
-// select groups from med files.
-// .SECTION Description
-// This property overrides the SetDefaultValues to select only cell groups
-
-#ifndef __vtkSMMedGroupSelectionDomain_h
-#define __vtkSMMedGroupSelectionDomain_h
-
-#include "vtkSMSILDomain.h"
-
-class VTK_EXPORT vtkSMMedGroupSelectionDomain : public vtkSMSILDomain
-{
-public:
-  static vtkSMMedGroupSelectionDomain* New();
-  vtkTypeMacro(vtkSMMedGroupSelectionDomain, vtkSMSILDomain);
-  void PrintSelf(ostream& os, vtkIndent indent);
-
-  virtual int SetDefaultValues(vtkSMProperty*);
-
-protected:
-  vtkSMMedGroupSelectionDomain();
-  ~vtkSMMedGroupSelectionDomain();
-
-private:
-  vtkSMMedGroupSelectionDomain(const vtkSMMedGroupSelectionDomain&);
-    // Not implemented
-  void operator=(const vtkSMMedGroupSelectionDomain&); // Not implemented
-};
-
-#endif
diff --git a/src/Plugins/MedReader/plugin.cmake b/src/Plugins/MedReader/plugin.cmake
deleted file mode 100644 (file)
index 7d1291e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-pv_plugin(MedReader
-  # provide a description for the plugin.
-  DESCRIPTION "Reads the MED data format from Electricite de France"
-  PLUGIN_NAMES MedReader
-  DEFAULT_ENABLED)
index 35a53b3772906e238d044769f5980bae7c6d9561..b866c28f4557a12273f767857a407a0c975a7923 100644 (file)
@@ -34,7 +34,7 @@ PROJECT( ParaMEDCorba )
     
     INCLUDE( ${PARAVIEW_USE_FILE} )
 
-    FIND_PACKAGE( VTK 6.0 COMPONENTS vtkClientServer NO_MODULE)
+    FIND_PACKAGE( VTK 6.1 COMPONENTS vtkClientServer NO_MODULE)
     INCLUDE( ${VTK_USE_FILE} )
 
     SET( PARACORBAPLUG_SRCS
index a6c44384643e91c14e63d90f9b2b3e175f3ee5dc..2ff339a722a8a10dee5965056bf393015c54cb41 100644 (file)
@@ -9,7 +9,7 @@
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_SUBMINOR_VERSION 37
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
 
 /* end standard C headers. */
 
+#ifndef __cplusplus
+extern int isatty(int);
+#endif /* __cplusplus */
+
 /* flex integer type definitions */
 
 #ifndef FLEXINT_H
@@ -54,7 +58,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -85,6 +88,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -373,8 +378,8 @@ static void yy_fatal_error (yyconst char msg[]  );
         *yy_cp = '\0'; \
         (yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 173
-#define YY_END_OF_BUFFER 174
+#define YY_NUM_RULES 199
+#define YY_END_OF_BUFFER 200
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -382,131 +387,155 @@ struct yy_trans_info
         flex_int32_t yy_verify;
         flex_int32_t yy_nxt;
         };
-static yyconst flex_int16_t yy_accept[1116] =
+static yyconst flex_int16_t yy_accept[1339] =
     {   0,
-        0,    0,  174,  172,  142,  143,  143,  171,  172,  171,
-      171,  172,  171,  171,  171,  171,  171,  171,  171,  140,
-      139,  171,  171,  171,  171,  133,  133,  133,  133,  133,
-      133,  169,  172,  170,  171,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  171,  142,   11,   11,   14,  171,
-      172,  142,  164,    0,   15,    0,  157,  161,  158,    0,
-        0,    0,  116,  117,    0,    0,    0,    0,  155,  151,
-      153,  152,  154,  149,  147,    0,  134,    1,   13,  156,
-      135,  138,    0,    0,  139,  139,  139,  168,  146,  165,
-
-      163,  166,  150,  133,  133,  133,  133,  133,  133,  133,
-      133,  141,    0,  160,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,   70,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  159,  162,  142,   11,   14,
-        0,    0,   14,   14,   12,    0,   15,   16,   16,    0,
-        0,    0,    0,    0,  148,  167,  134,  134,   13,  135,
-      135,  138,  138,    0,  136,  137,  144,  145,  133,  133,
-      133,  133,    0,  133,  133,  133,  133,  133,  133,  133,
-
-      133,  133,   68,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,   25,
-      133,  133,  133,  133,   58,   72,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,   74,   12,   14,   12,   12,   12,   12,    0,    0,
-        0,    0,    0,    0,    0,  134,    0,  135,  136,  137,
-      133,  133,  133,  133,    0,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,   66,  133,  133,   29,
-       24,  133,  133,  133,  133,  133,  133,   42,  133,  133,
-
-      133,  133,  133,  133,   23,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,    0,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,   28,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,   12,   12,   12,   12,
-       12,   12,   12,   12,    0,    0,    0,    0,    0,  133,
-      133,  133,  133,  128,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,   77,   37,
-       78,   45,  133,  133,  133,  133,  133,   20,  133,  133,
-      133,  133,  133,  133,  133,   71,  133,  133,  133,  133,
-
-      133,  133,   22,  133,  133,  133,  133,  133,    0,  133,
-      133,  133,   61,  133,  133,   43,  133,   57,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,   12,   12,   12,   12,   12,   12,
-       12,    2,    3,    0,    0,    0,    0,    0,  133,  133,
-      133,  133,  128,  133,  133,  133,  121,  133,  133,  133,
-      133,  133,  133,  133,  133,   69,   76,  133,   59,   19,
-      133,  133,   52,   49,   50,  133,  133,  133,   73,  133,
-      133,  133,  133,   39,  133,  133,  133,   27,   30,  133,
-       51,    0,    0,    0,  133,   38,  133,  133,  133,  133,
-
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,   75,   12,   12,   12,    2,
-        3,   12,   12,   12,    2,    3,    0,    0,    0,    0,
-        0,  133,  133,  133,  133,  133,  133,  133,  120,  133,
-      131,  133,  133,  133,   21,  133,  133,  133,  133,  133,
-      133,   47,  133,  133,  133,   40,  133,    0,  133,  133,
-      133,   31,  133,    0,    0,    0,  124,  124,  133,   55,
-      133,  133,   44,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,    0,   12,   12,   12,    2,    3,   12,
-
-       12,   12,    0,    0,    0,    0,    0,  118,  119,  121,
-       17,  121,   32,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,   60,  123,  123,  133,   48,  122,
-      122,    0,  133,    0,   67,  133,    0,   36,  133,    0,
-        0,    0,   53,   54,   26,   46,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,   12,
-       12,   12,    5,   12,   12,    0,    0,    0,    0,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,   56,    0,
-       41,    0,  133,  133,    0,    0,    0,  133,  133,  133,
-
-      133,  133,  133,  133,   79,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-        5,   12,   12,    5,   12,   12,    0,    0,  133,  132,
-      133,  133,  130,   64,  133,    0,    0,    0,  133,  133,
-        0,    0,    0,  133,  133,  133,  133,  133,  133,  133,
-       18,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,    5,   12,   12,   12,   12,
-        0,    4,  133,  133,  133,  133,    0,    0,    0,  133,
-       62,    0,    0,    0,  133,  133,  133,   81,  133,  133,
-      133,  133,   80,  133,  133,  133,  133,  133,  133,  133,
-
-      133,  106,  133,  133,  133,  133,  133,  133,   12,   12,
-       12,   12,    0,  133,  133,  133,   63,    0,    0,    0,
-      133,    0,    0,  133,  127,  133,  133,  133,  133,  133,
-      133,  133,  133,  125,  133,  108,  110,  112,  102,  133,
-      133,  133,  133,  107,  133,  133,  133,   12,   12,   12,
-       12,    0,  133,  133,  129,    0,    0,    0,   33,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      109,  111,  113,  133,  133,  133,   12,   12,   12,   12,
-       12,   12,   12,    0,  133,  133,    0,   34,    0,  133,
-
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  114,  115,  133,
-      133,  133,  133,   12,   12,   12,   12,   12,   12,   12,
-       12,   12,   12,    0,  133,  104,    0,  133,   87,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,  133,  133,  133,  133,  133,  133,  133,   12,
-       12,   12,   12,   12,   12,   12,   12,   12,    6,  133,
-        0,   35,   65,  133,  133,  133,  133,  133,  133,  133,
-      133,  133,   84,  133,  133,  133,  133,  133,  133,  133,
-      133,  126,  133,  133,   12,   12,   12,   12,    6,   12,
-
-       12,   12,   12,    6,  133,  133,  133,   86,   83,  133,
-      133,  133,  133,   97,   85,   82,  133,  133,  133,  133,
-       96,  133,  133,  133,   12,   12,   12,   12,    6,   12,
-       12,   12,   12,  105,  133,  133,   92,   93,   94,   95,
-       88,   89,   90,   91,  133,  133,  133,   12,   12,   12,
-       12,   12,   12,   12,   12,  133,  133,  133,  133,  133,
-       12,   12,   12,   12,   10,   12,   12,   12,  100,  133,
-      103,  133,  133,   10,   12,   12,   12,   10,   12,    8,
-        9,  133,  133,  133,   10,   12,    8,    9,   12,    8,
-        9,  133,  133,  133,   12,    8,    9,   12,  133,  133,
-
-       99,   12,    7,  133,  133,    7,    7,  133,  133,    7,
-      133,   98,  133,  101,    0
+        0,    0,  200,  198,  162,  163,  163,  197,  198,  197,
+      197,  198,  197,  197,  197,  197,  197,  197,  197,  160,
+      159,  197,  197,  197,  197,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  195,  198,  196,  197,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  197,  162,
+       11,   11,   14,  197,  198,  162,  190,    0,    0,   15,
+       17,    0,  169,  183,  166,  187,  184,    0,    0,    0,
+      128,  129,    0,    0,    0,    0,    0,  181,  177,  179,
+      178,  180,  176,  174,    0,  154,    1,   13,  182,  155,
+
+      158,    0,    0,  159,  159,  159,  194,  168,  165,  167,
+      173,  191,  189,  192,  170,  153,  153,  153,  153,    0,
+        0,  153,  153,  153,    0,  153,  153,    0,  164,  161,
+        0,  186,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,   82,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  185,  188,  162,   11,   14,    0,    0,
+       14,   14,   12,    0,   15,    0,    0,   17,    0,   15,
+
+       16,   16,    0,    0,    0,    0,    0,    0,  175,  193,
+      154,  154,   13,  155,  155,  158,  158,    0,  156,  157,
+      159,  156,  171,  172,  153,  153,  153,  153,    0,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,   80,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,   27,  153,  153,  153,  153,   66,
+      153,   84,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+       70,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+
+       86,   12,   14,   12,   12,   12,   12,    0,    0,    0,
+       15,   15,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  154,    0,  154,  155,    0,  155,  158,
+      156,  156,  157,  157,  156,  153,  153,  153,  153,    0,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,   20,  153,  153,
+       31,  153,   26,  153,  153,  153,  153,  153,  153,  153,
+      153,   48,  153,  153,  153,  153,  153,  153,   25,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,    0,  153,  153,
+
+      153,  153,  153,  153,  153,  153,  153,  153,   30,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,   12,   12,   12,   12,   12,   12,   12,
+       12,    0,    0,   15,    0,   15,   15,   16,   16,    0,
+        0,    0,    0,    0,    0,    0,    0,  154,  154,  155,
+      155,  156,  156,  157,  157,  157,  157,  156,  153,  153,
+      153,  153,  140,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,   89,   71,  153,  153,   43,   90,   51,
+      153,  153,  153,  153,  153,  153,  153,   22,  153,  153,
+
+      153,  153,  153,  153,  153,  153,  153,   83,  153,  153,
+      153,  153,  153,  153,   24,  153,  153,  153,  153,  153,
+        0,  153,  153,  153,  153,   69,  153,  153,   49,  153,
+       65,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,   12,   12,   12,
+       12,   12,   12,   12,    2,    3,    0,    0,   15,   15,
+       15,   16,   16,    0,    0,    0,    0,    0,    0,    0,
+        0,  156,  153,  153,  153,  153,  140,  153,  153,  153,
+      134,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,   81,   88,  153,  153,  153,
+
+      153,  153,  153,   67,   21,  153,  153,   60,   55,   56,
+      153,  153,  153,  153,   85,  153,  153,  153,  153,  153,
+       45,  153,  153,  153,   29,  153,  153,   58,    0,    0,
+        0,    0,  153,   44,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,   87,   12,   12,   12,    2,    3,
+       12,   12,   12,    2,    3,    0,    0,   15,    0,    0,
+        0,    0,    0,    0,    0,    0,  153,  153,  153,  153,
+      153,  153,  153,  133,  153,  146,  153,  153,  153,  153,
+      150,  153,  153,  153,   23,  153,  153,  142,  153,  153,
+
+      153,  153,  153,   74,  153,  153,  153,   53,  153,  153,
+      152,  153,  153,   46,  153,    0,  153,  153,  153,   35,
+       35,  153,  153,    0,    0,    0,    0,    0,    0,  137,
+      137,  153,  153,   63,  153,  153,   50,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,    0,   34,   12,   12,
+       12,    2,    3,   12,   12,   12,    0,    0,    0,    0,
+        0,  131,  132,    0,    0,    0,    0,    0,  134,   18,
+      134,   38,  153,  153,  153,  143,  144,  153,  153,  153,
+      153,  153,  153,  153,  153,   32,   33,  153,  153,   73,
+
+      153,   68,  136,  136,  153,   72,  153,   54,  135,  135,
+        0,  153,    0,   79,  153,    0,   42,   36,   36,  153,
+      153,    0,    0,    0,    0,    0,    0,   61,  153,   62,
+       28,   52,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,    0,   12,   12,   12,    5,   12,
+       12,    0,    0,    0,    0,    0,  130,    0,    0,    0,
+        0,  153,  153,  153,  147,  153,  153,  153,  153,  153,
+      153,   57,  153,   64,  153,    0,   47,    0,  153,  153,
+      153,    0,    0,    0,    0,    0,    0,  153,  153,  153,
+
+      153,  153,  153,  153,   91,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+        0,    5,   12,   12,    5,   12,   12,    0,    0,    0,
+        0,  153,  151,  153,  153,  153,  149,   77,  153,   37,
+       37,    0,    0,    0,  153,  153,  153,    0,    0,    0,
+        0,    0,    0,  153,  153,  153,  153,  153,  153,  153,
+       19,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,    5,   12,   12,   12,   12,
+        0,    4,  153,  153,  153,  153,  153,    0,    0,    0,
+      153,  153,   75,    0,    0,    0,    0,    0,    0,  153,
+
+      153,  153,   93,  153,  153,  153,  153,   92,  153,  153,
+      153,  153,  153,  153,  153,  153,  118,  153,  153,  153,
+      153,  153,  153,   12,   12,   12,   12,    0,  153,  153,
+      153,  153,   76,    0,    0,    0,  153,  153,    0,    0,
+        0,    0,   59,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  138,  153,  120,  122,  124,  114,  153,  153,
+      153,  153,  119,  153,  153,  153,   12,   12,   12,   12,
+        0,  153,  153,  145,  148,    0,    0,    0,   39,  153,
+      141,    0,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+
+      153,  153,  121,  123,  125,  153,  153,  153,   12,   12,
+       12,   12,   12,   12,   12,    0,  153,  153,    0,   40,
+        0,  153,    0,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      126,  127,  153,  153,  153,  153,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,    0,  153,  116,    0,
+      153,   99,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,  153,  153,  153,  153,  153,  153,  153,  153,
+      153,  153,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,    6,  153,    0,   41,   78,  153,  153,  153,  153,
+
+      153,  153,  153,  153,  153,   96,  153,  153,  153,  153,
+      153,  153,  153,  153,  139,  153,  153,   12,   12,   12,
+       12,    6,   12,   12,   12,   12,    6,  153,  153,  153,
+       98,   95,  153,  153,  153,  153,  109,   97,   94,  153,
+      153,  153,  153,  108,  153,  153,  153,   12,   12,   12,
+       12,    6,   12,   12,   12,   12,  117,  153,  153,  104,
+      105,  106,  107,  100,  101,  102,  103,  153,  153,  153,
+       12,   12,   12,   12,   12,   12,   12,   12,  153,  153,
+      153,  153,  153,   12,   12,   12,   12,   10,   12,   12,
+       12,  112,  153,  115,  153,  153,   10,   12,   12,   12,
+
+       10,   12,    8,    9,  153,  153,  153,   10,   12,    8,
+        9,   12,    8,    9,  153,  153,  153,   12,    8,    9,
+       12,  153,  153,  111,   12,    7,  153,  153,    7,    7,
+      153,  153,    7,  153,  110,  153,  113,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -515,607 +544,826 @@ static yyconst flex_int32_t yy_ec[256] =
         4,    4,    5,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    6,    7,    8,    9,    1,   10,   11,   12,   13,
-       14,   15,   16,   14,   17,   18,   19,   20,   21,   22,
-       23,   24,   25,   26,   25,   27,   25,   28,   14,   29,
-       30,   31,    1,   32,   33,   34,   35,   36,   37,   38,
-       39,   40,   41,   42,   43,   44,   45,   46,   47,   48,
-       49,   50,   51,   52,   53,   54,   55,   56,   57,   40,
-       58,   59,   60,   61,   62,    1,   63,   64,   65,   66,
-
-       67,   68,   69,   70,   71,   72,   73,   74,   75,   76,
-       77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
-       87,   88,   14,   89,   14,   14,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
+       14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
+       24,   25,   26,   27,   26,   28,   26,   29,   17,   30,
+       31,   32,    1,   33,   34,   35,   36,   37,   38,   39,
+       40,   41,   42,   43,   44,   45,   46,   47,   48,   49,
+       50,   51,   52,   53,   54,   55,   56,   57,   58,   41,
+       59,   60,   61,   62,   63,    1,   64,   65,   66,   67,
+
+       68,   69,   70,   71,   72,   73,   74,   75,   76,   77,
+       78,   79,   80,   81,   82,   83,   84,   85,   86,   87,
+       88,   89,   17,   90,   17,   17,    1,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91,   91,   91,   91,   91,   91,
+       91,   91,   91,   91,   91
     } ;
 
-static yyconst flex_int32_t yy_meta[90] =
+static yyconst flex_int32_t yy_meta[92] =
     {   0,
-        1,    2,    3,    1,    2,    2,    1,    1,    1,    1,
-        2,    4,    1,    1,    2,    1,    1,    5,    1,    6,
-        6,    6,    6,    6,    6,    6,    6,    7,    1,    1,
-        1,    1,    8,    8,    8,    8,    8,    8,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    1,    1,    1,
-        1,    9,    8,    8,    8,    8,    8,    8,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-        9,    9,    9,    9,    9,    9,    9,    9,    1
+        1,    2,    3,    4,    5,    2,    1,    1,    1,    1,
+        6,    7,    1,    4,    6,    1,    1,    1,    8,    1,
+        9,    9,    9,    9,    9,    9,    9,    9,   10,    1,
+        1,    1,    1,   11,   11,   11,   11,   11,   11,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,    1,    1,
+        1,    1,   12,   11,   11,   11,   11,   11,   11,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,    1,
+       13
+
     } ;
 
-static yyconst flex_int16_t yy_base[1153] =
+static yyconst flex_int16_t yy_base[1417] =
     {   0,
-        0,   88, 2594, 2595,   90, 2595, 2595, 2563,   87, 2562,
-       87, 2532,   97, 2595, 2560,   85,   88,  113,   91,  133,
-      151, 2561,   84, 2558,   92,   63, 2525,   83,   42,  128,
-       85, 2595,  124, 2595, 2556, 2523,  103,  120,  122,  136,
-      119,   87,  125,   86,   79,  145,  147,  131,  148,  159,
-      164,  162,  171,  106,  113,  252, 2595, 2595, 2525,  217,
-     2512,  214, 2595,  158, 2595,  186, 2595, 2595, 2595,  223,
-      227,  257, 2595, 2595,  116, 2554,  216,  209, 2595, 2595,
-     2595, 2595, 2595, 2566, 2595, 2562,  254, 2595,    0, 2595,
-      273,  293,  311,    0,  321,  341,  353, 2595, 2549, 2595,
-
-     2595, 2595, 2548, 2515,  205,  227,  208,  335,  241,  142,
-      239, 2595, 2573, 2595,  344,  221,  226,  240,  247,  203,
-      242,  323,  321,  267,  324,  322,  339,  325,  332,  334,
-      244,  328,  329,  352,  351,  356,  287, 2513,  357,  358,
-      261,  361,  360,  362,  371,  378,  372,  366,  381,  383,
-      386,  387,  389,  393,  390, 2595, 2595,  466, 2595, 2515,
-     2554, 2501, 2512,  471,  447,  276,  248, 2595,  444, 2542,
-     2541,  437,  433,  434, 2595, 2595,  466,  484,    0,  492,
-      511,  521,  533,  541,  549,  557, 2595, 2595,  458,  417,
-      478,  462, 2540, 2505,  461,  420,  523,  459,  293,  421,
-
-      524,   80, 2504,  525,  536,  526,  534,  545,  539,  546,
-      542,  541,  330,  553,  556,  549,  569,  567,  548, 2503,
-      571,  573,  574,  576, 2502, 2501,  577,  603,  579,  582,
-      585,  584,  583,  586,  588,  587,  593,  437,  590,  625,
-      602,  599,  594,  607,  613,  617,  616,  614,  291,  618,
-      661, 2500,  683,  679,    0,  665, 2509, 2508, 2481, 2476,
-      716,  656,  666,  658,  723,  731,  739,  747,  755,  763,
-      662,  663,  670,  664,    0,  758,  743,  647,  666,  731,
-      672,  741,  732,  637,  668,  770, 2495,  742,  744, 2494,
-     2493,  753,  747,  754,  757,  761,  750, 2492,  746,  771,
-
-      776,  778,  779,  673, 2491,  780,  781,  808,  784,  786,
-      674,  787,  790,  797,  791,  794,  798,  804, 2490,  802,
-      811, 2523,  801,  816,  812,  467,  817,  822,  823,  825,
-      826, 2488,  828,  827,  833,  829,  835,  837,  839,  838,
-      844,  845,  846,  849,  850,  876,    0,  900, 2497, 2496,
-      868, 2480, 2490, 2489, 2470, 2476,  894,  895,  896,  873,
-      880,  895,  893,    0,  877,  896,  887,  900,  883,  885,
-      886,  890,  884,  927,  894,  892,  898,  899, 2480, 2479,
-     2478, 2477,  905,  907,  908,  906,  914, 2476,  916,  913,
-      921,  919,  923,  924,  925, 2475,  929,  926,  932,  933,
-
-      934,  937, 2474,  938,  940,  968, 2473,  948,  938,  949,
-      952,  958, 2472,  955,  961, 2471,  963, 2470,  964,  966,
-      967,  969,  970,  971,  983,  974,  976,  980,  979,  978,
-      985,  981,  993,  992, 1014, 2464, 2474, 2473, 2495, 2490,
-     2445,    0,    0, 2458, 2444, 1034, 1035, 1036, 1016, 1017,
-     1034, 1035,    0, 1020, 1036, 1040, 1026, 1014, 1018, 1021,
-     1019, 1025, 1065, 1031, 1039, 2461, 2460, 1054, 2459, 2458,
-     1041, 1037, 2457, 2456, 2455, 1043, 1045, 1047, 2454, 1049,
-     1053, 1055, 1051, 1118, 1063, 1052, 1067, 2453, 2452, 1094,
-     2451, 2431, 2430, 2428, 1180, 2447, 1072, 1073, 1074, 1075,
-
-     1076, 1077, 1078, 1081, 1083, 1108, 1084, 1104, 1181, 1096,
-     1101, 1099, 1151, 1103, 1186, 2446, 2474, 2469, 2424,    0,
-        0, 2459, 2468, 2437,    0,    0, 2426, 2432, 1187, 1139,
-     1216, 1116, 1117, 1184, 1168, 1187, 1190, 1185, 2437, 1189,
-     2436, 1155, 1172, 1192, 2435, 1183, 1196, 1198, 2434, 1194,
-     1276, 2433, 1110, 1247, 1365, 1260, 1205, 1268, 1248, 1251,
-     1336, 2432, 1278, 2411, 2410, 2411, 2595, 2428, 1249, 2427,
-     1250, 1252, 2426, 1257, 1258, 1288, 1264, 1268, 1283, 1270,
-     1284, 1337, 1338, 1286, 1291, 1293, 1339, 1294, 1340, 1367,
-     1341, 1349, 1296, 2459, 2441, 2450, 2419,    0,    0, 2446,
-
-     2430, 2401, 2413, 2416, 1376, 1385, 1429, 2595, 2450, 1368,
-     2415, 1388, 2414, 2413, 1375, 2412, 1376, 1377, 1347, 1378,
-     1379, 1381, 1380, 1408, 2411, 2595, 2410, 1395, 2409, 2595,
-     2408, 1461, 1297, 2395, 2406, 1385, 1466, 2595, 1344, 2387,
-     2386, 2394, 2402, 2401, 2400, 2399, 1386, 1394, 1396, 1414,
-     1261, 1413, 1415, 1419, 1420, 1421, 1423, 1427, 1428, 1430,
-     1429, 1436, 1384, 1434, 1438, 1460, 1440, 1441, 1469, 2423,
-     2407, 2378,    0, 2416, 2385, 2379, 2389, 1509, 1523, 1470,
-     1473, 1479, 1451, 1455, 1465, 1472, 1461, 1482, 2391, 2378,
-     1547, 2374, 1492, 1474, 2383, 2382, 2372, 1485, 1478, 1498,
-
-     1486, 1500, 1501, 1494, 2385, 1502, 1507, 1508, 1511, 1512,
-     1513, 1515, 1517, 1518, 1519, 1523, 1525, 1529, 1528, 1527,
-        0, 2405, 2374,    0, 2397, 2365, 2360, 2374, 1213, 2378,
-     1536, 1535, 2377, 2376, 1531, 2360, 1608, 2354, 1537, 1541,
-     2372, 2371, 2364, 1560, 1553, 1555, 1556, 1562, 1544, 1563,
-     2370, 1564, 1566, 1567, 1568, 1569, 1572, 1573, 1624, 1575,
-     1587, 1577, 1590, 1591, 1592,    0, 2384, 2352, 2383, 2346,
-     2364, 2595, 1605, 1608, 2364, 1595, 2343, 2350, 2342, 2360,
-     2359, 2345, 2344,    0, 1599, 1601, 1612, 2356, 1603, 1606,
-     1604, 1631, 2355, 1609, 1610, 1616, 1618, 1619, 1656, 1661,
-
-     1666, 2354, 1630, 1632, 1676, 1633, 1663, 1642, 2369, 2332,
-     2407, 2341, 2329, 1652, 1668, 1669, 2348, 2328, 2331, 1706,
-     1679,    0,    0, 1655, 2345, 1648, 1674, 1681, 1723, 1670,
-     1692, 1694, 1729, 2344, 1698, 2343, 2342, 2341, 2340, 1686,
-     1701, 1707, 1716, 2339, 1696, 1688, 1700, 2394, 2328, 1735,
-     2321, 2326, 2334, 1711, 1705, 1777, 2313, 1787, 2595, 1725,
-     1697, 1719, 1732, 1736, 1739, 1751, 1755, 1757, 1741, 1710,
-     1744, 1746, 1765, 1766, 1767, 1769, 1758, 1796, 1798, 1761,
-     2332, 2331, 2330, 1762, 1763, 1764, 1801, 2314, 2327, 2322,
-     2321, 2320, 2310, 2308, 1805, 1784, 1842, 2595, 2303, 1770,
-
-     1772, 1788, 1791, 1792, 1799, 1801, 1803, 1806, 1809, 1797,
-     1810, 1811, 1816, 1818, 1821, 1823, 1825, 2321, 2320, 1826,
-     1827, 1829, 1830, 2318, 2313, 2312, 2311, 2301, 2292, 2294,
-     2307, 2306, 2344, 2295, 1856, 2308, 1892, 1834, 2307, 1855,
-     1839, 1842, 1845, 1846, 1850, 1859, 1851, 1837, 1861, 1863,
-     1864, 1865, 1870, 1871, 1866, 1889, 1875, 1777, 1876, 2284,
-     2286, 2299, 2298, 2336, 2296, 2297, 2355, 2354,    0, 1905,
-     1947, 2595, 2297, 1885, 1892, 1880, 1883, 1893, 1894, 1896,
-     1899, 1900, 2296, 1901, 1903, 1902, 1904, 1906, 1907, 1908,
-     1909, 2295, 1919, 1921, 2289, 2290, 2348, 2341,    0, 2275,
-
-     2249, 2287, 2248,    0, 1944, 1927, 1929, 2240, 2231, 1931,
-     1932, 1933, 1934, 2222, 2213, 2204, 1935, 1937, 1938, 1939,
-     2174, 1940, 1942, 1955, 2164, 2138, 2176, 2137,    0, 2109,
-     2115, 2102, 2097, 2105, 1945, 1957, 2097, 2093, 2089, 2084,
-     2076, 2071, 2059, 2054, 1958, 1961, 1981, 2030, 2036, 2032,
-     2031, 2023, 2018, 2000, 1999, 1959, 1965, 1967, 1968, 1969,
-     1998, 2000, 1996, 1995,    0, 1992, 1995, 1994, 2007, 1971,
-     2005, 1972, 1975,    0, 1916, 1687, 1442,    0, 1154,    0,
-        0, 1979, 1990, 1983,    0, 1024,    0,    0,  784,    0,
-        0, 1985, 1986, 1989,  733,    0,    0,  629, 2008, 1992,
-
-      550,  313,    0, 1996, 1993,    0,    0, 2000, 1998,    0,
-     2002,  211, 2006,   47, 2595, 2083, 2092, 2100, 2105, 2109,
-     2118, 2122, 2126, 2135, 2139, 2144, 2148, 2156, 2160, 2164,
-     2173, 2175, 2179, 2188, 2197, 2206, 2215, 2224, 2233, 2242,
-     2249, 2256, 2263, 2272, 2281, 2290, 2299, 2308, 2317, 2326,
-     2335, 2344
+        0,   90, 4032, 4033,   92, 4033, 4033, 4000,   98,   76,
+       86, 3970,  113, 4033, 3998,   98,   95,  115,  130,  156,
+      174,   93,  122, 3997,   89,   97, 3964,   99,  123,   81,
+      140,  155,  102,  124,  186,  151, 4033, 3995,  170,  144,
+      142,  163,  162,  145,  172,  108,   94,  152,  188,  176,
+      181,  105,  196,  206,  252,  198,  183,  153,  139,  280,
+     4033, 4033, 3965,  273, 3952,  269, 4033,  293,  151,  235,
+      265,  306, 4033, 4033, 4033, 4033, 4033,  242,  251,  321,
+     4033, 4033,  288, 3994,  287,  263,  255, 4033, 4033, 4033,
+     4033, 4033, 4007, 4033, 4002,  318, 4033,    0, 4033,  337,
+
+      366,  385,    0,  395,    0,  414, 4033, 4033, 4033, 4033,
+     3989, 4033, 4033, 4033, 3988, 3955,  286,  284,  285,  323,
+     3957,  361,  332,  304, 4003,  291,  305,  394, 4033, 4033,
+     4012, 4033,  368,  308,  366,  310,  407,  383,  311,  319,
+      364,  386,  365,  227,  287,  389,  393,  391,  395,  394,
+      398,  404,  397,  417,  420,  421,  422,  423,  424,  425,
+      431,  428, 3951,  432,  439,  444,  449,  438,  309,  441,
+      459,  451,  455,  362,  462,  512,  461,  465,  466,  467,
+      352,  475,  468, 4033, 4033,  548, 4033, 3953, 3992, 3939,
+     3950,  529,  529,  468, 3946,  540, 3995, 4033,  600,  574,
+
+     3944,  543, 3977, 3976,  523,  527,  532,  569, 4033, 4033,
+        0,  647,    0,    0,  660,    0,  673,  569,  618,  681,
+        0,  700, 4033, 4033,  520,   46,  521,  174, 3975, 3940,
+      536,  497,  496,  508,  523,  573,  584,  666,  585,  586,
+      603,  594,  593,  667, 3939,  673,  675,  539,  592,  629,
+      630,  677,  650,  668,  671,  689,  679,  691,  695,  697,
+      696,  698,  700,  702, 3938,  703,  706,  714,  707, 3937,
+      704, 3936,  710,  716,  742,  718,  719,  720,  723,  724,
+      725,  726,  729,  727,  730,  731,  771,  745,  746,  748,
+     3935,  750,  749,  752,  758,  757,  765,  759,  801,  767,
+
+     3934,  827,  798,    0,  823, 3943, 3942, 3915, 3910,    0,
+      829,  892,  982,    0, 1073,  834,  809,  821,  817,  815,
+      650,  823,  842,    0,  851,  905,    0,  913,  921,    0,
+      934,    0, 1144,    0,    0,  821,  818,  824,  851,    0,
+     1139,  901,  800,  822,  823,  852,  900,  833,  902, 1110,
+      903,  798, 1113,  904,  909, 1112, 1152, 3929, 1122, 1123,
+     3928, 1129, 1179,  806, 1130, 1124, 1131, 1134, 1143, 1153,
+     1154, 3927, 1159, 1156, 1158, 1161, 1162,  910, 3926,  854,
+     1164,  911, 1185, 1166,  912, 1169, 1172,  916, 1184, 1171,
+     1173, 1181, 1187, 1193, 3925, 1191, 1188, 3958, 1195, 1199,
+
+     1200, 1203,  832, 1206, 1205, 1208, 1211, 1213, 3923, 1216,
+     1214, 1217, 1221, 1223, 1222, 1225, 1224, 1228, 1231, 1232,
+     1233, 1238, 1260,    0, 1283, 3932, 3931, 1259, 3915, 3925,
+     3924, 3905, 3911,    0, 1328, 1419, 1509,    0, 1599, 1278,
+     1280, 1392, 1393, 1394, 1404, 1396, 1411, 1432,    0, 1443,
+        0,    0,    0, 1669,    0,    0,    0,    0, 1135, 1399,
+     1409, 1435,    0, 1255, 1436, 1263, 1434, 1414, 1421, 1419,
+     1422, 1258, 1425, 1261, 1379, 1426, 1424, 1467, 1429, 1468,
+     1439, 1469, 1441, 3915, 3914, 1509, 1510, 3913, 3912, 1480,
+     1471, 1472, 1483, 1489, 1481, 1492, 1497, 3911, 1498, 1499,
+
+     1500, 1491, 1512, 1513, 1514, 1515, 1557, 3910, 1516, 1558,
+     1519, 1520, 1559, 1521, 3909, 1560, 1525, 1586, 3908, 1524,
+     1561, 1564, 1562, 1532, 1530, 3907, 1583, 1573, 3906, 1585,
+     3905, 1589, 1584, 1587, 1591, 1581, 1604, 1592, 1600, 1605,
+     1603, 1608, 1610, 1618, 1621, 3904, 1622, 1627, 3898, 3908,
+     3907, 3929, 3924, 3879,    0,    0, 3892, 3878,    0, 1738,
+     1828,    0, 1918, 1647, 1680, 1669, 1657, 1658, 1648, 1693,
+     1681,    0, 1650, 1664, 1724, 1725,    0, 1663, 1722, 1730,
+     1669, 1656, 1662, 1649, 1702, 1709, 1703, 1654, 1710, 1474,
+     1714, 1753, 1718, 1726, 1720, 3895, 3894, 3893, 3892, 1741,
+
+     1721, 1727, 1728, 3891, 3890, 1746, 1731, 3889, 3888, 3887,
+     1738, 1742, 1732, 1786, 3886, 1787, 1788, 1750, 1752, 1789,
+     1816, 1799, 1790, 1791, 3885, 2008, 1817, 3884, 3864, 3861,
+     3862, 1792, 2099, 3880, 1793, 3879, 1427, 1806, 1815, 1818,
+     1821, 1822, 1814, 1853, 1807, 1840, 1906,  510, 1823, 1761,
+     1854, 1835, 1878, 1876, 3878, 3906, 3901, 3856,    0,    0,
+     3891, 3900, 3869,    0,    0, 3858, 3864, 2190, 1914, 1873,
+     2043, 1788, 1882, 1915, 1924, 1916, 1897, 1903, 1913, 1909,
+     1926, 1929, 1921, 3869, 1904, 3868, 1849, 1910, 3867, 1381,
+     3866, 1908, 1911, 1930, 3865, 1912, 1932, 3864, 2012, 2013,
+
+     1934, 1922, 1936, 3863, 3862, 1979, 2280, 3861, 1937, 1980,
+     3860, 1984, 2371, 2075, 1939, 2051, 1992, 1981, 2148, 4033,
+     3859, 2462, 2021, 3838, 3845, 3836, 3829, 3845, 3835, 4033,
+     3852, 1998, 2099, 3851, 2011, 2019, 3850, 2020, 2026, 2071,
+     1942, 1760, 2072, 2073, 2077, 2081, 1989, 2027, 1841, 2082,
+     2079, 2083, 2125, 2094, 2105, 2030, 3883, 3848, 3864, 3873,
+     3842,    0,    0, 3869, 3853, 3824, 3836, 3839, 2120, 2141,
+     2210, 4033, 3873, 2224, 2153, 2119, 2157, 2195, 2124, 3838,
+     2168, 3837, 3836, 2178, 3835, 3834, 3833, 2170, 2180, 2172,
+     2106, 2112, 2171, 2173, 2179, 3832, 3831, 2175, 2177, 3830,
+
+     2199, 3829, 4033, 3828, 2198, 3827, 2280, 3826, 4033, 3825,
+     2265, 2076, 3812, 3823, 2182, 2317, 4033, 4033, 3822, 2197,
+     2209, 3803, 3808, 3801, 3813, 3791, 3807, 3815, 2251, 3814,
+     3813, 3812, 2211, 2181, 2258, 2252, 2253, 2264, 2263, 2265,
+     2213, 2269, 2275, 2273, 2286, 2274, 2281, 2282, 2287, 2290,
+     2363, 2294, 2343, 2371, 2336, 3836, 3820, 3791,    0, 3829,
+     3798, 3792, 3802, 2407, 2496, 2414, 4033, 2336, 2340, 2421,
+     2422, 2385, 2304, 2386, 3804, 2362, 2364, 2372, 2378, 2379,
+     2376, 3803, 2380, 3802, 2553, 3789, 2524, 3785, 2389, 2437,
+     2446, 3794, 3782, 3792, 3796, 3790, 3780, 2392, 2383, 2440,
+
+     2450, 2442, 2206, 2449, 3793, 2297, 2441, 2452, 2471, 2444,
+     2455, 2472, 2473, 2457, 2480, 2525, 2526, 2474, 2527, 2528,
+     3772,    0, 3812, 3781,    0, 3804, 3772, 3767, 3781, 2518,
+     2519, 2536, 3785, 2538, 2534, 2539, 3784, 3783, 2535, 4033,
+     3782, 3766, 2616, 3760, 2533, 2541, 2542, 3778, 3758, 3776,
+     3756, 3775, 3767, 2486, 2382, 2557, 2548, 2564, 2560, 2568,
+     3773, 2566, 2569, 2570, 2565, 2571, 2575, 2576, 2626, 2578,
+     2588, 2572, 2604, 2594, 2595,    0, 3787, 3755, 3786, 3749,
+     3767, 4033, 2627, 2613, 2600, 3767, 2602, 3746, 3753, 3745,
+     3763, 2605, 3762, 3748, 3742, 3746,    0, 3738,    0, 2606,
+
+     2607, 2619, 3757, 2611, 2617, 2612, 2632, 3756, 2616, 2621,
+     2620, 2633, 2625, 2665, 2674, 2675, 3755, 2639, 2641, 2683,
+     2643, 2478, 2646, 3770, 3733, 3809, 3742, 3720, 2666, 2676,
+     2649, 2678, 3727, 3695, 3686, 2716, 2687, 2650,    0, 3688,
+        0,    0, 3675, 2668, 2667, 2686, 2689, 2733, 2679, 2698,
+     2701, 2742, 3662, 2724, 3649, 3636, 3623, 3619, 2691, 2709,
+     2717, 2734, 3618, 2705, 2699, 2707, 3663, 3596, 2739, 3578,
+     3583, 3580, 2720, 3579, 2735, 2779, 3547, 2787, 4033, 2731,
+     3566, 3534, 2736, 2739, 2737, 2740, 2760, 2761, 2763, 2764,
+     2748, 2756, 2750, 2765, 2769, 2774, 2779, 2784, 2770, 2808,
+
+     2810, 2773, 3553, 3532, 3519, 2776, 2775, 2777, 2807, 3491,
+     3492, 3464, 3433, 3421, 3399, 3392, 2817, 2794, 2858, 4033,
+     3383, 2783,    0, 2789, 2782, 2803, 2809, 2813, 2815, 2818,
+     2820, 2822, 2793, 2827, 2828, 2832, 2834, 2836, 2838, 2840,
+     3397, 3392, 2841, 2842, 2805, 2844, 3386, 3377, 3359, 3335,
+     3325, 3316, 3314, 3316, 3303, 3333, 3280, 2854, 3289, 2906,
+     2847, 3284, 2869, 2850, 2853, 2859, 2860, 2861, 2870, 2865,
+     2851, 2874, 2875, 2876, 2877, 2878, 2882, 2884, 2903, 2887,
+     2795, 2888, 3257, 3255, 3264, 3259, 3293, 3253, 3254, 3313,
+     3299,    0, 2917, 2956, 4033, 3241, 2900, 2904, 2891, 2897,
+
+     2905, 2907, 2908, 2910, 2914, 3240, 2915, 2916, 2918, 2919,
+     2920, 2921, 2927, 2932, 3225, 2934, 2924, 3214, 3211, 3266,
+     3261,    0, 3198, 3176, 3212, 3181,    0, 2953, 2945, 2940,
+     3181, 3169, 2941, 2946, 2949, 2950, 3163, 3160, 3155, 2951,
+     2952, 2954, 2955, 3149, 2957, 2958, 2963, 3136, 3113, 3144,
+     3113,    0, 3093, 3079, 3070, 3065, 3071, 2959, 2971, 3070,
+     3069, 3068, 3065, 3056, 3035, 3033, 3031, 2973, 2974, 2993,
+     3010, 3019, 3015, 3014, 3006, 3008, 3003, 3002, 2979, 2978,
+     2981, 2982, 2983, 2995, 2931, 2894, 2892,    0, 2787, 2700,
+     2642, 2443, 2986, 2305, 2985, 2989,    0, 2283, 2239, 1890,
+
+        0, 1841,    0,    0, 2988, 3004, 2998,    0, 1658,    0,
+        0, 1548,    0,    0, 2999, 3000, 3005, 1467,    0,    0,
+     1240, 3023, 3007, 1170,  634,    0, 3008, 3011,    0,    0,
+     3012, 3017,    0, 3018,  434, 3019,  275, 4033, 3099, 3112,
+     3124, 3130, 3135, 3148, 3161, 3174, 3179, 3184, 3197, 3202,
+     3208, 3213, 3216, 3229, 3242, 3247, 3252, 3257, 3262, 3267,
+     3272, 3285, 3288, 3301, 3304, 3312, 3317, 3322, 3327, 3332,
+     3337, 3342, 3347, 3352, 3355, 3368, 3381, 3386, 3399, 3412,
+     3417, 3430, 3435, 3440, 3445, 3450, 3455, 3460, 3473, 3486,
+     3491, 3504, 3517, 3522, 3535, 3540, 3553, 3566, 3579, 3592,
+
+     3605, 3618, 3631, 3644, 3657, 3670, 3683, 3696, 3709, 3722,
+     3735, 3748, 3761, 3774, 3787, 3800
     } ;
 
-static yyconst flex_int16_t yy_def[1153] =
+static yyconst flex_int16_t yy_def[1417] =
     {   0,
-     1115,    1, 1115, 1115, 1115, 1115, 1115, 1115, 1116, 1115,
-     1115, 1117, 1118, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1119, 1115, 1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120,
-     1120, 1115, 1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1115, 1115, 1115, 1115, 1121, 1115,
-     1115, 1115, 1115, 1116, 1115, 1116, 1115, 1115, 1115, 1117,
-     1117, 1118, 1115, 1115, 1122, 1122, 1122, 1122, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1123, 1115, 1124, 1115,
-     1125, 1126, 1115, 1127, 1119, 1119, 1119, 1115, 1115, 1115,
-
-     1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1115, 1115, 1115, 1115, 1121,
-     1115, 1115, 1121, 1121, 1128, 1115, 1116, 1115, 1117, 1122,
-     1115, 1122, 1122, 1122, 1115, 1115, 1123, 1123, 1124, 1125,
-     1125, 1126, 1126, 1115, 1129, 1130, 1115, 1115, 1120, 1120,
-     1120, 1120, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1131, 1121, 1128, 1128, 1128, 1128, 1115, 1115,
-     1118, 1122, 1122, 1122, 1115, 1123, 1115, 1125, 1129, 1130,
-     1120, 1120, 1120, 1120, 1132, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131, 1131, 1131,
-     1128, 1128, 1128, 1128, 1115, 1115, 1122, 1122, 1122, 1120,
-     1120, 1120, 1120, 1133, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1115, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1131, 1131, 1131, 1131, 1128, 1128,
-     1128, 1134, 1135, 1115, 1115, 1122, 1122, 1122, 1120, 1120,
-     1120, 1120, 1133, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131, 1131, 1136,
-     1137, 1128, 1128, 1128, 1134, 1135, 1115, 1115, 1122, 1122,
-     1122, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-      495, 1120, 1120, 1120,  495, 1120, 1120, 1115, 1120, 1120,
-     1120, 1120, 1120, 1115, 1115, 1115, 1115, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1115, 1131, 1131, 1131, 1136, 1137, 1128,
-
-     1128, 1128, 1115, 1115, 1122, 1122, 1115, 1115, 1122, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1115, 1120, 1120, 1120, 1115,
-     1120, 1115, 1120, 1115, 1120, 1120, 1115, 1115, 1120, 1115,
-     1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1131,
-     1131, 1131, 1138, 1128, 1128, 1115, 1115, 1122, 1122, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1115,
-     1120, 1115, 1120, 1120, 1115, 1115, 1115, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1139, 1131, 1131, 1138, 1128, 1128, 1115, 1115, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1115, 1115, 1115, 1120, 1120,
-     1115, 1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1139, 1131, 1131, 1128, 1128,
-     1115, 1115, 1120, 1120, 1120, 1120, 1115, 1115, 1115, 1120,
-     1120, 1115, 1115, 1140, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131,
-     1128, 1128, 1115, 1120, 1120, 1120, 1120, 1115, 1115, 1115,
-     1120, 1141, 1142, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131, 1128,
-     1128, 1115, 1120, 1120, 1120, 1115, 1115, 1115, 1115, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131, 1128, 1128,
-     1128, 1128, 1128, 1115, 1120, 1120, 1115, 1115, 1115, 1120,
-
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1131, 1131, 1131, 1131, 1131, 1128, 1128,
-     1128, 1128, 1128, 1115, 1120, 1120, 1115, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1131,
-     1131, 1131, 1131, 1131, 1128, 1128, 1128, 1128, 1143, 1120,
-     1115, 1115, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1131, 1131, 1131, 1131, 1144, 1128,
-
-     1128, 1128, 1128, 1143, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1131, 1131, 1131, 1131, 1144, 1128,
-     1128, 1128, 1128, 1120, 1120, 1120, 1120, 1120, 1120, 1120,
-     1120, 1120, 1120, 1120, 1120, 1120, 1120, 1131, 1131, 1131,
-     1131, 1128, 1128, 1128, 1128, 1120, 1120, 1120, 1120, 1120,
-     1131, 1131, 1131, 1131, 1145, 1128, 1128, 1128, 1120, 1120,
-     1120, 1120, 1120, 1146, 1131, 1131, 1131, 1145, 1128, 1147,
-     1148, 1120, 1120, 1120, 1146, 1131, 1149, 1150, 1128, 1147,
-     1148, 1120, 1120, 1120, 1131, 1149, 1150, 1128, 1120, 1120,
-
-     1120, 1131, 1151, 1120, 1120, 1152, 1151, 1120, 1120, 1152,
-     1120, 1120, 1120, 1120,    0, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115
+     1338,    1, 1338, 1338, 1338, 1338, 1338, 1338, 1339, 1338,
+     1338, 1340, 1341, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1342, 1338, 1338, 1338, 1338, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1338, 1338, 1338, 1338, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1338, 1338,
+     1338, 1338, 1344, 1338, 1338, 1338, 1338, 1339, 1345, 1346,
+     1345, 1339, 1338, 1338, 1338, 1338, 1338, 1340, 1340, 1341,
+     1338, 1338, 1347, 1347, 1347, 1347, 1347, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1348, 1338, 1349, 1338, 1350,
+
+     1351, 1338, 1352, 1342, 1353, 1353, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1343, 1343, 1343, 1343, 1345,
+     1340, 1343, 1343, 1343, 1346, 1343, 1343, 1338, 1338, 1338,
+     1338, 1338, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1338, 1338, 1338, 1338, 1344, 1338, 1338,
+     1344, 1344, 1354, 1338, 1338, 1345, 1346, 1338, 1355, 1339,
+
+     1338, 1340, 1347, 1338, 1347, 1347, 1347, 1347, 1338, 1338,
+     1356, 1356, 1349, 1357, 1357, 1358, 1358, 1338, 1359, 1360,
+     1353, 1361, 1338, 1338, 1343, 1343, 1343, 1343, 1338, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+     1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
+
+     1343, 1362, 1344, 1354, 1354, 1354, 1354, 1338, 1338, 1363,
+     1345, 1364, 1338, 1365, 1338, 1366, 1347, 1347, 1347, 1347,
+     1347, 1347, 1347, 1356, 1338, 1367, 1357, 1338, 1368, 1358,
+     1369, 1370, 1371, 1372, 1373, 1374, 1374, 1374, 1374, 1375,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1338, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1376, 1376, 1376, 1376, 1377, 1377, 1377,
+     1377, 1338, 1338, 1378, 1338, 1379, 1380, 1381, 1382, 1347,
+     1347, 1347, 1347, 1347, 1347, 1347, 1347, 1383, 1384, 1385,
+     1386, 1387, 1370, 1371,  454, 1372, 1372, 1373, 1374, 1374,
+     1374, 1374, 1388, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1338, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376, 1376,
+     1376, 1377, 1377, 1377, 1389, 1390, 1338, 1338, 1391, 1392,
+     1393, 1394, 1395, 1396, 1396, 1396, 1396, 1396, 1396, 1396,
+     1396, 1387, 1374, 1374, 1374, 1374, 1388, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1338, 1338,
+     1338, 1338,  626, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1376, 1376, 1376, 1397, 1398,
+     1377, 1377, 1377, 1389, 1390, 1338, 1338, 1392, 1396, 1396,
+     1396, 1396, 1396, 1396, 1396, 1396, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374,  626, 1374, 1374, 1374,
+     1374, 1374,  626, 1374, 1374, 1338, 1374, 1374, 1374, 1338,
+     1374,  626, 1374, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1338, 1374, 1376, 1376,
+     1376, 1397, 1398, 1377, 1377, 1377, 1338, 1338, 1396, 1396,
+     1338, 1338, 1396, 1396, 1396, 1396, 1396, 1396, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1338, 1374, 1374, 1374, 1374, 1374, 1338, 1374,
+     1338, 1374, 1338, 1374, 1374, 1338, 1338, 1338, 1374, 1374,
+     1374, 1338, 1338, 1338, 1338, 1338, 1338, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1338, 1376, 1376, 1376, 1399, 1377,
+     1377, 1338, 1338, 1396, 1396, 1338, 1338, 1396, 1396, 1396,
+     1396, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374,  626, 1338, 1374, 1338, 1374, 1374,
+     1374, 1338, 1338, 1338, 1338, 1338, 1338, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1338, 1400, 1376, 1376, 1399, 1377, 1377, 1338, 1338, 1396,
+     1396, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1338,
+     1374, 1338, 1338, 1338, 1374, 1374, 1374, 1338, 1338, 1338,
+     1338, 1338, 1338, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1400, 1376, 1376, 1377, 1377,
+     1338, 1338, 1374, 1374, 1374, 1374, 1374, 1338, 1338, 1338,
+     1374, 1374, 1374, 1338, 1338, 1338, 1401, 1338, 1402, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1376, 1376, 1377, 1377, 1338, 1374, 1374,
+     1374, 1374, 1374, 1338, 1338, 1338, 1374, 1374, 1403, 1338,
+     1404, 1405, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376, 1377, 1377,
+     1338, 1374, 1374, 1374, 1374, 1338, 1338, 1338, 1338, 1374,
+     1374, 1338, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376,
+     1377, 1377, 1377, 1377, 1377, 1338, 1374, 1374, 1338, 1338,
+     1338, 1374, 1406, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376, 1376, 1376,
+     1376, 1377, 1377, 1377, 1377, 1377, 1338, 1374, 1374, 1338,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1376, 1376, 1376, 1376, 1376, 1377, 1377, 1377,
+     1377, 1407, 1374, 1338, 1338, 1374, 1374, 1374, 1374, 1374,
+
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376, 1376,
+     1376, 1408, 1377, 1377, 1377, 1377, 1407, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1376, 1376, 1376,
+     1376, 1408, 1377, 1377, 1377, 1377, 1374, 1374, 1374, 1374,
+     1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374,
+     1376, 1376, 1376, 1376, 1377, 1377, 1377, 1377, 1374, 1374,
+     1374, 1374, 1374, 1376, 1376, 1376, 1376, 1409, 1377, 1377,
+     1377, 1374, 1374, 1374, 1374, 1374, 1410, 1376, 1376, 1376,
+
+     1409, 1377, 1411, 1412, 1374, 1374, 1374, 1410, 1376, 1413,
+     1414, 1377, 1411, 1412, 1374, 1374, 1374, 1376, 1413, 1414,
+     1377, 1374, 1374, 1374, 1376, 1415, 1374, 1374, 1416, 1415,
+     1374, 1374, 1416, 1374, 1374, 1374, 1374,    0, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338
     } ;
 
-static yyconst flex_int16_t yy_nxt[2685] =
+static yyconst flex_int16_t yy_nxt[4125] =
     {   0,
         4,    5,    6,    7,    7,    5,    8,    9,    4,   10,
-       11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
-       21,   21,   21,   21,   21,   21,   21,   22,   23,   24,
-       25,    4,   26,   27,   28,   27,   27,   27,   27,   27,
-       27,   27,   27,   27,   27,   27,   27,   27,   29,   27,
-       27,   27,   27,   30,   31,   27,   27,   32,   33,   34,
-       35,   36,   37,   38,   39,   40,   41,   42,   27,   27,
-       43,   27,   27,   44,   45,   46,   47,   48,   27,   49,
-       50,   51,   52,   53,   27,   54,   27,   27,   55,   56,
-       57,   62,   58,   56,   65,   62,   59,   68,   72,   72,
-
-       80,   72,   72,  108,   82,   88,   60,   73,  106,   89,
-      105,   74,   99,  100,   81,  107,   69,   83,   84,   61,
-       90,  102,  103,  109,  106,  111,  112,   85,  113,   75,
-       86,   77,   87,   87,   87,   87,   87,   87,   87,   87,
-      106,  106,  156,  171,  106,   66,  106,  106,  106,  285,
-       91,   78,   92,   92,   92,   92,   92,   92,   92,   92,
-      128,  133,  132,  172,  106,   65,  129,  106,   91,   93,
-       95,   95,   95,   95,   95,   95,   95,   95,  116,  110,
-      106,  106,  155,  106,  194,  117,  106,   97,   94,  106,
-      118,  120,  106,  167,  126,  121,  119,  106,  122,   93,
-
-      130,  157,  123,  106,  127,  131,  106,  134,  106,  106,
-      140,  135,  124,  141,  142,   62,   66,   97,   94,   62,
-      106,  136,  125,  106,  137,  106,  138,  139,  143,  144,
-      147,   88,  106,  148,  168,  165,  171,  150,  169,  145,
-      146,  152,  151,  171,   66,  189,   90,  153,  173,  174,
-      149,  191,  154,  158,  159,   65,  159,  158,   72,   72,
-      160,   72,   72,  190,  106,  207,  106,   73,  193,  106,
-      161,   74,  106,   87,   87,   87,   87,   87,   87,   87,
-       87,   71,  106,  162,  195,   71,  203,  106,  106,   75,
-      178,   77,   87,   87,   87,   87,   87,   87,   87,   87,
-
-      106,  106,  106,  106,  208,  106,   66,  204,  106,  181,
-       91,   78,   92,   92,   92,   92,   92,   92,   92,   92,
-      178,  205,  106,  206,  232,  221,  184,  184,  106,  183,
-      185,  185,  185,  185,  185,  185,  185,  185,   91,  181,
-       95,   95,   95,   95,   95,   95,   95,   95,  106,  212,
-      259,  260,  106,  227,  106,  282,  332,   97, 1115,  183,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,  184,  184,
-     1115,  190,  185,  185,  185,  185,  185,  185,  185,  185,
-      190,  192,  106,  106,  106,  106,  106,   97, 1106,  106,
-      106,  106,  297,  106,  211,  106,  106,  209,  210,  213,
-
-      106,  217,  218,  222,  214,  106,  196,  219,  197,  198,
-      223,  199,  106,  106,  200,  220,  215,  106,  106,  106,
-      216,  106,  106,  106,  201,  202,  224,  106,  230,  233,
-      236,  234,  106,  106,  231,  225,  235,  226,  229,  106,
-      239,  238,  106,  240,  106,  243,  242,  106,  106,  237,
-      106,  106,  256,  245,  106,  168,  247,  241,  244,  249,
-      171,  171,  250,  246,  171,  251,  248,  158,  159,  252,
-      159,  158,  272,  163,  160,  254,  263,  262,  106,  264,
-      257,  106,  106,  258,  161, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115,  277,  271,  274,  283,  162,  106,  265,
-
-      265,  278,   71,  266,  266,  266,  266,  266,  266,  266,
-      266, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,  106,
-      106,  273,  106,  106,  320,  281,  267,  267,  106,  164,
-      268,  268,  268,  268,  268,  268,  268,  268, 1115,  106,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,  184,  184,
-     1115,  413,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  185,  185,  185,  185,
-      185,  185,  185,  185,  185,  185,  186,  186,  186,  186,
-      186,  186,  186,  186,  106,  106,  106,  106,  279,  186,
-      186,  186,  186,  186,  186,  106,  280,  106,  288,  290,
-
-      106,  287,  106,  106,  296,  284,  106,  106,  295,  106,
-      106,  106,  289,  291,  106,  300,  293,  106,  303,  186,
-      186,  186,  186,  186,  186,  292,  294,  298,  106,  299,
-      106,  301,  106,  302,  106,  106,  306,  106,  106,  190,
-      106,  305,  307,  106,  106,  106,  106,  106,  106,  106,
-      304,  106,  322,  315,  106,  106,  309,  314,  311,  319,
-      106,  316,  318,  106,  106,  312,  313,  317,  106,  310,
-      326,  321,  323,  327,  106,  106,  325,  106,  106,  106,
-      333,  163,  351,  171,  324,  171,  106,  329,  348,  328,
-      359,  330,  357,  171,  334,  331,  335,  336,  106,  337,
-
-      352,  338,  375,  362, 1103,  363,  339,  360,  106,  358,
-      361,  340,  341,  342,  343,  344,  349, 1115, 1115,  350,
-     1115, 1115,  106,  106,  106,  106,   73,  106,  369,  106,
-       74,  106,  370,  106,  106,  106,  372,  164,  376,  391,
-      397,  345,  266,  266,  266,  266,  266,  266,  266,  266,
-      266,  266,  266,  266,  266,  266,  266,  266,  268,  268,
-      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
-      268,  268,  268,  268, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-      368,  365,  106,  106,  190, 1115, 1115, 1115, 1115, 1115,
-
-     1115,  366,  106,  106,  106,  106,  190,  106,  106, 1102,
-      371,  106,  367,  374,  106,  106,  386,  378,  106,  106,
-      381,  373,  106,  379,  385, 1115, 1115, 1115, 1115, 1115,
-     1115,  106,  106,  380,  384,  382,  377,  106,  383,  106,
-      106,  106,  106,  392,  190,  106,  395,  106,  106,  398,
-      387,  106,  106,  389,  390,  106,  399,  388,  106,  106,
-     1098,  393,  106,  106,  396,  106,  404,  400,  407,  106,
-      405,  401,  106,  106,  394,  402,  410,  106,  106,  403,
-      411,  408,  414,  106,  106,  412,  106,  106,  106,  106,
-      106,  417,  415,  418,  106,  422,  106,  416,  106,  106,
-
-      106,  424,  425,  421,  427,  106,  106,  106,  419,  420,
-      106,  106,  190,  439,  423,  426,  431,  435,  440,  428,
-      430,  171,  171,  171,  449,  432,  450,  451,  447,  452,
-      429,  433,  455,  454,  106,  436,  456,  106,  106,  446,
-      457,  106,  434,  448,  106,  106,  106,  106,  106,  459,
-      460,  106,  463,  106,  106,  106,  106,  106,  464,  106,
-      106,  106,  458,  461,  467,  462,  106,  106,  106,  106,
-      472,  469,  465,  470,  106,  106,  466,  106,  471,  475,
-      106,  474,  106,  476,  106,  106,  106,  106,  106,  473,
-      106,  481,  477,  106,  106,  106,  483,  484,  106,  106,
-
-      478,  106,  479,  486,  190,  488,  480,  482,  492,  106,
-      106,  487,  491,  106,  493,  485,  106,  495,  494,  106,
-      497,  498,  106,  499,  106,  106,  501,  106,  106,  106,
-      106,  106,  106,  496,  507,  106,  502,  106,  500,  106,
-      106,  106,  106,  503,  106,  510,  106,  505,  512,  489,
-      504,  513,  506,  106,  106,  508,  511,  509,  515,  517,
-      514,  171,  171,  171,  518,  532,  533,  530,  534,  535,
-      516,  536,  538,  539,  537,  106,  531,  106,  106,  106,
-      106,  106,  106,  542,  540,  529,  106,  106,  545,  544,
-      190,  541,  106,  546, 1095,  106,  106,  106,  106,  543,
-
-      106,  106,  106,  547,  106,  549,  106,  550,  106,  553,
-      106,  552,  106,  106,  106,  106,  106,  551,  548,  558,
-      558,  556,  558,  558,  106,  554,  106,  555,  106,  559,
-      190,  560,  557,  106,  106,  106,  106,  106,  106,  106,
-      570,  572,  106,  576,  106,  106,  589,  561,  571,  573,
-      574,  575,  578,  569,  579,  106,  583,  106,  580,  577,
-      106,  581,  106,  591,  106,  106,  171,  590,  611,  106,
-      582,  106,  610,  606,  628,  562,  593,  106,  106,  106,
-      567,  567,  567,  567,  567,  567,  567,  567,  567,  567,
-      567,  567,  567,  567,  567,  567,  567,  567,  567,  568,
-
-      568,  568,  568,  568,  568,  568,  568,  567,  567,  567,
-      567,  567,  106,  594,  171,  584,  106,  607,  607,  613,
-      607,  607,  615,  614, 1089,  585,  612,  586,  618,  106,
-      608,  587,  616,  106,  588,  592,  605,  567,  567,  567,
-      567,  106,  106,  171,  106,  106,  106,  106,  106,  619,
-      106,  106,  617,  106,  620,  106,  621,  106,  622,  106,
-      623,  632,  632,  609,  632,  632,  106,  773,  567,  558,
-      558,  633,  558,  558,  106,  625,  626,  626,  626,  626,
-      626,  626,  626,  626,  626,  626,  626,  626,  626,  626,
-      626,  626,  626,  626,  626,  627,  627,  627,  627,  627,
-
-      627,  627,  627,  626,  626,  626,  626,  626,  106,  106,
-      106,  106,  106,  106,  190,  643,  644,  645,  106,  106,
-      648,  106,  106,  646,  647,  106,  629,  635,  636,  106,
-      650,  106,  702,  626,  626,  626,  626,  637,  637,  106,
-      637,  637,  639,  649,  106,  106,  651,  106,  634,  106,
-      653,  652,  106,  657,  106,  106,  658,  106,  106,  656,
-      660,  669,  691,  638,  626,  630,  630,  630,  630,  630,
-      630,  630,  630,  630,  630,  630,  630,  630,  630,  630,
-      630,  630,  630,  630,  631,  631,  631,  631,  631,  631,
-      631,  631,  630,  630,  630,  630,  630,  106,  106,  106,
-
-      106,  106,  106,  171,  662,  106,  694,  663,  106,  681,
-      106,  664,  171,  684,  654,  539,  665,  667,  655,  666,
-      659,  661,  630,  630,  630,  630,  668,  679,  106,  106,
-      607,  607,  678,  607,  607,  539,  106,  106,  106,  106,
-      106,  106,  106,  608,  190,  106,  106,  106,  698,  106,
-      541,  685,  541,  630,  686,  106,  106,  106,  683,  714,
-      687,  689,  632,  632,  693,  632,  632,  637,  637,  106,
-      637,  637,  688,  699,  106,  106,  106,  700,  701,  704,
-      106,  106,  106,  707,  106,  705,  706,  708,  106,  106,
-      106,  106,  703,  638,  711,  106,  715,  106,  709,  106,
-
-      717,  106,  106,  720,  716,  718,  190,  710,  712,  713,
-      607,  607,  106,  607,  607,  731,  106,  719, 1088,  733,
-      729,  106,  106,  608,  607,  607,  106,  607,  607,  730,
-      106,  106,  732,  106,  106,  106,  171,  608,  541,  106,
-      106,  690,  734,  106,  735,  541,  106,  106,  737,  737,
-      171,  737,  737,  106,  740,  106,  609,  745,  739,  106,
-      744,  106,  106,  106,  746,  747,  748,  751,  106,  106,
-      609,  749,  106,  106,  106,  750,  106,  754,  106,  106,
-      106,  752,  755,  760,  106,  757,  106,  753,  106,  106,
-      106,  774,  106,  758,  756,  763,  106,  106,  106,  759,
-
-      762,  775,  106,  765,  785,  106,  761,  764,  106,  737,
-      737,  776,  737,  737,  106,  786,  106,  106,  780,  790,
-      787,  106,  781,  106,  106,  106,  789,  106,  106,  106,
-      106,  794,  788,  106,  106,  798,  106,  814,  106,  791,
-      806,  792,  793,  795,  799,  796,  800,  797,  106,  801,
-      802,  106,  106,  106,  803,  361,  106,  804,  805,  815,
-      106,  824,  106,  826,  106,  106,  106,  106,  808,  106,
-      106,  106,  807,  106,  828,  830,  817,  106,  832,  106,
-      106,  836,  837,  829,  827,  106,  834,  825,  778,  838,
-      831,  106,  106,  106,  106,  833,  841,  846,  842,  853,
-
-      835,  843,  844,  106,  854,  190,  839,  858,  858,  106,
-      858,  858,  840,  106,  845,  190,  106,  106,  863,  861,
-      878,  847,  106,  879,  106,  864,  881,  106,  882,  106,
-      855,  106,  870,  859,  862,  106,  871,  106,  872,  883,
-      106,  190,  106,  860,  865,  866,  867,  106,  868,  106,
-      873,  874,  875,  106,  876,  106,  880,  106,  106,  106,
-      896,  106,  106, 1087,  885,  886,  106,  869,  106,  889,
-      890,  106,  106,  877,  910,  884,  901,  106,  897,  897,
-      106,  897,  897,  905,  106,  891,  106,  900,  858,  858,
-      106,  858,  858,  106,  903,  906,  902,  106,  904,  907,
-
-      106,  908,  106,  909,  898,  106,  911,  106,  912,  913,
-      914,  915,  106,  916,  859,  892,  106,  918,  106,  106,
-      917,  919,  106,  106,  106,  106,  106,  106,  106,  936,
-      106,  106,  921,  106,  923,  924,  925,  920,  106,  922,
-      935,  190,  993,  897,  897,  106,  897,  897,  939,  106,
-      938,  926,  106,  106,  940,  941,  942,  106,  106,  106,
-      106,  943,  106,  944,  106,  945,  106,  106,  946,  898,
-      106,  106,  106,  947,  949,  950,  948,  106,  951,  106,
-      952,  927,  106,  953,  106,  954,  106,  106,  106,  955,
-      106,  106,  970,  971,  971,  106,  971,  971,  106,  974,
-
-      106,  956,  957,  106,  975,  959,  106,  106,  958,  978,
-      979,  106,  106,  983,  980,  973,  106,  106,  976,  972,
-      106,  977,  106,  981,  106,  106,  106,  106,  986,  987,
-      982,  106,  106,  991,  988,  989,  106,  106,  994, 1005,
-      984,  106,  985,  992,  106,  990,  106, 1006,  971,  971,
-      106,  971,  971,  106,  106,  106, 1008,  106, 1007, 1009,
-      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
-      106, 1022, 1010, 1011,  972, 1012, 1014, 1015, 1013, 1016,
-      106, 1017,  106, 1018, 1021, 1019, 1020, 1034,  106, 1023,
-      106, 1035,  106,  106,  106,  106,  106, 1086,  106,  106,
-
-      106,  106, 1024,  106, 1045,  106,  106, 1037, 1038, 1039,
-     1040, 1041, 1036, 1042, 1043, 1044,  106, 1046,  106,  106,
-      106, 1047,  106, 1059, 1056, 1060,  106, 1057,  106,  106,
-      106, 1073,  106,  106, 1093, 1069,  106, 1058, 1083, 1084,
-      106, 1082,  106, 1071,  106, 1070,  106,  106, 1100, 1072,
-      106,  106, 1104,  106,  106, 1092, 1105,  106, 1108,  106,
-     1099,  106, 1094,  106, 1111, 1101,  106,  106,  106,  106,
-     1081, 1080, 1109, 1079, 1112, 1077, 1076, 1075, 1074, 1068,
-     1067, 1113, 1114,   64,   64,   64,   64,   64,   64,   64,
-       64,   64,   70,   70,   70, 1066,   70,   70,   70,   70,
-
-       70,   76,   76, 1065, 1064, 1063, 1062,   76,   76,   96,
-       96, 1061,   96,   96,  104,  106,  104,  104,  163,  163,
-      106,  163,  163,  163,  163,  163,  163,  170,  170,  170,
-      170,  177,  106,  177,  177,  179,  179,  106,  179,  179,
-      179,  179,  179,  179,  180,  106,  180,  180,  182,  182,
-      106,  182,  182,  186,  106,  186,  255,  255,  106,  255,
-      255,  255,  255,  255,  255,  269,  106,  269,  269,  270,
-     1055,  270,  270,  347,  347, 1054,  347,  347,  347,  347,
-      347,  347,  364,  364,  453, 1053,  453,  453,  525,  525,
-     1052,  525,  525,  525,  525,  525,  525,  526,  526, 1051,
-
-      526,  526,  526,  526,  526,  526,  598,  598, 1050,  598,
-      598,  598,  598,  598,  598,  599,  599, 1049,  599,  599,
-      599,  599,  599,  599,  724,  724, 1048,  724,  724,  724,
-      724,  724,  724,  766,  766,  106,  766,  766,  766,  766,
-      766,  766,  567,  567,  567,  567,  567,  567,  567,  626,
-      626,  626,  626,  626,  626,  626,  630,  630,  630,  630,
-      630,  630,  630, 1004, 1004,  106, 1004, 1004, 1004, 1004,
-     1004, 1004, 1029, 1029,  106, 1029, 1029, 1029, 1029, 1029,
-     1029, 1078, 1078,  106, 1078, 1078, 1078, 1078, 1078, 1078,
-     1085, 1085,  106, 1085, 1085, 1085, 1085, 1085, 1085, 1090,
-
-     1090,  106, 1090, 1090, 1090, 1090, 1090, 1090, 1091, 1091,
-     1033, 1091, 1091, 1091, 1091, 1091, 1091, 1096, 1096, 1032,
-     1096, 1096, 1096, 1096, 1096, 1096, 1097, 1097, 1031, 1097,
-     1097, 1097, 1097, 1097, 1097, 1107, 1107, 1030, 1107, 1107,
-     1107, 1107, 1107, 1107, 1110, 1110, 1028, 1110, 1110, 1110,
-     1110, 1110, 1110, 1027, 1026, 1025,  106,  106,  106, 1003,
-     1002, 1001, 1000,  999,  998,  997,  996,  995,  106,  106,
-      772,  969,  968,  967,  966,  965,  964,  963,  962,  961,
-      960,  106,  106,  937,  934,  933,  932,  931,  930,  929,
-      928,  106,  106,  106,  899,  895,  894,  893,  888,  887,
-
-      106,  106,  106,  106,  106,  106,  106,  857,  856,  106,
-      852,  851,  850,  849,  848,  106,  106,  106,  823,  822,
-      106,  821,  820,  819,  818,  816,  813,  812,  811,  810,
-      809,  106,  784,  783,  782,  779,  777,  106,  106,  106,
-      772,  771,  770,  769,  768,  767,  106,  743,  742,  741,
-      738,  736,  106,  728,  727,  726,  725,  723,  722,  721,
-      106,  106,  106,  106,  697,  696,  695,  106,  692,  106,
-      106,  106,  106,  682,  680,  106,  106,  171,  677,  676,
-      675,  674,  673,  672,  671,  670,  409,  106,  106,  106,
-      642,  641,  640,  106,  106,  624,  106,  106,  106,  604,
-
-      603,  602,  601,  600,  597,  596,  595,  106,  106,  566,
-      565,  564,  563,  106,  106,  106,  106,  106,  106,  106,
-      106,  106,  106,  528,  527,  524,  523,  522,  521,  520,
-      519,  106,  106,  106,  490,  106,  106,  106,  468,  106,
-      106,  106,  445,  444,  443,  442,  441,  438,  437,  106,
-      409,  406,  106,  106,  106,  106,  106,  356,  355,  354,
-      353,  346,  308,  106,  106,  286,  276,  275,  261,  171,
-      164,  166,  253,  164,  228,  112,  106,  188,  187,  176,
-      175,  171,  166,  164,  115,  114,  106,  101,   98,   79,
-       71,   67,   63, 1115,    3, 1115, 1115, 1115, 1115, 1115,
-
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115
+       11,   12,   13,   14,   15,   16,   14,   17,   18,   19,
+       20,   21,   21,   21,   21,   21,   21,   21,   22,   23,
+       24,   25,    4,   26,   27,   28,   27,   27,   27,   27,
+       27,   27,   27,   27,   29,   27,   27,   27,   27,   30,
+       31,   27,   27,   32,   33,   34,   27,   27,   35,   36,
+       37,   38,   39,   40,   41,   42,   43,   44,   45,   27,
+       27,   46,   27,   27,   47,   48,   49,   50,   51,   27,
+       52,   53,   54,   55,   56,   57,   58,   27,   27,   59,
+       27,   60,   61,   66,   62,   60,   76,   66,   63,   69,
+
+       69,   69,  337,   69,   73,   70,   74,   75,  118,   64,
+       71,   69,   91,   89,   80,   80,   77,   80,   80,  114,
+      115,  107,   65,   81,  108,   92,   93,   82,   90,   94,
+      120,  109,  119,   95,  121,   96,   96,   96,   96,   96,
+       96,   96,   96,  123,   97,  117,   83,  125,   85,   98,
+      110,  111,  112,  130,  126,  131,  118,   72,  195,  118,
+       99,  118,  120,  124,  118,  127,  121,  118,   86,  184,
+      118,  156,  167,  122,  100,   87,  101,  101,  101,  101,
+      101,  101,  101,  101,  154,  118,  118,  128,  128,  155,
+      128,  128,  100,  102,  104,  104,  104,  104,  104,  104,
+
+      104,  104,  118,  133,  118,  122,  118,  118,  339,  134,
+      196,  106,  103,  141,  118,  118,  135,  118,  138,  142,
+      139,  150,  136,  102,  118,  118,  143,  140,  185,  147,
+      183,  151,  137,  144,  118,  157,  118,  145,  118,  148,
+      146,  106,  103,  118,  129,  118,  152,  198,  182,  149,
+      118,  158,  153,  201,  162,  159,  163,  164,  118,  120,
+      118,  165,  202,  121,  166,  160,  168,  169,  118,  179,
+       66,  161,  195,  172,   66,  180,  173,  170,  171,  176,
+      181,  186,  187,  204,  187,  186,  174,   97,  188,  118,
+      250,  204,  193,  175,   69,   69,   69,  199,   69,  189,
+
+       70,   79,  122,   99,  207,   71,   69,   69,   69,   69,
+       79,   69,  190,  200,  118,  204,  204,  208,   71,   69,
+      206,  226,   80,   80,  196,   80,   80,  225,  177,  227,
+      195,   81,  229,  178,  230,   82,  205,  118,   96,   96,
+       96,   96,   96,   96,   96,   96,  118,  118,  118,  118,
+      251,  231,   72,  118,   83,  212,   85,   96,   96,   96,
+       96,   96,   96,   96,   96,   72,  118,  118,  125,  226,
+      118,  118,  118,  118,  215,  234,   86,  245,  283,  228,
+      236,  118,  196,   87,  100,  212,  101,  101,  101,  101,
+      101,  101,  101,  101,  118,  128,  128,  284,  128,  128,
+
+      218,  246,  218,  217,  215,  219,  219,  219,  219,  219,
+      219,  219,  219,  100,  118,  104,  104,  104,  104,  104,
+      104,  104,  104,  118,  118,  299,  118,  118,  118,  218,
+      118,  218,  106,  217,  222,  222,  222,  222,  222,  222,
+      222,  222,  232,  235,  226,  118,  247,  249,  118,  291,
+      233,  118,  129,  118,  244,  118,  118,  118,  254,  118,
+      118,  255,  106,  248,  252,  253,  118,  256,  263,  118,
+      237,  258,  238,  239,  257,  240,  260,  259,  241,  118,
+      261,  262,  118,  118,  118,  118,  118,  118,  242,  243,
+      118,  264,  271,  118,  118,  274,  118,  267,  269,  265,
+
+      118,  118,  266,  118,  268,  273,  118,  272,  279,  270,
+      277,  118,  285,  118,  276,  282,  278,  118,  280,  120,
+      281,  118,  286,  118,  118,  287,  289,  118,  118,  118,
+      118,  191,  293,  303,  305,  290,  295,  118,  297,  288,
+      292,  298,  294,  308,  309,  300,  296,  311,  301,  186,
+      187,  204,  187,  186,  201,  204,  188,  336,  118,  118,
+      204,  752,  122,  306,  317,  338,  307,  189,  343,  342,
+      118,  318,  118,  344,  118,   69,   69,   69,  319,   69,
+      190,   70,  118,  118,  345,  118,   71,   69,  192,  219,
+      219,  219,  219,  219,  219,  219,  219,  204,  118,  196,
+
+      197,  118,   79,  346,  197,  315,  197,  197,  197,  197,
+      197,  197,  198,  361,  197,  197,  197,  197,  197,  197,
+      197,  197,  197,  197,  197,  197,  197,  197,  197,  197,
+      197,  197,  197,   72,  320,  118,  313,  321,  219,  219,
+      219,  219,  219,  219,  219,  219,  118,  118,  118,  352,
+      322,  323,  351,  347,  118,  118,  118,  362,  197,  197,
+      197,  197,  325,  355,  325,  118,  348,  326,  326,  326,
+      326,  326,  326,  326,  326,  328,  354,  328,  204,  353,
+      329,  329,  329,  329,  329,  329,  329,  329,  218,  197,
+      218,  118,  118,  331,  331,  331,  331,  331,  331,  331,
+
+      331,  220,  220,  220,  220,  220,  220,  220,  220,  363,
+     1329,  364,  118,  445,  333,  333,  333,  333,  333,  333,
+      222,  222,  222,  222,  222,  222,  222,  222,  118,  118,
+      118,  366,  349,  118,  368,  118,  356,  118,  359,  118,
+      350,  118,  367,  370,  333,  333,  333,  333,  333,  333,
+      358,  118,  360,  118,  371,  365,  369,  118,  118,  118,
+      118,  375,  118,  374,  118,  118,  118,  376,  118,  118,
+      372,  373,  118,  377,  381,  379,  118,  380,  118,  226,
+      118,  118,  118,  378,  384,  118,  118,  118,  118,  118,
+      382,  118,  118,  118,  395,  391,  385,  390,  387,  398,
+
+      191,  392,  389,  388,  118,  394,  393,  118,  118,  386,
+      118,  118,  118,  397,  118,  402,  399,  404,  396,  118,
+      118,  118,  410,  406,  401,  403,  405,  118,  400,  118,
+      422,  409,  425,  118,  407,  411,  195,  204,  412,  408,
+      413,  428,  414,  204,   81,  204,  440,  415,   82,  204,
+      442,  204,  416,  417,  418,  419,  420,  192,  461,  429,
+      118,  426,  118,  118,  427,  441,  460,  459,  118,  468,
+      204,  448,  448,  448,  448,  448,  448,  448,  448,  477,
+      118,  443,  421,  118,  118,  118,  118,  488,  196,  444,
+      470,  435,  197,  462,  118,  118,  197,  469,  197,  197,
+
+      197,  197,  197,  197,  198,  446,  197,  197,  197,  197,
+      197,  197,  447,  118,  118,  473,  118,  526,  502,  471,
+      197,  197,  197,  197,  197,  326,  326,  326,  326,  326,
+      326,  326,  326,  450,  450,  450,  450,  450,  450,  450,
+      450,  329,  329,  329,  329,  329,  329,  329,  329,  467,
+      197,  197,  197,  197,  331,  331,  331,  331,  331,  331,
+      331,  331,  118,  118,  118,  118,  118,  472,  476,  474,
+      479,  118,  118,  118,  118,  507,  504,  501,  118,  510,
+      480,  197,   68,   69,   69,   69,   68,   69,   68,   70,
+       68,   68,   68,   68,   71,   69,   68,   68,   68,   68,
+
+       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
+       68,   68,   68,   68,   68,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+       68,   72,   68,   68,  437,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+      437,   68,  437,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,  201,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+
+       78,   78,   78,   78,   78,   78,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,   78,   79,   78,   78,  439,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,   78,  439,  454,  454,  454,  454,  454,  454,
+      454,  454,  118,  464,  118,  118,  226,  455,  455,  455,
+      455,  455,  455,  465,  118,  118,  118,  573,  481,  226,
+      475,  118,  118,  118,  466,  478,  118,  118,  483,  485,
+
+      486,  118,  487,  484,  489,  118,  490,  455,  455,  455,
+      455,  455,  455,  491,  118,  118,  118,  492,  118,  482,
+      118,  118,  226,  118,  118,  493,  118,  494,  118,  495,
+      496,  118,  118,  118,  118,  118,  497,  499,  500,  509,
+      498,  118,  512,  118,  506,  503,  118,  118,  508,  118,
+      118,  511,  505,  118,  513,  118,  516,  118,  519,  520,
+      517,  118,  118,  514,  523,  118,  525,  118,  118,  515,
+      118,  522,  527,  118,  524,  118,  118,  530,  118,  118,
+      531,  529,  528,  118,  118,  118,  118,  118,  536,  537,
+      118,  534,  539,  118,  118,  118,  532,  226,  533,  538,
+
+      118,  548,  543,  535,  542,  552,  204,  540,  204,  544,
+      553,  541,  578,  580,  565,  545, 1326,  118,  546,  549,
+      118,  586,  118,  118,  564,  118,  588,  547,   69,   69,
+       69,   69,   69,   69,   69,  195,   69,   69,   69,   69,
+       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
+       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
+       69,  560,  560,  560,  560,  560,  560,  560,  560,  560,
+      560,  560,  560,  560,  560,  560,  560,  560,  560,  560,
+      560,  560,  560,  560,  560,  560,   69,  196,   69,   69,
+      560,  560,  560,  560,  560,  560,  560,  560,  560,  560,
+
+      560,  560,  560,  560,  560,  560,  560,  560,  560,  560,
+      560,  560,  560,  560,  560,  560,  560,   69,  560,  197,
+      204,  204,  204,  197,  204,  197,  197,  197,  197,  197,
+      197,  198,  204,  197,  197,  197,  197,  197,  197,  204,
+      566,  118,  575,  118,  589,  790,  574,  197,  197,  197,
+      197,  197,  448,  448,  448,  448,  448,  448,  448,  448,
+      567,  118,  570,  450,  450,  450,  450,  450,  450,  450,
+      450,  118,  576,  579,  568,  581,  118,  197,  197,  197,
+      197,  118,  571,  118,  118,  569,  118,  118,  118,  118,
+      582,  118,  583,  592,  593,  734,  118,  118,  118,  584,
+
+      590,  118,  595,  118,  585,  587,  591,  597,  197,   68,
+       69,   69,   69,   68,   69,   68,   70,   68,   68,   68,
+       68,   71,   69,   68,   68,   68,   68,   68,   68,  118,
+      118,  118,  599,  118,  118,  598,  118,   68,   68,   68,
+       68,   68,  600,  118, 1325,  118,  603,  601,  596,  594,
+      604,  118,  606,  118,  118,  693,  605,  607,  602,  118,
+      118,  118,  118,  611,  609,  612,  610,   68,   72,   68,
+       68,  118,  118,  608,  118,  118,  118,  118,  118,  618,
+      614,  118,  118,  118,  620,  621,  118,  118,  623,  628,
+      613,  625,  118,  615,  118,  635,  636,  616,   68,   78,
+
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+      201,   78,   78,   78,   78,   78,   78,   78,   78,  118,
+      118,  118,  118,  226,  118, 1321,  118,   78,   78,   78,
+       78,   78,  629,  633,  624,  118,  638,  630,  631,  617,
+      619,  622,  632,  118,  634,  118,  118,  118,  118,  118,
+      637,  118,  640,  118,  118,  641,  645,   78,   79,   78,
+       78,  639,  118,  644,  642,  118,  118,  118,  626,  643,
+      118,  648,  118,  656,  646,  204,  204,  651,  657,  650,
+      118,  649,  647,  118,  118,  204,  204,  653,   78,  454,
+      454,  454,  454,  454,  454,  454,  454,  204,  652,  669,
+
+      677,  655,  455,  455,  455,  455,  455,  455,  204,  204,
+      671,  118,  118,  670,  678,  681,  118,  684,  118,  685,
+      687,  204,  672,  673,  118,  118,  118,  686,  691, 1318,
+      674,  118,  455,  455,  455,  455,  455,  455,   69,   69,
+       69,   69,   69,   69,   69,  195,   69,   69,   69,   69,
+       69,   69,   69,   69,   69,   69,   69,   69,  675,  679,
+      680,  682,  676,  683,  118,  118,   69,   69,   69,   69,
+       69,  118,  118,  692,  690,  689,  118,  695,  226,  694,
+      118,  696,  118,  118,  118,  688,  118,  118,  118,  118,
+      118,  697,  118,  118,  118,  709,   69,  196,   69,   69,
+
+      118,  698,  706,  118,  118,  703,  701,  702,  118,  708,
+      704,  705,  118,  707,  118,  118,  204,  716,  716,  714,
+      716,  716,  118,  118,  836,  713,  754,   69,   68,   69,
+       69,   69,   68,   69,   68,   70,   68,   68,   68,   68,
+       71,   69,   68,   68,   68,   68,   68,   68,  118,  118,
+      118,  118,  118,  118,  226,  118,   68,   68,   68,   68,
+       68,  118,  774,  727,  710,  712,  717,  711,  118,  118,
+      718,  715,  719,  728,  729,  732,  118,  118,  118,  118,
+      118,  735,  736,  118,  118,  118,   68,   72,   68,   68,
+      753,  740,  737,  746,  745,  738,  739,  118,  741,  722,
+
+      742,  204,  118,  118,  743,  843,  757,  744,  770,  756,
+      204,  118, 1312,  226,  787,  118,  118,   68,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,  201,
+       78,   78,   78,   78,   78,   78,   78,   78,  118,  755,
+      118,  747,  204,  204,  204,  775,   78,   78,   78,   78,
+       78,  748,  204,  749,  779,  780,  781,  750,  758,  118,
+      751,  782,  784,  783,  769,  118,  118, 1311,  118,  785,
+      118,  118,  118,  118,  118,  118,   78,   79,   78,   78,
+      776,  778,  791,  118,  118,  786,  794,  777,  118,  792,
+      788,  118,  118,  793,  118,  795,  118,  798,  118,  118,
+
+      799,  118,  805,  800,  118,  835,  812,   78,  720,  720,
+      720,  720,  720,  720,  720,  720,  720,  720,  720,  720,
+      720,  720,  720,  720,  720,  720,  720,  720,  721,  721,
+      721,  721,  721,  721,  721,  721,  720,  720,  720,  720,
+      720,  118,  118,  118,  771,  771,  118,  771,  771,  226,
+      226,  118,  716,  716,  118,  716,  716,  772,  226,  815,
+      118,  802,  806,  841,  808,  828,  720,  720,  720,  720,
+      118,  204,  814,  118,  118,  118,  811,  811,  830,  811,
+      811,  118,  118,  118,  820,  831,  821,  832,  118,  118,
+      842,  773,  118,  833,  796,  797,  854,  720,  721,  730,
+
+      730,  730,  730,  730,  730,  730,  730,  730,  730,  730,
+      730,  730,  730,  730,  730,  730,  730,  730,  730,  731,
+      731,  731,  731,  731,  731,  731,  731,  730,  730,  730,
+      730,  730,  813,  118,  118,  118,  226,  118,  118,  118,
+      838,  118,  887,  118,  118,  118,  845,  204,  204,  816,
+      816,  834,  816,  816,  837,  839,  118,  730,  730,  730,
+      730,  118,  840,  847,  844,  846,  848,  118,  118,  204,
+      849,  852,  684,  829,  118,  850,  817,  864,  851,  878,
+      691,  204,  869,  853,  865,  204,  118,  118,  730,  731,
+       69,   69,   69,   69,   69,   69,   69,  195,   69,   69,
+
+       69,   69,   69,   69,   69,   69,   69,   69,   69,   69,
+      118,  771,  771,  873,  771,  771,  684,  226,   69,   69,
+       69,   69,   69,  204,  772,  866,  866,  868,  866,  866,
+      118,  870,  118,  118,  118,  118,  226,  118,  867,  118,
+      118,  118,  118,  118,  118,  879,  875,  691,   69,  196,
+       69,   69,  204,  880,  876,  877,  881,  882,  871,  118,
+      118,  118,  889,  900,  883,  884,  811,  811,  118,  811,
+      811,  118,  891,  118,  899,  118,  907,  959,  890,   69,
+      803,  803,  803,  803,  803,  803,  803,  803,  803,  803,
+      803,  803,  803,  803,  803,  803,  803,  803,  803,  803,
+
+      804,  804,  804,  804,  804,  804,  804,  804,  803,  803,
+      803,  803,  803,  118,  118,  118, 1310,  226,  816,  816,
+      118,  816,  816,  901,  902,  118,  118,  118,  898,  904,
+      905,  118,  906,  903,  908,  118,  118,  118,  803,  803,
+      803,  803,  118,  118,  118,  817,  886,  909,  118,  118,
+      915,  911,  118,  910,  912,  913,  118,  916,  914,  118,
+      918,  933,  885,  961,  204, 1309,  118,  118,  204,  803,
+      804,  809,  809,  809,  809,  809,  809,  809,  809,  809,
+      809,  809,  809,  809,  809,  809,  809,  809,  809,  809,
+      809,  810,  810,  810,  810,  810,  810,  810,  810,  809,
+
+      809,  809,  809,  809,  917,  118,  920,  629,  771,  771,
+      774,  771,  771,  631,  930,  866,  866,  921,  866,  866,
+      919,  772,  226,  934,  118,  118,  118, 1001,  867,  809,
+      809,  809,  809,  118,  118,  204,  932,  937,  118,  935,
+      118,  118,  118,  939,  118,  118,  936,  118,  118,  204,
+      204,  118,  691,  691,  118,  773,  945,  954,  938,  955,
+      809,  810,  818,  818,  818,  818,  818,  818,  818,  818,
+      818,  818,  818,  818,  818,  818,  818,  818,  818,  818,
+      818,  818,  819,  819,  819,  819,  819,  819,  819,  819,
+      818,  818,  818,  818,  818,  774,  931,  771,  771,  118,
+
+      771,  771,  118,  118,  118,  118,  118,  956,  118,  958,
+      772,  118,  118, 1065,  118,  965,  962,  118,  946,  118,
+      818,  818,  818,  818,  204,  943,  943,  947,  943,  943,
+      957,  960,  963,  118,  118,  118,  118,  966,  964,  969,
+      118,  973,  118,  967,  773,  970,  204,  204,  118, 1000,
+      968,  818,  819,  940,  940,  940,  940,  940,  940,  940,
+      940,  940,  940,  940,  940,  940,  940,  940,  940,  940,
+      940,  940,  940,  941,  941,  941,  941,  941,  941,  941,
+      941,  940,  940,  940,  940,  940,  118,  118,  118,  118,
+      118,  983,  774,  774,  984,  118,  118,  118,  118,  985,
+
+      118,  118,  972,  118,  118,  975,  986,  974,  992,  971,
+      118,  940,  940,  940,  940,  991,  987,  943,  943,  118,
+      943,  943,  118, 1002,  993, 1003,  118,  118,  118, 1004,
+      118,  118,  118,  118,  118, 1009, 1005,  118,  118, 1013,
+      118, 1010,  940,  941, 1007, 1006, 1008, 1014, 1011, 1015,
+      118, 1012, 1016, 1017, 1020, 1021,  118,  118, 1018, 1019,
+     1029,  460,  118, 1031,  118, 1030,  118,  118,  118,  118,
+     1044, 1045, 1023,  118,  118,  118, 1022, 1049,  118,  118,
+     1043,  118,  118,  118, 1033, 1038, 1047,  118,  118,  118,
+     1051, 1055, 1048, 1046,  118,  118, 1056,  989, 1050, 1057,
+
+     1052,  118, 1053,  118, 1060,  118, 1061, 1054,  118, 1062,
+     1063,  118,  118, 1073, 1072,  226, 1058, 1078, 1078, 1304,
+     1078, 1078, 1059, 1074,  226, 1064, 1066,  118,  118,  118,
+      118, 1085, 1081, 1083, 1086, 1103,  118,  118,  118, 1104,
+     1075,  118, 1092, 1093, 1079,  118, 1094, 1100,  118,  118,
+     1101,  118, 1080,  118, 1084, 1087, 1088, 1089, 1105, 1090,
+      118,  118, 1102,  118, 1095, 1096, 1097,  118, 1098,  118,
+     1118,  118,  226, 1108, 1111, 1112, 1107, 1303, 1091,  118,
+     1119, 1119,  118, 1119, 1119, 1106,  118, 1099, 1078, 1078,
+     1113, 1078, 1078,  118, 1122,  118,  118,  118,  118,  118,
+
+     1126,  118,  118, 1127,  118, 1128, 1129, 1120, 1130, 1131,
+      118, 1132,  118, 1134, 1136, 1079, 1124, 1125,  118, 1137,
+     1114, 1133,  118,  118, 1138,  118,  118,  118, 1135, 1139,
+     1141,  118,  118, 1140, 1142,  118,  118,  118,  118,  118,
+     1159,  118, 1147, 1148,  118,  118,  118, 1144, 1146, 1163,
+     1143,  118, 1145, 1158,  226,  118,  118,  118, 1149, 1119,
+     1119, 1216, 1119, 1119, 1161,  118, 1162,  118, 1164, 1302,
+      118,  118,  118, 1171, 1165,  118, 1166,  118, 1167,  118,
+      118, 1168,  118, 1169,  118, 1181, 1120, 1170, 1150,  118,
+      118, 1193, 1172, 1173,  118, 1174,  118, 1175,  118, 1176,
+
+      118, 1177,  118,  118,  118, 1178,  118, 1194, 1194,  118,
+     1194, 1194,  118,  118, 1197,  118,  118, 1179, 1180, 1198,
+     1182,  118,  118,  118, 1201, 1202, 1203,  118, 1206, 1196,
+     1199,  118,  118, 1200, 1195, 1204,  118,  118,  118,  118,
+      118, 1209, 1210, 1211,  118, 1205,  118, 1212, 1214,  118,
+      118, 1217, 1228,  118, 1207, 1208, 1215, 1194, 1194,  118,
+     1194, 1194,  118, 1229, 1213,  118,  118,  118, 1231,  118,
+      118, 1230,  118, 1300, 1232, 1299,  118,  118,  118,  118,
+      118,  118,  118,  118, 1195, 1233,  118, 1234, 1235,  118,
+     1236, 1237, 1238, 1239,  118, 1245,  118, 1257, 1240, 1241,
+
+     1242, 1243,  118,  118, 1244, 1246, 1247,  118,  118, 1298,
+     1258,  118,  118,  118,  118,  118,  118,  118, 1260,  118,
+      118,  118, 1268, 1261, 1259,  118, 1262, 1263, 1264, 1265,
+     1270, 1266, 1267,  118, 1269,  118,  118, 1282, 1283, 1279,
+      118,  118, 1280,  118,  118,  118, 1296,  118,  118, 1316,
+      118,  118, 1306, 1281, 1307,  118, 1292, 1305, 1294, 1293,
+      118,  118,  118, 1323, 1295, 1315,  118,  118, 1327,  118,
+      118, 1331, 1328,  118,  118, 1322, 1297, 1334, 1317,  118,
+      118,  118, 1324, 1291, 1290,  118, 1289, 1288, 1287, 1286,
+     1285, 1332, 1284,  118, 1335,  118, 1337,  118, 1336,   68,
+
+       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
+       68,   68,   78,   78,   78,   78,   78,   78,  118,   78,
+       78,   78,   78,   78,   78,   84,   84,  118,   84,   84,
+      118,  118,  118,  118,   84,   84,   84,  105,  105, 1278,
+      105,  105,  105,  116, 1277,  116,  116,  116,  191,  191,
+     1276,  191,  191,  191,  191,  191,  191,  191,  191,  191,
+      191,   69,   69,   69,   69,   69,   69,   69,   69,   69,
+       69,   69,   69,   69,  197, 1275, 1274, 1273,  197,  197,
+      197,  197,  197,  197,  197,  197,  197,  203,  203,  203,
+      203,  203,  211, 1272,  211,  211,  211,  213,  213, 1271,
+
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      214,  118,  214,  214,  214,  216,  216,  118,  216,  216,
+      216,  220,  118,  220,  221,  118,  221,  221,  221,  304,
+      304,  118,  304,  304,  304,  304,  304,  304,  304,  304,
+      304,  304,  312,  118, 1256, 1255,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  324, 1254,  324,  324,  324,
+      327, 1253,  327,  327,  327,  330, 1251,  330,  330,  330,
+      332, 1250,  332,  332,  332,  334, 1249,  334,  334,  334,
+      335, 1248,  335,  335,  335,  424,  424,  118,  424,  424,
+      424,  424,  424,  424,  424,  424,  424,  424,  434,  434,
+
+      434,  436,  118,  118, 1226,  436,  436,  436,  436,  436,
+      436,  436,  436,  436,  438,  438,  438,   84, 1225, 1224,
+     1223, 1222,   84,   84,   84,  449, 1221,  449,  449,  449,
+      451, 1220,  451,  451,  451,  452, 1219,  452,  452,  452,
+      453, 1218,  453,  453,  453,  456,  118,  456,  456,  456,
+      457,  118,  457,  457,  457,  458,  982,  458,  458,  458,
+      116, 1192,  116,  116,  116,  463,  463,  463,  424,  424,
+     1191,  424,  424,  424,  424,  424,  424,  424,  424,  424,
+      424,  304,  304, 1190,  304,  304,  304,  304,  304,  304,
+      304,  304,  304,  304,  559, 1189,  559,  559,  559,  436,
+
+     1188, 1187, 1186,  436,  436,  436,  436,  436,  436,  436,
+      436,  436,  561,  561,  561,  561,  561,  561,  561,  561,
+      561,  561,  561,  561,  561,  562, 1185,  562,  562,  562,
+      563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
+      563,  563,  563,  211, 1184,  211,  211,  211,  324, 1183,
+      324,  324,  324,  214,  118,  214,  214,  214,  327,  118,
+      327,  327,  327,  572, 1160,  572,  572,  572,  577, 1157,
+      577,  577,  577,  664,  664, 1156,  664,  664,  664,  664,
+      664,  664,  664,  664,  664,  664,  665,  665, 1155,  665,
+      665,  665,  665,  665,  665,  665,  665,  665,  665,  559,
+
+     1154,  559,  559,  559,  668,  668,  668,  668,  668,  668,
+      668,  668,  668,  668,  668,  668,  668,  561,  561,  561,
+      561,  561,  561,  561,  561,  561,  561,  561,  561,  561,
+      562, 1153,  562,  562,  562,  563,  563,  563,  563,  563,
+      563,  563,  563,  563,  563,  563,  563,  563,  203,  203,
+      203,  203,  203,  762,  762, 1152,  762,  762,  762,  762,
+      762,  762,  762,  762,  762,  762,  763,  763, 1151,  763,
+      763,  763,  763,  763,  763,  763,  763,  763,  763,  925,
+      925,  118,  925,  925,  925,  925,  925,  925,  925,  925,
+      925,  925,  976,  976,  118,  976,  976,  976,  976,  976,
+
+      976,  976,  976,  976,  976,  720,  720,  720,  720,  720,
+      720,  720,  720,  720,  720,  118, 1123,  720,  730,  730,
+      730,  730,  730,  730,  730,  730,  730,  730,  118, 1121,
+      730,  803,  803,  803,  803,  803,  803,  803,  803,  803,
+      803,  118, 1117,  803,  809,  809,  809,  809,  809,  809,
+      809,  809,  809,  809, 1116, 1115,  809,  818,  818,  818,
+      818,  818,  818,  818,  818,  818,  818, 1110, 1109,  818,
+      940,  940,  940,  940,  940,  940,  940,  940,  940,  940,
+      118,  118,  940, 1227, 1227,  118, 1227, 1227, 1227, 1227,
+     1227, 1227, 1227, 1227, 1227, 1227, 1252, 1252,  118, 1252,
+
+     1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1252, 1301,
+     1301,  118, 1301, 1301, 1301, 1301, 1301, 1301, 1301, 1301,
+     1301, 1301, 1308, 1308,  118, 1308, 1308, 1308, 1308, 1308,
+     1308, 1308, 1308, 1308, 1308, 1313, 1313,  118, 1313, 1313,
+     1313, 1313, 1313, 1313, 1313, 1313, 1313, 1313, 1314, 1314,
+     1082, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314,
+     1314, 1319, 1319, 1077, 1319, 1319, 1319, 1319, 1319, 1319,
+     1319, 1319, 1319, 1319, 1320, 1320, 1076, 1320, 1320, 1320,
+     1320, 1320, 1320, 1320, 1320, 1320, 1320, 1330, 1330,  118,
+     1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330, 1330,
+
+     1333, 1333, 1071, 1333, 1333, 1333, 1333, 1333, 1333, 1333,
+     1333, 1333, 1333, 1070, 1069, 1068, 1067,  118,  118,  118,
+     1042, 1041, 1040, 1039,  118, 1037, 1036, 1035, 1034, 1032,
+     1028, 1027, 1026, 1025, 1024,  118,  999,  998,  997,  996,
+      995,  994,  990,  988,  118,  118,  118,  118,  982,  981,
+      980,  979,  978,  977,  729,  118,  953,  952,  951,  950,
+      949,  948,  944,  942,  118,  118,  118,  929,  928,  927,
+      926,  924,  923,  922,  118,  118,  118,  118,  897,  896,
+      895,  894,  893,  892,  118,  118,  888,  118,  118,  118,
+      118,  118,  118,  118,  118,  118,  118,  874,  872,  118,
+
+      118,  204,  863,  862,  861,  860,  859,  858,  857,  856,
+      118,  855,  118,  118,  118,  827,  826,  825,  824,  823,
+      822,  118,  807,  118,  801,  118,  118,  118,  118,  789,
+      118,  118,  768,  767,  766,  765,  764,  761,  760,  759,
+      118,  733,  118,  726,  725,  724,  723,  118,  118,  118,
+      118,  118,  118,  118,  700,  699,  118,  118,  667,  666,
+      663,  662,  661,  660,  659,  658,  654,  118,  118,  118,
+      627,  118,  118,  118,  118,  118,  118,  118,  558,  557,
+      556,  555,  554,  551,  550,  118,  521,  518,  118,  118,
+      118,  118,  433,  432,  431,  430,  423,  118,  383,  118,
+
+      118,  357,  341,  340,  316,  204,  314,  198,  310,  192,
+      194,  302,  192,  275,  130,  198,   79,  118,  224,  223,
+      210,  209,  204,  194,  192,  132,  118,  113,   88,   79,
+       67, 1338,    3, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338
     } ;
 
-static yyconst flex_int16_t yy_chk[2685] =
+static yyconst flex_int16_t yy_chk[4125] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -1125,307 +1373,468 @@ static yyconst flex_int16_t yy_chk[2685] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    2,
-        2,    5,    2,    2,    9,    5,    2,   11,   13,   13,
-
-       16,   13,   13,   29,   17,   19,    2,   13, 1114,   19,
-       26,   13,   23,   23,   16,   28,   11,   17,   17,    2,
-       19,   25,   25,   29,   26,   31,   33,   18,   33,   13,
-       18,   13,   18,   18,   18,   18,   18,   18,   18,   18,
-       45,  202,   55,   75,   28,    9,   31,   44,   42,  202,
-       20,   13,   20,   20,   20,   20,   20,   20,   20,   20,
-       42,   45,   44,   75,   37,   64,   42,   54,   21,   20,
-       21,   21,   21,   21,   21,   21,   21,   21,   37,   30,
-       41,   38,   54,   39,  110,   37,   43,   21,   20,   30,
-       38,   39,   48,   66,   41,   39,   38,   40,   39,   20,
-
-       43,   55,   40,  110,   41,   43,   46,   46,   47,   49,
-       48,   46,   40,   48,   49,   62,   64,   21,   20,   62,
-       50,   46,   40,   52,   47,   51,   47,   47,   50,   50,
-       51,   60,   53,   51,   70,   60,   78,   52,   71,   50,
-       50,   53,   52,   77,   66,  105,   60,   53,   77,   78,
-       51,  107,   53,   56,   56,  167,   56,   56,   72,   72,
-       56,   72,   72,  106,  120,  120,  105,   72,  109,  107,
-       56,   72, 1112,   87,   87,   87,   87,   87,   87,   87,
-       87,   70,  116,   56,  111,   71,  116,  117,  106,   72,
-       87,   72,   91,   91,   91,   91,   91,   91,   91,   91,
-
-      111,  118,  109,  121,  121,  131,  167,  117,  119,   91,
-       92,   72,   92,   92,   92,   92,   92,   92,   92,   92,
-       87,  118,  141,  119,  141,  131,   93,   93,  124,   92,
-       93,   93,   93,   93,   93,   93,   93,   93,   95,   91,
-       95,   95,   95,   95,   95,   95,   95,   95,  137,  124,
-      166,  166,  249,  137,  199,  199,  249,   95,   96,   92,
-       96,   96,   96,   96,   96,   96,   96,   96,   97,   97,
-       97,  108,   97,   97,   97,   97,   97,   97,   97,   97,
-      115,  108,  123,  126,  122,  125,  128,   95, 1102,  132,
-      133,  213,  213,  129,  123,  130,  108,  122,  122,  125,
-
-      127,  128,  129,  132,  126,  115,  115,  130,  115,  115,
-      133,  115,  135,  134,  115,  130,  127,  136,  139,  140,
-      127,  143,  142,  144,  115,  115,  134,  148,  140,  142,
-      144,  142,  145,  147,  140,  135,  143,  136,  139,  146,
-      146,  145,  149,  146,  150,  148,  147,  151,  152,  144,
-      153,  155,  165,  150,  154,  169,  151,  146,  149,  153,
-      173,  174,  153,  150,  172,  154,  152,  158,  158,  155,
-      158,  158,  190,  164,  158,  164,  173,  172,  190,  174,
-      165,  196,  200,  165,  158,  177,  177,  177,  177,  177,
-      177,  177,  177,  195,  189,  192,  200,  158,  238,  178,
-
-      178,  196,  169,  178,  178,  178,  178,  178,  178,  178,
-      178,  180,  180,  180,  180,  180,  180,  180,  180,  189,
-      198,  191,  195,  192,  238,  198,  181,  181,  326,  164,
-      181,  181,  181,  181,  181,  181,  181,  181,  182,  191,
-      182,  182,  182,  182,  182,  182,  182,  182,  183,  183,
-      183,  326,  183,  183,  183,  183,  183,  183,  183,  183,
-      184,  184,  184,  184,  184,  184,  184,  184,  185,  185,
-      185,  185,  185,  185,  185,  185,  186,  186,  186,  186,
-      186,  186,  186,  186,  197,  201,  204,  206,  197,  186,
-      186,  186,  186,  186,  186,  207,  197,  205,  205,  206,
-
-      209,  204,  212,  211,  212,  201,  208,  210,  211,  219,
-      216, 1101,  205,  207,  214,  216,  209,  215,  219,  186,
-      186,  186,  186,  186,  186,  208,  210,  214,  218,  215,
-      217,  217,  221,  218,  222,  223,  223,  224,  227,  228,
-      229,  222,  224,  230,  233,  232,  231,  234,  236,  235,
-      221,  239,  240,  233,  237,  243,  227,  232,  229,  237,
-      242,  234,  236,  241,  228,  230,  231,  235,  244,  228,
-      243,  239,  241,  244,  245,  248,  242,  247,  246,  250,
-      250,  254,  256,  262,  241,  264,  240,  246,  253,  245,
-      264,  247,  262,  263,  251,  248,  251,  251,  284,  251,
-
-      256,  251,  284,  273, 1098,  274,  251,  271,  278,  263,
-      272,  251,  251,  251,  251,  251,  253,  261,  261,  253,
-      261,  261,  251,  271,  272,  274,  261,  279,  278,  285,
-      261,  273,  279,  281,  304,  311,  281,  254,  285,  304,
-      311,  251,  265,  265,  265,  265,  265,  265,  265,  265,
-      266,  266,  266,  266,  266,  266,  266,  266,  267,  267,
-      267,  267,  267,  267,  267,  267,  268,  268,  268,  268,
-      268,  268,  268,  268,  269,  269,  269,  269,  269,  269,
-      269,  269,  270,  270,  270,  270,  270,  270,  270,  270,
-      277,  276,  280,  283,  276,  270,  270,  270,  270,  270,
-
-      270,  276,  282,  288,  277,  289,  286,  299,  293, 1095,
-      280,  297,  276,  283,  292,  294,  299,  288,  295,  276,
-      293,  282,  296,  289,  297,  270,  270,  270,  270,  270,
-      270,  286,  300,  292,  296,  294,  286,  301,  295,  302,
-      303,  306,  307,  306,  308,  309,  309,  310,  312,  312,
-      300,  313,  315,  302,  303,  316,  313,  301,  314,  317,
-     1089,  307,  323,  320,  310,  318,  318,  314,  320,  308,
-      318,  315,  321,  325,  308,  316,  323,  324,  327,  317,
-      324,  321,  327,  328,  329,  325,  330,  331,  334,  333,
-      336,  329,  327,  330,  335,  335,  337,  328,  338,  340,
-
-      339,  337,  338,  334,  340,  341,  342,  343,  331,  333,
-      344,  345,  346,  351,  336,  339,  343,  348,  351,  340,
-      342,  357,  358,  359,  360,  344,  361,  362,  358,  363,
-      341,  345,  366,  365,  360,  348,  367,  346,  365,  357,
-      368,  361,  346,  359,  369,  373,  370,  371,  367,  370,
-      371,  372,  374,  376,  363,  375,  362,  366,  375,  377,
-      378,  368,  369,  372,  378,  373,  383,  386,  384,  385,
-      386,  383,  376,  384,  390,  387,  377,  389,  385,  390,
-      392,  389,  391,  391,  393,  394,  395,  398,  374,  387,
-      397,  397,  392,  399,  400,  401,  399,  400,  402,  404,
-
-      393,  405,  394,  402,  406,  405,  395,  398,  409,  408,
-      410,  404,  408,  411,  409,  401,  414,  410,  409,  412,
-      412,  414,  415,  415,  417,  419,  419,  420,  421,  406,
-      422,  423,  424,  411,  425,  426,  420,  427,  417,  430,
-      429,  428,  432,  421,  425,  428,  431,  423,  430,  406,
-      422,  431,  424,  434,  433,  426,  429,  427,  433,  435,
-      432,  446,  447,  448,  435,  449,  450,  447,  451,  452,
-      434,  454,  456,  457,  455,  458,  448,  449,  450,  459,
-      461,  454,  460,  460,  458,  446,  462,  457,  463,  462,
-      468,  459,  464,  464, 1086,  451,  452,  455,  472,  461,
-
-      465,  456,  471,  465,  476,  471,  477,  472,  478,  478,
-      480,  477,  483,  486,  481,  468,  482,  476,  468,  484,
-      484,  482,  484,  484,  485,  480,  463,  481,  487,  485,
-      490,  486,  483,  497,  498,  499,  500,  501,  502,  503,
-      498,  500,  504,  504,  505,  507,  510,  487,  499,  501,
-      502,  503,  506,  497,  506,  490,  508,  510,  506,  505,
-      512,  506,  511,  512,  514,  508,  530,  511,  533,  506,
-      507,  553,  532,  530,  553,  490,  514,  532,  533,  484,
-      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
-      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
-
-      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
-      495,  495,  513,  515,  529,  509,  542,  531,  531,  535,
-      531,  531,  537,  536, 1079,  509,  534,  509,  542,  535,
-      531,  509,  538,  543,  509,  513,  529,  495,  495,  495,
-      495,  495,  509,  531,  546,  534,  538,  515,  536,  543,
-      540,  537,  540,  544,  544,  550,  546,  547,  547,  548,
-      548,  556,  556,  531,  556,  556,  557,  729,  495,  558,
-      558,  557,  558,  558,  729,  550,  551,  551,  551,  551,
-      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
-      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
-
-      551,  551,  551,  551,  551,  551,  551,  551,  554,  559,
-      569,  571,  560,  572,  563,  569,  571,  572,  574,  575,
-      576,  556,  651,  574,  575,  577,  554,  559,  560,  578,
-      578,  580,  651,  551,  551,  551,  551,  561,  561,  563,
-      561,  561,  563,  577,  579,  581,  579,  584,  558,  576,
-      581,  580,  585,  585,  586,  588,  586,  593,  633,  584,
-      588,  593,  633,  561,  551,  555,  555,  555,  555,  555,
-      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
-      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
-      555,  555,  555,  555,  555,  555,  555,  561,  582,  583,
-
-      587,  589,  591,  605,  590,  639,  639,  590,  619,  615,
-      592,  590,  606,  619,  582,  610,  590,  591,  583,  590,
-      587,  589,  555,  555,  555,  555,  592,  606,  590,  610,
-      607,  607,  605,  607,  607,  612,  615,  617,  618,  620,
-      621,  623,  622,  607,  624,  663,  636,  647,  647,  612,
-      618,  620,  621,  555,  622,  648,  628,  649,  617,  663,
-      623,  628,  632,  632,  636,  632,  632,  637,  637,  624,
-      637,  637,  624,  648,  652,  650,  653,  649,  650,  653,
-      654,  655,  656,  656,  657,  654,  655,  657,  658,  659,
-      661,  660,  652,  637,  660,  664,  664,  662,  658,  665,
-
-      666,  667,  668,  669,  665,  667,  680,  659,  661,  662,
-      678,  678,  683,  678,  678,  682,  684,  668, 1077,  684,
-      680,  666,  687,  678,  679,  679,  685,  679,  679,  681,
-      669,  680,  683,  686,  681,  694,  678,  679,  685,  699,
-      682,  632,  687,  688,  688,  686,  698,  701,  691,  691,
-      679,  691,  691,  693,  694,  704,  678,  699,  693,  700,
-      698,  702,  703,  706,  700,  701,  702,  706,  707,  708,
-      679,  703,  709,  710,  711,  704,  712,  709,  713,  714,
-      715,  707,  710,  715,  716,  712,  717,  708,  720,  719,
-      718,  731,  735,  713,  711,  718,  732,  731,  739,  714,
-
-      717,  732,  740,  720,  744,  749,  716,  719,  691,  737,
-      737,  735,  737,  737,  745,  745,  746,  747,  739,  749,
-      746,  744,  740,  748,  750,  752,  748,  753,  754,  755,
-      756,  754,  747,  757,  758,  758,  760,  773,  762,  750,
-      763,  752,  753,  755,  759,  756,  759,  757,  761,  759,
-      759,  763,  764,  765,  760,  774,  776,  761,  762,  774,
-      785,  785,  786,  787,  789,  791,  773,  790,  765,  774,
-      794,  795,  764,  787,  790,  792,  776,  796,  795,  797,
-      798,  799,  800,  791,  789,  759,  797,  786,  737,  801,
-      794,  803,  792,  804,  806,  796,  805,  807,  805,  814,
-
-      798,  805,  805,  808,  815,  816,  803,  820,  820,  826,
-      820,  820,  804,  814,  806,  821,  824,  799,  827,  824,
-      835,  808,  800,  835,  807,  828,  841,  801,  842,  815,
-      816,  830,  830,  820,  826,  827,  831,  805,  832,  843,
-      821,  855,  828,  821,  829,  829,  829,  840,  829,  846,
-      833,  833,  833,  831,  833,  832,  840,  845,  861,  835,
-      854,  847,  841, 1076,  846,  847,  855,  829,  842,  850,
-      850,  870,  854,  833,  870,  845,  861,  843,  856,  856,
-      862,  856,  856,  865,  829,  850,  860,  860,  858,  858,
-      833,  858,  858,  863,  863,  866,  862,  864,  864,  867,
-
-      865,  868,  869,  869,  856,  871,  871,  872,  872,  873,
-      874,  875,  866,  876,  858,  850,  867,  878,  868,  877,
-      877,  879,  880,  884,  885,  886,  873,  874,  875,  896,
-      876,  900,  884,  901,  886,  887,  887,  880,  958,  885,
-      895,  895,  958,  897,  897,  896,  897,  897,  901,  902,
-      900,  887,  903,  904,  902,  903,  904,  878,  910,  879,
-      905,  905,  906,  906,  907,  907,  895,  908,  908,  897,
-      909,  911,  912,  909,  911,  912,  910,  913,  913,  914,
-      914,  887,  915,  915,  916,  916,  917,  920,  921,  917,
-      922,  923,  935,  937,  937,  938,  937,  937,  948,  940,
-
-      941,  920,  921,  942,  940,  923,  943,  944,  922,  943,
-      944,  945,  947,  948,  945,  938,  940,  935,  941,  937,
-      946,  942,  949,  946,  950,  951,  952,  955,  951,  952,
-      947,  953,  954,  956,  953,  954,  957,  959,  959,  970,
-      949,  976,  950,  957,  977,  955,  974,  974,  971,  971,
-      956,  971,  971,  975,  978,  979,  976,  980,  975,  977,
-      981,  982,  984,  986,  985,  987,  970,  988,  989,  990,
-      991,  991,  978,  979,  971,  980,  982,  984,  981,  985,
-      993,  986,  994,  987,  990,  988,  989, 1005, 1006,  993,
-     1007, 1006, 1010, 1011, 1012, 1013, 1017, 1075, 1018, 1019,
-
-     1020, 1022,  994, 1023, 1022, 1005, 1035, 1010, 1011, 1012,
-     1013, 1017, 1007, 1018, 1019, 1020, 1024, 1023, 1036, 1045,
-     1056, 1024, 1046, 1046, 1035, 1047, 1057, 1036, 1058, 1059,
-     1060, 1060, 1070, 1072, 1083, 1056, 1073, 1045, 1072, 1073,
-     1082, 1070, 1047, 1058, 1084, 1057, 1092, 1093, 1093, 1059,
-     1094, 1083, 1099, 1100, 1105, 1082, 1100, 1104, 1104, 1109,
-     1092, 1108, 1084, 1111, 1108, 1094, 1071, 1113, 1069, 1099,
-     1068, 1067, 1105, 1066, 1109, 1064, 1063, 1062, 1061, 1055,
-     1054, 1111, 1113, 1116, 1116, 1116, 1116, 1116, 1116, 1116,
-     1116, 1116, 1117, 1117, 1117, 1053, 1117, 1117, 1117, 1117,
-
-     1117, 1118, 1118, 1052, 1051, 1050, 1049, 1118, 1118, 1119,
-     1119, 1048, 1119, 1119, 1120, 1044, 1120, 1120, 1121, 1121,
-     1043, 1121, 1121, 1121, 1121, 1121, 1121, 1122, 1122, 1122,
-     1122, 1123, 1042, 1123, 1123, 1124, 1124, 1041, 1124, 1124,
-     1124, 1124, 1124, 1124, 1125, 1040, 1125, 1125, 1126, 1126,
-     1039, 1126, 1126, 1127, 1038, 1127, 1128, 1128, 1037, 1128,
-     1128, 1128, 1128, 1128, 1128, 1129, 1034, 1129, 1129, 1130,
-     1033, 1130, 1130, 1131, 1131, 1032, 1131, 1131, 1131, 1131,
-     1131, 1131, 1132, 1132, 1133, 1031, 1133, 1133, 1134, 1134,
-     1030, 1134, 1134, 1134, 1134, 1134, 1134, 1135, 1135, 1028,
-
-     1135, 1135, 1135, 1135, 1135, 1135, 1136, 1136, 1027, 1136,
-     1136, 1136, 1136, 1136, 1136, 1137, 1137, 1026, 1137, 1137,
-     1137, 1137, 1137, 1137, 1138, 1138, 1025, 1138, 1138, 1138,
-     1138, 1138, 1138, 1139, 1139, 1021, 1139, 1139, 1139, 1139,
-     1139, 1139, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1141,
-     1141, 1141, 1141, 1141, 1141, 1141, 1142, 1142, 1142, 1142,
-     1142, 1142, 1142, 1143, 1143, 1016, 1143, 1143, 1143, 1143,
-     1143, 1143, 1144, 1144, 1015, 1144, 1144, 1144, 1144, 1144,
-     1144, 1145, 1145, 1014, 1145, 1145, 1145, 1145, 1145, 1145,
-     1146, 1146, 1009, 1146, 1146, 1146, 1146, 1146, 1146, 1147,
-
-     1147, 1008, 1147, 1147, 1147, 1147, 1147, 1147, 1148, 1148,
-     1003, 1148, 1148, 1148, 1148, 1148, 1148, 1149, 1149, 1002,
-     1149, 1149, 1149, 1149, 1149, 1149, 1150, 1150, 1001, 1150,
-     1150, 1150, 1150, 1150, 1150, 1151, 1151, 1000, 1151, 1151,
-     1151, 1151, 1151, 1151, 1152, 1152,  998, 1152, 1152, 1152,
-     1152, 1152, 1152,  997,  996,  995,  992,  983,  973,  968,
-      967,  966,  965,  964,  963,  962,  961,  960,  939,  936,
-      934,  933,  932,  931,  930,  929,  928,  927,  926,  925,
-      924,  919,  918,  899,  894,  893,  892,  891,  890,  889,
-      888,  883,  882,  881,  857,  853,  852,  851,  849,  848,
-
-      844,  839,  838,  837,  836,  834,  825,  819,  818,  817,
-      813,  812,  811,  810,  809,  802,  793,  788,  783,  782,
-      781,  780,  779,  778,  777,  775,  771,  770,  769,  768,
-      767,  751,  743,  742,  741,  738,  736,  734,  733,  730,
-      728,  727,  726,  725,  723,  722,  705,  697,  696,  695,
-      692,  690,  689,  677,  676,  675,  674,  672,  671,  670,
-      646,  645,  644,  643,  642,  641,  640,  635,  634,  631,
-      629,  627,  625,  616,  614,  613,  611,  609,  604,  603,
-      602,  601,  600,  597,  596,  595,  594,  573,  570,  568,
-      566,  565,  564,  562,  552,  549,  545,  541,  539,  528,
-
-      527,  524,  523,  522,  519,  518,  517,  516,  496,  494,
-      493,  492,  491,  489,  488,  479,  475,  474,  473,  470,
-      469,  467,  466,  445,  444,  441,  440,  439,  438,  437,
-      436,  418,  416,  413,  407,  403,  396,  388,  382,  381,
-      380,  379,  356,  355,  354,  353,  352,  350,  349,  332,
-      322,  319,  305,  298,  291,  290,  287,  260,  259,  258,
-      257,  252,  226,  225,  220,  203,  194,  193,  171,  170,
-      163,  162,  161,  160,  138,  113,  104,  103,   99,   86,
-       84,   76,   61,   59,   36,   35,   27,   24,   22,   15,
-       12,   10,    8,    3, 1115, 1115, 1115, 1115, 1115, 1115,
-
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115, 1115,
-     1115, 1115, 1115, 1115
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    2,    5,    2,    2,   11,    5,    2,    9,
+
+        9,    9,  226,    9,   10,    9,   10,   10,  226,    2,
+        9,    9,   17,   16,   13,   13,   11,   13,   13,   25,
+       25,   22,    2,   13,   22,   17,   17,   13,   16,   18,
+       29,   23,   28,   18,   29,   18,   18,   18,   18,   18,
+       18,   18,   18,   30,   19,   26,   13,   31,   13,   19,
+       23,   23,   23,   36,   33,   36,   47,    9,   69,   26,
+       19,   28,   32,   30,   33,   34,   32,   52,   13,   59,
+       46,   47,   52,   29,   20,   13,   20,   20,   20,   20,
+       20,   20,   20,   20,   46,   29,   34,   35,   35,   46,
+       35,   35,   21,   20,   21,   21,   21,   21,   21,   21,
+
+       21,   21,   31,   39,   41,   32,   40,   44,  228,   39,
+       69,   21,   20,   41,   48,   58,   39,   32,   40,   41,
+       40,   44,   39,   20,   43,   42,   42,   40,   59,   43,
+       58,   44,   39,   42,   45,   48,  228,   42,   50,   43,
+       42,   21,   20,   51,   35,   57,   45,   70,   57,   43,
+       49,   49,   45,   78,   50,   49,   50,   50,   53,   55,
+       56,   51,   79,   55,   51,   49,   53,   53,   54,   56,
+       66,   49,   71,   54,   66,   56,   54,   53,   53,   55,
+       56,   60,   60,   87,   60,   60,   54,   64,   60,  144,
+      144,   86,   64,   54,   68,   68,   68,   70,   68,   60,
+
+       68,   78,   55,   64,   86,   68,   68,   72,   72,   72,
+       79,   72,   60,   72,   55,   85,   83,   87,   72,   72,
+       85,  118,   80,   80,   71,   80,   80,  117,   55,  119,
+      120,   80,  124,   55,  126,   80,   83, 1337,   96,   96,
+       96,   96,   96,   96,   96,   96,  118,  119,  117,  145,
+      145,  127,   68,  126,   80,   96,   80,  100,  100,  100,
+      100,  100,  100,  100,  100,   72,  124,  127,  122,  123,
+      134,  169,  136,  139,  100,  134,   80,  139,  169,  123,
+      136,  140,  120,   80,  101,   96,  101,  101,  101,  101,
+      101,  101,  101,  101,  123,  128,  128,  169,  128,  128,
+
+      102,  140,  102,  101,  100,  102,  102,  102,  102,  102,
+      102,  102,  102,  104,  181,  104,  104,  104,  104,  104,
+      104,  104,  104,  122,  174,  181,  141,  143,  135,  106,
+      133,  106,  104,  101,  106,  106,  106,  106,  106,  106,
+      106,  106,  133,  135,  137,  138,  141,  143,  142,  174,
+      133,  146,  128,  148,  138,  147,  150,  149,  147,  153,
+      151,  147,  104,  142,  146,  146,  152,  147,  153,  137,
+      137,  149,  137,  137,  148,  137,  151,  150,  137,  154,
+      151,  152,  155,  156,  157,  158,  159,  160,  137,  137,
+      162,  154,  160,  161,  164,  162, 1335,  156,  158,  154,
+
+      168,  165,  155,  170,  157,  161,  166,  160,  166,  159,
+      165,  167,  170,  172,  164,  168,  165,  173,  167,  176,
+      167,  171,  171,  177,  175,  171,  172,  178,  179,  180,
+      183,  192,  177,  192,  193,  173,  178,  182,  180,  171,
+      175,  180,  177,  194,  194,  182,  179,  196,  183,  186,
+      186,  205,  186,  186,  202,  206,  186,  225,  233,  232,
+      207,  648,  176,  193,  205,  227,  193,  186,  232,  231,
+      234,  206,  648,  233,  176,  200,  200,  200,  207,  200,
+      186,  200,  225,  227,  234,  235,  200,  200,  192,  218,
+      218,  218,  218,  218,  218,  218,  218,  208,  231,  196,
+
+      199,  248,  202,  235,  199,  202,  199,  199,  199,  199,
+      199,  199,  199,  248,  199,  199,  199,  199,  199,  199,
+      199,  199,  199,  199,  199,  199,  199,  199,  199,  199,
+      199,  199,  199,  200,  208,  236,  200,  208,  219,  219,
+      219,  219,  219,  219,  219,  219,  237,  239,  240,  240,
+      208,  208,  239,  236,  249,  243,  242,  249,  199,  199,
+      199,  199,  212,  243,  212,  241,  237,  212,  212,  212,
+      212,  212,  212,  212,  212,  215,  242,  215,  321,  241,
+      215,  215,  215,  215,  215,  215,  215,  215,  217,  199,
+      217,  250,  251,  217,  217,  217,  217,  217,  217,  217,
+
+      217,  220,  220,  220,  220,  220,  220,  220,  220,  250,
+     1325,  251,  253,  321,  220,  220,  220,  220,  220,  220,
+      222,  222,  222,  222,  222,  222,  222,  222,  238,  244,
+      254,  253,  238,  255,  255,  246,  244,  247,  247,  252,
+      238,  257,  254,  257,  220,  220,  220,  220,  220,  220,
+      246,  256,  247,  258,  258,  252,  256,  259,  261,  260,
+      262,  262,  263,  261,  264,  266,  271,  263,  267,  269,
+      259,  260,  273,  264,  269,  267,  268,  268,  274,  275,
+      276,  277,  278,  266,  273,  279,  280,  281,  282,  284,
+      271,  283,  285,  286,  284,  280,  274,  279,  276,  287,
+
+      303,  281,  278,  277,  275,  283,  282,  288,  289,  275,
+      290,  293,  292,  286,  294,  290,  288,  292,  285,  296,
+      295,  298,  298,  294,  289,  290,  293,  297,  288,  300,
+      300,  297,  302,  287,  295,  299,  311,  317,  299,  296,
+      299,  305,  299,  320,  316,  319,  317,  299,  316,  318,
+      319,  322,  299,  299,  299,  299,  299,  303,  338,  305,
+      352,  302,  343,  299,  302,  318,  337,  336,  364,  343,
+      323,  325,  325,  325,  325,  325,  325,  325,  325,  352,
+      337,  320,  299,  336,  344,  345,  338,  364,  311,  320,
+      345,  311,  312,  339,  403,  348,  312,  344,  312,  312,
+
+      312,  312,  312,  312,  312,  322,  312,  312,  312,  312,
+      312,  312,  323,  339,  346,  348,  380,  403,  380,  346,
+      312,  312,  312,  312,  312,  326,  326,  326,  326,  326,
+      326,  326,  326,  328,  328,  328,  328,  328,  328,  328,
+      328,  329,  329,  329,  329,  329,  329,  329,  329,  342,
+      312,  312,  312,  312,  331,  331,  331,  331,  331,  331,
+      331,  331,  347,  342,  349,  351,  354,  347,  351,  349,
+      354,  355,  378,  382,  385,  385,  382,  378,  388,  388,
+      355,  312,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  313,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  333,  333,  333,  333,  333,  333,
+      333,  333,  350,  341,  356,  353,  341,  333,  333,  333,
+      333,  333,  333,  341,  359,  360,  366,  459,  356,  357,
+      350,  362,  365,  367,  341,  353,  368,  459,  359,  362,
+
+      363,  341,  363,  360,  365,  369,  366,  333,  333,  333,
+      333,  333,  333,  367,  357,  370,  371,  368,  374,  357,
+      375,  373,  383,  376,  377,  369,  381,  370,  384,  371,
+      373,  386, 1324,  390,  387,  391,  374,  376,  377,  387,
+      375,  363,  390,  392,  384,  381,  389,  383,  386,  393,
+      397,  389,  383,  396,  391,  394,  394,  399,  396,  397,
+      394,  400,  401,  392,  400,  402,  402,  405,  404,  393,
+      406,  399,  404,  407,  401,  408,  411,  406,  410,  412,
+      407,  405,  404,  413,  415,  414,  417,  416,  413,  414,
+      418,  411,  416,  419,  420,  421,  408,  423,  410,  415,
+
+      422,  425,  419,  412,  418,  428,  440,  416,  441,  420,
+      428,  417,  464,  466,  441,  421, 1321,  464,  422,  425,
+      472,  472,  423,  474,  440,  466,  474,  423,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  435,
+      435,  435,  435,  435,  435,  435,  435,  435,  435,  436,
+      442,  443,  444,  436,  446,  436,  436,  436,  436,  436,
+      436,  436,  445,  436,  436,  436,  436,  436,  436,  447,
+      442,  475,  461,  690,  475,  690,  460,  436,  436,  436,
+      436,  436,  448,  448,  448,  448,  448,  448,  448,  448,
+      443,  460,  446,  450,  450,  450,  450,  450,  450,  450,
+      450,  461,  462,  465,  444,  467,  468,  436,  436,  436,
+      436,  470,  447,  469,  471,  445,  477,  473,  476,  637,
+      468,  479,  469,  478,  479,  637,  467,  462,  465,  470,
+
+      476,  481,  481,  483,  471,  473,  477,  483,  436,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  437,
+      437,  437,  437,  437,  437,  437,  437,  437,  437,  478,
+      480,  482,  487,  491,  492,  486,  590,  437,  437,  437,
+      437,  437,  490,  495, 1318,  493,  492,  490,  482,  480,
+      493,  494,  495,  502,  496,  590,  494,  496,  491,  497,
+      499,  500,  501,  501,  499,  502,  500,  437,  437,  437,
+      437,  486,  487,  497,  503,  504,  505,  506,  509,  509,
+      504,  511,  512,  514,  511,  512,  520,  517,  514,  520,
+      503,  517,  525,  505,  524,  524,  525,  506,  437,  439,
+
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  507,
+      510,  513,  516,  518,  523, 1312,  522,  439,  439,  439,
+      439,  439,  521,  522,  516,  528,  528,  521,  521,  507,
+      510,  513,  521,  536,  523,  527,  533,  530,  518,  534,
+      527,  532,  532,  535,  538,  533,  537,  439,  439,  439,
+      439,  530,  539,  536,  534,  541,  537,  540,  518,  535,
+      542,  540,  543,  548,  538,  564,  569,  543,  548,  542,
+      544,  541,  539,  545,  547,  567,  568,  545,  439,  454,
+      454,  454,  454,  454,  454,  454,  454,  566,  544,  564,
+
+      573,  547,  454,  454,  454,  454,  454,  454,  565,  571,
+      566,  584,  573,  565,  574,  578,  588,  581,  582,  582,
+      584,  570,  567,  568,  583,  578,  574,  583,  588, 1309,
+      569,  581,  454,  454,  454,  454,  454,  454,  560,  560,
+      560,  560,  560,  560,  560,  560,  560,  560,  560,  560,
+      560,  560,  560,  560,  560,  560,  560,  560,  570,  575,
+      576,  579,  571,  580,  585,  587,  560,  560,  560,  560,
+      560,  586,  589,  589,  587,  586,  591,  592,  600,  591,
+      593,  593,  595,  601,  579,  585,  575,  576,  594,  602,
+      603,  594,  580,  607,  613,  613,  560,  560,  560,  560,
+
+      611,  595,  607,  600,  612,  602,  600,  601,  606,  612,
+      603,  606,  618,  611,  619,  592,  672,  621,  621,  619,
+      621,  621,  742,  650,  742,  618,  650,  560,  561,  561,
+      561,  561,  561,  561,  561,  561,  561,  561,  561,  561,
+      561,  561,  561,  561,  561,  561,  561,  561,  614,  616,
+      617,  620,  623,  624,  627,  635,  561,  561,  561,  561,
+      561,  622,  672,  632,  614,  617,  622,  616,  638,  645,
+      623,  620,  624,  632,  632,  635,  643,  639,  621,  627,
+      640,  638,  639,  641,  642,  649,  561,  561,  561,  561,
+      649,  643,  640,  646,  645,  641,  642,  652,  644,  627,
+
+      644,  670,  646,  749,  644,  749,  653,  644,  670,  652,
+      673,  687, 1302,  654,  687,  644,  651,  561,  563,  563,
+      563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
+      563,  563,  563,  563,  563,  563,  563,  563,  654,  651,
+      653,  647,  669,  674,  676,  673,  563,  563,  563,  563,
+      563,  647,  675,  647,  677,  678,  679,  647,  654,  677,
+      647,  680,  682,  681,  669,  678,  685, 1300,  647,  683,
+      692,  680,  688,  693,  696,  679,  563,  563,  563,  563,
+      674,  676,  692,  683,  702,  685,  696,  675,  681,  693,
+      688,  682,  694,  694,  697,  697,  701,  701,  703,  709,
+
+      702,  715,  709,  703,  741,  741,  715,  563,  626,  626,
+      626,  626,  626,  626,  626,  626,  626,  626,  626,  626,
+      626,  626,  626,  626,  626,  626,  626,  626,  626,  626,
+      626,  626,  626,  626,  626,  626,  626,  626,  626,  626,
+      626,  706,  710,  718,  671,  671,  712,  671,  671,  699,
+      700,  747,  716,  716,  717,  716,  716,  671,  723,  718,
+      732,  706,  710,  747,  712,  732,  626,  626,  626,  626,
+      626,  671,  717,  735,  699,  700,  714,  714,  735,  714,
+      714,  736,  738,  723,  723,  736,  723,  738,  739,  748,
+      748,  671,  756,  739,  699,  700,  756,  626,  626,  633,
+
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  633,  633,  633,  633,  633,  633,  633,  633,
+      633,  633,  716,  740,  743,  744,  733,  714,  812,  745,
+      744,  751,  812,  746,  750,  752,  751,  776,  769,  719,
+      719,  740,  719,  719,  743,  745,  754,  633,  633,  633,
+      633,  733,  746,  753,  750,  752,  753,  755,  791,  770,
+      753,  754,  779,  733,  792,  753,  719,  769,  753,  792,
+      791,  775,  776,  755,  770,  777,  779,  753,  633,  633,
+      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
+
+      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
+      719,  771,  771,  784,  771,  771,  781,  789,  668,  668,
+      668,  668,  668,  778,  771,  774,  774,  775,  774,  774,
+      781,  777,  788,  793,  790,  794,  801,  798,  774,  799,
+      784,  795,  789,  834,  815,  793,  788,  794,  668,  668,
+      668,  668,  774,  795,  789,  790,  798,  799,  778,  820,
+      805,  801,  815,  834,  801,  805,  811,  811,  903,  811,
+      811,  821,  821,  833,  833,  841,  841,  903,  820,  668,
+      707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
+      707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
+
+      707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
+      707,  707,  707,  829,  836,  837, 1299,  807,  816,  816,
+      835,  816,  816,  835,  836,  839,  838,  840,  829,  838,
+      839,  842,  840,  837,  842,  844,  846,  843,  707,  707,
+      707,  707,  807,  847,  848,  816,  811,  843,  845,  849,
+      849,  845,  850,  844,  846,  847,  852,  850,  848,  906,
+      852,  873,  807,  906,  868, 1298,  873, 1294,  869,  707,
+      707,  713,  713,  713,  713,  713,  713,  713,  713,  713,
+      713,  713,  713,  713,  713,  713,  713,  713,  713,  713,
+      713,  713,  713,  713,  713,  713,  713,  713,  713,  713,
+
+      713,  713,  713,  713,  851,  853,  854,  855,  864,  864,
+      868,  864,  864,  855,  869,  866,  866,  855,  866,  866,
+      853,  864,  872,  874,  876,  851,  877,  955,  866,  713,
+      713,  713,  713,  854,  878,  864,  872,  878,  881,  876,
+      879,  880,  883,  883,  955,  899,  877,  872,  874,  870,
+      871,  889,  879,  880,  898,  864,  889,  898,  881,  899,
+      713,  713,  722,  722,  722,  722,  722,  722,  722,  722,
+      722,  722,  722,  722,  722,  722,  722,  722,  722,  722,
+      722,  722,  722,  722,  722,  722,  722,  722,  722,  722,
+      722,  722,  722,  722,  722,  870,  871,  865,  865,  890,
+
+      865,  865,  900,  907,  902, 1292,  910,  900,  891,  902,
+      865,  904,  901, 1022,  908,  910,  907,  911,  890,  914,
+      722,  722,  722,  722,  865,  887,  887,  891,  887,  887,
+      901,  904,  908,  909,  912,  913,  918,  911,  909,  914,
+     1022,  918,  915,  912,  865,  915,  930,  931,  954,  954,
+      913,  722,  722,  885,  885,  885,  885,  885,  885,  885,
+      885,  885,  885,  885,  885,  885,  885,  885,  885,  885,
+      885,  885,  885,  885,  885,  885,  885,  885,  885,  885,
+      885,  885,  885,  885,  885,  885,  887,  916,  917,  919,
+      920,  932,  930,  931,  934,  945,  935,  939,  932,  935,
+
+      934,  936,  917,  946,  947,  920,  936,  919,  946,  916,
+      957,  885,  885,  885,  885,  945,  939,  943,  943,  956,
+      943,  943,  959,  956,  947,  957,  958,  965,  962,  958,
+      960,  963,  964,  966,  972,  964,  959,  967,  968,  968,
+      970,  965,  885,  885,  962,  960,  963,  969,  966,  969,
+      971,  967,  969,  969,  972,  973,  974,  975,  970,  971,
+      983,  984,  985,  985,  987,  984,  973,  992, 1000, 1001,
+     1001, 1002,  975, 1004, 1006,  984,  974, 1007, 1009, 1005,
+     1000, 1002, 1011, 1010,  987,  992, 1005, 1013,  969,  983,
+     1010, 1014, 1006, 1004, 1007, 1012, 1015,  943, 1009, 1016,
+
+     1011, 1018, 1012, 1019, 1020, 1021, 1020, 1013, 1023, 1020,
+     1020, 1031, 1038, 1030, 1029, 1032, 1018, 1036, 1036, 1291,
+     1036, 1036, 1019, 1031, 1037, 1021, 1023, 1014, 1029, 1045,
+     1044, 1046, 1038, 1044, 1047, 1060, 1015, 1016, 1030, 1061,
+     1032, 1049, 1049, 1050, 1036, 1020, 1051, 1054, 1046, 1037,
+     1054, 1047, 1037, 1059, 1045, 1048, 1048, 1048, 1062, 1048,
+     1050, 1065, 1059, 1051, 1052, 1052, 1052, 1064, 1052, 1066,
+     1073, 1060, 1075, 1066, 1069, 1069, 1065, 1290, 1048, 1061,
+     1076, 1076, 1073, 1076, 1076, 1064, 1054, 1052, 1078, 1078,
+     1069, 1078, 1078, 1080, 1080, 1048, 1062, 1075, 1083, 1085,
+
+     1085, 1084, 1086, 1086, 1052, 1087, 1088, 1076, 1089, 1090,
+     1091, 1091, 1093, 1093, 1095, 1078, 1083, 1084, 1092, 1096,
+     1069, 1092, 1087, 1088, 1097, 1089, 1090, 1094, 1094, 1098,
+     1100, 1095, 1099, 1099, 1101, 1102, 1096, 1107, 1106, 1108,
+     1118, 1097, 1109, 1109, 1125, 1122, 1098, 1106, 1108, 1125,
+     1102, 1124, 1107, 1117, 1117, 1133, 1118, 1181, 1109, 1119,
+     1119, 1181, 1119, 1119, 1122, 1126, 1124, 1145, 1126, 1289,
+     1100, 1127, 1101, 1133, 1127, 1128, 1128, 1129, 1129, 1117,
+     1130, 1130, 1131, 1131, 1132, 1145, 1119, 1132, 1109, 1134,
+     1135, 1158, 1134, 1135, 1136, 1136, 1137, 1137, 1138, 1138,
+
+     1139, 1139, 1140, 1143, 1144, 1140, 1146, 1160, 1160, 1161,
+     1160, 1160, 1164, 1171, 1163, 1165, 1158, 1143, 1144, 1163,
+     1146, 1166, 1167, 1168, 1166, 1167, 1168, 1170, 1171, 1161,
+     1164, 1163, 1169, 1165, 1160, 1169, 1172, 1173, 1174, 1175,
+     1176, 1174, 1175, 1176, 1177, 1170, 1178, 1177, 1179, 1180,
+     1182, 1182, 1193, 1199, 1172, 1173, 1180, 1194, 1194, 1200,
+     1194, 1194, 1197, 1197, 1178, 1179, 1198, 1201, 1199, 1202,
+     1203, 1198, 1204, 1287, 1200, 1286, 1205, 1207, 1208, 1193,
+     1209, 1210, 1211, 1212, 1194, 1201, 1217, 1202, 1203, 1213,
+     1204, 1205, 1207, 1208, 1214, 1214, 1216, 1228, 1209, 1210,
+
+     1211, 1212, 1230, 1233, 1213, 1216, 1217, 1229, 1234, 1285,
+     1229, 1235, 1236, 1240, 1241, 1228, 1242, 1243, 1233, 1245,
+     1246, 1258, 1245, 1234, 1230, 1247, 1235, 1236, 1240, 1241,
+     1247, 1242, 1243, 1259, 1246, 1268, 1269, 1269, 1270, 1258,
+     1280, 1279, 1259, 1281, 1282, 1283, 1283, 1295, 1293, 1306,
+     1305, 1296, 1295, 1268, 1296, 1270, 1279, 1293, 1281, 1280,
+     1307, 1315, 1316, 1316, 1282, 1305, 1306, 1317, 1322, 1323,
+     1327, 1327, 1323, 1328, 1331, 1315, 1284, 1331, 1307, 1332,
+     1334, 1336, 1317, 1278, 1277, 1322, 1276, 1275, 1274, 1273,
+     1272, 1328, 1271, 1267, 1332, 1266, 1336, 1265, 1334, 1339,
+
+     1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339,
+     1339, 1339, 1340, 1340, 1340, 1340, 1340, 1340, 1264, 1340,
+     1340, 1340, 1340, 1340, 1340, 1341, 1341, 1263, 1341, 1341,
+     1262, 1261, 1260, 1257, 1341, 1341, 1341, 1342, 1342, 1256,
+     1342, 1342, 1342, 1343, 1255, 1343, 1343, 1343, 1344, 1344,
+     1254, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
+     1344, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345, 1345,
+     1345, 1345, 1345, 1345, 1346, 1253, 1251, 1250, 1346, 1346,
+     1346, 1346, 1346, 1346, 1346, 1346, 1346, 1347, 1347, 1347,
+     1347, 1347, 1348, 1249, 1348, 1348, 1348, 1349, 1349, 1248,
+
+     1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349, 1349,
+     1350, 1244, 1350, 1350, 1350, 1351, 1351, 1239, 1351, 1351,
+     1351, 1352, 1238, 1352, 1353, 1237, 1353, 1353, 1353, 1354,
+     1354, 1232, 1354, 1354, 1354, 1354, 1354, 1354, 1354, 1354,
+     1354, 1354, 1355, 1231, 1226, 1225, 1355, 1355, 1355, 1355,
+     1355, 1355, 1355, 1355, 1355, 1356, 1224, 1356, 1356, 1356,
+     1357, 1223, 1357, 1357, 1357, 1358, 1221, 1358, 1358, 1358,
+     1359, 1220, 1359, 1359, 1359, 1360, 1219, 1360, 1360, 1360,
+     1361, 1218, 1361, 1361, 1361, 1362, 1362, 1215, 1362, 1362,
+     1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1363, 1363,
+
+     1363, 1364, 1206, 1196, 1191, 1364, 1364, 1364, 1364, 1364,
+     1364, 1364, 1364, 1364, 1365, 1365, 1365, 1366, 1190, 1189,
+     1188, 1187, 1366, 1366, 1366, 1367, 1186, 1367, 1367, 1367,
+     1368, 1185, 1368, 1368, 1368, 1369, 1184, 1369, 1369, 1369,
+     1370, 1183, 1370, 1370, 1370, 1371, 1162, 1371, 1371, 1371,
+     1372, 1159, 1372, 1372, 1372, 1373, 1157, 1373, 1373, 1373,
+     1374, 1156, 1374, 1374, 1374, 1375, 1375, 1375, 1376, 1376,
+     1155, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376,
+     1376, 1377, 1377, 1154, 1377, 1377, 1377, 1377, 1377, 1377,
+     1377, 1377, 1377, 1377, 1378, 1153, 1378, 1378, 1378, 1379,
+
+     1152, 1151, 1150, 1379, 1379, 1379, 1379, 1379, 1379, 1379,
+     1379, 1379, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1380,
+     1380, 1380, 1380, 1380, 1380, 1381, 1149, 1381, 1381, 1381,
+     1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382, 1382,
+     1382, 1382, 1382, 1383, 1148, 1383, 1383, 1383, 1384, 1147,
+     1384, 1384, 1384, 1385, 1142, 1385, 1385, 1385, 1386, 1141,
+     1386, 1386, 1386, 1387, 1121, 1387, 1387, 1387, 1388, 1116,
+     1388, 1388, 1388, 1389, 1389, 1115, 1389, 1389, 1389, 1389,
+     1389, 1389, 1389, 1389, 1389, 1389, 1390, 1390, 1114, 1390,
+     1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1391,
+
+     1113, 1391, 1391, 1391, 1392, 1392, 1392, 1392, 1392, 1392,
+     1392, 1392, 1392, 1392, 1392, 1392, 1392, 1393, 1393, 1393,
+     1393, 1393, 1393, 1393, 1393, 1393, 1393, 1393, 1393, 1393,
+     1394, 1112, 1394, 1394, 1394, 1395, 1395, 1395, 1395, 1395,
+     1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1396, 1396,
+     1396, 1396, 1396, 1397, 1397, 1111, 1397, 1397, 1397, 1397,
+     1397, 1397, 1397, 1397, 1397, 1397, 1398, 1398, 1110, 1398,
+     1398, 1398, 1398, 1398, 1398, 1398, 1398, 1398, 1398, 1399,
+     1399, 1105, 1399, 1399, 1399, 1399, 1399, 1399, 1399, 1399,
+     1399, 1399, 1400, 1400, 1104, 1400, 1400, 1400, 1400, 1400,
+
+     1400, 1400, 1400, 1400, 1400, 1401, 1401, 1401, 1401, 1401,
+     1401, 1401, 1401, 1401, 1401, 1103, 1082, 1401, 1402, 1402,
+     1402, 1402, 1402, 1402, 1402, 1402, 1402, 1402, 1081, 1077,
+     1402, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403,
+     1403, 1074, 1072, 1403, 1404, 1404, 1404, 1404, 1404, 1404,
+     1404, 1404, 1404, 1404, 1071, 1070, 1404, 1405, 1405, 1405,
+     1405, 1405, 1405, 1405, 1405, 1405, 1405, 1068, 1067, 1405,
+     1406, 1406, 1406, 1406, 1406, 1406, 1406, 1406, 1406, 1406,
+     1063, 1058, 1406, 1407, 1407, 1057, 1407, 1407, 1407, 1407,
+     1407, 1407, 1407, 1407, 1407, 1407, 1408, 1408, 1056, 1408,
+
+     1408, 1408, 1408, 1408, 1408, 1408, 1408, 1408, 1408, 1409,
+     1409, 1055, 1409, 1409, 1409, 1409, 1409, 1409, 1409, 1409,
+     1409, 1409, 1410, 1410, 1053, 1410, 1410, 1410, 1410, 1410,
+     1410, 1410, 1410, 1410, 1410, 1411, 1411, 1043, 1411, 1411,
+     1411, 1411, 1411, 1411, 1411, 1411, 1411, 1411, 1412, 1412,
+     1040, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412, 1412,
+     1412, 1413, 1413, 1035, 1413, 1413, 1413, 1413, 1413, 1413,
+     1413, 1413, 1413, 1413, 1414, 1414, 1034, 1414, 1414, 1414,
+     1414, 1414, 1414, 1414, 1414, 1414, 1414, 1415, 1415, 1033,
+     1415, 1415, 1415, 1415, 1415, 1415, 1415, 1415, 1415, 1415,
+
+     1416, 1416, 1028, 1416, 1416, 1416, 1416, 1416, 1416, 1416,
+     1416, 1416, 1416, 1027, 1026, 1025, 1024, 1017, 1008, 1003,
+      998,  996,  995,  994,  993,  991,  990,  989,  988,  986,
+      981,  980,  979,  978,  977,  961,  953,  952,  951,  950,
+      949,  948,  944,  942,  941,  938,  937,  933,  929,  928,
+      927,  926,  924,  923,  921,  905,  897,  896,  895,  894,
+      893,  892,  888,  886,  884,  882,  875,  863,  862,  861,
+      860,  858,  857,  856,  832,  831,  830,  828,  827,  826,
+      825,  824,  823,  822,  819,  814,  813,  810,  808,  806,
+      804,  802,  800,  797,  796,  787,  786,  785,  783,  782,
+
+      780,  773,  768,  767,  766,  765,  764,  761,  760,  759,
+      758,  757,  737,  734,  731,  729,  728,  727,  726,  725,
+      724,  721,  711,  708,  705,  704,  698,  695,  691,  689,
+      686,  684,  667,  666,  663,  662,  661,  658,  657,  656,
+      655,  636,  634,  631,  630,  629,  628,  625,  615,  610,
+      609,  608,  605,  604,  599,  598,  597,  596,  558,  557,
+      554,  553,  552,  551,  550,  549,  546,  531,  529,  526,
+      519,  515,  508,  498,  489,  488,  485,  484,  433,  432,
+      431,  430,  429,  427,  426,  409,  398,  395,  379,  372,
+      361,  358,  309,  308,  307,  306,  301,  291,  272,  270,
+
+      265,  245,  230,  229,  204,  203,  201,  197,  195,  191,
+      190,  189,  188,  163,  131,  125,  121,  116,  115,  111,
+       95,   93,   84,   65,   63,   38,   27,   24,   15,   12,
+        8,    3, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338,
+     1338, 1338, 1338, 1338
     } ;
 
 /* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[174] =
+static yyconst flex_int32_t yy_rule_can_match_eol[200] =
     {   0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1,
+    1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
-    0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     };
+        };
 
 static yy_state_type yy_last_accepting_state;
 static char *yy_last_accepting_cpos;
@@ -1497,6 +1906,8 @@ static int skip_ahead_until(const char *text);
 static int skip_to_next_directive();
 static int skip_conditional_block();
 
+static const char *raw_string(const char *begin);
+
 static void preprocessor_directive(const char *text, size_t l);
 static void print_preprocessor_error(int result, const char *cp, size_t n);
 static const char *get_macro_arguments();
@@ -1511,7 +1922,7 @@ static void push_macro(MacroInfo *macro);
 static void pop_macro();
 static int in_macro();
 
-#line 1515 "lex.yy.c"
+#line 1922 "lex.yy.c"
 
 #define INITIAL 0
 
@@ -1600,7 +2011,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -1611,7 +2022,7 @@ static int input (void );
         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                 { \
                 int c = '*'; \
-                yy_size_t n; \
+                size_t n; \
                 for ( n = 0; n < max_size && \
                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                         buf[n] = (char) c; \
@@ -1692,14 +2103,14 @@ extern int yylex (void);
  */
 YY_DECL
 {
-        register yy_state_type yy_current_state;
-        register char *yy_cp, *yy_bp;
-        register int yy_act;
+        yy_state_type yy_current_state;
+        char *yy_cp, *yy_bp;
+        int yy_act;
 
-#line 77 "vtkParse.l"
+#line 79 "vtkParse.l"
 
 
-#line 1703 "lex.yy.c"
+#line 2110 "lex.yy.c"
 
         if ( !(yy_init) )
                 {
@@ -1744,7 +2155,7 @@ YY_DECL
 yy_match:
                 do
                         {
-                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+                        YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
                         if ( yy_accept[yy_current_state] )
                                 {
                                 (yy_last_accepting_state) = yy_current_state;
@@ -1753,13 +2164,13 @@ yy_match:
                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                 {
                                 yy_current_state = (int) yy_def[yy_current_state];
-                                if ( yy_current_state >= 1116 )
+                                if ( yy_current_state >= 1339 )
                                         yy_c = yy_meta[(unsigned int) yy_c];
                                 }
                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
                         ++yy_cp;
                         }
-                while ( yy_base[yy_current_state] != 2595 );
+                while ( yy_base[yy_current_state] != 4033 );
 
 yy_find_action:
                 yy_act = yy_accept[yy_current_state];
@@ -1795,12 +2206,12 @@ do_action:        /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 79 "vtkParse.l"
+#line 81 "vtkParse.l"
 { skip_comment(); }
         YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 81 "vtkParse.l"
+#line 83 "vtkParse.l"
 {
       if (!IgnoreBTX) {
         skip_ahead_until("//ETX");
@@ -1809,19 +2220,19 @@ YY_RULE_SETUP
         YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 87 "vtkParse.l"
+#line 89 "vtkParse.l"
 /* eat mismatched ETX */
         YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 89 "vtkParse.l"
+#line 91 "vtkParse.l"
 {
       skip_ahead_until("@end");
     }
         YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 93 "vtkParse.l"
+#line 95 "vtkParse.l"
 {
       size_t pos = 1;
       while (yytext[pos-1] != 'M' || yytext[pos] != 'E')
@@ -1833,38 +2244,38 @@ YY_RULE_SETUP
         YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 102 "vtkParse.l"
+#line 104 "vtkParse.l"
 { setCommentState(1); }
         YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 103 "vtkParse.l"
+#line 105 "vtkParse.l"
 { setCommentState(2); }
         YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 104 "vtkParse.l"
+#line 106 "vtkParse.l"
 { setCommentState(3); }
         YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 105 "vtkParse.l"
+#line 107 "vtkParse.l"
 { setCommentState(3); }
         YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 106 "vtkParse.l"
+#line 108 "vtkParse.l"
 { setCommentState(4); }
         YY_BREAK
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-#line 107 "vtkParse.l"
+#line 109 "vtkParse.l"
 { closeOrClearComment(); }
         YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 108 "vtkParse.l"
+#line 110 "vtkParse.l"
 {
       size_t pos = 2;
       while (yytext[pos-2] != '/' || yytext[pos-1] != '/') pos++;
@@ -1873,13 +2284,13 @@ YY_RULE_SETUP
         YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 114 "vtkParse.l"
+#line 116 "vtkParse.l"
 /* eat C++ comments */
         YY_BREAK
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 116 "vtkParse.l"
+#line 118 "vtkParse.l"
 {
       skip_trailing_comment(yytext, yyleng);
       preprocessor_directive(yytext, yyleng);
@@ -1888,7 +2299,7 @@ YY_RULE_SETUP
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 121 "vtkParse.l"
+#line 123 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(STRING_LITERAL);
@@ -1897,7 +2308,7 @@ YY_RULE_SETUP
 case 16:
 /* rule 16 can match eol */
 YY_RULE_SETUP
-#line 126 "vtkParse.l"
+#line 128 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(CHAR_LITERAL);
@@ -1905,12 +2316,20 @@ YY_RULE_SETUP
         YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 131 "vtkParse.l"
-/* ignore EXPORT macros */
+#line 133 "vtkParse.l"
+{
+      yylval.str = raw_string(yytext);
+      return(STRING_LITERAL);
+    }
         YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 133 "vtkParse.l"
+#line 138 "vtkParse.l"
+/* ignore EXPORT macros */
+        YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 140 "vtkParse.l"
 { /* let the wrappers see the parameter */
       const char *args = NULL;
       const char *cp;
@@ -1921,7 +2340,7 @@ YY_RULE_SETUP
         cp = args;
         if (*cp == '(') { cp++; }
         while (*cp == ' ' || *cp == '\t') { cp++; }
-        l = vtkidlen(cp);
+        l = vtkParse_SkipId(cp);
         if (l)
           {
           yylval.str = vtkstrndup(cp, l);
@@ -1932,93 +2351,80 @@ YY_RULE_SETUP
         }
     }
         YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 154 "vtkParse.l"
-return(DOUBLE);
-        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 155 "vtkParse.l"
-return(FLOAT);
+#line 161 "vtkParse.l"
+return(AUTO);
         YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 156 "vtkParse.l"
-return(INT64__);
+#line 163 "vtkParse.l"
+return(DOUBLE);
         YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 157 "vtkParse.l"
-return(SHORT);
+#line 164 "vtkParse.l"
+return(FLOAT);
         YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 158 "vtkParse.l"
-return(LONG);
+#line 165 "vtkParse.l"
+return(INT64__);
         YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 159 "vtkParse.l"
-return(CHAR);
+#line 166 "vtkParse.l"
+return(SHORT);
         YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 160 "vtkParse.l"
-return(INT);
+#line 167 "vtkParse.l"
+return(LONG);
         YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 162 "vtkParse.l"
-return(UNSIGNED);
+#line 168 "vtkParse.l"
+return(CHAR);
         YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 163 "vtkParse.l"
-return(SIGNED);
+#line 169 "vtkParse.l"
+return(INT);
         YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 165 "vtkParse.l"
-return(VOID);
+#line 171 "vtkParse.l"
+return(UNSIGNED);
         YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 166 "vtkParse.l"
-return(BOOL);
+#line 172 "vtkParse.l"
+return(SIGNED);
         YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 168 "vtkParse.l"
-return(SIZE_T);
+#line 174 "vtkParse.l"
+return(VOID);
         YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 169 "vtkParse.l"
-return(SSIZE_T);
+#line 175 "vtkParse.l"
+return(BOOL);
         YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 171 "vtkParse.l"
-/* ignore the Q_OBJECT macro from Qt */
+#line 177 "vtkParse.l"
+return(CHAR16_T);
         YY_BREAK
 case 33:
-/* rule 33 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
-(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 172 "vtkParse.l"
-return(PUBLIC);
+#line 178 "vtkParse.l"
+return(CHAR32_T);
         YY_BREAK
 case 34:
-/* rule 34 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
-(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 173 "vtkParse.l"
-return(PRIVATE);
+#line 179 "vtkParse.l"
+return(WCHAR_T);
         YY_BREAK
 case 35:
 /* rule 35 can match eol */
@@ -2026,8 +2432,11 @@ case 35:
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 174 "vtkParse.l"
-return(PROTECTED);
+#line 181 "vtkParse.l"
+{
+      yylval.str = (yytext[3] == ':' ? "std::size_t" : "size_t");
+      return(SIZE_T);
+    }
         YY_BREAK
 case 36:
 /* rule 36 can match eol */
@@ -2035,408 +2444,494 @@ case 36:
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 175 "vtkParse.l"
-return(PROTECTED);
+#line 186 "vtkParse.l"
+{
+      yylval.str = (yytext[3] == ':' ? "std::ssize_t" : "ssize_t");
+      return(SSIZE_T);
+    }
         YY_BREAK
 case 37:
+/* rule 37 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 177 "vtkParse.l"
-return(CLASS);
+#line 191 "vtkParse.l"
+{
+      yylval.str = (yytext[3] == ':' ? "std::nullptr_t" : "nullptr_t");
+      return(NULLPTR_T);
+    }
         YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 178 "vtkParse.l"
-return(STRUCT);
+#line 196 "vtkParse.l"
+/* ignore the Q_OBJECT macro from Qt */
         YY_BREAK
 case 39:
+/* rule 39 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 179 "vtkParse.l"
+#line 197 "vtkParse.l"
 return(PUBLIC);
         YY_BREAK
 case 40:
+/* rule 40 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 180 "vtkParse.l"
+#line 198 "vtkParse.l"
 return(PRIVATE);
         YY_BREAK
 case 41:
+/* rule 41 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 181 "vtkParse.l"
+#line 199 "vtkParse.l"
 return(PROTECTED);
         YY_BREAK
 case 42:
+/* rule 42 can match eol */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 182 "vtkParse.l"
-return(ENUM);
+#line 200 "vtkParse.l"
+return(PROTECTED);
         YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 183 "vtkParse.l"
-return(UNION);
+#line 202 "vtkParse.l"
+return(CLASS);
         YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 184 "vtkParse.l"
-return(VIRTUAL);
+#line 203 "vtkParse.l"
+return(STRUCT);
         YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 185 "vtkParse.l"
-return(CONST);
+#line 204 "vtkParse.l"
+return(PUBLIC);
         YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 186 "vtkParse.l"
-return(VOLATILE);
+#line 205 "vtkParse.l"
+return(PRIVATE);
         YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 187 "vtkParse.l"
-return(MUTABLE);
+#line 206 "vtkParse.l"
+return(PROTECTED);
         YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 188 "vtkParse.l"
-return(OPERATOR);
+#line 207 "vtkParse.l"
+return(ENUM);
         YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 189 "vtkParse.l"
-return(FRIEND);
+#line 208 "vtkParse.l"
+return(UNION);
         YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 190 "vtkParse.l"
-return(INLINE);
+#line 209 "vtkParse.l"
+return(VIRTUAL);
         YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 191 "vtkParse.l"
-return(STATIC);
+#line 210 "vtkParse.l"
+return(CONST);
         YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 192 "vtkParse.l"
-return(EXTERN);
+#line 211 "vtkParse.l"
+return(VOLATILE);
         YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 193 "vtkParse.l"
-return(TEMPLATE);
+#line 212 "vtkParse.l"
+return(MUTABLE);
         YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 194 "vtkParse.l"
-return(TYPENAME);
+#line 213 "vtkParse.l"
+return(OPERATOR);
         YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 195 "vtkParse.l"
-return(TYPEDEF);
+#line 214 "vtkParse.l"
+return(FRIEND);
         YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 196 "vtkParse.l"
-return(NAMESPACE);
+#line 215 "vtkParse.l"
+return(INLINE);
         YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 197 "vtkParse.l"
-return(USING);
+#line 216 "vtkParse.l"
+return(CONSTEXPR);
         YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 198 "vtkParse.l"
-return(NEW);
+#line 217 "vtkParse.l"
+return(STATIC);
         YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 199 "vtkParse.l"
-return(DELETE);
+#line 218 "vtkParse.l"
+return(THREAD_LOCAL);
         YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 200 "vtkParse.l"
-return(EXPLICIT);
+#line 219 "vtkParse.l"
+return(EXTERN);
         YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 201 "vtkParse.l"
-return(THROW);
+#line 220 "vtkParse.l"
+return(TEMPLATE);
         YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 203 "vtkParse.l"
-return(STATIC_CAST);
+#line 221 "vtkParse.l"
+return(TYPENAME);
         YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 204 "vtkParse.l"
-return(DYNAMIC_CAST);
+#line 222 "vtkParse.l"
+return(TYPEDEF);
         YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 205 "vtkParse.l"
-return(CONST_CAST);
+#line 223 "vtkParse.l"
+return(NAMESPACE);
         YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 206 "vtkParse.l"
-return(REINTERPRET_CAST);
+#line 224 "vtkParse.l"
+return(USING);
         YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 208 "vtkParse.l"
-/* irrelevant to wrappers */
+#line 225 "vtkParse.l"
+return(NEW);
         YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 209 "vtkParse.l"
-/* irrelevant to wrappers */
+#line 226 "vtkParse.l"
+return(DELETE);
         YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 211 "vtkParse.l"
-return(OP_LOGIC_AND);
+#line 227 "vtkParse.l"
+return(EXPLICIT);
         YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 212 "vtkParse.l"
-return(OP_AND_EQ);
+#line 228 "vtkParse.l"
+return(THROW);
         YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 213 "vtkParse.l"
-return(OP_LOGIC_OR);
+#line 229 "vtkParse.l"
+return(TRY);
         YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 214 "vtkParse.l"
-return(OP_OR_EQ);
+#line 230 "vtkParse.l"
+return(CATCH);
         YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 215 "vtkParse.l"
-return('!');
+#line 231 "vtkParse.l"
+return(NOEXCEPT);
         YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 216 "vtkParse.l"
-return(OP_LOGIC_NEQ);
+#line 232 "vtkParse.l"
+return(DECLTYPE);
         YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 217 "vtkParse.l"
-return('^');
+#line 233 "vtkParse.l"
+return(DEFAULT);
         YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 218 "vtkParse.l"
-return(OP_XOR_EQ);
+#line 235 "vtkParse.l"
+return(STATIC_CAST);
         YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 219 "vtkParse.l"
-return('&');
+#line 236 "vtkParse.l"
+return(DYNAMIC_CAST);
         YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 220 "vtkParse.l"
-return('|');
+#line 237 "vtkParse.l"
+return(CONST_CAST);
         YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 221 "vtkParse.l"
-return('~');
+#line 238 "vtkParse.l"
+return(REINTERPRET_CAST);
         YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 223 "vtkParse.l"
-return(IdType);
+#line 240 "vtkParse.l"
+/* irrelevant to wrappers */
         YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 224 "vtkParse.l"
-return(SetMacro);
+#line 242 "vtkParse.l"
+return(OP_LOGIC_AND);
         YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 225 "vtkParse.l"
-return(GetMacro);
+#line 243 "vtkParse.l"
+return(OP_AND_EQ);
         YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 226 "vtkParse.l"
-return(SetStringMacro);
+#line 244 "vtkParse.l"
+return(OP_LOGIC_OR);
         YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 227 "vtkParse.l"
-return(GetStringMacro);
+#line 245 "vtkParse.l"
+return(OP_OR_EQ);
         YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 228 "vtkParse.l"
-return(SetClampMacro);
+#line 246 "vtkParse.l"
+return('!');
         YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 229 "vtkParse.l"
-return(SetObjectMacro);
+#line 247 "vtkParse.l"
+return(OP_LOGIC_NEQ);
         YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 230 "vtkParse.l"
-return(GetObjectMacro);
+#line 248 "vtkParse.l"
+return('^');
         YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 231 "vtkParse.l"
-return(BooleanMacro);
+#line 249 "vtkParse.l"
+return(OP_XOR_EQ);
         YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 232 "vtkParse.l"
-return(SetVector2Macro);
+#line 250 "vtkParse.l"
+return('&');
         YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 233 "vtkParse.l"
-return(SetVector3Macro);
+#line 251 "vtkParse.l"
+return('|');
         YY_BREAK
 case 90:
 YY_RULE_SETUP
-#line 234 "vtkParse.l"
-return(SetVector4Macro);
+#line 252 "vtkParse.l"
+return('~');
         YY_BREAK
 case 91:
 YY_RULE_SETUP
-#line 235 "vtkParse.l"
-return(SetVector6Macro);
+#line 254 "vtkParse.l"
+return(IdType);
         YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 236 "vtkParse.l"
-return(GetVector2Macro);
+#line 255 "vtkParse.l"
+return(SetMacro);
         YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 237 "vtkParse.l"
-return(GetVector3Macro);
+#line 256 "vtkParse.l"
+return(GetMacro);
         YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 238 "vtkParse.l"
-return(GetVector4Macro);
+#line 257 "vtkParse.l"
+return(SetStringMacro);
         YY_BREAK
 case 95:
 YY_RULE_SETUP
-#line 239 "vtkParse.l"
-return(GetVector6Macro);
+#line 258 "vtkParse.l"
+return(GetStringMacro);
         YY_BREAK
 case 96:
 YY_RULE_SETUP
-#line 240 "vtkParse.l"
-return(SetVectorMacro);
+#line 259 "vtkParse.l"
+return(SetClampMacro);
         YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 241 "vtkParse.l"
-return(GetVectorMacro);
+#line 260 "vtkParse.l"
+return(SetObjectMacro);
         YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 242 "vtkParse.l"
-return(ViewportCoordinateMacro);
+#line 261 "vtkParse.l"
+return(GetObjectMacro);
         YY_BREAK
 case 99:
 YY_RULE_SETUP
-#line 243 "vtkParse.l"
-return(WorldCoordinateMacro);
+#line 262 "vtkParse.l"
+return(BooleanMacro);
         YY_BREAK
 case 100:
 YY_RULE_SETUP
-#line 244 "vtkParse.l"
-return(TypeMacro);
+#line 263 "vtkParse.l"
+return(SetVector2Macro);
         YY_BREAK
 case 101:
 YY_RULE_SETUP
-#line 245 "vtkParse.l"
-return(TypeMacro);
+#line 264 "vtkParse.l"
+return(SetVector3Macro);
         YY_BREAK
 case 102:
 YY_RULE_SETUP
-#line 246 "vtkParse.l"
-return(TypeMacro);
+#line 265 "vtkParse.l"
+return(SetVector4Macro);
         YY_BREAK
 case 103:
 YY_RULE_SETUP
-#line 247 "vtkParse.l"
-return(TypeMacro);
+#line 266 "vtkParse.l"
+return(SetVector6Macro);
         YY_BREAK
 case 104:
 YY_RULE_SETUP
-#line 248 "vtkParse.l"
-;
+#line 267 "vtkParse.l"
+return(GetVector2Macro);
         YY_BREAK
 case 105:
 YY_RULE_SETUP
-#line 249 "vtkParse.l"
-return(VTK_BYTE_SWAP_DECL);
+#line 268 "vtkParse.l"
+return(GetVector3Macro);
         YY_BREAK
 case 106:
 YY_RULE_SETUP
-#line 250 "vtkParse.l"
-return(TypeInt8);
+#line 269 "vtkParse.l"
+return(GetVector4Macro);
         YY_BREAK
 case 107:
 YY_RULE_SETUP
-#line 251 "vtkParse.l"
-return(TypeUInt8);
+#line 270 "vtkParse.l"
+return(GetVector6Macro);
         YY_BREAK
 case 108:
 YY_RULE_SETUP
-#line 252 "vtkParse.l"
+#line 271 "vtkParse.l"
+return(SetVectorMacro);
+        YY_BREAK
+case 109:
+YY_RULE_SETUP
+#line 272 "vtkParse.l"
+return(GetVectorMacro);
+        YY_BREAK
+case 110:
+YY_RULE_SETUP
+#line 273 "vtkParse.l"
+return(ViewportCoordinateMacro);
+        YY_BREAK
+case 111:
+YY_RULE_SETUP
+#line 274 "vtkParse.l"
+return(WorldCoordinateMacro);
+        YY_BREAK
+case 112:
+YY_RULE_SETUP
+#line 275 "vtkParse.l"
+return(TypeMacro);
+        YY_BREAK
+case 113:
+YY_RULE_SETUP
+#line 276 "vtkParse.l"
+return(TypeMacro);
+        YY_BREAK
+case 114:
+YY_RULE_SETUP
+#line 277 "vtkParse.l"
+return(TypeMacro);
+        YY_BREAK
+case 115:
+YY_RULE_SETUP
+#line 278 "vtkParse.l"
+return(TypeMacro);
+        YY_BREAK
+case 116:
+YY_RULE_SETUP
+#line 279 "vtkParse.l"
+;
+        YY_BREAK
+case 117:
+YY_RULE_SETUP
+#line 280 "vtkParse.l"
+return(VTK_BYTE_SWAP_DECL);
+        YY_BREAK
+case 118:
+YY_RULE_SETUP
+#line 281 "vtkParse.l"
+return(TypeInt8);
+        YY_BREAK
+case 119:
+YY_RULE_SETUP
+#line 282 "vtkParse.l"
+return(TypeUInt8);
+        YY_BREAK
+case 120:
+YY_RULE_SETUP
+#line 283 "vtkParse.l"
 return(TypeInt16);
         YY_BREAK
-case 109:
+case 121:
 YY_RULE_SETUP
-#line 253 "vtkParse.l"
+#line 284 "vtkParse.l"
 return(TypeUInt16);
         YY_BREAK
-case 110:
+case 122:
 YY_RULE_SETUP
-#line 254 "vtkParse.l"
+#line 285 "vtkParse.l"
 return(TypeInt32);
         YY_BREAK
-case 111:
+case 123:
 YY_RULE_SETUP
-#line 255 "vtkParse.l"
+#line 286 "vtkParse.l"
 return(TypeUInt32);
         YY_BREAK
-case 112:
+case 124:
 YY_RULE_SETUP
-#line 256 "vtkParse.l"
+#line 287 "vtkParse.l"
 return(TypeInt64);
         YY_BREAK
-case 113:
+case 125:
 YY_RULE_SETUP
-#line 257 "vtkParse.l"
+#line 288 "vtkParse.l"
 return(TypeUInt64);
         YY_BREAK
-case 114:
+case 126:
 YY_RULE_SETUP
-#line 258 "vtkParse.l"
+#line 289 "vtkParse.l"
 return(TypeFloat32);
         YY_BREAK
-case 115:
+case 127:
 YY_RULE_SETUP
-#line 259 "vtkParse.l"
+#line 290 "vtkParse.l"
 return(TypeFloat64);
         YY_BREAK
-case 116:
-/* rule 116 can match eol */
+case 128:
+/* rule 128 can match eol */
 YY_RULE_SETUP
-#line 261 "vtkParse.l"
+#line 292 "vtkParse.l"
 {
       size_t i = 1;
       size_t j;
@@ -2448,10 +2943,10 @@ YY_RULE_SETUP
       return(LA);
     }
         YY_BREAK
-case 117:
-/* rule 117 can match eol */
+case 129:
+/* rule 129 can match eol */
 YY_RULE_SETUP
-#line 272 "vtkParse.l"
+#line 303 "vtkParse.l"
 {
       size_t i = 1;
       size_t j;
@@ -2463,120 +2958,156 @@ YY_RULE_SETUP
       return(LP);
     }
         YY_BREAK
-case 118:
-/* rule 118 can match eol */
+case 130:
+/* rule 130 can match eol */
 YY_RULE_SETUP
-#line 283 "vtkParse.l"
+#line 314 "vtkParse.l"
 {
       yylval.str = "";
       return(LP);
     }
         YY_BREAK
-case 119:
-/* rule 119 can match eol */
+case 131:
+/* rule 131 can match eol */
 YY_RULE_SETUP
-#line 288 "vtkParse.l"
+#line 319 "vtkParse.l"
 {
       yylval.str = "";
       return(LP);
     }
         YY_BREAK
-case 120:
+case 132:
+/* rule 132 can match eol */
+YY_RULE_SETUP
+#line 324 "vtkParse.l"
+{
+      yylval.str = "";
+      return(LP);
+    }
+        YY_BREAK
+case 133:
 YY_RULE_SETUP
-#line 293 "vtkParse.l"
+#line 329 "vtkParse.l"
 return('*');
         YY_BREAK
-case 121:
+case 134:
 YY_RULE_SETUP
-#line 295 "vtkParse.l"
+#line 331 "vtkParse.l"
 /* misc unused win32 macros */
         YY_BREAK
-case 122:
-/* rule 122 can match eol */
+case 135:
+/* rule 135 can match eol */
 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 297 "vtkParse.l"
+#line 333 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(OSTREAM);
     }
         YY_BREAK
-case 123:
-/* rule 123 can match eol */
+case 136:
+/* rule 136 can match eol */
 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 302 "vtkParse.l"
+#line 338 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(ISTREAM);
     }
         YY_BREAK
-case 124:
-/* rule 124 can match eol */
+case 137:
+/* rule 137 can match eol */
 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
 (yy_c_buf_p) = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 307 "vtkParse.l"
+#line 343 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(StdString);
     }
         YY_BREAK
-case 125:
+case 138:
 YY_RULE_SETUP
-#line 312 "vtkParse.l"
+#line 348 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(StdString);
     }
         YY_BREAK
-case 126:
+case 139:
 YY_RULE_SETUP
-#line 317 "vtkParse.l"
+#line 353 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(UnicodeString);
     }
         YY_BREAK
-case 127:
+case 140:
 YY_RULE_SETUP
-#line 322 "vtkParse.l"
+#line 358 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
-      return(VTK_ID);
+      return(QT_ID);
     }
         YY_BREAK
-case 128:
+case 141:
 YY_RULE_SETUP
-#line 327 "vtkParse.l"
-{
-      yylval.str = vtkstrndup(yytext, yyleng);
-      return(QT_ID);
-    }
+#line 363 "vtkParse.l"
+get_macro_arguments(); /* C++11 */
         YY_BREAK
-case 129:
+case 142:
+YY_RULE_SETUP
+#line 365 "vtkParse.l"
+get_macro_arguments(); /* C++11 */
+        YY_BREAK
+case 143:
+YY_RULE_SETUP
+#line 367 "vtkParse.l"
+get_macro_arguments(); /* C11 */
+        YY_BREAK
+case 144:
+YY_RULE_SETUP
+#line 369 "vtkParse.l"
+get_macro_arguments(); /* C11 */
+        YY_BREAK
+case 145:
+YY_RULE_SETUP
+#line 371 "vtkParse.l"
+return(THREAD_LOCAL); /* C11 */
+        YY_BREAK
+case 146:
+YY_RULE_SETUP
+#line 373 "vtkParse.l"
+/* C11 */
+        YY_BREAK
+case 147:
+YY_RULE_SETUP
+#line 375 "vtkParse.l"
+/* C11 */
+        YY_BREAK
+case 148:
 YY_RULE_SETUP
-#line 332 "vtkParse.l"
+#line 377 "vtkParse.l"
 get_macro_arguments(); /* gcc attributes */
         YY_BREAK
-case 130:
+case 149:
 YY_RULE_SETUP
-#line 334 "vtkParse.l"
+#line 379 "vtkParse.l"
 get_macro_arguments(); /* Windows linkage */
         YY_BREAK
-case 131:
+case 150:
 YY_RULE_SETUP
-#line 336 "vtkParse.l"
+#line 381 "vtkParse.l"
 /* Windows */
         YY_BREAK
-case 132:
+case 151:
 YY_RULE_SETUP
-#line 338 "vtkParse.l"
+#line 383 "vtkParse.l"
 {
       const char *args = get_macro_arguments();
       if (args && args[0] != '\0' && args[1] != '\0')
@@ -2592,9 +3123,17 @@ YY_RULE_SETUP
       free((char *)args);
     }
         YY_BREAK
-case 133:
+case 152:
 YY_RULE_SETUP
-#line 353 "vtkParse.l"
+#line 398 "vtkParse.l"
+{
+      yylval.str = vtkstrndup(yytext, yyleng);
+      return(NULLPTR);
+    }
+        YY_BREAK
+case 153:
+YY_RULE_SETUP
+#line 403 "vtkParse.l"
 {
       const char *name = vtkstrndup(yytext, yyleng);
       MacroInfo *macro = vtkParsePreprocess_GetMacro(preprocessor, name);
@@ -2621,6 +3160,7 @@ YY_RULE_SETUP
             if (!emacro)
               {
               print_preprocessor_error(VTK_PARSE_MACRO_NUMARGS, NULL, 0);
+              exit(1);
               }
             free((char *)args);
             }
@@ -2642,6 +3182,7 @@ YY_RULE_SETUP
             if (!emacro)
               {
               print_preprocessor_error(r, NULL, 0);
+              exit(1);
               }
             }
           }
@@ -2679,234 +3220,268 @@ YY_RULE_SETUP
         }
     }
         YY_BREAK
-case 134:
+case 154:
 YY_RULE_SETUP
-#line 437 "vtkParse.l"
+#line 489 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(FLOAT_LITERAL);
     }
         YY_BREAK
-case 135:
+case 155:
 YY_RULE_SETUP
-#line 442 "vtkParse.l"
+#line 494 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(FLOAT_LITERAL);
     }
         YY_BREAK
-case 136:
+case 156:
 YY_RULE_SETUP
-#line 447 "vtkParse.l"
+#line 499 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(FLOAT_LITERAL);
     }
         YY_BREAK
-case 137:
+case 157:
 YY_RULE_SETUP
-#line 452 "vtkParse.l"
+#line 504 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(HEX_LITERAL);
     }
         YY_BREAK
-case 138:
+case 158:
 YY_RULE_SETUP
-#line 457 "vtkParse.l"
+#line 509 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(OCT_LITERAL);
     }
         YY_BREAK
-case 139:
+case 159:
 YY_RULE_SETUP
-#line 462 "vtkParse.l"
+#line 514 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(INT_LITERAL);
     }
         YY_BREAK
-case 140:
+case 160:
 YY_RULE_SETUP
-#line 467 "vtkParse.l"
+#line 519 "vtkParse.l"
 {
       yylval.str = vtkstrndup(yytext, yyleng);
       return(ZERO);
     }
         YY_BREAK
-case 141:
-/* rule 141 can match eol */
+case 161:
+/* rule 161 can match eol */
 YY_RULE_SETUP
-#line 472 "vtkParse.l"
+#line 524 "vtkParse.l"
 /* escaped newlines */
         YY_BREAK
-case 142:
+case 162:
 YY_RULE_SETUP
-#line 473 "vtkParse.l"
+#line 525 "vtkParse.l"
 /* whitespace */
         YY_BREAK
-case 143:
-/* rule 143 can match eol */
+case 163:
+/* rule 163 can match eol */
 YY_RULE_SETUP
-#line 474 "vtkParse.l"
+#line 526 "vtkParse.l"
 /* whitespace */
         YY_BREAK
-case 144:
+case 164:
+/* rule 164 can match eol */
+YY_RULE_SETUP
+#line 528 "vtkParse.l"
+return(BEGIN_ATTRIB);
+        YY_BREAK
+case 165:
+YY_RULE_SETUP
+#line 530 "vtkParse.l"
+return('{');
+        YY_BREAK
+case 166:
+YY_RULE_SETUP
+#line 531 "vtkParse.l"
+return('}');
+        YY_BREAK
+case 167:
+YY_RULE_SETUP
+#line 532 "vtkParse.l"
+return('[');
+        YY_BREAK
+case 168:
+YY_RULE_SETUP
+#line 533 "vtkParse.l"
+return(']');
+        YY_BREAK
+case 169:
+YY_RULE_SETUP
+#line 534 "vtkParse.l"
+return('#');
+        YY_BREAK
+case 170:
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+(yy_c_buf_p) = yy_cp = yy_bp + 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 476 "vtkParse.l"
+#line 536 "vtkParse.l"
+return(OP_RSHIFT_A);
+        YY_BREAK
+case 171:
+YY_RULE_SETUP
+#line 538 "vtkParse.l"
 return(OP_LSHIFT_EQ);
         YY_BREAK
-case 145:
+case 172:
 YY_RULE_SETUP
-#line 477 "vtkParse.l"
+#line 539 "vtkParse.l"
 return(OP_RSHIFT_EQ);
         YY_BREAK
-case 146:
+case 173:
 YY_RULE_SETUP
-#line 478 "vtkParse.l"
+#line 540 "vtkParse.l"
 return(OP_LSHIFT);
         YY_BREAK
-case 147:
+case 174:
 YY_RULE_SETUP
-#line 479 "vtkParse.l"
+#line 541 "vtkParse.l"
 return(OP_DOT_POINTER);
         YY_BREAK
-case 148:
+case 175:
 YY_RULE_SETUP
-#line 480 "vtkParse.l"
+#line 542 "vtkParse.l"
 return(OP_ARROW_POINTER);
         YY_BREAK
-case 149:
+case 176:
 YY_RULE_SETUP
-#line 481 "vtkParse.l"
+#line 543 "vtkParse.l"
 return(OP_ARROW);
         YY_BREAK
-case 150:
-YY_RULE_SETUP
-#line 482 "vtkParse.l"
-return(OP_RSHIFT);
-        YY_BREAK
-case 151:
+case 177:
 YY_RULE_SETUP
-#line 483 "vtkParse.l"
+#line 544 "vtkParse.l"
 return(OP_INCR);
         YY_BREAK
-case 152:
+case 178:
 YY_RULE_SETUP
-#line 484 "vtkParse.l"
+#line 545 "vtkParse.l"
 return(OP_DECR);
         YY_BREAK
-case 153:
+case 179:
 YY_RULE_SETUP
-#line 485 "vtkParse.l"
+#line 546 "vtkParse.l"
 return(OP_PLUS_EQ);
         YY_BREAK
-case 154:
+case 180:
 YY_RULE_SETUP
-#line 486 "vtkParse.l"
+#line 547 "vtkParse.l"
 return(OP_MINUS_EQ);
         YY_BREAK
-case 155:
+case 181:
 YY_RULE_SETUP
-#line 487 "vtkParse.l"
+#line 548 "vtkParse.l"
 return(OP_TIMES_EQ);
         YY_BREAK
-case 156:
+case 182:
 YY_RULE_SETUP
-#line 488 "vtkParse.l"
+#line 549 "vtkParse.l"
 return(OP_DIVIDE_EQ);
         YY_BREAK
-case 157:
+case 183:
 YY_RULE_SETUP
-#line 489 "vtkParse.l"
+#line 550 "vtkParse.l"
 return(OP_REMAINDER_EQ);
         YY_BREAK
-case 158:
+case 184:
 YY_RULE_SETUP
-#line 490 "vtkParse.l"
+#line 551 "vtkParse.l"
 return(OP_AND_EQ);
         YY_BREAK
-case 159:
+case 185:
 YY_RULE_SETUP
-#line 491 "vtkParse.l"
+#line 552 "vtkParse.l"
 return(OP_OR_EQ);
         YY_BREAK
-case 160:
+case 186:
 YY_RULE_SETUP
-#line 492 "vtkParse.l"
+#line 553 "vtkParse.l"
 return(OP_XOR_EQ);
         YY_BREAK
-case 161:
+case 187:
 YY_RULE_SETUP
-#line 493 "vtkParse.l"
+#line 554 "vtkParse.l"
 return(OP_LOGIC_AND);
         YY_BREAK
-case 162:
+case 188:
 YY_RULE_SETUP
-#line 494 "vtkParse.l"
+#line 555 "vtkParse.l"
 return(OP_LOGIC_OR);
         YY_BREAK
-case 163:
+case 189:
 YY_RULE_SETUP
-#line 495 "vtkParse.l"
+#line 556 "vtkParse.l"
 return(OP_LOGIC_EQ);
         YY_BREAK
-case 164:
+case 190:
 YY_RULE_SETUP
-#line 496 "vtkParse.l"
+#line 557 "vtkParse.l"
 return(OP_LOGIC_NEQ);
         YY_BREAK
-case 165:
+case 191:
 YY_RULE_SETUP
-#line 497 "vtkParse.l"
+#line 558 "vtkParse.l"
 return(OP_LOGIC_LEQ);
         YY_BREAK
-case 166:
+case 192:
 YY_RULE_SETUP
-#line 498 "vtkParse.l"
+#line 559 "vtkParse.l"
 return(OP_LOGIC_GEQ);
         YY_BREAK
-case 167:
+case 193:
 YY_RULE_SETUP
-#line 499 "vtkParse.l"
+#line 560 "vtkParse.l"
 return(ELLIPSIS);
         YY_BREAK
-case 168:
+case 194:
 YY_RULE_SETUP
-#line 500 "vtkParse.l"
+#line 561 "vtkParse.l"
 return(DOUBLE_COLON);
         YY_BREAK
-case 169:
+case 195:
 YY_RULE_SETUP
-#line 502 "vtkParse.l"
+#line 563 "vtkParse.l"
 return('[');
         YY_BREAK
-case 170:
+case 196:
 YY_RULE_SETUP
-#line 503 "vtkParse.l"
+#line 564 "vtkParse.l"
 return(']');
         YY_BREAK
-case 171:
+case 197:
 YY_RULE_SETUP
-#line 505 "vtkParse.l"
+#line 566 "vtkParse.l"
 return(yytext[0]);
         YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 507 "vtkParse.l"
+#line 568 "vtkParse.l"
 { if (!pop_buffer()) { yyterminate(); } }
         YY_BREAK
-case 172:
+case 198:
 YY_RULE_SETUP
-#line 509 "vtkParse.l"
+#line 570 "vtkParse.l"
 { return(OTHER); }
         YY_BREAK
-case 173:
+case 199:
 YY_RULE_SETUP
-#line 511 "vtkParse.l"
+#line 572 "vtkParse.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
         YY_BREAK
-#line 2910 "lex.yy.c"
+#line 3481 "lex.yy.c"
 
         case YY_END_OF_BUFFER:
                 {
@@ -3046,9 +3621,9 @@ YY_FATAL_ERROR( "flex scanner jammed" );
  */
 static int yy_get_next_buffer (void)
 {
-            register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-        register char *source = (yytext_ptr);
-        register int number_to_move, i;
+            char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+        char *source = (yytext_ptr);
+        int number_to_move, i;
         int ret_val;
 
         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -3097,7 +3672,7 @@ static int yy_get_next_buffer (void)
                         { /* Not enough room in the buffer - grow it. */
 
                         /* just a shorter name for the current buffer */
-                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
 
                         int yy_c_buf_p_offset =
                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -3180,15 +3755,15 @@ static int yy_get_next_buffer (void)
 
     static yy_state_type yy_get_previous_state (void)
 {
-        register yy_state_type yy_current_state;
-        register char *yy_cp;
+        yy_state_type yy_current_state;
+        char *yy_cp;
 
         yy_current_state = (yy_start);
         yy_current_state += YY_AT_BOL();
 
         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
                 {
-                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+                YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
                 if ( yy_accept[yy_current_state] )
                         {
                         (yy_last_accepting_state) = yy_current_state;
@@ -3197,7 +3772,7 @@ static int yy_get_next_buffer (void)
                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                         {
                         yy_current_state = (int) yy_def[yy_current_state];
-                        if ( yy_current_state >= 1116 )
+                        if ( yy_current_state >= 1339 )
                                 yy_c = yy_meta[(unsigned int) yy_c];
                         }
                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -3213,10 +3788,10 @@ static int yy_get_next_buffer (void)
  */
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 {
-        register int yy_is_jam;
-            register char *yy_cp = (yy_c_buf_p);
+        int yy_is_jam;
+            char *yy_cp = (yy_c_buf_p);
 
-        register YY_CHAR yy_c = 1;
+        YY_CHAR yy_c = 1;
         if ( yy_accept[yy_current_state] )
                 {
                 (yy_last_accepting_state) = yy_current_state;
@@ -3225,18 +3800,18 @@ static int yy_get_next_buffer (void)
         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                 {
                 yy_current_state = (int) yy_def[yy_current_state];
-                if ( yy_current_state >= 1116 )
+                if ( yy_current_state >= 1339 )
                         yy_c = yy_meta[(unsigned int) yy_c];
                 }
         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-        yy_is_jam = (yy_current_state == 1115);
+        yy_is_jam = (yy_current_state == 1338);
 
-        return yy_is_jam ? 0 : yy_current_state;
+                return yy_is_jam ? 0 : yy_current_state;
 }
 
-    static void yyunput (int c, register char * yy_bp )
+    static void yyunput (int c, char * yy_bp )
 {
-        register char *yy_cp;
+        char *yy_cp;
 
     yy_cp = (yy_c_buf_p);
 
@@ -3246,10 +3821,10 @@ static int yy_get_next_buffer (void)
         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
                 { /* need to shift things up to make room */
                 /* +2 for EOB chars. */
-                register yy_size_t number_to_move = (yy_n_chars) + 2;
-                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+                yy_size_t number_to_move = (yy_n_chars) + 2;
+                char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-                register char *source =
+                char *source =
                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -3323,7 +3898,7 @@ static int yy_get_next_buffer (void)
                                 case EOB_ACT_END_OF_FILE:
                                         {
                                         if ( yywrap( ) )
-                                                return 0;
+                                                return EOF;
 
                                         if ( ! (yy_did_buffer_switch_on_eof) )
                                                 YY_NEW_FILE;
@@ -3465,10 +4040,6 @@ static void yy_load_buffer_state  (void)
         yyfree((void *) b  );
 }
 
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a yyrestart() or at EOF.
@@ -3673,8 +4244,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  *
  * @return the newly allocated buffer state object.
  */
@@ -3682,7 +4253,8 @@ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len
 {
         YY_BUFFER_STATE b;
         char *buf;
-        yy_size_t n, i;
+        yy_size_t n;
+        yy_size_t i;
 
         /* Get memory for full buffer, including space for trailing EOB's. */
         n = _yybytes_len + 2;
@@ -3874,7 +4446,7 @@ int yylex_destroy  (void)
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-        register int i;
+        int i;
         for ( i = 0; i < n; ++i )
                 s1[i] = s2[i];
 }
@@ -3883,7 +4455,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 #ifdef YY_NEED_STRLEN
 static int yy_flex_strlen (yyconst char * s )
 {
-        register int n;
+        int n;
         for ( n = 0; s[n]; ++n )
                 ;
 
@@ -3915,7 +4487,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 511 "vtkParse.l"
+#line 572 "vtkParse.l"
 
 
 
@@ -4081,14 +4653,16 @@ const char *get_macro_arguments()
  */
 int skip_comment()
 {
+   int savelineno = yylineno;
    int c1 = 0, c2 = input();
    for (;;)
      {
-     if (c2 == 0)
+     if (c2 == 0 || c2 == EOF)
        {
+       yylineno = savelineno;
        print_preprocessor_error(VTK_PARSE_SYNTAX_ERROR,
          "Cannot find end of comment.", 27);
-       return 0;
+       exit(1);
        }
      if (c1 == '*' && c2 == '/') break;
      c1 = c2; c2 = input();
@@ -4175,7 +4749,7 @@ int skip_to_next_directive()
 
   c = input();
 
-  while (c != 0)
+  while (c != 0 && c != EOF)
     {
     /* whitespace */
     if (c == ' ' || c == '\t')
@@ -4212,7 +4786,7 @@ int skip_to_next_directive()
           c = input();
           }
         }
-      else if (c != 0)
+      else if (c != 0 && c != EOF)
         {
         c = input();
         }
@@ -4259,7 +4833,7 @@ int skip_conditional_block()
       {
       c = input();
       }
-    if (c == 0)
+    if (c == 0 || c == EOF)
       {
       return 0;
       }
@@ -4267,7 +4841,7 @@ int skip_conditional_block()
     /* eat the whole line */
     i = 0;
     linebuf[i++] = '#';
-    while (c != 0 && c != '\n')
+    while (c != 0 && c != EOF && c != '\n')
       {
       if (i >= linemaxlen-5)
         {
@@ -4311,7 +4885,7 @@ int skip_conditional_block()
 int skip_ahead_multi(const char *strings[])
 {
   char textbuf[SKIP_MATCH_MAXLEN+1];
-  char c = 0;
+  int c = 0;
   size_t i;
 
   for (i = 0; i < (SKIP_MATCH_MAXLEN+1); i++)
@@ -4326,7 +4900,8 @@ int skip_ahead_multi(const char *strings[])
       textbuf[i] = textbuf[i+1];
       }
 
-    if ((c = (char)input()) == '\0')
+    c = input();
+    if (c == 0 || c == EOF)
       {
       print_preprocessor_error(VTK_PARSE_SYNTAX_ERROR, NULL, 0);
       return 0;
@@ -4348,9 +4923,9 @@ int skip_ahead_multi(const char *strings[])
       }
     }
 
-  while (c != '\0' && c != '\n')
+  while (c != 0 && c != EOF && c != '\n')
     {
-    c = (char)input();
+    c = input();
     }
 
   return 1;
@@ -4368,6 +4943,123 @@ int skip_ahead_until(const char *text)
   return skip_ahead_multi(strings);
 }
 
+/*
+ * Convert a raw string into a non-raw string.
+ */
+const char *raw_string(const char *begin)
+{
+  int savelineno = yylineno;
+  char *textbuf;
+  int c = 0;
+  const char *delim;
+  const char *cp = begin;
+  char *dp;
+  char *result;
+  size_t i, j, n;
+  size_t m = 1024;
+
+  result = (char *)malloc(m);
+  dp = result;
+
+  while (*cp != '\"')
+    {
+    *dp++ = *cp++;
+    }
+  --dp;
+  *dp++ = *cp++;
+
+  delim = cp;
+
+  for (n = 0;; n++)
+    {
+    if (delim[n] == '(') { break; }
+    }
+
+  textbuf = (char *)malloc(n+1);
+
+  for (i = 0; i < n+1; i++)
+    {
+    c = input();
+    textbuf[i] = c;
+    }
+
+  while (c != EOF)
+    {
+    if (textbuf[0] == ')' && (n == 0 || strncmp(&textbuf[1], delim, n) == 0))
+      {
+      break;
+      }
+
+    j = dp - result;
+    if (j > m - 8)
+      {
+      m += 1024;
+      result = (char *)realloc(result, m);
+      dp = result + j;
+      }
+
+    if ((*textbuf >= ' ' && *textbuf <= '~') ||
+        (*textbuf & 0x80) != 0)
+      {
+      *dp++ = *textbuf;
+      }
+    else switch (*textbuf)
+      {
+      case '\a': *dp++ = '\\'; *dp++ = 'a'; break;
+      case '\b': *dp++ = '\\'; *dp++ = 'b'; break;
+      case '\f': *dp++ = '\\'; *dp++ = 'f'; break;
+      case '\n': *dp++ = '\\'; *dp++ = 'n'; break;
+      case '\r': *dp++ = '\\'; *dp++ = 'r'; break;
+      case '\t': *dp++ = '\\'; *dp++ = 't'; break;
+      case '\v': *dp++ = '\\'; *dp++ = 'v'; break;
+      case '\\': *dp++ = '\\'; *dp++ = '\\'; break;
+      case '\'': *dp++ = '\\'; *dp++ = '\''; break;
+      case '\"': *dp++ = '\\'; *dp++ = '\"'; break;
+      default:
+        sprintf(dp, "\\%3.3o", *textbuf);
+        dp += 4;
+        break;
+      }
+
+    for (i = 0; i < n; i++)
+      {
+      textbuf[i] = textbuf[i+1];
+      }
+
+    c = input();
+    textbuf[n] = c;
+    }
+
+  if (c == EOF || '\"' != input())
+    {
+    yylineno = savelineno;
+    print_preprocessor_error(VTK_PARSE_SYNTAX_ERROR,
+      "Unterminated raw string.", 24);
+    exit(1);
+    }
+
+  *dp++ = '\"';
+
+  c = input();
+  if (c == '_')
+    {
+    do
+      {
+      *dp++ = c;
+      c = input();
+      }
+    while (vtkParse_CharType(c, CPRE_IDGIT));
+    }
+  unput(c);
+
+  *dp = '\0';
+  cp = vtkstrdup(result);
+  free(result);
+  free(textbuf);
+
+  return cp;
+}
+
 /*
  * buffer stack, used for macro expansion and include files
  */
@@ -4616,6 +5308,11 @@ void print_parser_error(const char *text, const char *cp, size_t n)
   size_t j = 0;
   const char *fn = "(none)";
 
+  if (CommandName)
+    {
+    fprintf(yyout, "%s: ", CommandName);
+    }
+
   if (data->FileName)
     {
     fn = data->FileName;
@@ -4626,15 +5323,19 @@ void print_parser_error(const char *text, const char *cp, size_t n)
     fprintf(yyout, "%i:\nIn %s:",
             lineno_stack[j], include_stack[j]->FileName);
     }
-  fprintf(yyout, "%i:\n", yylineno);
+  fprintf(yyout, "%i:", yylineno);
 
   if (cp)
     {
-    fprintf(yyout, "%s: %*.*s\n", text, (int)n, (int)n, cp);
+    fprintf(yyout, " %s: %*.*s\n", text, (int)n, (int)n, cp);
     }
   else if (text)
     {
-    fprintf(yyout, "%s.\n", text);
+    fprintf(yyout, " %s.\n", text);
+    }
+  else
+    {
+    fprintf(yyout, "\n");
     }
 }
 
@@ -4695,6 +5396,10 @@ void preprocessor_directive(const char *text, size_t l)
   else if (result != VTK_PARSE_OK)
     {
     print_preprocessor_error(result, text, l);
+    if ((result & VTK_PARSE_FATAL_ERROR) != 0)
+      {
+      exit(1);
+      }
     }
   else if (n == 6 && strncmp(directive, "define", n) == 0 &&
            ep - cp > 4 && strncmp(cp, "VTK", 3) == 0)
index 59894246ce4e5fc96f57144106b863097c41f92a..6c3443d1030f9306999d7e746274c8faa21b0657 100644 (file)
@@ -1,10 +1,8 @@
-
 /* A Bison parser, made by GNU Bison 2.4.1.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Skeleton implementation for Bison GLR parsers in C
 
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
-   Free Software Foundation, Inc.
+      Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
-/* C LALR(1) parser skeleton written by Richard Stallman, by
-   simplifying the original so-called "semantic" parser.  */
-
-/* All symbols defined below should begin with yy or YY, to avoid
-   infringing on user name space.  This should be done even for local
-   variables, as they might otherwise be expanded by user macros.
-   There are some unavoidable exceptions within include files to
-   define necessary library symbols; they are noted "INFRINGES ON
-   USER NAME SPACE" below.  */
+/* C GLR parser skeleton written by Paul Hilfinger.  */
 
 /* Identify Bison output.  */
 #define YYBISON 1
 #define YYBISON_VERSION "2.4.1"
 
 /* Skeleton name.  */
-#define YYSKELETON_NAME "yacc.c"
+#define YYSKELETON_NAME "glr.c"
 
 /* Pure parsers.  */
 #define YYPURE 0
 
-/* Push parsers.  */
-#define YYPUSH 0
-
-/* Pull parsers.  */
-#define YYPULL 1
-
 /* Using locations.  */
 #define YYLSP_NEEDED 0
 
 
 
+
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
+/* Line 172 of glr.c  */
 #line 15 "vtkParse.y"
 
 
@@ -82,9 +67,7 @@ Run yacc like this:
 Modify vtkParse.tab.c:
   - convert TABs to spaces (eight per tab)
   - remove spaces from ends of lines, s/ *$//g
-  - remove the "goto yyerrlab1;" that appears right before yyerrlab1:
-  - remove the #defined constants that appear right after the anonymous_enums
-
+  - replace all instances of "static inline" with "static".
 */
 
 /*
@@ -108,8 +91,8 @@ function pointer types, or "method" for method pointer types.
 Conformance Notes:
 
 This parser was designed empirically and incrementally.  It has been
-refactored to make it more similar to the ANSI C++ 1996 BNF grammar,
-but there are still many very significant differences.
+refactored to make it more similar to the C++ 1998 grammar, but there
+are still many very significant differences.
 
 The most significant difference between this parser and a "standard"
 parser is that it only parses declarations in detail.  All other
@@ -122,19 +105,19 @@ Instead, these two id types are used to allow operator functions to be
 handled by their own rules, rather than by the generic function rules.
 These ids can only be used in function declarations and using declarations.
 
-Types are handled quite differently from the ANSI BNF.  These differences
+Types are handled quite differently from the C++ BNF.  These differences
 represent a prolonged (and ultimately successful) attempt to empirically
 create a yacc parser without any shift/reduce conflicts.  The rules for
 types are organized according to the way that types are usually defined
 in working code, rather than strictly according to C++ grammar.
 
-The declaration specifiers "friend" and "typedef" can only appear at the
-beginning of a declaration sequence.  There are also restrictions on
-where class and enum specifiers can be used: you can declare a new struct
-within a variable declaration, but not within a parameter declaration.
+The declaration specifier "typedef" can only appear at the beginning
+of a declaration sequence.  There are also restrictions on where class
+and enum specifiers can be used: you can declare a new struct within a
+variable declaration, but not within a parameter declaration.
 
 The lexer returns each of "(scope::*", "(*", "(a::b::*", etc. as single
-tokens.  The ANSI BNF, in contrast, would consider these to be a "("
+tokens.  The C++ BNF, in contrast, would consider these to be a "("
 followed by a "ptr_operator".  The lexer concatenates these tokens in
 order to eliminate shift/reduce conflicts in the parser.  However, this
 means that this parser will only recognize "scope::*" as valid if it is
@@ -152,7 +135,7 @@ to the more usual form y x; without parentheses.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#define yyerror(a) fprintf(stderr,"%s\n",a)
+#define yyerror(a) print_parser_error(a, NULL, 0)
 #define yywrap() 1
 
 /* Make sure yacc-generated code knows we have included stdlib.h.  */
@@ -163,7 +146,7 @@ to the more usual form y x; without parentheses.
 
 /* Borland and MSVC do not define __STDC__ properly. */
 #if !defined(__STDC__)
-# if (defined(_MSC_VER) && _MSC_VER >= 1200) || defined(__BORLANDC__)
+# if defined(_MSC_VER) || defined(__BORLANDC__)
 #  define __STDC__ 1
 # endif
 #endif
@@ -251,6 +234,7 @@ const char   **Definitions;
 /* options that can be set by the programs that use the parser */
 int            IgnoreBTX = 0;
 int            Recursive = 0;
+const char    *CommandName = NULL;
 
 /* various state variables */
 NamespaceInfo *currentNamespace = NULL;
@@ -259,6 +243,7 @@ FunctionInfo  *currentFunction = NULL;
 TemplateInfo  *currentTemplate = NULL;
 const char    *currentEnumName = NULL;
 const char    *currentEnumValue = NULL;
+unsigned int   currentEnumType = 0;
 parse_access_t access_level = VTK_ACCESS_PUBLIC;
 
 /* functions from vtkParse.l */
@@ -267,10 +252,9 @@ void print_parser_error(const char *text, const char *cp, size_t n);
 /* helper functions */
 const char *type_class(unsigned int type, const char *classname);
 void start_class(const char *classname, int is_struct_or_union);
-void reject_class(const char *classname, int is_struct_or_union);
 void end_class();
 void add_base_class(ClassInfo *cls, const char *name, int access_lev,
-                    int is_virtual);
+                    unsigned int extra);
 void output_friend_function(void);
 void output_function(void);
 void reject_function(void);
@@ -281,7 +265,8 @@ void add_parameter(FunctionInfo *func, unsigned int type,
 void add_template_parameter(unsigned int datatype,
                             unsigned int extra, const char *funcSig);
 void add_using(const char *name, int is_namespace);
-void start_enum(const char *enumname);
+void start_enum(const char *name, int is_scoped,
+                unsigned int type, const char *basename);
 void add_enum(const char *name, const char *value);
 void end_enum();
 unsigned int guess_constant_type(const char *value);
@@ -303,6 +288,7 @@ void outputSetVectorMacro(const char *var, unsigned int paramType,
 void outputGetVectorMacro(const char *var, unsigned int paramType,
                           const char *typeText, int n);
 
+
 /*----------------------------------------------------------------
  * String utility methods
  *
@@ -424,28 +410,6 @@ static const char *vtkstrcat7(const char *str1, const char *str2,
   return vtkstrncat(7, cp);
 }
 
-static size_t vtkidlen(const char *text)
-{
-  size_t i = 0;
-  char c = text[0];
-
-  if ((c >= 'a' && c <= 'z') ||
-      (c >= 'A' && c <= 'Z') ||
-       c == '_')
-    {
-    do
-      {
-      c = text[++i];
-      }
-    while ((c >= 'a' && c <= 'z') ||
-           (c >= 'A' && c <= 'Z') ||
-           (c >= '0' && c <= '9') ||
-           c == '_');
-    }
-
-  return i;
-}
-
 /*----------------------------------------------------------------
  * Comments
  */
@@ -916,8 +880,8 @@ void setTypeMod(unsigned int mod)
 /* modify the indirection (pointers, refs) in the storage type */
 void setTypePtr(unsigned int ind)
 {
-  storedType &= ~(unsigned int)(VTK_PARSE_INDIRECT);
-  ind &= VTK_PARSE_INDIRECT;
+  storedType &= ~(unsigned int)(VTK_PARSE_INDIRECT | VTK_PARSE_RVALUE);
+  ind &= (VTK_PARSE_INDIRECT | VTK_PARSE_RVALUE);
   storedType |= ind;
 }
 
@@ -1242,11 +1206,8 @@ void prepend_scope(char *cp, const char *arg)
   n = strlen(arg);
   i = m;
   while (i > 0 &&
-         ((cp[i-1] >= 'a' && cp[i-1] <= 'z') ||
-          (cp[i-1] >= 'A' && cp[i-1] <= 'Z') ||
-          (cp[i-1] >= '0' && cp[i-1] <= '9') ||
-          cp[i-1] == '_' || cp[i-1] == ':' ||
-          cp[i-1] == '>'))
+         (vtkParse_CharType(cp[i-1], CPRE_IDGIT) ||
+          cp[i-1] == ':' || cp[i-1] == '>'))
     {
     i--;
     if (cp[i] == '>')
@@ -1295,6 +1256,12 @@ unsigned int add_indirection(unsigned int type1, unsigned int type2)
   result = ((type1 & ~VTK_PARSE_POINTER_MASK) |
             (type2 & ~VTK_PARSE_POINTER_MASK));
 
+  /* if there are two ampersands, it is an rvalue reference */
+  if ((type1 & type2 & VTK_PARSE_REF) != 0)
+    {
+    result |= VTK_PARSE_RVALUE;
+    }
+
   while (ptr2)
     {
     reverse = ((reverse << 2) | (ptr2 & VTK_PARSE_POINTER_LOWMASK));
@@ -1349,26 +1316,10 @@ unsigned int add_indirection_to_array(unsigned int type)
 
 
 
-/* Line 189 of yacc.c  */
-#line 1354 "vtkParse.tab.c"
-
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+/* Line 172 of glr.c  */
+#line 1322 "vtkParse.tab.c"
 
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
 
 
 /* Tokens.  */
@@ -1393,186 +1344,190 @@ unsigned int add_indirection_to_array(unsigned int type)
      FLOAT_LITERAL = 271,
      CHAR_LITERAL = 272,
      ZERO = 273,
-     STRUCT = 274,
-     CLASS = 275,
-     UNION = 276,
-     ENUM = 277,
-     PUBLIC = 278,
-     PRIVATE = 279,
-     PROTECTED = 280,
-     CONST = 281,
-     VOLATILE = 282,
-     MUTABLE = 283,
-     STATIC = 284,
-     VIRTUAL = 285,
-     EXPLICIT = 286,
-     INLINE = 287,
-     FRIEND = 288,
-     EXTERN = 289,
-     OPERATOR = 290,
-     TEMPLATE = 291,
-     THROW = 292,
-     TYPENAME = 293,
-     TYPEDEF = 294,
-     NAMESPACE = 295,
-     USING = 296,
-     NEW = 297,
-     DELETE = 298,
-     STATIC_CAST = 299,
-     DYNAMIC_CAST = 300,
-     CONST_CAST = 301,
-     REINTERPRET_CAST = 302,
-     OP_LSHIFT_EQ = 303,
-     OP_RSHIFT_EQ = 304,
-     OP_LSHIFT = 305,
-     OP_RSHIFT = 306,
-     OP_DOT_POINTER = 307,
-     OP_ARROW_POINTER = 308,
-     OP_ARROW = 309,
-     OP_INCR = 310,
-     OP_DECR = 311,
-     OP_PLUS_EQ = 312,
-     OP_MINUS_EQ = 313,
-     OP_TIMES_EQ = 314,
-     OP_DIVIDE_EQ = 315,
-     OP_REMAINDER_EQ = 316,
-     OP_AND_EQ = 317,
-     OP_OR_EQ = 318,
-     OP_XOR_EQ = 319,
-     OP_LOGIC_AND = 320,
-     OP_LOGIC_OR = 321,
-     OP_LOGIC_EQ = 322,
-     OP_LOGIC_NEQ = 323,
-     OP_LOGIC_LEQ = 324,
-     OP_LOGIC_GEQ = 325,
-     ELLIPSIS = 326,
-     DOUBLE_COLON = 327,
-     OTHER = 328,
-     VOID = 329,
-     BOOL = 330,
-     FLOAT = 331,
-     DOUBLE = 332,
-     INT = 333,
-     SHORT = 334,
-     LONG = 335,
-     INT64__ = 336,
-     CHAR = 337,
-     SIGNED = 338,
-     UNSIGNED = 339,
-     SSIZE_T = 340,
-     SIZE_T = 341,
-     IdType = 342,
-     TypeInt8 = 343,
-     TypeUInt8 = 344,
-     TypeInt16 = 345,
-     TypeUInt16 = 346,
-     TypeInt32 = 347,
-     TypeUInt32 = 348,
-     TypeInt64 = 349,
-     TypeUInt64 = 350,
-     TypeFloat32 = 351,
-     TypeFloat64 = 352,
-     SetMacro = 353,
-     GetMacro = 354,
-     SetStringMacro = 355,
-     GetStringMacro = 356,
-     SetClampMacro = 357,
-     SetObjectMacro = 358,
-     GetObjectMacro = 359,
-     BooleanMacro = 360,
-     SetVector2Macro = 361,
-     SetVector3Macro = 362,
-     SetVector4Macro = 363,
-     SetVector6Macro = 364,
-     GetVector2Macro = 365,
-     GetVector3Macro = 366,
-     GetVector4Macro = 367,
-     GetVector6Macro = 368,
-     SetVectorMacro = 369,
-     GetVectorMacro = 370,
-     ViewportCoordinateMacro = 371,
-     WorldCoordinateMacro = 372,
-     TypeMacro = 373,
-     VTK_BYTE_SWAP_DECL = 374
+     NULLPTR = 274,
+     SSIZE_T = 275,
+     SIZE_T = 276,
+     NULLPTR_T = 277,
+     BEGIN_ATTRIB = 278,
+     STRUCT = 279,
+     CLASS = 280,
+     UNION = 281,
+     ENUM = 282,
+     PUBLIC = 283,
+     PRIVATE = 284,
+     PROTECTED = 285,
+     CONST = 286,
+     VOLATILE = 287,
+     MUTABLE = 288,
+     STATIC = 289,
+     THREAD_LOCAL = 290,
+     VIRTUAL = 291,
+     EXPLICIT = 292,
+     INLINE = 293,
+     CONSTEXPR = 294,
+     FRIEND = 295,
+     EXTERN = 296,
+     OPERATOR = 297,
+     TEMPLATE = 298,
+     THROW = 299,
+     TRY = 300,
+     CATCH = 301,
+     NOEXCEPT = 302,
+     DECLTYPE = 303,
+     TYPENAME = 304,
+     TYPEDEF = 305,
+     NAMESPACE = 306,
+     USING = 307,
+     NEW = 308,
+     DELETE = 309,
+     DEFAULT = 310,
+     STATIC_CAST = 311,
+     DYNAMIC_CAST = 312,
+     CONST_CAST = 313,
+     REINTERPRET_CAST = 314,
+     OP_LSHIFT_EQ = 315,
+     OP_RSHIFT_EQ = 316,
+     OP_LSHIFT = 317,
+     OP_RSHIFT_A = 318,
+     OP_DOT_POINTER = 319,
+     OP_ARROW_POINTER = 320,
+     OP_ARROW = 321,
+     OP_INCR = 322,
+     OP_DECR = 323,
+     OP_PLUS_EQ = 324,
+     OP_MINUS_EQ = 325,
+     OP_TIMES_EQ = 326,
+     OP_DIVIDE_EQ = 327,
+     OP_REMAINDER_EQ = 328,
+     OP_AND_EQ = 329,
+     OP_OR_EQ = 330,
+     OP_XOR_EQ = 331,
+     OP_LOGIC_AND = 332,
+     OP_LOGIC_OR = 333,
+     OP_LOGIC_EQ = 334,
+     OP_LOGIC_NEQ = 335,
+     OP_LOGIC_LEQ = 336,
+     OP_LOGIC_GEQ = 337,
+     ELLIPSIS = 338,
+     DOUBLE_COLON = 339,
+     OTHER = 340,
+     AUTO = 341,
+     VOID = 342,
+     BOOL = 343,
+     FLOAT = 344,
+     DOUBLE = 345,
+     INT = 346,
+     SHORT = 347,
+     LONG = 348,
+     INT64__ = 349,
+     CHAR = 350,
+     CHAR16_T = 351,
+     CHAR32_T = 352,
+     WCHAR_T = 353,
+     SIGNED = 354,
+     UNSIGNED = 355,
+     IdType = 356,
+     TypeInt8 = 357,
+     TypeUInt8 = 358,
+     TypeInt16 = 359,
+     TypeUInt16 = 360,
+     TypeInt32 = 361,
+     TypeUInt32 = 362,
+     TypeInt64 = 363,
+     TypeUInt64 = 364,
+     TypeFloat32 = 365,
+     TypeFloat64 = 366,
+     SetMacro = 367,
+     GetMacro = 368,
+     SetStringMacro = 369,
+     GetStringMacro = 370,
+     SetClampMacro = 371,
+     SetObjectMacro = 372,
+     GetObjectMacro = 373,
+     BooleanMacro = 374,
+     SetVector2Macro = 375,
+     SetVector3Macro = 376,
+     SetVector4Macro = 377,
+     SetVector6Macro = 378,
+     GetVector2Macro = 379,
+     GetVector3Macro = 380,
+     GetVector4Macro = 381,
+     GetVector6Macro = 382,
+     SetVectorMacro = 383,
+     GetVectorMacro = 384,
+     ViewportCoordinateMacro = 385,
+     WorldCoordinateMacro = 386,
+     TypeMacro = 387,
+     VTK_BYTE_SWAP_DECL = 388
    };
 #endif
 
 
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+#ifndef YYSTYPE
 typedef union YYSTYPE
 {
 
-/* Line 222 of yacc.c  */
-#line 1302 "vtkParse.y"
+/* Line 215 of glr.c  */
+#line 1293 "vtkParse.y"
 
   const char   *str;
   unsigned int  integer;
 
 
 
-/* Line 222 of yacc.c  */
-#line 1635 "vtkParse.tab.c"
+/* Line 215 of glr.c  */
+#line 1481 "vtkParse.tab.c"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
 #endif
 
+#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
+typedef struct YYLTYPE
+{
 
-/* Copy the second part of user declarations.  */
+  char yydummy;
 
+} YYLTYPE;
+# define YYLTYPE_IS_DECLARED 1
+# define YYLTYPE_IS_TRIVIAL 1
+#endif
 
-/* Line 264 of yacc.c  */
-#line 1647 "vtkParse.tab.c"
 
-#ifdef short
-# undef short
-#endif
 
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
 #endif
 
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
 #else
-typedef short int yytype_int8;
+# define YYERROR_VERBOSE 0
 #endif
 
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
 #endif
 
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
+/* Default (constant) value used for initialization for null
+   right-hand sides.  Unlike the standard yacc.c template,
+   here we set the default value of $$ to a zeroed-out value.
+   Since the default value is undefined, this behavior is
+   technically correct.  */
+static YYSTYPE yyval_default;
+
+/* Copy the second part of user declarations.  */
 
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-#  define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-#  define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# else
-#  define YYSIZE_T unsigned int
-# endif
-#endif
 
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+/* Line 243 of glr.c  */
+#line 1528 "vtkParse.tab.c"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #ifndef YY_
 # if YYENABLE_NLS
@@ -1587,11 +1542,7 @@ typedef short int yytype_int16;
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
+#define YYUSE(e) ((void) (e))
 
 /* Identity function, used to suppress warnings about constant conditions.  */
 #ifndef lint
@@ -1600,180 +1551,109 @@ typedef short int yytype_int16;
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
-YYID (int yyi)
+YYID (int i)
 #else
 static int
-YYID (yyi)
-    int yyi;
+YYID (i)
+    int i;
 #endif
 {
-  return yyi;
+  return i;
 }
 #endif
 
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols.  */
-
-# ifdef YYSTACK_USE_ALLOCA
-#  if YYSTACK_USE_ALLOCA
-#   ifdef __GNUC__
-#    define YYSTACK_ALLOC __builtin_alloca
-#   elif defined __BUILTIN_VA_ARG_INCR
-#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-#   elif defined _AIX
-#    define YYSTACK_ALLOC __alloca
-#   elif defined _MSC_VER
-#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-#    define alloca _alloca
-#   else
-#    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-# ifdef YYSTACK_ALLOC
-   /* Pacify GCC's `empty if-body' warning.  */
-#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-    /* The OS might guarantee only one guard page at the bottom of the stack,
-       and a page size can be as small as 4096 bytes.  So we cannot safely
-       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
-       to allow for a few compiler-allocated temporary stack slots.  */
-#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-#  endif
-# else
-#  define YYSTACK_ALLOC YYMALLOC
-#  define YYSTACK_FREE YYFREE
-#  ifndef YYSTACK_ALLOC_MAXIMUM
-#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-#  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
-       && ! ((defined YYMALLOC || defined malloc) \
-             && (defined YYFREE || defined free)))
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
-#   endif
-#  endif
-#  ifndef YYMALLOC
-#   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-#  ifndef YYFREE
-#   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-#   endif
-#  endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+#ifndef YYFREE
+# define YYFREE free
+#endif
+#ifndef YYMALLOC
+# define YYMALLOC malloc
+#endif
+#ifndef YYREALLOC
+# define YYREALLOC realloc
+#endif
 
+#define YYSIZEMAX ((size_t) -1)
 
-#if (! defined yyoverflow \
-     && (! defined __cplusplus \
-         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+#ifdef __cplusplus
+   typedef bool yybool;
+#else
+   typedef unsigned char yybool;
+#endif
+#define yytrue 1
+#define yyfalse 0
+
+#ifndef YYSETJMP
+# include <setjmp.h>
+# define YYJMP_BUF jmp_buf
+# define YYSETJMP(env) setjmp (env)
+# define YYLONGJMP(env, val) longjmp (env, val)
+#endif
 
-/* A type that is properly aligned for any stack member.  */
-union yyalloc
-{
-  yytype_int16 yyss_alloc;
-  YYSTYPE yyvs_alloc;
-};
+/*-----------------.
+| GCC extensions.  |
+`-----------------*/
 
-/* The size of the maximum gap between one aligned stack and the next.  */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
-   N elements.  */
-# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
-      + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)                \
-      do                                        \
-        {                                        \
-          YYSIZE_T yyi;                                \
-          for (yyi = 0; yyi < (Count); yyi++)        \
-            (To)[yyi] = (From)[yyi];                \
-        }                                        \
-      while (YYID (0))
-#  endif
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if (! defined __GNUC__ || __GNUC__ < 2 \
+      || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
+#  define __attribute__(Spec) /* empty */
 # endif
+#endif
 
-/* Relocate STACK from its old location to the new one.  The
-   local variables YYSIZE and YYSTACKSIZE give the old and new number of
-   elements in the stack, and YYPTR gives the new location of the
-   stack.  Advance YYPTR to a properly aligned location for the next
-   stack.  */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack)                                \
-    do                                                                        \
-      {                                                                        \
-        YYSIZE_T yynewbytes;                                                \
-        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                        \
-        Stack = &yyptr->Stack_alloc;                                        \
-        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
-        yyptr += yynewbytes / sizeof (*yyptr);                                \
-      }                                                                        \
-    while (YYID (0))
 
+#ifdef __cplusplus
+# define YYOPTIONAL_LOC(Name) /* empty */
+#else
+# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
+#endif
+
+#ifndef YYASSERT
+# define YYASSERT(condition) ((void) ((condition) || (abort (), 0)))
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  3
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   5657
+#define YYLAST   9147
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  143
+#define YYNTOKENS  157
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  240
+#define YYNNTS  276
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  603
+#define YYNRULES  701
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  968
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
+#define YYNSTATES  1182
+/* YYMAXRHS -- Maximum number of symbols on right-hand side of rule.  */
+#define YYMAXRHS 10
+/* YYMAXLEFT -- Maximum number of symbols to the left of a handle
+   accessed by $0, $-1, etc., in any rule.  */
+#define YYMAXLEFT 0
+
+/* YYTRANSLATE(X) -- Bison symbol number corresponding to X.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   374
+#define YYMAXUTOK   388
 
 #define YYTRANSLATE(YYX)                                                \
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
-static const yytype_uint8 yytranslate[] =
+static const unsigned char yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   139,     2,     2,     2,   135,   133,     2,
-     126,   127,   134,   138,   125,   137,   142,   136,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,   124,   120,
-     128,   123,   129,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,   153,     2,     2,     2,   149,   146,     2,
+     140,   141,   147,   152,   139,   151,   156,   150,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,   138,   134,
+     142,   137,   148,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,   130,     2,   131,   141,     2,     2,     2,     2,     2,
+       2,   143,     2,   144,   155,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   121,   140,   122,   132,     2,     2,     2,
+       2,     2,     2,   135,   154,   136,   145,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -1798,307 +1678,360 @@ static const yytype_uint8 yytranslate[] =
       85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
       95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
      105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,   119
+     115,   116,   117,   118,   119,   120,   121,   122,   123,   124,
+     125,   126,   127,   128,   129,   130,   131,   132,   133
 };
 
 #if YYDEBUG
 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
    YYRHS.  */
-static const yytype_uint16 yyprhs[] =
-{
-       0,     0,     3,     5,     6,     7,    11,    13,    15,    17,
-      19,    21,    23,    25,    27,    29,    31,    33,    35,    37,
-      40,    42,    45,    48,    51,    54,    60,    65,    66,    73,
-      79,    81,    84,    88,    93,    98,   104,   105,   111,   112,
-     117,   118,   122,   124,   126,   128,   129,   130,   134,   138,
-     140,   142,   144,   146,   148,   150,   152,   154,   156,   158,
-     160,   162,   164,   167,   170,   172,   175,   178,   181,   185,
-     188,   192,   193,   195,   198,   200,   204,   206,   210,   214,
-     215,   217,   218,   220,   222,   224,   226,   231,   237,   238,
-     244,   247,   249,   250,   252,   254,   257,   261,   263,   264,
-     269,   276,   280,   285,   288,   292,   298,   302,   304,   307,
-     313,   319,   326,   332,   339,   342,   343,   347,   350,   352,
-     354,   355,   356,   364,   366,   370,   372,   375,   378,   381,
-     385,   389,   394,   398,   399,   405,   407,   408,   413,   414,
-     415,   421,   422,   423,   429,   430,   431,   432,   440,   442,
-     444,   445,   447,   448,   452,   454,   457,   460,   463,   466,
-     469,   472,   476,   479,   483,   486,   490,   494,   497,   501,
-     506,   509,   511,   513,   516,   518,   521,   524,   525,   526,
-     534,   537,   538,   542,   543,   549,   552,   554,   557,   558,
-     561,   562,   566,   568,   571,   575,   577,   578,   584,   586,
-     588,   589,   590,   596,   597,   603,   604,   607,   609,   613,
-     616,   617,   618,   621,   623,   624,   629,   633,   634,   635,
-     641,   642,   644,   645,   649,   654,   657,   658,   661,   662,
-     663,   668,   671,   672,   674,   677,   678,   684,   687,   688,
-     694,   696,   698,   700,   702,   704,   705,   706,   707,   714,
-     716,   717,   720,   723,   727,   729,   732,   734,   737,   738,
-     740,   742,   746,   748,   750,   752,   753,   755,   756,   759,
-     761,   764,   765,   770,   771,   772,   775,   777,   779,   781,
-     783,   786,   789,   792,   795,   798,   802,   806,   807,   813,
-     815,   817,   818,   824,   826,   828,   830,   832,   834,   836,
-     838,   841,   844,   847,   850,   853,   856,   859,   861,   863,
-     865,   867,   869,   871,   873,   875,   877,   879,   881,   883,
-     885,   887,   889,   891,   893,   895,   897,   899,   900,   903,
-     905,   907,   909,   911,   913,   916,   918,   920,   922,   924,
-     926,   929,   931,   933,   935,   937,   939,   941,   943,   946,
-     949,   950,   954,   955,   960,   962,   963,   967,   969,   971,
-     974,   977,   980,   981,   985,   986,   991,   993,   995,   997,
-    1000,  1003,  1006,  1008,  1010,  1012,  1014,  1016,  1018,  1020,
-    1022,  1024,  1026,  1028,  1030,  1032,  1034,  1036,  1038,  1040,
-    1042,  1044,  1046,  1048,  1050,  1052,  1054,  1056,  1058,  1060,
-    1062,  1064,  1066,  1068,  1070,  1072,  1074,  1076,  1079,  1081,
-    1083,  1084,  1088,  1090,  1093,  1094,  1102,  1103,  1104,  1105,
-    1115,  1116,  1122,  1123,  1129,  1130,  1131,  1142,  1143,  1151,
-    1152,  1153,  1154,  1164,  1171,  1172,  1180,  1181,  1189,  1190,
-    1198,  1199,  1207,  1208,  1216,  1217,  1225,  1226,  1234,  1235,
-    1243,  1244,  1254,  1255,  1265,  1270,  1275,  1283,  1284,  1286,
-    1289,  1292,  1296,  1300,  1302,  1304,  1306,  1308,  1310,  1312,
-    1314,  1316,  1318,  1320,  1322,  1324,  1326,  1328,  1330,  1332,
-    1334,  1336,  1338,  1340,  1342,  1344,  1346,  1348,  1350,  1352,
-    1354,  1356,  1358,  1360,  1362,  1364,  1366,  1368,  1370,  1372,
-    1374,  1376,  1378,  1380,  1382,  1384,  1386,  1388,  1390,  1392,
-    1394,  1396,  1398,  1400,  1402,  1404,  1406,  1408,  1410,  1412,
-    1414,  1416,  1418,  1420,  1422,  1424,  1426,  1428,  1430,  1432,
-    1434,  1436,  1438,  1440,  1443,  1445,  1447,  1449,  1451,  1453,
-    1455,  1457,  1459,  1461,  1463,  1465,  1466,  1469,  1471,  1473,
-    1475,  1477,  1479,  1481,  1483,  1485,  1486,  1489,  1490,  1493,
-    1495,  1497,  1499,  1501,  1503,  1504,  1509,  1510,  1515,  1516,
-    1521,  1522,  1527,  1528,  1533,  1534,  1539,  1540,  1543,  1544,
-    1547,  1549,  1551,  1553,  1555,  1557,  1559,  1561,  1563,  1565,
-    1567,  1569,  1571,  1573,  1575,  1577,  1579,  1581,  1583,  1587,
-    1591,  1595,  1597,  1599
+static const unsigned short int yyprhs[] =
+{
+       0,     0,     3,     5,     6,     7,    12,    14,    16,    18,
+      20,    22,    24,    26,    28,    30,    32,    34,    36,    38,
+      40,    42,    44,    47,    49,    52,    55,    58,    61,    64,
+      70,    75,    81,    86,    87,    94,   100,   102,   105,   110,
+     114,   120,   125,   131,   132,   138,   139,   147,   152,   153,
+     159,   162,   164,   166,   168,   172,   177,   180,   182,   184,
+     185,   187,   188,   189,   194,   198,   200,   202,   204,   206,
+     208,   210,   212,   214,   216,   218,   220,   222,   224,   226,
+     228,   230,   233,   236,   238,   241,   244,   247,   250,   253,
+     257,   260,   264,   266,   271,   274,   279,   284,   285,   287,
+     288,   290,   292,   294,   296,   302,   306,   313,   318,   324,
+     325,   331,   336,   340,   342,   345,   348,   349,   350,   354,
+     356,   360,   361,   363,   364,   369,   376,   379,   381,   387,
+     394,   398,   403,   409,   413,   415,   418,   424,   430,   437,
+     443,   450,   453,   454,   458,   461,   463,   465,   466,   467,
+     476,   478,   482,   484,   487,   490,   493,   497,   501,   506,
+     507,   516,   520,   521,   527,   529,   530,   535,   536,   537,
+     543,   544,   545,   551,   552,   553,   554,   562,   563,   565,
+     567,   569,   570,   572,   573,   577,   579,   582,   585,   588,
+     591,   594,   598,   603,   606,   610,   613,   617,   622,   625,
+     630,   636,   640,   642,   644,   647,   649,   652,   656,   657,
+     658,   668,   671,   672,   677,   678,   686,   689,   691,   695,
+     696,   699,   700,   704,   706,   709,   711,   714,   716,   718,
+     720,   723,   726,   727,   729,   730,   734,   738,   740,   742,
+     749,   750,   757,   758,   766,   767,   768,   775,   776,   783,
+     784,   787,   789,   793,   797,   798,   799,   802,   804,   805,
+     810,   814,   816,   817,   818,   824,   825,   827,   828,   832,
+     833,   836,   841,   844,   845,   848,   849,   850,   855,   858,
+     859,   861,   865,   866,   873,   877,   878,   884,   885,   889,
+     891,   892,   893,   894,   902,   904,   905,   908,   911,   915,
+     919,   922,   924,   927,   929,   932,   933,   935,   938,   943,
+     945,   947,   949,   950,   952,   953,   956,   958,   961,   962,
+     968,   969,   970,   973,   975,   977,   979,   981,   983,   986,
+     989,   992,   995,   998,  1001,  1004,  1007,  1011,  1015,  1019,
+    1020,  1026,  1028,  1030,  1032,  1033,  1039,  1040,  1044,  1046,
+    1048,  1050,  1052,  1054,  1056,  1058,  1060,  1062,  1064,  1066,
+    1068,  1070,  1072,  1074,  1076,  1078,  1080,  1082,  1084,  1086,
+    1088,  1090,  1092,  1094,  1096,  1098,  1100,  1101,  1105,  1107,
+    1109,  1111,  1113,  1116,  1120,  1122,  1124,  1126,  1128,  1130,
+    1132,  1135,  1137,  1139,  1141,  1143,  1145,  1147,  1149,  1151,
+    1154,  1157,  1158,  1162,  1163,  1168,  1170,  1174,  1179,  1181,
+    1183,  1184,  1189,  1192,  1195,  1198,  1199,  1203,  1204,  1209,
+    1212,  1213,  1217,  1218,  1223,  1225,  1227,  1229,  1231,  1234,
+    1237,  1240,  1243,  1246,  1248,  1250,  1252,  1254,  1256,  1258,
+    1260,  1262,  1264,  1266,  1268,  1270,  1272,  1274,  1276,  1278,
+    1280,  1282,  1284,  1286,  1288,  1290,  1292,  1294,  1296,  1298,
+    1300,  1302,  1304,  1306,  1308,  1310,  1312,  1314,  1316,  1318,
+    1320,  1322,  1324,  1327,  1330,  1333,  1334,  1339,  1340,  1342,
+    1344,  1347,  1348,  1351,  1352,  1353,  1360,  1361,  1369,  1370,
+    1371,  1372,  1382,  1383,  1389,  1390,  1396,  1397,  1398,  1409,
+    1410,  1418,  1419,  1420,  1421,  1431,  1438,  1439,  1447,  1448,
+    1456,  1457,  1465,  1466,  1474,  1475,  1483,  1484,  1492,  1493,
+    1501,  1502,  1510,  1511,  1521,  1522,  1532,  1537,  1542,  1550,
+    1551,  1553,  1556,  1559,  1563,  1567,  1569,  1571,  1573,  1575,
+    1578,  1581,  1584,  1586,  1588,  1590,  1592,  1594,  1596,  1598,
+    1600,  1602,  1604,  1606,  1608,  1610,  1612,  1614,  1616,  1618,
+    1620,  1622,  1624,  1626,  1628,  1630,  1632,  1634,  1636,  1638,
+    1640,  1642,  1644,  1646,  1648,  1650,  1652,  1654,  1656,  1658,
+    1660,  1662,  1664,  1666,  1668,  1670,  1672,  1674,  1676,  1678,
+    1680,  1682,  1684,  1686,  1688,  1690,  1692,  1694,  1696,  1698,
+    1700,  1702,  1704,  1706,  1708,  1710,  1712,  1714,  1716,  1718,
+    1720,  1722,  1724,  1726,  1728,  1730,  1733,  1735,  1737,  1739,
+    1740,  1744,  1746,  1748,  1750,  1752,  1754,  1756,  1758,  1760,
+    1762,  1764,  1766,  1768,  1770,  1771,  1774,  1776,  1778,  1780,
+    1782,  1784,  1786,  1788,  1790,  1792,  1793,  1796,  1797,  1800,
+    1802,  1804,  1806,  1808,  1810,  1811,  1816,  1818,  1820,  1821,
+    1826,  1827,  1833,  1834,  1839,  1840,  1845,  1846,  1851,  1852,
+    1857,  1858,  1861,  1862,  1865,  1867,  1869,  1871,  1873,  1875,
+    1877,  1879,  1881,  1883,  1885,  1887,  1889,  1891,  1893,  1895,
+    1897,  1899,  1901,  1903,  1905,  1907,  1911,  1915,  1920,  1924,
+    1926,  1928
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int16 yyrhs[] =
-{
-     144,     0,    -1,   145,    -1,    -1,    -1,   145,   146,   147,
-      -1,   198,    -1,   196,    -1,   153,    -1,   150,    -1,   152,
-      -1,   149,    -1,   186,    -1,   259,    -1,   175,    -1,   155,
-      -1,   216,    -1,   148,    -1,   327,    -1,   289,   120,    -1,
-     120,    -1,   199,   155,    -1,   199,   216,    -1,   199,   183,
-      -1,   199,   148,    -1,    34,    12,   121,   145,   122,    -1,
-      40,   121,   375,   122,    -1,    -1,    40,   299,   151,   121,
-     145,   122,    -1,    40,   299,   123,   291,   120,    -1,   154,
-      -1,   199,   154,    -1,   161,   289,   120,    -1,   302,   161,
-     289,   120,    -1,   156,   300,   261,   120,    -1,   302,   156,
-     300,   261,   120,    -1,    -1,   158,   157,   121,   162,   122,
-      -1,    -1,   161,   289,   159,   168,    -1,    -1,   161,   160,
-     168,    -1,    20,    -1,    19,    -1,    21,    -1,    -1,    -1,
-     162,   163,   165,    -1,   162,   164,   124,    -1,    23,    -1,
-      24,    -1,    25,    -1,   196,    -1,   153,    -1,   167,    -1,
-     186,    -1,   259,    -1,   175,    -1,   155,    -1,   220,    -1,
-     166,    -1,   327,    -1,   119,   381,    -1,   289,   120,    -1,
-     120,    -1,   199,   155,    -1,   199,   220,    -1,    33,   184,
-      -1,    33,   199,   184,    -1,    33,   153,    -1,    33,   221,
-     237,    -1,    -1,   169,    -1,   124,   170,    -1,   171,    -1,
-     170,   125,   171,    -1,   289,    -1,    30,   173,   289,    -1,
-     174,   172,   289,    -1,    -1,    30,    -1,    -1,   174,    -1,
-      23,    -1,    24,    -1,    25,    -1,   176,   300,   261,   120,
-      -1,   302,   176,   300,   261,   120,    -1,    -1,   178,   121,
-     177,   179,   122,    -1,    22,   289,    -1,    22,    -1,    -1,
-     180,    -1,   181,    -1,   180,   125,    -1,   180,   125,   181,
-      -1,   298,    -1,    -1,   298,   123,   182,   355,    -1,   308,
-     292,   298,   123,   376,   120,    -1,   161,   289,   185,    -1,
-     302,   161,   289,   185,    -1,   161,   185,    -1,   302,   161,
-     185,    -1,   121,   375,   122,   376,   120,    -1,   124,   376,
-     120,    -1,   187,    -1,   302,   187,    -1,    39,   308,   195,
-     189,   120,    -1,    39,   156,   300,   188,   120,    -1,    39,
-     302,   156,   300,   188,   120,    -1,    39,   176,   300,   188,
-     120,    -1,    39,   302,   176,   300,   188,   120,    -1,   190,
-     189,    -1,    -1,   189,   125,   190,    -1,   265,   195,    -1,
-     268,    -1,   192,    -1,    -1,    -1,   279,   126,   193,   249,
-     127,   194,   275,    -1,   191,    -1,    41,   197,   120,    -1,
-     289,    -1,    38,   289,    -1,   292,   231,    -1,   292,   226,
-      -1,   295,   292,   231,    -1,   295,   292,   226,    -1,    41,
-      40,   289,   120,    -1,    36,   128,   129,    -1,    -1,    36,
-     128,   200,   201,   129,    -1,   203,    -1,    -1,   201,   125,
-     202,   203,    -1,    -1,    -1,   204,   314,   266,   205,   212,
-      -1,    -1,    -1,   206,   211,   266,   207,   212,    -1,    -1,
-      -1,    -1,   208,   199,    20,   209,   266,   210,   212,    -1,
-      20,    -1,    38,    -1,    -1,   213,    -1,    -1,   123,   214,
-     215,    -1,   363,    -1,   215,   363,    -1,   217,   237,    -1,
-     222,   237,    -1,   218,   237,    -1,   219,   237,    -1,   308,
-     233,    -1,   308,   292,   233,    -1,   292,   241,    -1,   302,
-     292,   241,    -1,   292,   223,    -1,   302,   292,   223,    -1,
-     308,   292,   227,    -1,   221,   237,    -1,   292,   231,   120,
-      -1,   302,   292,   231,   120,    -1,   308,   233,    -1,   222,
-      -1,   241,    -1,   302,   241,    -1,   223,    -1,   302,   223,
-      -1,   308,   227,    -1,    -1,    -1,   226,   126,   224,   249,
-     127,   225,   234,    -1,   232,   308,    -1,    -1,   229,   228,
-     234,    -1,    -1,   231,   126,   230,   249,   127,    -1,   232,
-     351,    -1,    35,    -1,   238,   234,    -1,    -1,   234,   235,
-      -1,    -1,    37,   236,   369,    -1,    26,    -1,   123,    18,
-      -1,   121,   375,   122,    -1,   120,    -1,    -1,   240,   126,
-     239,   249,   127,    -1,   298,    -1,   296,    -1,    -1,    -1,
-     244,   242,   246,   243,   234,    -1,    -1,   240,   126,   245,
-     249,   127,    -1,    -1,   124,   247,    -1,   248,    -1,   247,
-     125,   248,    -1,   289,   381,    -1,    -1,    -1,   250,   251,
-      -1,   253,    -1,    -1,   251,   125,   252,   253,    -1,   251,
-     125,    71,    -1,    -1,    -1,   254,   308,   266,   255,   256,
-      -1,    -1,   257,    -1,    -1,   123,   258,   355,    -1,   308,
-     260,   262,   120,    -1,   268,   256,    -1,    -1,   264,   262,
-      -1,    -1,    -1,   262,   125,   263,   264,    -1,   265,   260,
-      -1,    -1,   322,    -1,   278,   281,    -1,    -1,   270,   276,
-     127,   267,   272,    -1,   279,   281,    -1,    -1,   271,   277,
-     127,   269,   272,    -1,   126,    -1,    10,    -1,    11,    -1,
-      10,    -1,    11,    -1,    -1,    -1,    -1,   126,   273,   249,
-     127,   274,   275,    -1,   282,    -1,    -1,   275,    28,    -1,
-     275,    26,    -1,   275,    37,   381,    -1,   266,    -1,   322,
-     266,    -1,   268,    -1,   322,   268,    -1,    -1,   279,    -1,
-     298,    -1,   298,   124,   280,    -1,    15,    -1,    13,    -1,
-      14,    -1,    -1,   282,    -1,    -1,   283,   284,    -1,   285,
-      -1,   284,   285,    -1,    -1,   130,   286,   287,   131,    -1,
-      -1,    -1,   288,   355,    -1,   290,    -1,   291,    -1,   298,
-      -1,   296,    -1,   292,   290,    -1,   295,   290,    -1,   295,
-     291,    -1,   294,   295,    -1,   296,   295,    -1,   292,   294,
-     295,    -1,   292,   296,   295,    -1,    -1,   292,    36,   293,
-     296,   295,    -1,   299,    -1,    72,    -1,    -1,   299,   128,
-     297,   361,   129,    -1,     4,    -1,     5,    -1,     3,    -1,
-       9,    -1,     8,    -1,     6,    -1,     7,    -1,   132,     4,
-      -1,   132,     5,    -1,   132,     3,    -1,   132,     9,    -1,
-     132,     8,    -1,   132,     6,    -1,   132,     7,    -1,    86,
-      -1,    85,    -1,    88,    -1,    89,    -1,    90,    -1,    91,
-      -1,    92,    -1,    93,    -1,    94,    -1,    95,    -1,    96,
-      -1,    97,    -1,    87,    -1,     3,    -1,     5,    -1,     4,
-      -1,     9,    -1,     8,    -1,     6,    -1,     7,    -1,    -1,
-     300,   301,    -1,   303,    -1,   321,    -1,    39,    -1,    33,
-      -1,   303,    -1,   302,   303,    -1,   304,    -1,   305,    -1,
-     306,    -1,    28,    -1,    34,    -1,    34,    12,    -1,    29,
-      -1,    32,    -1,    30,    -1,    31,    -1,    26,    -1,    27,
-      -1,   306,    -1,   307,   306,    -1,   309,   265,    -1,    -1,
-     312,   310,   300,    -1,    -1,   302,   312,   311,   300,    -1,
-     319,    -1,    -1,    38,   313,   289,    -1,   296,    -1,   291,
-      -1,   161,   289,    -1,    22,   289,    -1,   315,   265,    -1,
-      -1,   318,   316,   300,    -1,    -1,   302,   312,   317,   300,
-      -1,   319,    -1,   296,    -1,   291,    -1,    19,   289,    -1,
-      21,   289,    -1,    22,   289,    -1,   321,    -1,   320,    -1,
-       6,    -1,     7,    -1,     8,    -1,     9,    -1,     3,    -1,
-       4,    -1,     5,    -1,    85,    -1,    86,    -1,    88,    -1,
-      89,    -1,    90,    -1,    91,    -1,    92,    -1,    93,    -1,
-      94,    -1,    95,    -1,    96,    -1,    97,    -1,    87,    -1,
-      74,    -1,    75,    -1,    76,    -1,    77,    -1,    82,    -1,
-      78,    -1,    79,    -1,    80,    -1,    81,    -1,    83,    -1,
-      84,    -1,   323,    -1,   326,    -1,   326,   323,    -1,   133,
-      -1,   134,    -1,    -1,   134,   325,   307,    -1,   324,    -1,
-     326,   324,    -1,    -1,    98,   126,   298,   125,   328,   308,
-     127,    -1,    -1,    -1,    -1,    99,   126,   329,   298,   125,
-     330,   308,   331,   127,    -1,    -1,   100,   126,   332,   298,
-     127,    -1,    -1,   101,   126,   333,   298,   127,    -1,    -1,
-      -1,   102,   126,   298,   125,   334,   308,   335,   125,   376,
-     127,    -1,    -1,   103,   126,   298,   125,   336,   308,   127,
-      -1,    -1,    -1,    -1,   104,   126,   337,   298,   125,   338,
-     308,   339,   127,    -1,   105,   126,   298,   125,   308,   127,
-      -1,    -1,   106,   126,   298,   125,   340,   308,   127,    -1,
-      -1,   110,   126,   298,   125,   341,   308,   127,    -1,    -1,
-     107,   126,   298,   125,   342,   308,   127,    -1,    -1,   111,
-     126,   298,   125,   343,   308,   127,    -1,    -1,   108,   126,
-     298,   125,   344,   308,   127,    -1,    -1,   112,   126,   298,
-     125,   345,   308,   127,    -1,    -1,   109,   126,   298,   125,
-     346,   308,   127,    -1,    -1,   113,   126,   298,   125,   347,
-     308,   127,    -1,    -1,   114,   126,   298,   125,   348,   308,
-     125,    13,   127,    -1,    -1,   115,   126,   298,   125,   349,
-     308,   125,    13,   127,    -1,   116,   126,   298,   127,    -1,
-     117,   126,   298,   127,    -1,   118,   126,   298,   125,   298,
-     350,   127,    -1,    -1,   125,    -1,   126,   127,    -1,   130,
-     131,    -1,    42,   130,   131,    -1,    43,   130,   131,    -1,
-     128,    -1,   129,    -1,   125,    -1,   123,    -1,   352,    -1,
-     135,    -1,   134,    -1,   136,    -1,   137,    -1,   138,    -1,
-     139,    -1,   132,    -1,   133,    -1,   140,    -1,   141,    -1,
-      42,    -1,    43,    -1,    48,    -1,    49,    -1,    50,    -1,
-      51,    -1,    52,    -1,    53,    -1,    54,    -1,    57,    -1,
-      58,    -1,    59,    -1,    60,    -1,    61,    -1,    55,    -1,
-      56,    -1,    62,    -1,    63,    -1,    64,    -1,    65,    -1,
-      66,    -1,    67,    -1,    68,    -1,    69,    -1,    70,    -1,
-      39,    -1,    38,    -1,    20,    -1,    19,    -1,    21,    -1,
-      36,    -1,    23,    -1,    25,    -1,    24,    -1,    26,    -1,
-      29,    -1,    32,    -1,    30,    -1,    34,    -1,    40,    -1,
-      35,    -1,    22,    -1,    37,    -1,    46,    -1,    45,    -1,
-      44,    -1,    47,    -1,    15,    -1,    13,    -1,    14,    -1,
-      16,    -1,    17,    -1,    12,    -1,    18,    -1,   358,    -1,
-     355,   358,    -1,   367,    -1,   369,    -1,   373,    -1,   352,
-      -1,   124,    -1,   142,    -1,    72,    -1,   353,    -1,   354,
-      -1,   321,    -1,   320,    -1,    -1,   357,   359,    -1,   356,
-      -1,   128,    -1,   129,    -1,   358,    -1,   123,    -1,   125,
-      -1,   359,    -1,   120,    -1,    -1,   361,   364,    -1,    -1,
-     362,   360,    -1,   365,    -1,   356,    -1,   363,    -1,   123,
-      -1,   125,    -1,    -1,   128,   366,   361,   129,    -1,    -1,
-     130,   368,   357,   131,    -1,    -1,   126,   370,   357,   127,
-      -1,    -1,    10,   371,   357,   127,    -1,    -1,    11,   372,
-     357,   127,    -1,    -1,   121,   374,   362,   122,    -1,    -1,
-     375,   377,    -1,    -1,   376,   378,    -1,   378,    -1,   120,
-      -1,   379,    -1,   381,    -1,   380,    -1,    72,    -1,    71,
-      -1,   352,    -1,   124,    -1,   142,    -1,   128,    -1,   129,
-      -1,   123,    -1,   125,    -1,   353,    -1,   354,    -1,   319,
-      -1,    73,    -1,   121,   375,   122,    -1,   130,   375,   131,
-      -1,   382,   375,   127,    -1,   126,    -1,    10,    -1,    11,
-      -1
+static const short int yyrhs[] =
+{
+     158,     0,    -1,   159,    -1,    -1,    -1,   159,   160,   367,
+     161,    -1,   218,    -1,   216,    -1,   219,    -1,   168,    -1,
+     191,    -1,   165,    -1,   167,    -1,   164,    -1,   206,    -1,
+     289,    -1,   192,    -1,   170,    -1,   239,    -1,   162,    -1,
+     163,    -1,   371,    -1,   319,   134,    -1,   134,    -1,   221,
+     170,    -1,   221,   239,    -1,   221,   202,    -1,   221,   162,
+      -1,   221,   219,    -1,    41,    43,   428,   425,   134,    -1,
+      43,   428,   425,   134,    -1,    41,    12,   135,   159,   136,
+      -1,    51,   135,   424,   136,    -1,    -1,    51,   332,   166,
+     135,   159,   136,    -1,    51,   332,   137,   321,   134,    -1,
+     169,    -1,   221,   169,    -1,   176,   367,   177,   134,    -1,
+     176,   367,   134,    -1,   335,   176,   367,   177,   134,    -1,
+     171,   333,   291,   134,    -1,   335,   171,   333,   291,   134,
+      -1,    -1,   173,   172,   135,   180,   136,    -1,    -1,   176,
+     367,   177,   179,   138,   174,   186,    -1,   176,   367,   177,
+     179,    -1,    -1,   176,   367,   138,   175,   186,    -1,   176,
+     367,    -1,    25,    -1,    24,    -1,    26,    -1,   322,   178,
+     367,    -1,   326,   322,   178,   367,    -1,   178,   367,    -1,
+     331,    -1,   327,    -1,    -1,     3,    -1,    -1,    -1,   180,
+     181,   367,   183,    -1,   180,   182,   138,    -1,    28,    -1,
+      29,    -1,    30,    -1,   216,    -1,   219,    -1,   168,    -1,
+     191,    -1,   185,    -1,   206,    -1,   289,    -1,   192,    -1,
+     170,    -1,   243,    -1,   184,    -1,   163,    -1,   371,    -1,
+     133,   431,    -1,   319,   134,    -1,   134,    -1,   221,   170,
+      -1,   221,   243,    -1,   221,   184,    -1,   221,   219,    -1,
+      40,   204,    -1,    40,   221,   204,    -1,    40,   168,    -1,
+      40,   244,   265,    -1,   187,    -1,   186,   139,   367,   187,
+      -1,   319,   233,    -1,    36,   189,   319,   233,    -1,   190,
+     188,   319,   233,    -1,    -1,    36,    -1,    -1,   190,    -1,
+      28,    -1,    29,    -1,    30,    -1,   196,   367,   319,   197,
+     134,    -1,   196,   367,   134,    -1,   335,   196,   367,   319,
+     197,   134,    -1,   193,   333,   291,   134,    -1,   335,   193,
+     333,   291,   134,    -1,    -1,   195,   135,   194,   199,   136,
+      -1,   196,   367,   319,   197,    -1,   196,   367,   197,    -1,
+      27,    -1,    27,    25,    -1,    27,    24,    -1,    -1,    -1,
+     138,   198,   342,    -1,   200,    -1,   199,   139,   200,    -1,
+      -1,   331,    -1,    -1,   331,   137,   201,   399,    -1,   341,
+     233,   322,   331,   203,   134,    -1,   137,   425,    -1,   429,
+      -1,   176,   367,   177,   179,   205,    -1,   335,   176,   367,
+     177,   179,   205,    -1,   176,   367,   205,    -1,   335,   176,
+     367,   205,    -1,   135,   424,   136,   425,   134,    -1,   138,
+     425,   134,    -1,   207,    -1,   335,   207,    -1,    50,   341,
+     215,   209,   134,    -1,    50,   171,   333,   208,   134,    -1,
+      50,   335,   171,   333,   208,   134,    -1,    50,   193,   333,
+     208,   134,    -1,    50,   335,   193,   333,   208,   134,    -1,
+     210,   209,    -1,    -1,   209,   139,   210,    -1,   295,   215,
+      -1,   298,    -1,   212,    -1,    -1,    -1,   233,   309,   140,
+     213,   278,   141,   214,   305,    -1,   211,    -1,    52,   217,
+     134,    -1,   319,    -1,    49,   319,    -1,   322,   254,    -1,
+     322,   249,    -1,   326,   322,   254,    -1,   326,   322,   249,
+      -1,    52,    51,   319,   134,    -1,    -1,    52,   319,   367,
+     137,   220,   341,   296,   134,    -1,    43,   142,   414,    -1,
+      -1,    43,   142,   222,   223,   414,    -1,   225,    -1,    -1,
+     223,   139,   224,   225,    -1,    -1,    -1,   226,   352,   296,
+     227,   235,    -1,    -1,    -1,   228,   234,   296,   229,   235,
+      -1,    -1,    -1,    -1,   230,   221,    25,   231,   296,   232,
+     235,    -1,    -1,    83,    -1,    25,    -1,    49,    -1,    -1,
+     236,    -1,    -1,   137,   237,   238,    -1,   410,    -1,   238,
+     410,    -1,   240,   265,    -1,   245,   265,    -1,   241,   265,
+      -1,   242,   265,    -1,   341,   233,   256,    -1,   341,   233,
+     322,   256,    -1,   322,   270,    -1,   335,   322,   270,    -1,
+     322,   246,    -1,   335,   322,   246,    -1,   341,   233,   322,
+     250,    -1,   244,   265,    -1,   322,   254,   367,   134,    -1,
+     335,   322,   254,   367,   134,    -1,   341,   233,   256,    -1,
+     245,    -1,   270,    -1,   335,   270,    -1,   246,    -1,   335,
+     246,    -1,   341,   233,   250,    -1,    -1,    -1,   249,   140,
+     247,   278,   141,   367,   248,   257,   262,    -1,   255,   341,
+      -1,    -1,   252,   251,   257,   262,    -1,    -1,   254,   367,
+     140,   253,   278,   141,   367,    -1,   255,   395,    -1,    42,
+      -1,   268,   257,   262,    -1,    -1,   257,   258,    -1,    -1,
+      44,   259,   418,    -1,    31,    -1,   137,    18,    -1,     3,
+      -1,   260,   418,    -1,   260,    -1,   261,    -1,    47,    -1,
+     137,    54,    -1,   137,    55,    -1,    -1,   263,    -1,    -1,
+      66,   264,   348,    -1,   135,   424,   136,    -1,   266,    -1,
+     134,    -1,    45,   275,   135,   424,   136,   267,    -1,    -1,
+     267,    46,   431,   135,   424,   136,    -1,    -1,   320,   367,
+     140,   269,   278,   141,   367,    -1,    -1,    -1,   273,   271,
+     275,   272,   257,   262,    -1,    -1,   320,   140,   274,   278,
+     141,   367,    -1,    -1,   138,   276,    -1,   277,    -1,   276,
+     139,   277,    -1,   319,   431,   233,    -1,    -1,    -1,   279,
+     280,    -1,   282,    -1,    -1,   280,   139,   281,   282,    -1,
+     280,   139,    83,    -1,    83,    -1,    -1,    -1,   283,   341,
+     296,   284,   285,    -1,    -1,   286,    -1,    -1,   137,   287,
+     399,    -1,    -1,   288,   422,    -1,   341,   290,   292,   134,
+      -1,   298,   285,    -1,    -1,   294,   292,    -1,    -1,    -1,
+     292,   139,   293,   294,    -1,   295,   290,    -1,    -1,   360,
+      -1,   233,   308,   302,    -1,    -1,   300,   367,   306,   141,
+     297,   302,    -1,   233,   309,   311,    -1,    -1,   300,   307,
+     141,   299,   302,    -1,    -1,    10,   301,   365,    -1,    11,
+      -1,    -1,    -1,    -1,   140,   303,   278,   141,   367,   304,
+     305,    -1,   312,    -1,    -1,   305,    33,    -1,   305,    31,
+      -1,   305,    44,   431,    -1,   305,    47,   431,    -1,   305,
+      47,    -1,   296,    -1,   360,   296,    -1,   298,    -1,   360,
+     298,    -1,    -1,   309,    -1,   320,   367,    -1,   320,   367,
+     138,   310,    -1,    15,    -1,    13,    -1,    14,    -1,    -1,
+     312,    -1,    -1,   313,   314,    -1,   315,    -1,   314,   315,
+      -1,    -1,   143,   316,   317,   144,   367,    -1,    -1,    -1,
+     318,   399,    -1,   320,    -1,   321,    -1,   331,    -1,   327,
+      -1,   329,    -1,   324,   178,    -1,   324,   329,    -1,   322,
+     320,    -1,   326,   320,    -1,   326,   321,    -1,   325,   326,
+      -1,   327,   326,    -1,   329,   326,    -1,   322,   325,   326,
+      -1,   322,   327,   326,    -1,   322,   329,   326,    -1,    -1,
+     322,    43,   323,   327,   326,    -1,   145,    -1,   332,    -1,
+      84,    -1,    -1,   332,   142,   328,   408,   414,    -1,    -1,
+      48,   330,   418,    -1,     4,    -1,     5,    -1,     3,    -1,
+       9,    -1,     8,    -1,     6,    -1,     7,    -1,    22,    -1,
+      21,    -1,    20,    -1,   102,    -1,   103,    -1,   104,    -1,
+     105,    -1,   106,    -1,   107,    -1,   108,    -1,   109,    -1,
+     110,    -1,   111,    -1,   101,    -1,     3,    -1,     5,    -1,
+       4,    -1,     9,    -1,     8,    -1,     6,    -1,     7,    -1,
+      -1,   333,   334,   367,    -1,   336,    -1,   359,    -1,    50,
+      -1,    40,    -1,   336,   367,    -1,   335,   336,   367,    -1,
+     337,    -1,   338,    -1,   339,    -1,    39,    -1,    33,    -1,
+      41,    -1,    41,    12,    -1,    34,    -1,    35,    -1,    38,
+      -1,    36,    -1,    37,    -1,    31,    -1,    32,    -1,   339,
+      -1,   340,   339,    -1,   342,   295,    -1,    -1,   345,   343,
+     333,    -1,    -1,   335,   345,   344,   333,    -1,   346,    -1,
+     176,   367,   177,    -1,   196,   367,   319,   367,    -1,   357,
+      -1,   329,    -1,    -1,    49,   347,   319,   367,    -1,   327,
+     367,    -1,   321,   367,    -1,   349,   295,    -1,    -1,   346,
+     350,   333,    -1,    -1,   335,   346,   351,   333,    -1,   353,
+     295,    -1,    -1,   356,   354,   333,    -1,    -1,   335,   345,
+     355,   333,    -1,   357,    -1,   329,    -1,   327,    -1,   321,
+      -1,    24,   319,    -1,    26,   319,    -1,   196,   319,    -1,
+     359,   367,    -1,   358,   367,    -1,     6,    -1,     7,    -1,
+       8,    -1,     9,    -1,     3,    -1,     4,    -1,     5,    -1,
+      22,    -1,    20,    -1,    21,    -1,   102,    -1,   103,    -1,
+     104,    -1,   105,    -1,   106,    -1,   107,    -1,   108,    -1,
+     109,    -1,   110,    -1,   111,    -1,   101,    -1,    86,    -1,
+      87,    -1,    88,    -1,    89,    -1,    90,    -1,    95,    -1,
+      96,    -1,    97,    -1,    98,    -1,    91,    -1,    92,    -1,
+      93,    -1,    94,    -1,    99,    -1,   100,    -1,   361,    -1,
+     362,    -1,   366,    -1,   366,   361,    -1,   146,   367,    -1,
+      77,   367,    -1,    -1,   147,   367,   364,   365,    -1,    -1,
+     340,    -1,   363,    -1,   366,   363,    -1,    -1,   367,   368,
+      -1,    -1,    -1,    23,   369,   404,   370,   144,   144,    -1,
+      -1,   112,   140,   331,   139,   372,   341,   141,    -1,    -1,
+      -1,    -1,   113,   140,   373,   331,   139,   374,   341,   375,
+     141,    -1,    -1,   114,   140,   376,   331,   141,    -1,    -1,
+     115,   140,   377,   331,   141,    -1,    -1,    -1,   116,   140,
+     331,   139,   378,   341,   379,   139,   425,   141,    -1,    -1,
+     117,   140,   331,   139,   380,   341,   141,    -1,    -1,    -1,
+      -1,   118,   140,   381,   331,   139,   382,   341,   383,   141,
+      -1,   119,   140,   331,   139,   341,   141,    -1,    -1,   120,
+     140,   331,   139,   384,   341,   141,    -1,    -1,   124,   140,
+     331,   139,   385,   341,   141,    -1,    -1,   121,   140,   331,
+     139,   386,   341,   141,    -1,    -1,   125,   140,   331,   139,
+     387,   341,   141,    -1,    -1,   122,   140,   331,   139,   388,
+     341,   141,    -1,    -1,   126,   140,   331,   139,   389,   341,
+     141,    -1,    -1,   123,   140,   331,   139,   390,   341,   141,
+      -1,    -1,   127,   140,   331,   139,   391,   341,   141,    -1,
+      -1,   128,   140,   331,   139,   392,   341,   139,    13,   141,
+      -1,    -1,   129,   140,   331,   139,   393,   341,   139,    13,
+     141,    -1,   130,   140,   331,   141,    -1,   131,   140,   331,
+     141,    -1,   132,   140,   331,   139,   319,   394,   141,    -1,
+      -1,   139,    -1,   140,   141,    -1,   143,   144,    -1,    53,
+     143,   144,    -1,    54,   143,   144,    -1,   142,    -1,   148,
+      -1,   139,    -1,   137,    -1,    63,   148,    -1,    63,    63,
+      -1,    12,     3,    -1,   396,    -1,   149,    -1,   147,    -1,
+     150,    -1,   151,    -1,   152,    -1,   153,    -1,   145,    -1,
+     146,    -1,   154,    -1,   155,    -1,    53,    -1,    54,    -1,
+      60,    -1,    61,    -1,    62,    -1,    64,    -1,    65,    -1,
+      66,    -1,    69,    -1,    70,    -1,    71,    -1,    72,    -1,
+      73,    -1,    67,    -1,    68,    -1,    74,    -1,    75,    -1,
+      76,    -1,    77,    -1,    78,    -1,    79,    -1,    80,    -1,
+      81,    -1,    82,    -1,    50,    -1,    49,    -1,    25,    -1,
+      24,    -1,    26,    -1,    43,    -1,    28,    -1,    30,    -1,
+      29,    -1,    31,    -1,    34,    -1,    35,    -1,    39,    -1,
+      38,    -1,    36,    -1,    37,    -1,    48,    -1,    55,    -1,
+      41,    -1,    52,    -1,    51,    -1,    42,    -1,    27,    -1,
+      44,    -1,    47,    -1,    58,    -1,    57,    -1,    56,    -1,
+      59,    -1,    15,    -1,    13,    -1,    14,    -1,    16,    -1,
+      17,    -1,    12,    -1,    18,    -1,    19,    -1,   400,    -1,
+     399,   400,    -1,   402,    -1,   412,    -1,   142,    -1,    -1,
+     148,   401,   403,    -1,    63,    -1,   403,    -1,    84,    -1,
+     415,    -1,   418,    -1,   422,    -1,   396,    -1,   138,    -1,
+     156,    -1,   397,    -1,   398,    -1,   359,    -1,   358,    -1,
+      -1,   404,   406,    -1,   402,    -1,   142,    -1,   148,    -1,
+      63,    -1,   405,    -1,   137,    -1,   139,    -1,   406,    -1,
+     134,    -1,    -1,   408,   411,    -1,    -1,   409,   407,    -1,
+     412,    -1,   402,    -1,   410,    -1,   137,    -1,   139,    -1,
+      -1,   142,   413,   408,   414,    -1,   148,    -1,    63,    -1,
+      -1,   143,   416,   404,   144,    -1,    -1,    23,   417,   404,
+     144,   144,    -1,    -1,   140,   419,   404,   141,    -1,    -1,
+      10,   420,   404,   141,    -1,    -1,    11,   421,   404,   141,
+      -1,    -1,   135,   423,   409,   136,    -1,    -1,   424,   426,
+      -1,    -1,   425,   427,    -1,   427,    -1,   134,    -1,   428,
+      -1,   142,    -1,   429,    -1,   431,    -1,   430,    -1,    84,
+      -1,    83,    -1,   396,    -1,    63,    -1,   138,    -1,   156,
+      -1,   148,    -1,   137,    -1,   139,    -1,   397,    -1,   398,
+      -1,   359,    -1,   358,    -1,    85,    -1,   135,   424,   136,
+      -1,   143,   424,   144,    -1,    23,   424,   144,   144,    -1,
+     432,   424,   141,    -1,   140,    -1,    10,    -1,    11,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
-static const yytype_uint16 yyrline[] =
-{
-       0,  1460,  1460,  1462,  1464,  1463,  1474,  1475,  1476,  1477,
-    1478,  1479,  1480,  1481,  1482,  1483,  1484,  1485,  1486,  1487,
-    1488,  1491,  1492,  1493,  1494,  1501,  1508,  1509,  1509,  1513,
-    1520,  1521,  1524,  1525,  1528,  1529,  1532,  1532,  1546,  1546,
-    1548,  1548,  1552,  1553,  1554,  1556,  1558,  1557,  1566,  1570,
-    1571,  1572,  1575,  1576,  1577,  1578,  1579,  1580,  1581,  1582,
-    1583,  1584,  1585,  1586,  1587,  1590,  1591,  1594,  1595,  1596,
-    1597,  1599,  1600,  1603,  1606,  1607,  1610,  1612,  1614,  1618,
-    1619,  1622,  1623,  1626,  1627,  1628,  1639,  1640,  1644,  1644,
-    1657,  1658,  1660,  1661,  1664,  1665,  1666,  1669,  1670,  1670,
-    1678,  1681,  1682,  1683,  1684,  1687,  1688,  1696,  1697,  1700,
-    1701,  1703,  1705,  1707,  1711,  1713,  1714,  1717,  1720,  1721,
-    1724,  1725,  1724,  1729,  1763,  1766,  1767,  1768,  1770,  1772,
-    1774,  1778,  1785,  1788,  1787,  1805,  1807,  1806,  1811,  1813,
-    1811,  1815,  1817,  1815,  1819,  1820,  1822,  1819,  1833,  1834,
-    1836,  1837,  1840,  1840,  1850,  1851,  1859,  1860,  1861,  1862,
-    1865,  1868,  1869,  1870,  1873,  1874,  1875,  1878,  1879,  1880,
-    1883,  1884,  1885,  1886,  1889,  1890,  1891,  1895,  1899,  1894,
-    1911,  1915,  1915,  1926,  1925,  1934,  1938,  1941,  1950,  1951,
-    1954,  1954,  1955,  1956,  1964,  1965,  1969,  1968,  1976,  1977,
-    1985,  1986,  1985,  2004,  2004,  2007,  2008,  2011,  2012,  2015,
-    2021,  2022,  2022,  2025,  2026,  2026,  2028,  2032,  2034,  2032,
-    2058,  2059,  2062,  2062,  2070,  2073,  2132,  2133,  2135,  2136,
-    2136,  2139,  2142,  2143,  2147,  2148,  2148,  2167,  2168,  2168,
-    2186,  2187,  2189,  2193,  2195,  2198,  2199,  2200,  2199,  2205,
-    2207,  2208,  2209,  2210,  2213,  2214,  2218,  2219,  2223,  2224,
-    2227,  2228,  2231,  2232,  2233,  2236,  2237,  2240,  2240,  2243,
-    2244,  2247,  2247,  2250,  2251,  2251,  2258,  2259,  2262,  2263,
-    2266,  2268,  2270,  2274,  2276,  2278,  2280,  2282,  2282,  2287,
-    2290,  2293,  2293,  2308,  2309,  2310,  2311,  2312,  2313,  2314,
-    2315,  2316,  2317,  2318,  2319,  2320,  2321,  2322,  2323,  2324,
-    2325,  2326,  2327,  2328,  2329,  2330,  2331,  2332,  2333,  2334,
-    2341,  2342,  2343,  2344,  2345,  2346,  2347,  2354,  2355,  2358,
-    2359,  2361,  2362,  2365,  2366,  2369,  2370,  2371,  2374,  2375,
-    2376,  2377,  2380,  2381,  2382,  2385,  2386,  2389,  2390,  2399,
-    2402,  2402,  2404,  2404,  2408,  2409,  2409,  2411,  2413,  2415,
-    2417,  2421,  2424,  2424,  2426,  2426,  2430,  2431,  2433,  2435,
-    2437,  2439,  2443,  2444,  2447,  2448,  2449,  2450,  2451,  2452,
-    2453,  2454,  2455,  2456,  2457,  2458,  2459,  2460,  2461,  2462,
-    2463,  2464,  2465,  2466,  2469,  2470,  2471,  2472,  2473,  2474,
-    2475,  2476,  2477,  2478,  2479,  2499,  2500,  2501,  2504,  2507,
-    2508,  2508,  2523,  2524,  2541,  2541,  2551,  2552,  2552,  2551,
-    2561,  2561,  2571,  2571,  2580,  2580,  2580,  2613,  2612,  2623,
-    2624,  2624,  2623,  2633,  2651,  2651,  2656,  2656,  2661,  2661,
-    2666,  2666,  2671,  2671,  2676,  2676,  2681,  2681,  2686,  2686,
-    2691,  2691,  2708,  2708,  2722,  2759,  2797,  2834,  2835,  2842,
-    2843,  2844,  2845,  2846,  2847,  2848,  2849,  2850,  2853,  2854,
-    2855,  2856,  2857,  2858,  2859,  2860,  2861,  2862,  2863,  2864,
-    2865,  2866,  2867,  2868,  2869,  2870,  2871,  2872,  2873,  2874,
-    2875,  2876,  2877,  2878,  2879,  2880,  2881,  2882,  2883,  2884,
-    2885,  2886,  2887,  2890,  2891,  2892,  2893,  2894,  2895,  2896,
-    2897,  2898,  2899,  2900,  2901,  2902,  2903,  2904,  2905,  2906,
-    2907,  2908,  2909,  2910,  2911,  2914,  2915,  2916,  2917,  2918,
-    2919,  2920,  2927,  2928,  2931,  2932,  2933,  2934,  2965,  2965,
-    2966,  2967,  2968,  2969,  2970,  2993,  2994,  2996,  2997,  2998,
-    3000,  3001,  3002,  3004,  3005,  3007,  3008,  3010,  3011,  3014,
-    3015,  3018,  3019,  3020,  3024,  3023,  3037,  3037,  3041,  3041,
-    3043,  3043,  3045,  3045,  3049,  3049,  3054,  3055,  3057,  3058,
-    3061,  3062,  3065,  3066,  3067,  3068,  3069,  3070,  3071,  3071,
-    3071,  3071,  3071,  3071,  3072,  3072,  3073,  3074,  3077,  3080,
-    3083,  3086,  3086,  3086
+static const unsigned short int yyrline[] =
+{
+       0,  1467,  1467,  1469,  1471,  1470,  1481,  1482,  1483,  1484,
+    1485,  1486,  1487,  1488,  1489,  1490,  1491,  1492,  1493,  1494,
+    1495,  1496,  1497,  1498,  1501,  1502,  1503,  1504,  1505,  1508,
+    1509,  1516,  1523,  1524,  1524,  1528,  1535,  1536,  1539,  1540,
+    1541,  1544,  1545,  1548,  1548,  1563,  1562,  1568,  1574,  1573,
+    1578,  1584,  1585,  1586,  1589,  1591,  1593,  1596,  1597,  1600,
+    1601,  1603,  1605,  1604,  1613,  1617,  1618,  1619,  1622,  1623,
+    1624,  1625,  1626,  1627,  1628,  1629,  1630,  1631,  1632,  1633,
+    1634,  1635,  1636,  1637,  1640,  1641,  1642,  1643,  1646,  1647,
+    1648,  1649,  1652,  1653,  1656,  1658,  1661,  1666,  1667,  1670,
+    1671,  1674,  1675,  1676,  1687,  1688,  1689,  1693,  1694,  1698,
+    1698,  1711,  1717,  1725,  1726,  1727,  1730,  1731,  1731,  1735,
+    1736,  1738,  1739,  1740,  1740,  1748,  1752,  1753,  1756,  1758,
+    1760,  1761,  1764,  1765,  1773,  1774,  1777,  1778,  1780,  1782,
+    1784,  1788,  1790,  1791,  1794,  1797,  1798,  1801,  1802,  1801,
+    1806,  1840,  1843,  1844,  1845,  1847,  1849,  1851,  1855,  1858,
+    1858,  1889,  1892,  1891,  1909,  1911,  1910,  1915,  1917,  1915,
+    1919,  1921,  1919,  1923,  1924,  1926,  1923,  1937,  1938,  1941,
+    1942,  1944,  1945,  1948,  1948,  1958,  1959,  1967,  1968,  1969,
+    1970,  1973,  1976,  1977,  1978,  1981,  1982,  1983,  1986,  1987,
+    1988,  1992,  1993,  1994,  1995,  1998,  1999,  2000,  2004,  2009,
+    2003,  2021,  2025,  2025,  2037,  2036,  2045,  2049,  2052,  2061,
+    2062,  2065,  2065,  2066,  2067,  2073,  2078,  2079,  2080,  2083,
+    2086,  2087,  2089,  2090,  2093,  2093,  2101,  2102,  2103,  2106,
+    2108,  2109,  2113,  2112,  2125,  2126,  2125,  2145,  2145,  2149,
+    2150,  2153,  2154,  2157,  2163,  2164,  2164,  2167,  2168,  2168,
+    2170,  2172,  2176,  2178,  2176,  2202,  2203,  2206,  2206,  2208,
+    2208,  2216,  2219,  2278,  2279,  2281,  2282,  2282,  2285,  2288,
+    2289,  2293,  2304,  2304,  2323,  2325,  2325,  2343,  2343,  2345,
+    2349,  2350,  2351,  2350,  2356,  2358,  2359,  2360,  2361,  2362,
+    2363,  2366,  2367,  2371,  2372,  2376,  2377,  2380,  2381,  2385,
+    2386,  2387,  2390,  2391,  2394,  2394,  2397,  2398,  2401,  2401,
+    2405,  2406,  2406,  2413,  2414,  2417,  2418,  2419,  2420,  2421,
+    2424,  2426,  2428,  2432,  2434,  2436,  2438,  2440,  2442,  2444,
+    2444,  2449,  2452,  2455,  2458,  2458,  2466,  2466,  2475,  2476,
+    2477,  2478,  2479,  2480,  2481,  2482,  2483,  2484,  2485,  2486,
+    2487,  2488,  2489,  2490,  2491,  2492,  2493,  2494,  2495,  2502,
+    2503,  2504,  2505,  2506,  2507,  2508,  2514,  2515,  2518,  2519,
+    2521,  2522,  2525,  2526,  2529,  2530,  2531,  2532,  2535,  2536,
+    2537,  2538,  2539,  2543,  2544,  2545,  2548,  2549,  2552,  2553,
+    2561,  2564,  2564,  2566,  2566,  2570,  2571,  2573,  2577,  2578,
+    2580,  2580,  2582,  2584,  2588,  2591,  2591,  2593,  2593,  2597,
+    2600,  2600,  2602,  2602,  2606,  2607,  2609,  2611,  2613,  2615,
+    2617,  2621,  2622,  2625,  2626,  2627,  2628,  2629,  2630,  2631,
+    2632,  2633,  2634,  2635,  2636,  2637,  2638,  2639,  2640,  2641,
+    2642,  2643,  2644,  2645,  2648,  2649,  2650,  2651,  2652,  2653,
+    2654,  2655,  2656,  2657,  2658,  2659,  2660,  2661,  2662,  2682,
+    2683,  2684,  2685,  2688,  2692,  2696,  2696,  2700,  2701,  2716,
+    2717,  2733,  2734,  2737,  2737,  2737,  2744,  2744,  2754,  2755,
+    2755,  2754,  2764,  2764,  2774,  2774,  2783,  2783,  2783,  2816,
+    2815,  2826,  2827,  2827,  2826,  2836,  2854,  2854,  2859,  2859,
+    2864,  2864,  2869,  2869,  2874,  2874,  2879,  2879,  2884,  2884,
+    2889,  2889,  2894,  2894,  2911,  2911,  2925,  2962,  3000,  3037,
+    3038,  3045,  3046,  3047,  3048,  3049,  3050,  3051,  3052,  3053,
+    3054,  3055,  3056,  3059,  3060,  3061,  3062,  3063,  3064,  3065,
+    3066,  3067,  3068,  3069,  3070,  3071,  3072,  3073,  3074,  3075,
+    3076,  3077,  3078,  3079,  3080,  3081,  3082,  3083,  3084,  3085,
+    3086,  3087,  3088,  3089,  3090,  3091,  3092,  3095,  3096,  3097,
+    3098,  3099,  3100,  3101,  3102,  3103,  3104,  3105,  3106,  3107,
+    3108,  3109,  3110,  3111,  3112,  3113,  3114,  3115,  3116,  3117,
+    3118,  3119,  3120,  3121,  3122,  3123,  3126,  3127,  3128,  3129,
+    3130,  3131,  3132,  3133,  3140,  3141,  3144,  3145,  3146,  3147,
+    3147,  3148,  3151,  3152,  3155,  3156,  3157,  3158,  3188,  3188,
+    3189,  3190,  3191,  3192,  3215,  3216,  3219,  3220,  3221,  3222,
+    3225,  3226,  3227,  3230,  3231,  3233,  3234,  3236,  3237,  3240,
+    3241,  3244,  3245,  3246,  3250,  3249,  3263,  3264,  3267,  3267,
+    3269,  3269,  3273,  3273,  3275,  3275,  3277,  3277,  3281,  3281,
+    3286,  3287,  3289,  3290,  3293,  3294,  3297,  3298,  3301,  3302,
+    3303,  3304,  3305,  3306,  3307,  3308,  3308,  3308,  3308,  3308,
+    3309,  3310,  3311,  3312,  3313,  3316,  3319,  3320,  3323,  3326,
+    3326,  3326
 };
 #endif
 
@@ -2110,1860 +2043,3698 @@ static const char *const yytname[] =
   "$end", "error", "$undefined", "ID", "VTK_ID", "QT_ID", "StdString",
   "UnicodeString", "OSTREAM", "ISTREAM", "LP", "LA", "STRING_LITERAL",
   "INT_LITERAL", "HEX_LITERAL", "OCT_LITERAL", "FLOAT_LITERAL",
-  "CHAR_LITERAL", "ZERO", "STRUCT", "CLASS", "UNION", "ENUM", "PUBLIC",
-  "PRIVATE", "PROTECTED", "CONST", "VOLATILE", "MUTABLE", "STATIC",
-  "VIRTUAL", "EXPLICIT", "INLINE", "FRIEND", "EXTERN", "OPERATOR",
-  "TEMPLATE", "THROW", "TYPENAME", "TYPEDEF", "NAMESPACE", "USING", "NEW",
-  "DELETE", "STATIC_CAST", "DYNAMIC_CAST", "CONST_CAST",
-  "REINTERPRET_CAST", "OP_LSHIFT_EQ", "OP_RSHIFT_EQ", "OP_LSHIFT",
-  "OP_RSHIFT", "OP_DOT_POINTER", "OP_ARROW_POINTER", "OP_ARROW", "OP_INCR",
-  "OP_DECR", "OP_PLUS_EQ", "OP_MINUS_EQ", "OP_TIMES_EQ", "OP_DIVIDE_EQ",
+  "CHAR_LITERAL", "ZERO", "NULLPTR", "SSIZE_T", "SIZE_T", "NULLPTR_T",
+  "BEGIN_ATTRIB", "STRUCT", "CLASS", "UNION", "ENUM", "PUBLIC", "PRIVATE",
+  "PROTECTED", "CONST", "VOLATILE", "MUTABLE", "STATIC", "THREAD_LOCAL",
+  "VIRTUAL", "EXPLICIT", "INLINE", "CONSTEXPR", "FRIEND", "EXTERN",
+  "OPERATOR", "TEMPLATE", "THROW", "TRY", "CATCH", "NOEXCEPT", "DECLTYPE",
+  "TYPENAME", "TYPEDEF", "NAMESPACE", "USING", "NEW", "DELETE", "DEFAULT",
+  "STATIC_CAST", "DYNAMIC_CAST", "CONST_CAST", "REINTERPRET_CAST",
+  "OP_LSHIFT_EQ", "OP_RSHIFT_EQ", "OP_LSHIFT", "OP_RSHIFT_A",
+  "OP_DOT_POINTER", "OP_ARROW_POINTER", "OP_ARROW", "OP_INCR", "OP_DECR",
+  "OP_PLUS_EQ", "OP_MINUS_EQ", "OP_TIMES_EQ", "OP_DIVIDE_EQ",
   "OP_REMAINDER_EQ", "OP_AND_EQ", "OP_OR_EQ", "OP_XOR_EQ", "OP_LOGIC_AND",
   "OP_LOGIC_OR", "OP_LOGIC_EQ", "OP_LOGIC_NEQ", "OP_LOGIC_LEQ",
-  "OP_LOGIC_GEQ", "ELLIPSIS", "DOUBLE_COLON", "OTHER", "VOID", "BOOL",
-  "FLOAT", "DOUBLE", "INT", "SHORT", "LONG", "INT64__", "CHAR", "SIGNED",
-  "UNSIGNED", "SSIZE_T", "SIZE_T", "IdType", "TypeInt8", "TypeUInt8",
-  "TypeInt16", "TypeUInt16", "TypeInt32", "TypeUInt32", "TypeInt64",
-  "TypeUInt64", "TypeFloat32", "TypeFloat64", "SetMacro", "GetMacro",
-  "SetStringMacro", "GetStringMacro", "SetClampMacro", "SetObjectMacro",
-  "GetObjectMacro", "BooleanMacro", "SetVector2Macro", "SetVector3Macro",
-  "SetVector4Macro", "SetVector6Macro", "GetVector2Macro",
-  "GetVector3Macro", "GetVector4Macro", "GetVector6Macro",
-  "SetVectorMacro", "GetVectorMacro", "ViewportCoordinateMacro",
-  "WorldCoordinateMacro", "TypeMacro", "VTK_BYTE_SWAP_DECL", "';'", "'{'",
-  "'}'", "'='", "':'", "','", "'('", "')'", "'<'", "'>'", "'['", "']'",
-  "'~'", "'&'", "'*'", "'%'", "'/'", "'-'", "'+'", "'!'", "'|'", "'^'",
-  "'.'", "$accept", "translation_unit", "opt_declaration_seq", "$@1",
-  "declaration", "template_declaration", "linkage_specification",
+  "OP_LOGIC_GEQ", "ELLIPSIS", "DOUBLE_COLON", "OTHER", "AUTO", "VOID",
+  "BOOL", "FLOAT", "DOUBLE", "INT", "SHORT", "LONG", "INT64__", "CHAR",
+  "CHAR16_T", "CHAR32_T", "WCHAR_T", "SIGNED", "UNSIGNED", "IdType",
+  "TypeInt8", "TypeUInt8", "TypeInt16", "TypeUInt16", "TypeInt32",
+  "TypeUInt32", "TypeInt64", "TypeUInt64", "TypeFloat32", "TypeFloat64",
+  "SetMacro", "GetMacro", "SetStringMacro", "GetStringMacro",
+  "SetClampMacro", "SetObjectMacro", "GetObjectMacro", "BooleanMacro",
+  "SetVector2Macro", "SetVector3Macro", "SetVector4Macro",
+  "SetVector6Macro", "GetVector2Macro", "GetVector3Macro",
+  "GetVector4Macro", "GetVector6Macro", "SetVectorMacro", "GetVectorMacro",
+  "ViewportCoordinateMacro", "WorldCoordinateMacro", "TypeMacro",
+  "VTK_BYTE_SWAP_DECL", "';'", "'{'", "'}'", "'='", "':'", "','", "'('",
+  "')'", "'<'", "'['", "']'", "'~'", "'&'", "'*'", "'>'", "'%'", "'/'",
+  "'-'", "'+'", "'!'", "'|'", "'^'", "'.'", "$accept", "translation_unit",
+  "opt_declaration_seq", "$@1", "declaration", "template_declaration",
+  "explicit_instantiation", "linkage_specification",
   "namespace_definition", "$@2", "namespace_alias_definition",
   "forward_declaration", "simple_forward_declaration", "class_definition",
   "class_specifier", "$@3", "class_head", "$@4", "$@5", "class_key",
-  "member_specification", "$@6", "member_access_specifier",
-  "member_declaration", "template_member_declaration",
-  "friend_declaration", "opt_base_clause", "base_clause",
+  "class_head_name", "class_name", "opt_final", "member_specification",
+  "$@6", "member_access_specifier", "member_declaration",
+  "template_member_declaration", "friend_declaration",
   "base_specifier_list", "base_specifier", "opt_virtual",
-  "opt_access_specifier", "access_specifier", "enum_definition",
-  "enum_specifier", "$@7", "enum_head", "opt_enumerator_list",
-  "enumerator_list", "enumerator_definition", "$@8",
-  "nested_variable_initialization", "ignored_class", "ignored_class_body",
-  "typedef_declaration", "basic_typedef_declaration",
-  "typedef_declarator_list", "typedef_declarator_list_cont",
-  "typedef_declarator", "typedef_direct_declarator",
-  "function_direct_declarator", "$@9", "$@10", "typedef_declarator_id",
-  "using_declaration", "using_id", "using_directive", "template_head",
-  "$@11", "template_parameter_list", "$@12", "template_parameter", "$@13",
-  "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "class_or_typename",
-  "opt_template_parameter_initializer", "template_parameter_initializer",
-  "$@20", "template_parameter_value", "function_definition",
-  "function_declaration", "nested_method_declaration",
-  "nested_operator_declaration", "method_definition", "method_declaration",
-  "operator_declaration", "conversion_function", "$@21", "$@22",
-  "conversion_function_id", "operator_function_nr", "$@23",
-  "operator_function_sig", "$@24", "operator_function_id", "operator_sig",
-  "function_nr", "function_trailer_clause", "function_trailer", "$@25",
-  "function_body", "function_sig", "$@26", "function_name",
-  "structor_declaration", "$@27", "$@28", "structor_sig", "$@29",
-  "opt_ctor_initializer", "mem_initializer_list", "mem_initializer",
-  "parameter_declaration_clause", "$@30", "parameter_list", "$@31",
-  "parameter_declaration", "$@32", "$@33", "opt_initializer",
-  "initializer", "$@34", "variable_declaration", "init_declarator_id",
-  "opt_declarator_list", "declarator_list_cont", "$@35", "init_declarator",
-  "opt_ptr_operator_seq", "direct_abstract_declarator", "$@36",
-  "direct_declarator", "$@37", "p_or_lp_or_la", "lp_or_la",
-  "opt_array_or_parameters", "$@38", "$@39", "function_qualifiers",
-  "abstract_declarator", "declarator", "opt_declarator_id",
-  "declarator_id", "bitfield_size", "opt_array_decorator_seq",
-  "array_decorator_seq", "$@40", "array_decorator_seq_impl",
-  "array_decorator", "$@41", "array_size_specifier", "$@42",
-  "id_expression", "unqualified_id", "qualified_id",
-  "nested_name_specifier", "$@43", "identifier_sig", "scope_operator_sig",
-  "template_id", "$@44", "simple_id", "identifier",
+  "opt_access_specifier", "access_specifier", "opaque_enum_declaration",
+  "enum_definition", "enum_specifier", "$@7", "enum_head", "enum_key",
+  "opt_enum_base", "$@8", "enumerator_list", "enumerator_definition",
+  "$@9", "nested_variable_initialization", "ignored_initializer",
+  "ignored_class", "ignored_class_body", "typedef_declaration",
+  "basic_typedef_declaration", "typedef_declarator_list",
+  "typedef_declarator_list_cont", "typedef_declarator",
+  "typedef_direct_declarator", "function_direct_declarator", "$@10",
+  "$@11", "typedef_declarator_id", "using_declaration", "using_id",
+  "using_directive", "alias_declaration", "$@12", "template_head", "$@13",
+  "template_parameter_list", "$@14", "template_parameter", "$@15", "$@16",
+  "$@17", "$@18", "$@19", "$@20", "$@21", "opt_ellipsis",
+  "class_or_typename", "opt_template_parameter_initializer",
+  "template_parameter_initializer", "$@22", "template_parameter_value",
+  "function_definition", "function_declaration",
+  "nested_method_declaration", "nested_operator_declaration",
+  "method_definition", "method_declaration", "operator_declaration",
+  "conversion_function", "$@23", "$@24", "conversion_function_id",
+  "operator_function_nr", "$@25", "operator_function_sig", "$@26",
+  "operator_function_id", "operator_sig", "function_nr",
+  "function_trailer_clause", "function_trailer", "$@27", "noexcept_sig",
+  "function_body_as_trailer", "opt_trailing_return_type",
+  "trailing_return_type", "$@28", "function_body", "function_try_block",
+  "handler_seq", "function_sig", "$@29", "structor_declaration", "$@30",
+  "$@31", "structor_sig", "$@32", "opt_ctor_initializer",
+  "mem_initializer_list", "mem_initializer",
+  "parameter_declaration_clause", "$@33", "parameter_list", "$@34",
+  "parameter_declaration", "$@35", "$@36", "opt_initializer",
+  "initializer", "$@37", "$@38", "variable_declaration",
+  "init_declarator_id", "opt_declarator_list", "declarator_list_cont",
+  "$@39", "init_declarator", "opt_ptr_operator_seq",
+  "direct_abstract_declarator", "$@40", "direct_declarator", "$@41",
+  "lp_or_la", "$@42", "opt_array_or_parameters", "$@43", "$@44",
+  "function_qualifiers", "abstract_declarator", "declarator",
+  "opt_declarator_id", "declarator_id", "bitfield_size",
+  "opt_array_decorator_seq", "array_decorator_seq", "$@45",
+  "array_decorator_seq_impl", "array_decorator", "$@46",
+  "array_size_specifier", "$@47", "id_expression", "unqualified_id",
+  "qualified_id", "nested_name_specifier", "$@48", "tilde_sig",
+  "identifier_sig", "scope_operator_sig", "template_id", "$@49",
+  "decltype_specifier", "$@50", "simple_id", "identifier",
   "opt_decl_specifier_seq", "decl_specifier2", "decl_specifier_seq",
   "decl_specifier", "storage_class_specifier", "function_specifier",
   "cv_qualifier", "cv_qualifier_seq", "store_type", "store_type_specifier",
-  "$@45", "$@46", "type_specifier", "$@47", "tparam_type",
-  "tparam_type_specifier2", "$@48", "$@49", "tparam_type_specifier",
-  "simple_type_specifier", "type_name", "primitive_type",
-  "ptr_operator_seq", "reference", "pointer", "$@50", "pointer_seq",
-  "declaration_macro", "$@51", "$@52", "$@53", "$@54", "$@55", "$@56",
-  "$@57", "$@58", "$@59", "$@60", "$@61", "$@62", "$@63", "$@64", "$@65",
-  "$@66", "$@67", "$@68", "$@69", "$@70", "$@71", "$@72", "opt_comma",
+  "$@51", "$@52", "type_specifier", "trailing_type_specifier", "$@53",
+  "trailing_type_specifier_seq", "trailing_type_specifier_seq2", "$@54",
+  "$@55", "tparam_type", "tparam_type_specifier2", "$@56", "$@57",
+  "tparam_type_specifier", "simple_type_specifier", "type_name",
+  "primitive_type", "ptr_operator_seq", "reference", "rvalue_reference",
+  "pointer", "$@58", "ptr_cv_qualifier_seq", "pointer_seq",
+  "attribute_specifier_seq", "attribute_specifier", "$@59", "$@60",
+  "declaration_macro", "$@61", "$@62", "$@63", "$@64", "$@65", "$@66",
+  "$@67", "$@68", "$@69", "$@70", "$@71", "$@72", "$@73", "$@74", "$@75",
+  "$@76", "$@77", "$@78", "$@79", "$@80", "$@81", "$@82", "opt_comma",
   "operator_id", "operator_id_no_delim", "keyword", "literal",
-  "constant_expression", "common_bracket_item", "any_bracket_contents",
-  "bracket_pitem", "any_bracket_item", "braces_item",
-  "angle_bracket_contents", "braces_contents", "angle_bracket_pitem",
-  "angle_bracket_item", "angle_brackets_sig", "$@73", "brackets_sig",
-  "$@74", "parentheses_sig", "$@75", "$@76", "$@77", "braces_sig", "$@78",
+  "constant_expression", "constant_expression_item", "$@83",
+  "common_bracket_item", "common_bracket_item_no_scope_operator",
+  "any_bracket_contents", "bracket_pitem", "any_bracket_item",
+  "braces_item", "angle_bracket_contents", "braces_contents",
+  "angle_bracket_pitem", "angle_bracket_item", "angle_brackets_sig",
+  "$@84", "right_angle_bracket", "brackets_sig", "$@85", "$@86",
+  "parentheses_sig", "$@87", "$@88", "$@89", "braces_sig", "$@90",
   "ignored_items", "ignored_expression", "ignored_item",
-  "ignored_item_no_semi", "ignored_braces", "ignored_brackets",
-  "ignored_parentheses", "ignored_left_parenthesis", 0
+  "ignored_item_no_semi", "ignored_item_no_angle", "ignored_braces",
+  "ignored_brackets", "ignored_parentheses", "ignored_left_parenthesis", 0
 };
 #endif
 
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
-   token YYLEX-NUM.  */
-static const yytype_uint16 yytoknum[] =
-{
-       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
-     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
-     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
-     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
-     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
-     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
-     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
-     355,   356,   357,   358,   359,   360,   361,   362,   363,   364,
-     365,   366,   367,   368,   369,   370,   371,   372,   373,   374,
-      59,   123,   125,    61,    58,    44,    40,    41,    60,    62,
-      91,    93,   126,    38,    42,    37,    47,    45,    43,    33,
-     124,    94,    46
-};
-# endif
-
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
-static const yytype_uint16 yyr1[] =
-{
-       0,   143,   144,   145,   146,   145,   147,   147,   147,   147,
-     147,   147,   147,   147,   147,   147,   147,   147,   147,   147,
-     147,   148,   148,   148,   148,   149,   150,   151,   150,   152,
-     153,   153,   154,   154,   155,   155,   157,   156,   159,   158,
-     160,   158,   161,   161,   161,   162,   163,   162,   162,   164,
-     164,   164,   165,   165,   165,   165,   165,   165,   165,   165,
-     165,   165,   165,   165,   165,   166,   166,   167,   167,   167,
-     167,   168,   168,   169,   170,   170,   171,   171,   171,   172,
-     172,   173,   173,   174,   174,   174,   175,   175,   177,   176,
-     178,   178,   179,   179,   180,   180,   180,   181,   182,   181,
-     183,   184,   184,   184,   184,   185,   185,   186,   186,   187,
-     187,   187,   187,   187,   188,   189,   189,   190,   191,   191,
-     193,   194,   192,   195,   196,   197,   197,   197,   197,   197,
-     197,   198,   199,   200,   199,   201,   202,   201,   204,   205,
-     203,   206,   207,   203,   208,   209,   210,   203,   211,   211,
-     212,   212,   214,   213,   215,   215,   216,   216,   216,   216,
-     217,   218,   218,   218,   219,   219,   219,   220,   220,   220,
-     221,   221,   221,   221,   222,   222,   222,   224,   225,   223,
-     226,   228,   227,   230,   229,   231,   232,   233,   234,   234,
-     236,   235,   235,   235,   237,   237,   239,   238,   240,   240,
-     242,   243,   241,   245,   244,   246,   246,   247,   247,   248,
-     249,   250,   249,   251,   252,   251,   251,   254,   255,   253,
-     256,   256,   258,   257,   259,   260,   261,   261,   262,   263,
-     262,   264,   265,   265,   266,   267,   266,   268,   269,   268,
-     270,   270,   270,   271,   271,   272,   273,   274,   272,   272,
-     275,   275,   275,   275,   276,   276,   277,   277,   278,   278,
-     279,   279,   280,   280,   280,   281,   281,   283,   282,   284,
-     284,   286,   285,   287,   288,   287,   289,   289,   290,   290,
-     291,   291,   291,   292,   292,   292,   292,   293,   292,   294,
-     295,   297,   296,   298,   298,   298,   298,   298,   298,   298,
-     298,   298,   298,   298,   298,   298,   298,   298,   298,   298,
-     298,   298,   298,   298,   298,   298,   298,   298,   298,   298,
-     299,   299,   299,   299,   299,   299,   299,   300,   300,   301,
-     301,   301,   301,   302,   302,   303,   303,   303,   304,   304,
-     304,   304,   305,   305,   305,   306,   306,   307,   307,   308,
-     310,   309,   311,   309,   312,   313,   312,   312,   312,   312,
-     312,   314,   316,   315,   317,   315,   318,   318,   318,   318,
-     318,   318,   319,   319,   320,   320,   320,   320,   320,   320,
-     320,   320,   320,   320,   320,   320,   320,   320,   320,   320,
-     320,   320,   320,   320,   321,   321,   321,   321,   321,   321,
-     321,   321,   321,   321,   321,   322,   322,   322,   323,   324,
-     325,   324,   326,   326,   328,   327,   329,   330,   331,   327,
-     332,   327,   333,   327,   334,   335,   327,   336,   327,   337,
-     338,   339,   327,   327,   340,   327,   341,   327,   342,   327,
-     343,   327,   344,   327,   345,   327,   346,   327,   347,   327,
-     348,   327,   349,   327,   327,   327,   327,   350,   350,   351,
-     351,   351,   351,   351,   351,   351,   351,   351,   352,   352,
-     352,   352,   352,   352,   352,   352,   352,   352,   352,   352,
-     352,   352,   352,   352,   352,   352,   352,   352,   352,   352,
-     352,   352,   352,   352,   352,   352,   352,   352,   352,   352,
-     352,   352,   352,   353,   353,   353,   353,   353,   353,   353,
-     353,   353,   353,   353,   353,   353,   353,   353,   353,   353,
-     353,   353,   353,   353,   353,   354,   354,   354,   354,   354,
-     354,   354,   355,   355,   356,   356,   356,   356,   356,   356,
-     356,   356,   356,   356,   356,   357,   357,   358,   358,   358,
-     359,   359,   359,   360,   360,   361,   361,   362,   362,   363,
-     363,   364,   364,   364,   366,   365,   368,   367,   370,   369,
-     371,   369,   372,   369,   374,   373,   375,   375,   376,   376,
-     377,   377,   378,   378,   378,   378,   378,   378,   378,   378,
-     378,   378,   378,   378,   378,   378,   378,   378,   379,   380,
-     381,   382,   382,   382
+static const unsigned short int yyr1[] =
+{
+       0,   157,   158,   159,   160,   159,   161,   161,   161,   161,
+     161,   161,   161,   161,   161,   161,   161,   161,   161,   161,
+     161,   161,   161,   161,   162,   162,   162,   162,   162,   163,
+     163,   164,   165,   166,   165,   167,   168,   168,   169,   169,
+     169,   170,   170,   172,   171,   174,   173,   173,   175,   173,
+     173,   176,   176,   176,   177,   177,   177,   178,   178,   179,
+     179,   180,   181,   180,   180,   182,   182,   182,   183,   183,
+     183,   183,   183,   183,   183,   183,   183,   183,   183,   183,
+     183,   183,   183,   183,   184,   184,   184,   184,   185,   185,
+     185,   185,   186,   186,   187,   187,   187,   188,   188,   189,
+     189,   190,   190,   190,   191,   191,   191,   192,   192,   194,
+     193,   195,   195,   196,   196,   196,   197,   198,   197,   199,
+     199,   200,   200,   201,   200,   202,   203,   203,   204,   204,
+     204,   204,   205,   205,   206,   206,   207,   207,   207,   207,
+     207,   208,   209,   209,   210,   211,   211,   213,   214,   212,
+     215,   216,   217,   217,   217,   217,   217,   217,   218,   220,
+     219,   221,   222,   221,   223,   224,   223,   226,   227,   225,
+     228,   229,   225,   230,   231,   232,   225,   233,   233,   234,
+     234,   235,   235,   237,   236,   238,   238,   239,   239,   239,
+     239,   240,   241,   241,   241,   242,   242,   242,   243,   243,
+     243,   244,   244,   244,   244,   245,   245,   245,   247,   248,
+     246,   249,   251,   250,   253,   252,   254,   255,   256,   257,
+     257,   259,   258,   258,   258,   258,   258,   258,   258,   260,
+     261,   261,   262,   262,   264,   263,   265,   265,   265,   266,
+     267,   267,   269,   268,   271,   272,   270,   274,   273,   275,
+     275,   276,   276,   277,   278,   279,   278,   280,   281,   280,
+     280,   280,   283,   284,   282,   285,   285,   287,   286,   288,
+     286,   289,   290,   291,   291,   292,   293,   292,   294,   295,
+     295,   296,   297,   296,   298,   299,   298,   301,   300,   300,
+     302,   303,   304,   302,   302,   305,   305,   305,   305,   305,
+     305,   306,   306,   307,   307,   308,   308,   309,   309,   310,
+     310,   310,   311,   311,   313,   312,   314,   314,   316,   315,
+     317,   318,   317,   319,   319,   320,   320,   320,   320,   320,
+     321,   321,   321,   322,   322,   322,   322,   322,   322,   323,
+     322,   324,   325,   326,   328,   327,   330,   329,   331,   331,
+     331,   331,   331,   331,   331,   331,   331,   331,   331,   331,
+     331,   331,   331,   331,   331,   331,   331,   331,   331,   332,
+     332,   332,   332,   332,   332,   332,   333,   333,   334,   334,
+     334,   334,   335,   335,   336,   336,   336,   336,   337,   337,
+     337,   337,   337,   338,   338,   338,   339,   339,   340,   340,
+     341,   343,   342,   344,   342,   345,   345,   345,   346,   346,
+     347,   346,   346,   346,   348,   350,   349,   351,   349,   352,
+     354,   353,   355,   353,   356,   356,   356,   356,   356,   356,
+     356,   357,   357,   358,   358,   358,   358,   358,   358,   358,
+     358,   358,   358,   358,   358,   358,   358,   358,   358,   358,
+     358,   358,   358,   358,   359,   359,   359,   359,   359,   359,
+     359,   359,   359,   359,   359,   359,   359,   359,   359,   360,
+     360,   360,   360,   361,   362,   364,   363,   365,   365,   366,
+     366,   367,   367,   369,   370,   368,   372,   371,   373,   374,
+     375,   371,   376,   371,   377,   371,   378,   379,   371,   380,
+     371,   381,   382,   383,   371,   371,   384,   371,   385,   371,
+     386,   371,   387,   371,   388,   371,   389,   371,   390,   371,
+     391,   371,   392,   371,   393,   371,   371,   371,   371,   394,
+     394,   395,   395,   395,   395,   395,   395,   395,   395,   395,
+     395,   395,   395,   396,   396,   396,   396,   396,   396,   396,
+     396,   396,   396,   396,   396,   396,   396,   396,   396,   396,
+     396,   396,   396,   396,   396,   396,   396,   396,   396,   396,
+     396,   396,   396,   396,   396,   396,   396,   397,   397,   397,
+     397,   397,   397,   397,   397,   397,   397,   397,   397,   397,
+     397,   397,   397,   397,   397,   397,   397,   397,   397,   397,
+     397,   397,   397,   397,   397,   397,   398,   398,   398,   398,
+     398,   398,   398,   398,   399,   399,   400,   400,   400,   401,
+     400,   400,   402,   402,   403,   403,   403,   403,   403,   403,
+     403,   403,   403,   403,   404,   404,   405,   405,   405,   405,
+     406,   406,   406,   407,   407,   408,   408,   409,   409,   410,
+     410,   411,   411,   411,   413,   412,   414,   414,   416,   415,
+     417,   415,   419,   418,   420,   418,   421,   418,   423,   422,
+     424,   424,   425,   425,   426,   426,   427,   427,   428,   428,
+     428,   428,   428,   428,   428,   428,   428,   428,   428,   428,
+     428,   428,   428,   428,   428,   429,   430,   430,   431,   432,
+     432,   432
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
-static const yytype_uint8 yyr2[] =
+static const unsigned char yyr2[] =
 {
-       0,     2,     1,     0,     0,     3,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
-       1,     2,     2,     2,     2,     5,     4,     0,     6,     5,
-       1,     2,     3,     4,     4,     5,     0,     5,     0,     4,
-       0,     3,     1,     1,     1,     0,     0,     3,     3,     1,
+       0,     2,     1,     0,     0,     4,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     2,     2,     1,     2,     2,     2,     3,     2,
-       3,     0,     1,     2,     1,     3,     1,     3,     3,     0,
-       1,     0,     1,     1,     1,     1,     4,     5,     0,     5,
-       2,     1,     0,     1,     1,     2,     3,     1,     0,     4,
-       6,     3,     4,     2,     3,     5,     3,     1,     2,     5,
-       5,     6,     5,     6,     2,     0,     3,     2,     1,     1,
-       0,     0,     7,     1,     3,     1,     2,     2,     2,     3,
-       3,     4,     3,     0,     5,     1,     0,     4,     0,     0,
-       5,     0,     0,     5,     0,     0,     0,     7,     1,     1,
-       0,     1,     0,     3,     1,     2,     2,     2,     2,     2,
-       2,     3,     2,     3,     2,     3,     3,     2,     3,     4,
-       2,     1,     1,     2,     1,     2,     2,     0,     0,     7,
-       2,     0,     3,     0,     5,     2,     1,     2,     0,     2,
-       0,     3,     1,     2,     3,     1,     0,     5,     1,     1,
-       0,     0,     5,     0,     5,     0,     2,     1,     3,     2,
-       0,     0,     2,     1,     0,     4,     3,     0,     0,     5,
-       0,     1,     0,     3,     4,     2,     0,     2,     0,     0,
-       4,     2,     0,     1,     2,     0,     5,     2,     0,     5,
-       1,     1,     1,     1,     1,     0,     0,     0,     6,     1,
-       0,     2,     2,     3,     1,     2,     1,     2,     0,     1,
-       1,     3,     1,     1,     1,     0,     1,     0,     2,     1,
-       2,     0,     4,     0,     0,     2,     1,     1,     1,     1,
-       2,     2,     2,     2,     2,     3,     3,     0,     5,     1,
-       1,     0,     5,     1,     1,     1,     1,     1,     1,     1,
-       2,     2,     2,     2,     2,     2,     2,     1,     1,     1,
+       1,     1,     2,     1,     2,     2,     2,     2,     2,     5,
+       4,     5,     4,     0,     6,     5,     1,     2,     4,     3,
+       5,     4,     5,     0,     5,     0,     7,     4,     0,     5,
+       2,     1,     1,     1,     3,     4,     2,     1,     1,     0,
+       1,     0,     0,     4,     3,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     2,     2,     1,     2,     2,     2,     2,     2,     3,
+       2,     3,     1,     4,     2,     4,     4,     0,     1,     0,
+       1,     1,     1,     1,     5,     3,     6,     4,     5,     0,
+       5,     4,     3,     1,     2,     2,     0,     0,     3,     1,
+       3,     0,     1,     0,     4,     6,     2,     1,     5,     6,
+       3,     4,     5,     3,     1,     2,     5,     5,     6,     5,
+       6,     2,     0,     3,     2,     1,     1,     0,     0,     8,
+       1,     3,     1,     2,     2,     2,     3,     3,     4,     0,
+       8,     3,     0,     5,     1,     0,     4,     0,     0,     5,
+       0,     0,     5,     0,     0,     0,     7,     0,     1,     1,
+       1,     0,     1,     0,     3,     1,     2,     2,     2,     2,
+       2,     3,     4,     2,     3,     2,     3,     4,     2,     4,
+       5,     3,     1,     1,     2,     1,     2,     3,     0,     0,
+       9,     2,     0,     4,     0,     7,     2,     1,     3,     0,
+       2,     0,     3,     1,     2,     1,     2,     1,     1,     1,
+       2,     2,     0,     1,     0,     3,     3,     1,     1,     6,
+       0,     6,     0,     7,     0,     0,     6,     0,     6,     0,
+       2,     1,     3,     3,     0,     0,     2,     1,     0,     4,
+       3,     1,     0,     0,     5,     0,     1,     0,     3,     0,
+       2,     4,     2,     0,     2,     0,     0,     4,     2,     0,
+       1,     3,     0,     6,     3,     0,     5,     0,     3,     1,
+       0,     0,     0,     7,     1,     0,     2,     2,     3,     3,
+       2,     1,     2,     1,     2,     0,     1,     2,     4,     1,
+       1,     1,     0,     1,     0,     2,     1,     2,     0,     5,
+       0,     0,     2,     1,     1,     1,     1,     1,     2,     2,
+       2,     2,     2,     2,     2,     2,     3,     3,     3,     0,
+       5,     1,     1,     1,     0,     5,     0,     3,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     1,     1,     0,     3,     1,     1,
+       1,     1,     2,     3,     1,     1,     1,     1,     1,     1,
+       2,     1,     1,     1,     1,     1,     1,     1,     1,     2,
+       2,     0,     3,     0,     4,     1,     3,     4,     1,     1,
+       0,     4,     2,     2,     2,     0,     3,     0,     4,     2,
+       0,     3,     0,     4,     1,     1,     1,     1,     2,     2,
+       2,     2,     2,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     0,     2,     1,
-       1,     1,     1,     1,     2,     1,     1,     1,     1,     1,
-       2,     1,     1,     1,     1,     1,     1,     1,     2,     2,
-       0,     3,     0,     4,     1,     0,     3,     1,     1,     2,
-       2,     2,     0,     3,     0,     4,     1,     1,     1,     2,
-       2,     2,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     2,     1,     1,
-       0,     3,     1,     2,     0,     7,     0,     0,     0,     9,
-       0,     5,     0,     5,     0,     0,    10,     0,     7,     0,
-       0,     0,     9,     6,     0,     7,     0,     7,     0,     7,
+       1,     1,     2,     2,     2,     0,     4,     0,     1,     1,
+       2,     0,     2,     0,     0,     6,     0,     7,     0,     0,
+       0,     9,     0,     5,     0,     5,     0,     0,    10,     0,
+       7,     0,     0,     0,     9,     6,     0,     7,     0,     7,
        0,     7,     0,     7,     0,     7,     0,     7,     0,     7,
-       0,     9,     0,     9,     4,     4,     7,     0,     1,     2,
-       2,     3,     3,     1,     1,     1,     1,     1,     1,     1,
+       0,     7,     0,     9,     0,     9,     4,     4,     7,     0,
+       1,     2,     2,     3,     3,     1,     1,     1,     1,     2,
+       2,     2,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     2,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     0,     2,     1,     1,     1,
+       1,     1,     1,     1,     1,     2,     1,     1,     1,     0,
+       3,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+       1,     1,     1,     1,     0,     2,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     0,     2,     0,     2,     1,
-       1,     1,     1,     1,     0,     4,     0,     4,     0,     4,
-       0,     4,     0,     4,     0,     4,     0,     2,     0,     2,
+       1,     1,     1,     1,     0,     4,     1,     1,     0,     4,
+       0,     5,     0,     4,     0,     4,     0,     4,     0,     4,
+       0,     2,     0,     2,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     1,     1,     1,     1,     1,     3,     3,
-       3,     1,     1,     1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
-   means the default is an error.  */
-static const yytype_uint16 yydefact[] =
-{
-       3,     0,     4,     1,     0,   378,   379,   380,   374,   375,
-     376,   377,    43,    42,    44,    91,   345,   346,   338,   341,
-     343,   344,   342,   339,   186,     0,   355,     0,     0,     0,
-     290,   394,   395,   396,   397,   399,   400,   401,   402,   398,
-     403,   404,   381,   382,   393,   383,   384,   385,   386,   387,
-     388,   389,   390,   391,   392,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    20,     0,     5,    17,
-      11,     9,    10,     8,    30,    15,   327,    36,    40,    14,
-     327,     0,    12,   107,     7,     6,     0,    16,     0,     0,
-       0,     0,   174,     0,     0,    13,     0,   276,   358,     0,
-       0,     0,   357,   278,   289,     0,   333,   335,   336,   337,
-       0,   232,   350,   354,   373,   372,    18,   295,   293,   294,
-     298,   299,   297,   296,   308,   307,   319,   309,   310,   311,
-     312,   313,   314,   315,   316,   317,   318,   360,   277,     0,
-     279,   340,   133,     0,   378,   379,   380,   374,   375,   376,
-     377,   339,   381,   382,   393,   383,   384,   385,   386,   387,
-     388,   389,   390,   391,   392,   327,    40,   327,   358,   357,
-       0,     0,   320,   322,   321,   325,   326,   324,   323,   576,
-      27,     0,     0,     0,   125,     0,     0,     0,   416,   420,
-     422,     0,     0,   429,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   302,   300,
-     301,   305,   306,   304,   303,   232,     0,    71,   359,   232,
-      88,     0,    24,    31,    21,    23,     0,    22,     0,     0,
-     195,   576,   156,   158,   159,   157,   177,     0,     0,   180,
-      19,   287,   164,     0,   162,   200,   280,     0,   279,   278,
-     283,   281,   282,   284,   291,   327,    40,   327,   108,   175,
-       0,   334,   352,   243,   244,   176,   181,     0,     0,   160,
-     188,     0,   228,   220,     0,   265,     0,   199,   260,   408,
-     409,   349,   233,   405,   412,   406,   327,   279,     3,   132,
-     138,   356,   340,   232,   359,   232,   327,   327,   295,   293,
-     294,   298,   299,   297,   296,   123,   119,   115,   118,   265,
-     260,     0,     0,     0,   126,     0,   124,   128,   127,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   332,   331,     0,   228,     0,   328,   329,   330,
-      45,     0,    41,    72,    32,    71,     0,    92,   360,     0,
-       0,   198,     0,   211,   359,     0,   203,   205,   285,   286,
-     555,   232,   359,   232,   165,   163,   327,   188,   183,   478,
-     479,   480,   481,   482,   483,   484,   485,   486,   492,   493,
-     487,   488,   489,   490,   491,   494,   495,   496,   497,   498,
-     499,   500,   501,   502,   466,   465,     0,   463,   464,     0,
-     474,   475,   469,   468,   470,   471,   472,   473,   476,   477,
-     185,   467,   187,   196,     0,   222,   225,   221,   256,     0,
-       0,   237,   266,     0,   166,   161,   199,     0,     0,   407,
-     413,   351,     4,     0,   135,     0,     0,     0,     0,   115,
-       0,     0,   232,   232,     0,   120,   378,   379,   380,   374,
-     375,   376,   377,   602,   603,   530,   526,   527,   525,   528,
-     529,   531,   506,   505,   507,   519,   509,   511,   510,   512,
-     513,   515,   514,   516,   518,   508,   520,   504,   503,   517,
-     478,   479,   523,   522,   521,   524,   586,   585,   597,   581,
-     576,    26,   592,   588,   593,   601,   590,   591,   576,   589,
-     596,   587,   594,   595,   577,   580,   582,   584,   583,   576,
-       0,     0,     3,   131,   130,   129,   414,     0,     0,     0,
-     424,   427,     0,     0,   434,   438,   442,   446,   436,   440,
-     444,   448,   450,   452,   454,   455,     0,    34,   227,   231,
-      46,    83,    84,    85,    81,    73,    74,    79,    76,    39,
-      86,     0,    93,    94,    97,   198,   194,     0,   217,     0,
-       0,   211,     0,   201,     0,     0,    33,     0,   353,   182,
-     211,     0,     0,   459,   460,   192,   190,     0,   189,   211,
-     224,   229,     0,   238,   257,   271,   268,   269,   263,   264,
-     262,   261,   347,   411,    25,   136,   134,     0,     0,     0,
-     368,   367,     0,   258,   232,   362,   366,   148,   149,   258,
-       0,   110,   114,   117,   112,     0,     0,   109,   232,   211,
-       0,     0,     0,    29,     4,     0,   417,   421,   423,     0,
-       0,   430,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   457,    49,    50,    51,    37,     0,     0,
-       0,    82,     0,    80,     0,    89,    95,    98,   578,   178,
-     212,   213,     0,   288,     0,   206,   207,     0,   188,   570,
-     572,   540,   574,   562,   538,   563,   568,   564,   292,   566,
-     539,   544,   543,   537,   541,   542,   560,   561,   556,   559,
-     534,   535,   536,    35,    87,     0,   461,   462,     0,   193,
-       0,   232,   548,   549,   223,   547,   532,   245,   274,   270,
-     348,   138,   369,   370,   371,   364,   241,   242,   240,   139,
-     258,   265,   259,   361,   327,   142,   145,   111,   113,   116,
-       0,   598,   599,   600,    28,     0,     0,   425,     0,     0,
-     433,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   458,     0,     0,     0,     0,    64,    53,    58,    47,
-      60,    54,    57,    55,    52,     0,    59,     0,   171,   172,
-      56,     0,     0,   357,     0,     0,    61,    48,    77,    75,
-      78,    96,     0,     0,   188,   214,   258,   204,     0,   209,
-     202,   545,   545,   557,   545,   555,   545,   184,   191,   197,
-     230,   533,   246,   239,   249,     0,     0,   137,   327,   150,
-     254,     0,   258,   234,   363,   150,   258,   121,   415,   418,
-       0,   428,   431,   435,   439,   443,   447,   437,   441,   445,
-     449,     0,     0,   456,    69,     0,    67,     0,     0,   357,
-       0,     0,    62,    65,    66,     0,   167,    63,     0,   173,
-       0,   170,   199,    99,   100,   579,   179,   216,   217,   218,
-     208,     0,     0,     0,     0,     0,     0,   211,   272,   275,
-     365,   152,   140,   151,   235,   255,   143,   146,   250,     0,
-     578,     0,     0,     0,   576,   578,   103,   359,     0,    68,
-       0,    70,     0,   168,     0,   215,   220,   551,   552,   571,
-     550,   546,   573,   554,   575,   553,   558,   569,   565,   567,
-       0,     0,   245,   150,   122,   419,     0,   432,   451,   453,
-       0,     0,   101,     0,     0,   104,   359,   169,   219,   247,
-     153,   154,   236,   147,   252,   251,     0,   426,   578,   106,
-       0,   102,   250,   155,   253,     0,   248,   105
-};
-
-/* YYDEFGOTO[NTERM-NUM].  */
-static const yytype_int16 yydefgoto[] =
-{
-      -1,     1,     2,     4,    78,   232,    80,    81,   323,    82,
-      83,    84,   234,    86,   226,    87,   365,   227,   247,   560,
-     668,   669,   779,   780,   781,   362,   363,   565,   566,   674,
-     670,   567,    89,    90,   367,    91,   571,   572,   573,   802,
-     235,   856,   906,    92,    93,   458,   464,   459,   315,   316,
-     639,   898,   317,    94,   193,    95,   236,   300,   453,   731,
-     454,   455,   829,   456,   835,   457,   836,   933,   629,   892,
-     893,   931,   950,   237,    98,    99,   100,   786,   787,   101,
-     102,   373,   804,   103,   275,   387,   276,   590,   277,   104,
-     279,   432,   598,   718,   242,   280,   599,   253,   789,   377,
-     688,   255,   581,   583,   685,   686,   577,   578,   680,   878,
-     681,   682,   916,   436,   437,   602,   105,   282,   354,   434,
-     721,   355,   356,   739,   932,   283,   727,   740,   284,   823,
-     887,   962,   934,   831,   439,   741,   742,   611,   441,   442,
-     443,   606,   607,   728,   825,   826,   194,   107,   178,   149,
-     375,   110,   111,   179,   380,   113,   114,   225,   357,   248,
-     116,   117,   118,   119,   613,   239,   121,   296,   386,   122,
-     153,   623,   624,   744,   828,   625,   123,   124,   125,   292,
-     293,   294,   448,   295,   126,   645,   332,   756,   899,   333,
-     334,   649,   840,   650,   337,   759,   901,   653,   657,   654,
-     658,   655,   659,   656,   660,   661,   662,   772,   430,   703,
-     704,   705,   724,   725,   881,   920,   921,   926,   584,   883,
-     707,   708,   709,   815,   710,   816,   711,   814,   811,   812,
-     712,   813,   321,   803,   524,   525,   526,   527,   528,   529
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
-   STATE-NUM.  */
-#define YYPACT_NINF -872
-static const yytype_int16 yypact[] =
-{
-    -872,    77,    87,  -872,  4255,   167,   191,   227,   280,   300,
-     301,   304,  -872,  -872,  -872,  4899,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,    98,  -872,    -8,  -872,  5429,   383,  4624,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,   -38,   106,   121,   122,   133,   158,   171,   186,
-     196,   203,   210,   228,   243,    -3,    36,    43,    45,    90,
-     114,   130,   138,   151,   179,   183,   187,   202,   215,   233,
-     235,   249,   258,   267,   269,   271,  -872,   438,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  4899,  -872,
-    -872,    21,  -872,  -872,  -872,  -872,  5144,  -872,   -71,   -71,
-     -71,   -71,  -872,   281,  5524,  -872,    54,  -872,   284,  4742,
-     350,  4899,   -25,  -872,   297,  5239,  -872,  -872,  -872,  -872,
-    4672,   276,  -872,  -872,  -872,  -872,  -872,   -10,     9,    18,
-      50,    52,   148,   166,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,   310,  -872,  4921,
-     350,   312,   321,  4899,   -10,     9,    18,    50,    52,   148,
-     166,   441,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  4899,  -872,  -872,   350,
-    5429,  4790,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-     332,  4899,  4899,   337,  -872,  4742,  4899,  4529,  -872,  -872,
-    -872,  4529,  4529,  -872,  4529,  4529,  4529,  4529,  4529,  4529,
-    4529,  4529,  4529,  4529,  4529,  4529,  4529,  4529,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  1286,   343,   348,   259,  1286,
-    -872,  4899,  -872,  -872,  -872,  -872,  5144,  -872,  5334,  4947,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  4899,  5524,  -872,
-    -872,  -872,  -872,   360,  -872,  -872,  -872,   350,   -13,   362,
-    -872,  -872,  -872,  -872,  -872,  -872,  4899,  -872,  -872,  -872,
-    4742,  -872,  -872,  -872,  -872,  -872,  -872,   363,  5071,  -872,
-    -872,   370,  -872,   377,  1478,   372,  4742,   350,    15,  -872,
-     435,  -872,  -872,  -872,  -872,   276,  -872,   350,  -872,  -872,
-      73,  -872,  -872,  5028,   177,  5028,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,   107,
-     379,  1212,   409,   384,  -872,   386,  -872,  -872,  -872,  1383,
-    4742,   387,  4529,  4529,  4529,   388,   389,  4529,   390,   391,
-     392,   393,   397,   398,   399,   401,   402,   403,   405,   404,
-     406,   407,  -872,  -872,   414,  -872,  4790,  -872,  -872,  -872,
-    -872,  1111,  -872,  -872,  -872,   348,   415,  4529,  -872,  5334,
-    4742,  -872,  1617,   424,  -872,   471,  -872,   412,  -872,  -872,
-    -872,  1286,   278,  1286,  -872,  -872,  -872,  -872,  -872,   381,
-     423,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,   428,  -872,  -872,   411,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,    41,  -872,   212,  -872,  -872,  -872,  -872,   429,
-    4790,  -872,  -872,   427,  -872,  -872,   350,   470,   440,  -872,
-    -872,  4121,   436,    11,  -872,  5560,    88,   524,   442,  -872,
-    4790,   443,  5028,  5028,   224,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-     444,   350,  -872,  -872,  -872,  -872,  -872,   445,   434,   439,
-    -872,  -872,   446,  5524,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  4529,  -872,   447,  -872,
-      48,  -872,  -872,  -872,   485,   448,  -872,   535,  -872,  -872,
-    -872,   452,   451,  -872,   456,   457,  -872,   454,  -872,   350,
-     297,   424,  4899,  -872,  3577,   449,  -872,   462,  4121,    41,
-     424,   437,   453,  -872,  -872,  -872,  -872,   549,  -872,   424,
-    -872,  -872,  3857,  -872,  -872,  -872,   427,  -872,  -872,  -872,
-    -872,  -872,  -872,   440,  -872,  -872,  -872,  4899,  4899,  4899,
-    -872,   350,  5524,  4694,   276,  -872,  -872,  -872,  -872,  4694,
-     563,  -872,   461,  -872,  -872,   467,   468,  -872,   276,   424,
-    1757,  1897,  2037,  -872,   472,  5524,  -872,  -872,  -872,  5524,
-    5524,  -872,   463,  5524,  5524,  5524,  5524,  5524,  5524,  5524,
-    5524,  5524,  5524,   464,  -872,  -872,  -872,  -872,  4137,   469,
-    4899,  -872,  1111,  -872,  4899,  -872,  4529,  -872,  -872,  -872,
-     473,  -872,  5524,  -872,   474,   475,  -872,    58,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,   477,  -872,  -872,    92,  -872,
-     478,   276,  -872,  -872,  3857,  -872,  -872,   160,   465,  -872,
-    -872,    73,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-     969,   372,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-     479,  -872,  -872,  -872,  -872,   480,  5524,  -872,   481,  5524,
-    -872,   482,   483,   484,   489,   490,   491,   492,   496,   487,
-     499,  -872,   498,  4373,  4851,    58,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  4563,  -872,   -71,  -872,  -872,
-    -872,   506,  4742,   129,  4468,  4672,  -872,  -872,  -872,  -872,
-    -872,  -872,  3857,  2317,  -872,   526,  4694,  -872,  4899,  -872,
-      41,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,   497,  3857,  -872,  -872,   504,
-    -872,   502,  4694,  -872,  4121,   504,  4694,  -872,  -872,  -872,
-     508,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,   622,   623,  -872,  -872,  4720,  -872,   518,   -71,   -13,
-    4563,  4947,  -872,  -872,  -872,  4563,  -872,  -872,   520,  -872,
-    4742,  -872,  -872,  3857,  -872,  -872,    41,  -872,  -872,  -872,
-    -872,  3017,  3157,  2877,  3297,  3717,  3437,   424,  -872,  3857,
-    4121,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,   514,
-    -872,   515,   516,   519,  -872,  -872,  -872,   328,  4720,  -872,
-     518,  -872,  4720,  -872,   527,  -872,   377,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-     521,  3997,   160,   504,    93,  -872,  2457,  -872,  -872,  -872,
-    2177,  2597,  -872,   328,  4720,  -872,   339,  -872,  -872,  -872,
-    3997,  -872,  -872,  -872,  -872,  -872,    58,  -872,  -872,  -872,
-     339,  -872,  -872,  -872,  -872,  2737,    93,  -872
-};
-
-/* YYPGOTO[NTERM-NUM].  */
-static const yytype_int16 yypgoto[] =
-{
-    -872,  -872,  -260,  -872,  -872,   645,  -872,  -872,  -872,  -872,
-    -613,   -94,     1,   -26,  -872,  -872,  -872,  -872,    16,  -872,
-    -872,  -872,  -872,  -872,  -872,   285,  -872,  -872,   -20,  -872,
-    -872,    89,   -17,   -21,  -872,  -872,  -872,  -872,   -22,  -872,
-    -872,  -202,  -473,    -9,  -102,  -249,   199,    22,  -872,  -872,
-    -872,  -872,   201,    -6,  -872,  -872,    -1,  -872,  -872,  -872,
-     -66,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -770,
-    -872,  -872,  -872,   668,  -872,  -872,  -872,  -111,   -97,  -576,
-     -80,  -872,  -872,  -154,  -241,  -872,  -872,  -872,  -155,    35,
-    -270,  -364,  -872,  -872,   -91,  -872,  -872,  -105,   -67,  -872,
-    -872,  -872,  -872,  -872,  -872,  -129,  -542,  -872,  -872,  -872,
-    -198,  -872,  -872,  -230,  -872,  -872,    20,   333,  -166,   338,
-    -872,    -5,   -95,  -575,  -872,  -157,  -872,  -872,  -872,  -237,
-    -872,  -872,  -261,  -872,  -872,  -872,   -98,  -872,   -29,  -696,
-    -872,  -872,   112,  -872,  -872,  -872,    13,   -45,     3,    32,
-    -872,   -63,    23,    -4,  -872,   754,   -24,     8,  -872,    10,
-     -81,  -872,  -872,  -415,  -872,    49,  -872,  -872,  -872,   -19,
-    -872,  -872,  -872,  -872,  -872,  -872,  -121,  -391,   194,  -272,
-     425,   430,  -872,  -872,    51,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,
-    -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -872,  -204,
-    -302,    82,  -751,  -554,  -456,  -581,  -153,  -872,   -89,  -872,
-    -871,  -872,  -872,  -872,  -872,  -872,    17,  -872,  -872,  -872,
-    -872,  -872,  -183,  -820,  -872,  -759,  -872,  -872,  -660,  -872
+       1,     1,     1,     1,     1,     3,     3,     4,     3,     1,
+       1,     1
 };
 
-/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
-   positive, shift that token.  If negative, reduce the rule which
-   number is the opposite.  If zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -411
-static const yytype_int16 yytable[] =
-{
-     112,   175,   233,    96,   190,    85,   177,   108,   243,   244,
-     245,   150,   440,   268,   115,   281,   445,   106,   148,   522,
-      88,   726,   285,   589,   318,   150,   291,   809,   147,   252,
-     706,   824,   148,   612,   271,   269,   109,   180,   452,   684,
-     328,   327,   254,   176,   875,   444,   257,    30,   715,   240,
-     241,   873,   196,   120,   745,   777,   461,   720,   372,    30,
-     951,   195,  -320,   366,   256,   896,   261,   595,   473,   474,
-     522,   664,   665,   666,   431,   889,   181,     3,   596,   963,
-     936,  -322,  -308,   319,   150,   941,   257,    -2,  -308,   265,
-    -321,   148,   788,  -141,   267,  -279,   272,   750,   229,   271,
-     445,   228,   689,   690,   256,   258,   238,   150,   627,  -144,
-     151,  -141,    88,  -199,   262,   862,   287,   521,  -320,   954,
-     152,   955,  -325,   197,  -326,   431,   628,   438,   109,   444,
-     956,   266,   257,   260,   281,   263,   615,  -322,   965,   447,
-     616,  -198,   230,   821,   358,   297,  -321,   270,   358,   150,
-     256,   261,   286,   249,   306,   278,   148,   271,   269,   307,
-     854,   272,   198,   953,   597,   830,   301,   271,   521,   199,
-     667,   200,   150,   263,   250,   535,   534,   875,  -325,   148,
-    -326,   281,   875,   303,   515,   305,   285,   150,   150,   304,
-     384,   297,   150,   701,   148,   148,   176,   788,   730,   262,
-     520,    30,   263,   385,   324,   325,   875,   257,   460,   788,
-     460,   701,   265,   635,   636,   585,   201,   587,   696,   272,
-    -324,   726,   358,   257,   358,   256,  -307,   150,   330,   272,
-     329,   879,  -307,   465,   148,   287,   824,  -267,  -323,  -320,
-     202,  -319,  -309,   150,   368,   726,   369,  -319,  -309,  -279,
-     148,   520,   176,  -310,   266,  -199,   203,   895,   285,  -310,
-     374,   897,   150,  -322,   204,   281,   258,   257,   109,   148,
-     270,   370,   644,   381,   278,   383,  -324,   205,  -311,   382,
-     378,   379,   446,   604,  -311,   256,   822,  -295,   271,   269,
-    -267,  -312,   821,  -295,  -323,  -320,   964,  -312,   -38,  -321,
-     358,   -38,   358,   318,   451,   206,  -313,   257,   821,   207,
-     263,  -293,  -313,   208,   462,   463,  -314,  -293,   531,  -322,
-     379,   278,  -314,  -315,   810,   530,   297,   640,   209,  -315,
-    -316,   706,   600,   701,   626,   641,  -316,   601,   522,   522,
-     522,   210,   285,   265,   637,   930,   642,  -294,  -317,   638,
-     272,   580,  -325,  -294,  -317,  -321,   882,   150,   884,   211,
-     886,   212,   319,  -318,   148,   329,   446,   460,   460,  -318,
-     358,   579,  -326,  -324,   568,   213,  -323,   706,   249,   364,
-     -38,   358,   358,   -38,   214,   176,   182,   183,   184,   185,
-     186,   187,   188,   215,   588,   216,   706,   217,   586,   -38,
-    -298,   270,   -38,   523,  -277,   278,  -298,   246,  -325,   289,
-     290,   701,   182,   183,   184,   185,   186,   187,   188,   359,
-    -299,  -297,    30,   359,  -296,   264,  -299,  -297,  -326,  -324,
-    -296,   -90,  -323,   298,   942,   701,   521,   521,   521,   945,
-     876,   218,   219,   220,   221,   222,   223,   224,   364,   904,
-     299,   621,   905,   302,   523,   322,   630,   326,   620,   586,
-     904,  -410,  -410,   905,   360,   622,    16,    17,   832,   379,
-     942,   945,   361,   961,   182,   183,   184,   185,   186,   187,
-     188,    30,   701,   608,   609,   610,   376,   961,  -198,   388,
-     701,   701,   701,   701,   701,   701,   433,   359,   701,   359,
-     435,   522,  -267,   447,   189,   532,   533,   358,   561,   562,
-     563,   591,   536,   540,   541,   543,   544,   545,   546,   520,
-     520,   520,   547,   548,   549,   871,   550,   551,   552,   743,
-     553,   554,   556,   555,   557,   570,   582,    12,    13,    14,
-     701,   271,   594,   460,    16,    17,    18,    19,    20,    21,
-      22,  -210,   161,   592,   263,   593,   603,   605,   614,   701,
-      25,   647,   631,   634,   643,   673,   648,   719,   716,   713,
-     646,   651,   601,   672,   675,   359,   676,   359,   150,   677,
-     678,   679,   714,   746,   717,   148,   638,   747,   748,   771,
-     760,   871,   652,   797,   754,   687,  -273,   877,   805,   521,
-     808,   807,   683,   735,   817,   819,   837,   838,   841,   843,
-     844,   845,   851,   150,   150,   150,   846,   847,   848,   849,
-     148,   148,   148,   850,   852,   853,   867,   891,   888,   894,
-     732,   733,   734,   900,   522,   902,   903,   868,   522,   522,
-     913,   935,   937,   938,   263,   359,   939,   947,   949,    79,
-     569,   782,   799,   671,   801,   909,   359,   359,   632,   783,
-     749,   633,   784,   522,   793,   827,   150,   785,   150,   778,
-     150,   108,    97,   148,   864,   148,   858,   148,   794,   880,
-     915,   791,   520,   798,    88,   568,   948,   800,   790,   559,
-     281,   233,   268,   558,   755,   952,   866,   285,   757,   758,
-     792,   966,   761,   762,   763,   764,   765,   766,   767,   768,
-     769,   770,   833,   271,   269,   914,   820,   795,   729,   796,
-     449,   940,   523,   523,   523,   450,   885,   869,     0,   257,
-     925,   806,   521,     0,     0,   818,   521,   521,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   256,     0,     0,
-       0,     0,   834,   358,     0,     0,   281,     0,     0,     0,
-       0,   521,     0,   233,     0,     0,     0,   911,   265,   859,
-     150,   580,   857,   267,     0,   272,     0,   148,   702,   271,
-     269,   859,   359,   860,   271,   269,   863,     0,   297,   855,
-     859,   872,     0,   869,     0,   865,   702,   196,   869,     0,
-       0,    88,     0,     0,   150,   839,   195,   257,   842,   358,
-     266,   148,     0,     0,     0,   520,   263,   792,     0,   520,
-     520,   687,   861,     0,     0,   256,   870,   278,     0,   271,
-     278,     0,     0,     0,   861,     0,   890,   580,     0,   265,
-       0,   272,     0,     0,   520,     0,   272,     0,     0,     0,
-       0,   150,     0,     0,     0,     0,   859,   872,   148,     0,
-       0,   859,     0,   259,     0,     0,   297,   910,   907,     0,
-       0,     0,     0,   908,   288,     0,   912,     0,     0,     0,
-       0,   266,   263,     0,     0,   523,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   278,   870,     0,     0,
-       0,     0,     0,     0,   150,   278,     0,     0,   150,     0,
-       0,   148,     0,     0,     0,   148,     0,     0,   702,     0,
-       0,   943,     0,     0,     0,   946,   944,     0,     0,     0,
-       0,     0,     0,     0,     0,   320,     0,     0,     0,     0,
-     150,     0,     0,     0,     0,     0,     0,   148,     0,     0,
-       0,   331,     0,     0,     0,   335,   336,   960,   338,   339,
-     340,   341,   342,   343,   344,   345,   346,   347,   348,   349,
-     350,   351,   308,   309,   310,   311,   312,   313,   314,   736,
-     737,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,   371,     0,     0,   702,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   523,     0,
-     702,     0,   523,   523,   259,     0,     0,     0,   359,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   320,     0,
-     371,     0,     0,     0,     0,     0,     0,   523,     0,     0,
-       0,     0,     0,     0,   134,   135,   136,   137,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,   702,     0,     0,
-       0,     0,     0,     0,     0,   702,   702,   702,   702,   702,
-     702,     0,     0,   702,   359,     0,   537,   538,   539,     0,
-       0,   542,     0,     0,     0,   738,     0,     0,     0,     0,
-       0,    77,   289,   290,     0,     0,     0,     0,     0,     0,
-     320,     0,     0,     0,   127,   128,   129,   130,   131,   132,
-     133,   574,     0,     0,   575,   702,     0,     0,     0,     0,
-       0,     0,     0,     0,   561,   562,   563,     0,     0,     0,
-       0,   564,     0,     0,   702,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    30,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   320,     0,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,     0,
-       0,     0,     0,     0,   320,   466,   467,   468,   469,   470,
-     471,   472,   473,   474,   475,   476,   477,   478,   479,   480,
-     481,   482,   483,   484,   485,   486,   487,   488,   489,     0,
-       0,   490,   491,    77,   492,     0,   493,   494,   495,   496,
-     497,   498,   499,     0,   500,   501,   502,   503,   504,   505,
-     391,   392,   393,   394,   395,   396,   397,   398,   399,   400,
-     401,   402,   403,   404,   405,   406,   407,   408,   409,   410,
-     411,   412,   413,   506,   507,   508,    31,    32,    33,    34,
-      35,    36,    37,    38,    39,    40,    41,   162,   163,   164,
-     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
-     663,     0,    16,    17,    18,    19,    20,    21,    22,   352,
-     161,     0,     0,     0,     0,   353,     0,     0,     0,     0,
-       0,     0,   509,   510,   511,   512,   513,   514,   515,     0,
-     516,   517,   518,     0,   420,   421,   422,   423,   424,   425,
-     426,   427,   428,   429,   519,     0,     0,     0,     0,     0,
-      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
-      41,     0,     0,     0,     0,     0,     0,   320,     0,     0,
-       0,     0,     0,   320,     0,     0,   154,   155,   156,   157,
-     158,   159,   160,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    12,    13,    14,   231,  -226,     0,     0,    16,
-      17,    18,    19,    20,    21,    22,     0,   161,     0,   289,
-     290,    26,   259,     0,     0,   389,   390,     0,     0,     0,
-     574,   391,   392,   393,   394,   395,   396,   397,   398,   399,
-     400,   401,   402,   403,   404,   405,   406,   407,   408,   409,
-     410,   411,   412,   413,     0,    30,     0,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,   162,   163,
-     164,   165,   166,   167,   168,   169,   170,   171,   172,   173,
-     174,   308,   309,   310,   311,   312,   313,   314,   273,   274,
-       0,     0,     0,     0,   320,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   414,     0,   415,   416,
-       0,   417,   418,   419,     0,   420,   421,   422,   423,   424,
-     425,   426,   427,   428,   429,     0,     0,   371,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   371,
-       0,     0,     0,     0,     0,     0,     0,     0,   371,   288,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     320,     0,     0,   134,   135,   136,   137,   138,   139,   140,
-     141,   142,   143,   144,   145,   146,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   320,     0,     0,     0,
-     320,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      77,   289,   290,     0,   371,   371,     0,     0,     0,   371,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   509,   510,   576,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   509,   510,   751,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   509,   510,     0,
-     512,   513,   514,   515,     0,   516,   517,   518,   752,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   509,   510,     0,
-     512,   513,   514,   515,   753,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   509,   510,   958,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   874,   510,     0,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   510,     0,
-     512,   513,   514,   515,   957,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   959,   510,     0,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   473,   474,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,   506,   507,
-     508,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   967,   510,     0,
-     512,   513,   514,   515,     0,   516,   517,   518,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   519,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   923,   692,   924,
-     917,   694,   918,   696,     0,   722,   723,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     917,   694,   918,   696,   919,   722,   723,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     917,   694,   918,   696,   922,   722,   723,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     917,   694,   918,   696,   927,   722,   723,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     917,   694,   918,   696,     0,   722,   723,   699,   929,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     693,   694,   695,   696,     0,   697,   698,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-     693,   694,   695,   696,     0,   697,   928,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-       0,   694,     0,   696,     0,   722,   723,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-     466,   467,   468,   469,   470,   471,   472,   689,   690,   475,
-     476,   477,   478,   479,   480,   481,   482,   483,   484,   485,
-     486,   487,   488,   489,     0,     0,   490,   491,     0,   492,
-       0,   493,   494,   495,   496,   497,   498,   499,     0,   500,
-     501,   502,   503,   504,   505,   391,   392,   393,   394,   395,
-     396,   397,   398,   399,   400,   401,   402,   403,   404,   405,
-     406,   407,   408,   409,   410,   411,   412,   413,     0,   691,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,   162,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   692,     0,
-       0,   694,     0,   696,     0,   697,     0,   699,     0,   420,
-     421,   422,   423,   424,   425,   426,   427,   428,   429,   700,
-       5,     6,     7,     8,     9,    10,    11,    16,    17,    18,
-      19,    20,    21,    22,   352,   161,    12,    13,    14,    15,
-     353,     0,     0,    16,    17,    18,    19,    20,    21,    22,
-     773,   161,    24,    25,     0,    26,    27,     0,   774,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    31,    32,    33,    34,    35,
-      36,    37,    38,    39,    40,    41,     0,     0,     0,    30,
-       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
-      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
-      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
-      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
-      70,    71,    72,    73,    74,    75,   775,   776,     5,     6,
-       7,     8,     9,    10,    11,     0,     0,     0,     0,    77,
-       0,     0,     0,     0,    12,    13,    14,    15,     0,     0,
-       0,    16,    17,    18,    19,    20,    21,    22,     0,    23,
-      24,    25,     0,    26,    27,    28,    29,     0,     0,     0,
+/* YYDPREC[RULE-NUM] -- Dynamic precedence of rule #RULE-NUM (0 if none).  */
+static const unsigned char yydprec[] =
+{
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    30,     0,    31,
-      32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
-      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
-      72,    73,    74,    75,     0,    76,     5,     6,     7,     8,
-       9,    10,    11,     0,     0,     0,     0,    77,     0,     0,
-       0,     0,    12,    13,    14,   231,     0,     0,     0,    16,
-      17,    18,    19,    20,    21,    22,     0,   161,    24,    25,
-       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    30,     0,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,     5,     6,     7,     8,     9,    10,    11,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    12,    13,    14,
-      15,     0,     0,     0,    16,    17,    18,    19,    20,    21,
-      22,     0,   161,    24,     0,    77,    26,    27,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   308,   309,   310,   311,   312,   313,   314,     0,
-      30,     0,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
-      49,    50,    51,    52,    53,    54,     5,     6,     7,     8,
-       9,    10,    11,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    12,    13,    14,   231,     0,     0,     0,    16,
-      17,    18,    19,    20,    21,    22,     0,   161,    24,     0,
-      77,    26,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   134,   135,   136,   137,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,   127,   128,   129,
-     130,   131,   132,   133,     0,    30,     0,    31,    32,    33,
-      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
-      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
-      54,    77,   191,     0,   192,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   127,   128,   129,   130,   131,
-     132,   133,   273,   274,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    77,    30,   308,   309,   310,
-     311,   312,   313,   314,   736,   737,     0,    24,     0,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,     0,   127,   128,   129,   130,   131,   132,   133,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   127,   128,   129,   130,   131,
-     132,   133,     0,     0,     0,     0,    77,   134,   135,   136,
-     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
-       0,     0,     0,     0,     0,     0,     0,    24,   251,   134,
-     135,   136,   137,   138,   139,   140,   141,   142,   143,   144,
-     145,   146,    30,   308,   309,   310,   311,   312,   313,   314,
-     273,   274,     0,     0,    77,   134,   135,   136,   137,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,     0,     0,
-     738,     0,     0,     0,     0,     0,    77,   134,   135,   136,
-     137,   138,   139,   140,   141,   142,   143,   144,   145,   146,
-       0,   904,     0,     0,   905,     0,     0,     0,     0,     0,
-       0,     0,    77,     0,   127,   128,   129,   130,   131,   132,
-     133,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,    77,   134,   135,   136,   137,   138,
-     139,   140,   141,   142,   143,   144,   145,   146,     0,   191,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   127,   128,   129,   130,   131,   132,   133,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    77,    30,   127,   128,   129,   130,   131,   132,
-     133,     0,     0,     0,     0,     0,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,     0,
-     127,   128,   129,   130,   131,   132,   133,   251,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    30,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    24,    77,   134,   135,   136,   137,   138,   139,
-     140,   141,   142,   143,   144,   145,   146,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,   143,   144,   145,   146,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    77,   134,   135,   136,   137,   138,   139,   140,   141,
-     142,   143,   144,   145,   146,     0,     0,     0,     0,     0,
-       0,     0,     0,    77,    16,    17,    18,    19,    20,    21,
-      22,   352,   161,     0,     0,     0,     0,   353,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    77,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    31,    32,    33,    34,    35,    36,    37,    38,
-      39,    40,    41,   389,   390,     0,     0,     0,     0,   391,
-     392,   393,   394,   395,   396,   397,   398,   399,   400,   401,
-     402,   403,   404,   405,   406,   407,   408,   409,   410,   411,
-     412,   413,     0,     0,     0,     0,     0,   154,   155,   156,
-     157,   158,   159,   160,     0,     0,     0,     0,     0,     0,
-       0,   289,   290,    12,    13,    14,   231,     0,     0,     0,
-      16,    17,    18,    19,    20,    21,    22,     0,   161,    24,
-      25,     0,    26,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   414,     0,   415,   416,     0,   417,
-     418,   419,     0,   420,   421,   422,   423,   424,   425,   426,
-     427,   428,   429,     0,     0,     0,    30,     0,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     173,   174,   154,   155,   156,   157,   158,   159,   160,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    12,    13,
-      14,    15,     0,     0,     0,    16,    17,    18,    19,    20,
-      21,    22,     0,   161,    24,     0,     0,    26,    27,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    30,     0,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,   172,   173,   174,   154,   155,   156,
-     157,   158,   159,   160,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    12,    13,    14,   231,     0,     0,     0,
-      16,    17,    18,    19,    20,    21,    22,     0,   161,    24,
-       0,     0,    26,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    30,     0,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     173,   174,   154,   155,   156,   157,   158,   159,   160,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    12,    13,
-      14,    15,     0,     0,     0,    16,    17,    18,    19,    20,
-      21,    22,     0,   161,     0,     0,     0,    26,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    30,     0,    31,    32,    33,    34,    35,    36,    37,
-      38,    39,    40,    41,   162,   163,   164,   165,   166,   167,
-     168,   169,   170,   171,   172,   173,   174,   154,   155,   156,
-     157,   158,   159,   160,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,    12,    13,    14,   231,     0,     0,     0,
-      16,    17,    18,    19,    20,    21,    22,     0,   161,     0,
-       0,     0,    26,   154,   155,   156,   157,   158,   159,   160,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   617,
-       0,   618,   619,     0,     0,     0,    16,    17,    18,    19,
-      20,    21,    22,     0,   161,     0,    30,     0,    31,    32,
-      33,    34,    35,    36,    37,    38,    39,    40,    41,   162,
-     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
-     173,   174,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,    30,     0,    31,    32,    33,    34,    35,    36,
-      37,    38,    39,    40,    41,   162,   163,   164,   165,   166,
-     167,   168,   169,   170,   171,   172,   173,   174
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0
 };
 
-static const yytype_int16 yycheck[] =
-{
-       4,    27,    96,     4,    28,     4,    27,     4,    99,   100,
-     101,    15,   284,   115,     4,   120,   286,     4,    15,   321,
-       4,   602,   120,   387,   181,    29,   121,   687,    15,   109,
-     584,   727,    29,   448,   115,   115,     4,    27,   298,   581,
-     195,   195,   109,    27,   803,   286,   109,    72,   590,   120,
-     121,   802,    29,     4,   629,   668,   305,   599,   241,    72,
-     931,    29,    72,   229,   109,   835,   111,    26,    10,    11,
-     372,    23,    24,    25,   278,   826,    27,     0,    37,   950,
-     900,    72,   120,   181,    88,   905,   149,     0,   126,   115,
-      72,    88,   668,    20,   115,   120,   115,   639,    90,   180,
-     370,    88,    10,    11,   149,   109,    96,   111,    20,    36,
-      12,    38,    96,   126,   111,   775,   120,   321,   128,    26,
-     128,    28,    72,   126,    72,   329,    38,   284,    96,   370,
-      37,   115,   195,   110,   239,   112,   125,   128,   958,   124,
-     129,   126,   121,   724,   225,   149,   128,   115,   229,   153,
-     195,   196,   120,   104,   180,   120,   153,   238,   238,   180,
-     773,   180,   126,   933,   123,   740,   153,   248,   372,   126,
-     122,   126,   176,   150,   120,   330,   330,   936,   128,   176,
-     128,   286,   941,   175,   126,   177,   284,   191,   192,   176,
-     270,   195,   196,   584,   191,   192,   180,   773,   613,   196,
-     321,    72,   179,   270,   191,   192,   965,   270,   303,   785,
-     305,   602,   238,   462,   463,   381,   126,   383,   126,   238,
-      72,   802,   303,   286,   305,   270,   120,   231,   196,   248,
-     195,   806,   126,   126,   231,   239,   932,   130,    72,    72,
-     126,   120,   120,   247,   231,   826,   236,   126,   126,   120,
-     247,   372,   236,   120,   238,   126,   126,   832,   356,   126,
-     247,   836,   266,    72,   126,   370,   270,   330,   236,   266,
-     238,   239,   532,   265,   239,   267,   128,   126,   120,   266,
-     257,   258,   286,   440,   126,   330,   126,   120,   369,   369,
-     130,   120,   873,   126,   128,   128,   956,   126,   121,    72,
-     381,   124,   383,   460,   296,   126,   120,   370,   889,   126,
-     287,   120,   126,   126,   306,   307,   120,   126,   322,   128,
-     297,   286,   126,   120,   688,   322,   330,   510,   126,   126,
-     120,   885,   120,   724,   455,   518,   126,   125,   640,   641,
-     642,   126,   440,   369,   120,   887,   529,   120,   120,   125,
-     369,   375,    72,   126,   126,   128,   812,   361,   814,   126,
-     816,   126,   460,   120,   361,   330,   370,   462,   463,   126,
-     451,   375,    72,    72,   361,   126,    72,   931,   329,   120,
-     121,   462,   463,   124,   126,   369,     3,     4,     5,     6,
-       7,     8,     9,   126,   386,   126,   950,   126,   120,   121,
-     120,   369,   124,   321,   120,   370,   126,   126,   128,   133,
-     134,   802,     3,     4,     5,     6,     7,     8,     9,   225,
-     120,   120,    72,   229,   120,   128,   126,   126,   128,   128,
-     126,   121,   128,   121,   907,   826,   640,   641,   642,   912,
-     804,     3,     4,     5,     6,     7,     8,     9,   120,   121,
-     129,   455,   124,    12,   372,   123,   457,   120,   455,   120,
-     121,    26,    27,   124,   121,   455,    26,    27,   740,   446,
-     943,   944,   124,   946,     3,     4,     5,     6,     7,     8,
-       9,    72,   873,    13,    14,    15,   126,   960,   126,   126,
-     881,   882,   883,   884,   885,   886,   126,   303,   889,   305,
-     123,   803,   130,   124,   121,   121,   120,   588,    23,    24,
-      25,   130,   125,   125,   125,   125,   125,   125,   125,   640,
-     641,   642,   125,   125,   125,   795,   125,   125,   125,   624,
-     125,   127,   125,   127,   120,   120,   124,    19,    20,    21,
-     931,   622,   131,   638,    26,    27,    28,    29,    30,    31,
-      32,   127,    34,   130,   531,   127,   127,   130,   122,   950,
-      36,   127,   120,   120,   120,    30,   127,    18,   131,   120,
-     125,   125,   125,   125,   122,   381,   125,   383,   582,   123,
-     123,   127,   120,    20,   131,   582,   125,   120,   120,   125,
-     127,   861,   543,   124,   122,   582,   131,    71,   125,   803,
-     125,   127,   579,   622,   127,   127,   127,   127,   127,   127,
-     127,   127,   125,   617,   618,   619,   127,   127,   127,   127,
-     617,   618,   619,   127,   125,   127,   120,   123,   131,   127,
-     617,   618,   619,   125,   936,    13,    13,   792,   940,   941,
-     120,   127,   127,   127,   621,   451,   127,   120,   127,     4,
-     365,   668,   672,   564,   676,   857,   462,   463,   459,   668,
-     638,   460,   668,   965,   668,   731,   670,   668,   672,   668,
-     674,   668,     4,   670,   785,   672,   773,   674,   668,   808,
-     878,   668,   803,   670,   668,   672,   916,   674,   668,   356,
-     795,   785,   794,   355,   645,   932,   787,   795,   649,   650,
-     668,   962,   653,   654,   655,   656,   657,   658,   659,   660,
-     661,   662,   741,   794,   794,   870,   721,   668,   606,   668,
-     295,   904,   640,   641,   642,   295,   815,   794,    -1,   792,
-     883,   682,   936,    -1,    -1,   718,   940,   941,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   792,    -1,    -1,
-      -1,    -1,   744,   834,    -1,    -1,   861,    -1,    -1,    -1,
-      -1,   965,    -1,   857,    -1,    -1,    -1,   858,   794,   773,
-     774,   795,   773,   794,    -1,   794,    -1,   774,   584,   860,
-     860,   785,   588,   773,   865,   865,   785,    -1,   792,   773,
-     794,   795,    -1,   860,    -1,   785,   602,   774,   865,    -1,
-      -1,   785,    -1,    -1,   808,   756,   774,   870,   759,   890,
-     794,   808,    -1,    -1,    -1,   936,   793,   785,    -1,   940,
-     941,   808,   773,    -1,    -1,   870,   794,   792,    -1,   910,
-     795,    -1,    -1,    -1,   785,    -1,   828,   861,    -1,   865,
-      -1,   860,    -1,    -1,   965,    -1,   865,    -1,    -1,    -1,
-      -1,   855,    -1,    -1,    -1,    -1,   860,   861,   855,    -1,
-      -1,   865,    -1,   109,    -1,    -1,   870,   857,   855,    -1,
-      -1,    -1,    -1,   857,   120,    -1,   860,    -1,    -1,    -1,
-      -1,   865,   859,    -1,    -1,   803,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   861,   865,    -1,    -1,
-      -1,    -1,    -1,    -1,   908,   870,    -1,    -1,   912,    -1,
-      -1,   908,    -1,    -1,    -1,   912,    -1,    -1,   724,    -1,
-      -1,   908,    -1,    -1,    -1,   912,   910,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   181,    -1,    -1,    -1,    -1,
-     944,    -1,    -1,    -1,    -1,    -1,    -1,   944,    -1,    -1,
-      -1,   197,    -1,    -1,    -1,   201,   202,   944,   204,   205,
-     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
-     216,   217,     3,     4,     5,     6,     7,     8,     9,    10,
-      11,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   239,    -1,    -1,   802,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   936,    -1,
-     826,    -1,   940,   941,   270,    -1,    -1,    -1,   834,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   284,    -1,
-     286,    -1,    -1,    -1,    -1,    -1,    -1,   965,    -1,    -1,
-      -1,    -1,    -1,    -1,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,   873,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   881,   882,   883,   884,   885,
-     886,    -1,    -1,   889,   890,    -1,   332,   333,   334,    -1,
-      -1,   337,    -1,    -1,    -1,   126,    -1,    -1,    -1,    -1,
-      -1,   132,   133,   134,    -1,    -1,    -1,    -1,    -1,    -1,
-     356,    -1,    -1,    -1,     3,     4,     5,     6,     7,     8,
-       9,   367,    -1,    -1,   370,   931,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    23,    24,    25,    -1,    -1,    -1,
-      -1,    30,    -1,    -1,   950,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    72,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   440,    -1,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    -1,
-      -1,    -1,    -1,    -1,   460,     3,     4,     5,     6,     7,
-       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
-      18,    19,    20,    21,    22,    23,    24,    25,    26,    -1,
-      -1,    29,    30,   132,    32,    -1,    34,    35,    36,    37,
-      38,    39,    40,    -1,    42,    43,    44,    45,    46,    47,
-      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
-      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
-      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
-      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
-      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
-     556,    -1,    26,    27,    28,    29,    30,    31,    32,    33,
-      34,    -1,    -1,    -1,    -1,    39,    -1,    -1,    -1,    -1,
-      -1,    -1,   120,   121,   122,   123,   124,   125,   126,    -1,
-     128,   129,   130,    -1,   132,   133,   134,   135,   136,   137,
-     138,   139,   140,   141,   142,    -1,    -1,    -1,    -1,    -1,
-      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
-      84,    -1,    -1,    -1,    -1,    -1,    -1,   623,    -1,    -1,
-      -1,    -1,    -1,   629,    -1,    -1,     3,     4,     5,     6,
-       7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    19,    20,    21,    22,   120,    -1,    -1,    26,
-      27,    28,    29,    30,    31,    32,    -1,    34,    -1,   133,
-     134,    38,   668,    -1,    -1,    42,    43,    -1,    -1,    -1,
-     676,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,    -1,    72,    -1,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,     3,     4,     5,     6,     7,     8,     9,    10,    11,
-      -1,    -1,    -1,    -1,   740,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   123,    -1,   125,   126,
-      -1,   128,   129,   130,    -1,   132,   133,   134,   135,   136,
-     137,   138,   139,   140,   141,    -1,    -1,   773,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   785,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   794,   795,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     806,    -1,    -1,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   832,    -1,    -1,    -1,
-     836,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     132,   133,   134,    -1,   860,   861,    -1,    -1,    -1,   865,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,   122,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,   122,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,    -1,
-     123,   124,   125,   126,   127,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,   122,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,   127,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    71,    72,
-      73,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   120,   121,   122,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
+/* YYMERGER[RULE-NUM] -- Index of merging function for rule #RULE-NUM.  */
+static const unsigned char yymerger[] =
+{
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0
+};
+
+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
+   doesn't specify something else to do.  Zero means the default is an
+   error.  */
+static const unsigned short int yydefact[] =
+{
+       3,     0,     4,     1,   481,     0,   437,   438,   439,   433,
+     434,   435,   436,   441,   442,   440,   483,    52,    51,    53,
+     113,   396,   397,   388,   391,   392,   394,   395,   393,   387,
+     389,   217,     0,   346,   410,     0,     0,     0,   343,   454,
+     455,   456,   457,   458,   463,   464,   465,   466,   459,   460,
+     461,   462,   467,   468,   453,   443,   444,   445,   446,   447,
+     448,   449,   450,   451,   452,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    23,   341,     5,    19,
+      20,    13,    11,    12,     9,    36,    17,   376,    43,   481,
+      10,    16,   376,     0,   481,    14,   134,     7,     6,     8,
+       0,    18,     0,     0,     0,     0,   205,     0,     0,    15,
+       0,   323,   481,     0,     0,     0,     0,   481,   409,   325,
+     342,     0,   481,   384,   385,   386,   177,   279,   401,   405,
+     408,   481,   481,   482,    21,   634,   115,   114,   390,     0,
+     437,   438,   439,   433,   434,   435,   436,   700,   701,   611,
+     607,   608,   606,   609,   610,   612,   613,   441,   442,   440,
+     670,   580,   579,   581,   599,   583,   585,   584,   586,   587,
+     588,   591,   592,   590,   589,   595,   598,   582,   600,   601,
+     593,   578,   577,   597,   596,   553,   554,   594,   604,   603,
+     602,   605,   555,   556,   557,   684,   558,   559,   560,   566,
+     567,   561,   562,   563,   564,   565,   568,   569,   570,   571,
+     572,   573,   574,   575,   576,   682,   681,   694,   453,   443,
+     444,   445,   446,   447,   448,   449,   450,   451,   452,   670,
+     688,   685,   689,   699,   162,   670,   549,   550,   544,   687,
+     543,   545,   546,   547,   548,   551,   552,   686,   693,   692,
+     683,   690,   691,   672,   678,   680,   679,   670,     0,     0,
+     437,   438,   439,   433,   434,   435,   436,   389,   376,   481,
+     376,   481,   481,     0,   481,   409,     0,   177,   369,   371,
+     370,   374,   375,   373,   372,   670,    33,   350,   348,   349,
+     353,   354,   352,   351,   357,   356,   355,     0,     0,   368,
+     358,   359,   360,   361,   362,   363,   364,   365,   366,   367,
+       0,   481,   324,     0,     0,   326,   327,     0,   488,   492,
+     494,     0,     0,   501,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   279,     0,
+      50,   279,   109,   116,     0,     0,    27,    37,    24,   481,
+      26,    28,     0,    25,     0,   177,   249,   238,   670,   187,
+     237,   189,   190,   188,   208,   481,     0,   211,    22,   413,
+     339,   195,   193,   244,   330,     0,   326,   327,   328,    58,
+     329,    57,     0,   333,   331,   332,   334,   412,   335,   344,
+     376,   481,   376,   481,   135,   206,     0,   481,   403,   382,
+     287,   289,   178,     0,   275,   265,   177,   481,   481,   481,
+     400,   280,   469,   470,   479,   471,   376,   432,   431,   484,
+       3,   672,     0,     0,   657,   656,   167,   161,     0,     0,
+       0,   664,   666,   662,   347,   481,   390,   279,    50,   279,
+     116,   330,   376,   376,   150,   146,   142,     0,   145,     0,
+       0,     0,   153,     0,   151,     0,   155,   154,     0,     0,
+     350,   348,   349,   353,   354,   352,   351,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   381,   380,
+       0,   275,   177,   481,   378,   379,    61,    39,    48,   406,
+     481,     0,     0,    58,     0,     0,   121,   105,   117,   112,
+     481,   481,     0,     0,     0,     0,     0,     0,   255,     0,
+       0,   249,   247,   336,   337,   338,   645,   279,    50,   279,
+     116,   196,   194,   383,   376,   477,   207,   212,   481,     0,
+     191,   219,   312,   481,     0,     0,   267,   272,   266,     0,
+       0,   303,     0,   177,   474,   473,   475,   472,   480,   402,
+     660,   639,   623,   668,   641,   628,   642,   637,   658,   638,
+     629,   633,   632,     0,   627,   630,   631,   636,   622,   640,
+     635,   624,   625,   626,     4,     0,   675,   677,     0,   671,
+     674,   676,   695,     0,   164,     0,     0,     0,   696,    30,
+     673,   698,   634,   634,   634,   411,     0,   142,   177,   406,
+       0,   481,   279,   279,     0,   312,   481,   326,   327,    32,
+       0,     0,     3,   158,   159,     0,   553,   554,     0,   538,
+     537,     0,   535,     0,   536,   216,   542,   157,   156,   486,
+       0,     0,     0,   496,   499,     0,     0,   506,   510,   514,
+     518,   508,   512,   516,   520,   522,   524,   526,   527,     0,
+      41,   274,   278,   377,    62,     0,    60,    38,    47,    56,
+     481,    58,     0,     0,   107,     0,   119,   122,     0,   111,
+     407,   481,   481,     0,   250,   251,     0,   670,   236,     0,
+     262,   406,     0,   245,   255,     0,     0,   406,     0,   481,
+     404,   398,   478,   288,   219,     0,   232,   284,   313,     0,
+     307,   197,   192,   271,   276,     0,   270,   285,   304,   477,
+     634,   647,   634,     0,    31,    29,   697,   165,   163,     0,
+       0,     0,   427,   426,   425,     0,   177,   279,   420,   424,
+     179,   180,   177,     0,     0,     0,     0,   137,   141,   144,
+     139,   111,     0,     0,   136,   279,   147,   307,    35,     4,
+       0,   541,     0,     0,   540,   539,   531,   532,     0,   489,
+     493,   495,     0,     0,   502,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   529,    65,    66,    67,
+      44,   481,     0,   101,   102,   103,    99,    49,    92,    97,
+     177,    45,    54,   481,   110,   121,   123,   118,   104,     0,
+     325,     0,   177,     0,   481,   261,   256,   257,     0,   340,
+     219,     0,   652,   653,   654,   650,   651,   646,   649,   345,
+      42,    40,   108,   111,   399,   232,   214,   225,   223,   221,
+     229,   234,     0,   220,   227,   228,   218,   233,   318,   315,
+     316,     0,   242,   279,   621,   618,   619,   268,   614,   616,
+     617,   290,   476,     0,     0,     0,   485,   167,   428,   429,
+     430,   422,   305,   168,   481,   419,   376,   171,   174,   665,
+     667,   663,   138,   140,   143,   255,    34,   177,   533,   534,
+       0,     0,   497,     0,     0,   505,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   530,     0,     0,    64,
+       0,   100,   481,    98,     0,    94,     0,    55,   120,     0,
+     672,     0,   127,   252,   253,   240,   209,   258,   177,   232,
+     481,   645,   106,   213,   255,     0,     0,   224,   230,   231,
+     226,   321,   317,   310,   311,   309,   308,   255,   277,     0,
+     615,   291,   286,   294,     0,   644,   669,   643,   648,   659,
+     166,   376,   290,   306,   181,   177,   421,   181,   177,     0,
+       0,   487,   490,     0,   500,   503,   507,   511,   515,   519,
+     509,   513,   517,   521,     0,     0,   528,     0,   389,     0,
+       0,    83,    79,    70,    76,    63,    78,    72,    71,    75,
+      73,    68,    69,     0,    77,     0,   202,   203,    74,     0,
+     323,     0,     0,   177,    80,   177,     0,   177,    46,   124,
+     126,   125,   239,   219,   260,   262,   263,   246,   248,     0,
+       0,   222,     0,   415,   235,   279,     0,     0,     0,   620,
+     255,   661,   423,   281,   183,   169,   182,   301,     0,   177,
+     172,   175,   148,   160,     0,   672,     0,     0,     0,    90,
+     481,    88,     0,     0,     0,     0,   177,    81,    84,    86,
+      87,     0,    85,     0,   198,    82,   481,   204,     0,     0,
+      95,    93,    96,     0,   232,   259,   265,   655,   481,   417,
+     376,   414,   481,   322,   481,     0,     0,   282,   302,   181,
+     295,   491,     0,   504,   523,   525,     0,   481,    89,     0,
+      91,   481,     0,     0,     0,   481,   201,     0,   210,   264,
+     215,   376,   416,   319,   243,   481,   184,   185,   290,   176,
+     149,   498,   670,   672,   406,   130,     0,   481,     0,   199,
+       0,   670,   418,   292,   186,   283,   297,   296,     0,   300,
+       0,     0,     0,    59,     0,   406,   131,   200,     0,   295,
+     298,   299,   672,   133,   128,    59,     0,   241,   293,     0,
+     129,   132
+};
+
+/* YYPDEFGOTO[NTERM-NUM].  */
+static const short int yydefgoto[] =
+{
+      -1,     1,     2,     4,    88,   356,    90,    91,    92,   461,
+      93,    94,    95,   358,    97,   349,    98,   926,   675,   375,
+     509,   510,   678,   674,   801,   802,  1005,  1079,  1007,   807,
+     808,   924,   920,   809,   100,   101,   102,   516,   103,   359,
+     519,   688,   685,   686,   929,   360,   931,  1071,  1145,   105,
+     106,   616,   624,   617,   454,   455,   895,  1110,   456,   107,
+     320,   108,   361,   770,   362,   436,   603,   877,   604,   605,
+     974,   606,   977,   607,   978,  1109,   882,   752,  1055,  1056,
+    1106,  1136,   363,   112,   113,   114,  1082,  1015,  1016,   116,
+     528,  1033,   117,   546,   714,   547,   944,   548,   118,   550,
+     716,   853,   945,   854,   855,   856,   857,   946,   369,   370,
+    1032,   551,   957,  1017,   531,   830,   383,   704,   526,   694,
+     695,   699,   700,   826,  1035,   827,   828,  1096,   557,   558,
+     725,   559,   119,   414,   500,   555,   863,   501,   502,   883,
+    1138,   415,   871,   416,   545,   962,  1050,  1169,  1140,  1058,
+     562,   972,   552,   956,   717,   963,   719,   859,   860,   951,
+    1046,  1047,   810,   121,   282,   283,   530,   124,   125,   126,
+     284,   536,   285,   268,   129,   130,   348,   503,   376,   132,
+     133,   134,   135,   712,  1076,   137,   426,   544,   138,   139,
+     269,  1044,  1045,  1100,  1131,   746,   747,   886,   971,   748,
+     140,   141,   142,   421,   422,   423,   424,   729,   713,   425,
+     690,   143,   145,   583,   144,   778,   478,   901,  1064,   479,
+     480,   782,   983,   783,   483,   904,  1066,   786,   790,   787,
+     791,   788,   792,   789,   793,   794,   795,   917,   645,   584,
+     585,   586,   867,   868,   959,   587,   588,   429,   589,   590,
+     968,   705,   874,   836,   837,   870,   941,   437,   591,   732,
+     730,   592,   614,   612,   613,   593,   731,   432,   439,   599,
+     600,   601,   264,   265,   266,   267
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+   STATE-NUM.  */
+#define YYPACT_NINF -1028
+static const short int yypact[] =
+{
+   -1028,   108,   115, -1028, -1028,  6791,   217,   221,   231,   247,
+     250,   288,   291,   -71,   -29,   -12, -1028, -1028, -1028, -1028,
+     285, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+     129, -1028,  4328, -1028, -1028,  8663,   173,  7489, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028,   148,   150,   192,   246,   269,   273,
+     292,   300,   304,   329,   342,   -51,   -10,    20,   128,   135,
+     143,   185,   209,   214,   218,   222,   230,   254,   284,   289,
+     299,   306,   314,   326,   354,   358, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028,   113, -1028, -1028, -1028, -1028, -1028, -1028,
+    8336, -1028,   164,   164,   164,   164, -1028,   375,  8663, -1028,
+     123, -1028,   341,  1951,  9036,   437,  7756,   166,   196, -1028,
+       7,  8445, -1028, -1028, -1028, -1028,   256,   140, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,   383,  4790,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028,    15, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,    55,  7756,
+      -7,    -3,     4,    28,   152,   162,   179,   511, -1028, -1028,
+   -1028, -1028, -1028,  7778,   437,   437,  8663,   256, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028,   395,    -7,    -3,     4,
+      28,   152,   162,   179, -1028, -1028, -1028,  7756,  7756, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+     400,   406, -1028,  1951,  7756,   437,   437,  6747, -1028, -1028,
+   -1028,  6747,  6747, -1028,  6747,  6747,  6747,  6747,  6747,  6747,
+    6747,  6747,  6747,  6747,  6747,  6747,  6747,  6747,  8191,   407,
+    8001,  8191, -1028,  7424,   403,  7756, -1028, -1028, -1028, -1028,
+   -1028, -1028,  8336, -1028,  8554,   463,   409, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028,  8663, -1028, -1028,   525,
+   -1028, -1028, -1028, -1028,   410,   437,   437,   437, -1028, -1028,
+   -1028, -1028,     7, -1028, -1028, -1028, -1028,   525, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028,  1951, -1028, -1028,   525,
+   -1028, -1028, -1028,  7826, -1028,   158,    74, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028,   366, -1028,   525,   525,  5714,
+   -1028, -1028,  2172,  2326, -1028, -1028,   228, -1028,  2480,  3558,
+    2634, -1028, -1028, -1028, -1028, -1028, -1028,  8219,  8110,  8219,
+    7598, -1028, -1028, -1028, -1028, -1028, -1028,  7890, -1028,  2788,
+     412,   416, -1028,   428, -1028,    57, -1028, -1028,  6638,  1951,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028,   425,  6747,  6747,
+    6747,   426,   427,  6747,   429,   432,   433,   436,   438,   442,
+     443,   445,   447,   448,   449,   450,   452,   451, -1028, -1028,
+     460, -1028,   256, -1028, -1028, -1028, -1028, -1028, -1028,    54,
+   -1028,  9011,   649,   437,   437,   464,  6747, -1028, -1028, -1028,
+     206, -1028,  7644,  8554,  7826,  7756,   444,  2942,   461,  8990,
+     676,   409, -1028, -1028, -1028, -1028, -1028,  8191,  8110,  8191,
+    7598, -1028, -1028,   525, -1028,   499, -1028, -1028, -1028,  1610,
+   -1028, -1028,   458, -1028,  1951,   122, -1028, -1028, -1028,   468,
+    7890, -1028,   467,   256,   525,   525,   525, -1028, -1028,  1417,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028,   466, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028,   481,  3712, -1028, -1028,   474, -1028,
+   -1028, -1028, -1028,   181, -1028,  8772,    77,   576, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028,   525,   488, -1028,   256,    64,
+     489,   189,  8219,  8219,   183,   239, -1028, -1028, -1028, -1028,
+     490,   437, -1028, -1028, -1028,   623,   484,   485,    27, -1028,
+   -1028,   495, -1028,   486, -1028, -1028, -1028, -1028, -1028, -1028,
+     492,   496,   497, -1028, -1028,   501,  8663, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,  7756,
+   -1028,   502, -1028,   525,    67,  7378, -1028, -1028,   504,   525,
+   -1028,   437,   437,  9011, -1028,   335, -1028,   506,  8663,   510,
+     525, -1028, -1028,  1951,   508, -1028,    65, -1028, -1028,   518,
+     562, -1028,   437, -1028,   461,  5868,   515,    84,   526,   206,
+    1417, -1028,   499, -1028, -1028,    70,   117, -1028, -1028,   519,
+     109, -1028, -1028, -1028, -1028,  6176, -1028, -1028, -1028,   499,
+   -1028, -1028, -1028,   521, -1028, -1028, -1028, -1028, -1028,  7756,
+    7756,  7756, -1028,   437,   437,  8663,   256,   140, -1028, -1028,
+   -1028, -1028,   256,   638,  4944,  5098,  5252, -1028,   527, -1028,
+   -1028, -1028,   533,   534, -1028,   140, -1028,    78, -1028,   535,
+    8663, -1028,   528,   529, -1028, -1028, -1028, -1028,  8663, -1028,
+   -1028, -1028,  8663,  8663, -1028,   546,  8663,  8663,  8663,  8663,
+    8663,  8663,  8663,  8663,  8663,  8663,   530, -1028, -1028, -1028,
+   -1028, -1028,   536, -1028, -1028, -1028,   382,   537, -1028,   653,
+     463, -1028,   525, -1028, -1028,  6747, -1028, -1028, -1028,    83,
+     324,  7756,   463,  3096, -1028, -1028,   551, -1028,  8663, -1028,
+   -1028,   552, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028,   560, -1028,   117, -1028, -1028, -1028, -1028,
+   -1028, -1028,    89, -1028,    55, -1028, -1028, -1028, -1028,   519,
+   -1028,   514, -1028,   140, -1028,  6022, -1028,  6176, -1028, -1028,
+   -1028,   345, -1028,  5406,  4482,  5560, -1028,   228, -1028, -1028,
+   -1028, -1028,  7890, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028,   461, -1028,   256, -1028, -1028,
+     554,  8663, -1028,   555,  8663, -1028,   557,   559,   561,   563,
+     564,   565,   566,   567,   570,   571, -1028,   572,  1787, -1028,
+    7756, -1028, -1028, -1028,  7756, -1028,  7378,   525, -1028,  6176,
+   -1028,   569, -1028, -1028, -1028, -1028,   525,   632,   256,   117,
+   -1028, -1028, -1028, -1028,   461,    55,  8881, -1028, -1028, -1028,
+   -1028,   574, -1028, -1028, -1028, -1028, -1028,   461, -1028,  6484,
+   -1028, -1028, -1028, -1028,   575, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028,   345, -1028,   584,    50,  1417,   584,   256,   581,
+     589, -1028, -1028,   585, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028,   713,   714, -1028,  7038,   226,  7709,
+      65, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028,  6923, -1028,   164, -1028, -1028, -1028,   595,
+     410,  1951,  7153,   256, -1028,   463,  1981,   463,   537,  6176,
+    4636, -1028,   684, -1028, -1028, -1028, -1028, -1028,   525,  5868,
+     590, -1028,  8881, -1028, -1028,   140,   588,  6176,   592, -1028,
+     461, -1028,  1417, -1028, -1028, -1028, -1028, -1028,   598,   256,
+   -1028, -1028, -1028, -1028,   600, -1028,   602,   604,   606, -1028,
+   -1028, -1028,   805,   164,   410,  7268,   463, -1028, -1028, -1028,
+   -1028,  6923, -1028,  7268, -1028, -1028, -1028, -1028,  1951,  7826,
+   -1028, -1028, -1028,    65,   117, -1028,   158, -1028, -1028, -1028,
+   -1028, -1028, -1028,  6176, -1028,   607,  6330, -1028, -1028,   584,
+   -1028, -1028,  3866, -1028, -1028, -1028,  7936, -1028, -1028,   805,
+   -1028, -1028,  7826,  7268,    90, -1028, -1028,   614, -1028, -1028,
+     525, -1028,  1417,   525,   525, -1028,  6330, -1028,   345, -1028,
+     434, -1028, -1028, -1028,    95, -1028,  7936, -1028,  8072, -1028,
+      93, -1028,  1417,   525, -1028, -1028, -1028, -1028,    65,    65,
+    3250,  4020,   373,    56,  8072,   107, -1028, -1028,  3404, -1028,
+   -1028, -1028, -1028, -1028, -1028,    59,   373, -1028,   434,  4174,
+   -1028, -1028
+};
+
+/* YYPGOTO[NTERM-NUM].  */
+static const short int yypgoto[] =
+{
+   -1028, -1028,  -401, -1028, -1028,   745,  -167, -1028, -1028, -1028,
+   -1028,  -847,   -99,    -2,   -31, -1028, -1028, -1028, -1028,    21,
+    -404,  -107,  -828, -1028, -1028, -1028, -1028,  -166, -1028,  -173,
+    -272, -1028, -1028,   -49,  -163,  -159,   -27, -1028, -1028,    11,
+    -483, -1028, -1028,   -54, -1028, -1028, -1028,  -309,  -771,  -156,
+    -119,  -409,   147,     0, -1028, -1028, -1028, -1028,   149,  -152,
+   -1028, -1028,    18, -1028,    25, -1028, -1028, -1028,  -109, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028,   405, -1028,  -923, -1028,
+   -1028, -1028,   766, -1028, -1028, -1028,  -145,  -218,    26,  -121,
+   -1028, -1028,  -268,  -502, -1028, -1028, -1028,  -310,  -296,  -526,
+    -690, -1028, -1028, -1028, -1028,  -802, -1028, -1028,   -80, -1028,
+   -1028, -1028, -1028,  -117, -1028, -1028, -1028, -1028,   249, -1028,
+     -40,  -684, -1028, -1028, -1028,  -253, -1028, -1028,  -313, -1028,
+   -1028, -1028,  -131,   287,  -302,   293, -1028,   -73,  -136,  -713,
+   -1028,  -251, -1028,  -699, -1028,  -930, -1028, -1028,  -374, -1028,
+   -1028, -1028,  -432, -1028, -1028,  -478, -1028, -1028,   -63, -1028,
+   -1028, -1028,  1119,  1082,  1110,    14, -1028, -1028,   -32,   700,
+      -5, -1028,    45, -1028,   930,   -21,   397, -1028,    94,   998,
+   -1028, -1028,  -497, -1028,   943,   110, -1028, -1028,  -124,  -876,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+     195,    51,   440,  -402,   376, -1028,   377, -1028,    75, -1028,
+     493, -1028, -1028, -1028,  -115, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
+   -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,     9,
+     121,   174,  -835,  -822, -1028,  -633,  -151,  -458, -1028,   -65,
+   -1028,  -130, -1028, -1027, -1028,  -683, -1028,  -582, -1028, -1028,
+   -1028,  -259, -1028, -1028, -1028,   251, -1028,  -181,  -426, -1028,
+    -421,    36,    -8, -1028,  -658, -1028
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
+   positive, shift that token.  If negative, reduce the rule which
+   number is the opposite.  If zero, do what YYDEFACT says.
+   If YYTABLE_NINF, syntax error.  */
+#define YYTABLE_NINF -655
+static const short int yytable[] =
+{
+     127,   420,   381,    96,   278,   595,   382,   408,   280,   444,
+     405,   357,   404,   467,   563,   296,   104,   388,   610,   123,
+     831,   738,   838,   109,   845,   625,    99,   468,   722,   594,
+     110,   115,   325,   371,   372,   373,   458,   689,   822,   887,
+     620,   260,  1053,   943,   619,   960,   281,   884,   711,   515,
+     128,   323,   721,   884,  1060,   466,   279,   676,   433,   676,
+     410,   411,   676,  -357,   438,   441,   442,   676,   263,  -357,
+    1043,  1003,   835,    16,   718,   157,   158,  -369,   434,  1137,
+      16,  -371,   326,   258,   410,   411,   440,   676,  -370,   327,
+     774,   385,   869,    16,  1029,   797,   798,   799,   676,   131,
+     400,    16,   750,   392,   402,  -356,    16,   947,     3,  1154,
+     676,  -356,  -374,    16,   459,    -2,    16,   549,   386,   389,
+     847,   325,  -355,   839,   123,   701,   751,   417,  -355,   286,
+     328,    99,    16,   412,   707,  -369,   115,  1037,   761,  -371,
+     939,   148,   403,   948,   949,   406,  -370,   718,   848,   399,
+    1069,   417,   401,   261,   754,   755,   756,   412,   260,   648,
+     329,   849,   408,   435,   850,   561,  1099,   722,   387,   390,
+    -374,   326,   149,   468,   610,   775,   288,   289,   290,   291,
+     292,   293,   294,   851,   980,   431,  1139,   527,   677,   -59,
+     677,   721,   -59,   841,   634,   443,   418,   419,   884,   -59,
+     258,   647,   -59,   800,   364,   243,   262,   960,  1155,   366,
+     846,   979,  1103,   762,   763,   844,   861,   417,   841,   -59,
+     418,   419,   -59,   862,  1149,  1036,   843,  1167,   549,   677,
+     -59,   769,   711,   -59,   869,   706,  -375,   708,   446,   884,
+     408,   841,   -59,   405,   434,   -59,  -373,   861,   352,   862,
+      38,   385,   408,  -170,   852,   452,   723,   378,   549,   453,
+    1040,   724,  1057,  -372,   325,  1061,   410,   411,   330,   149,
+     261,  -173,   873,  1048,   875,   331,   884,  -170,   386,   884,
+      38,   960,  -368,   332,  -358,   541,   418,   419,  -368,   542,
+    -358,   385,  1128,  -269,  -375,   556,   869,   281,   367,   368,
+    -326,  -369,   325,   325,  -373,  -371,  -326,   279,   295,   146,
+     147,   618,   728,   618,   326,  -370,  1162,   764,   386,   325,
+     737,  -372,   765,   262,  -116,   333,  -359,   518,   387,   435,
+    -327,  -374,  -359,   400,  -375,  1162,  -327,  1176,   469,   412,
+    -116,  -116,  1077,  1094,   518,   513,  1108,  1176,   325,   334,
+     325,  -350,   326,   326,   335,  -348,   838,  -350,   336,  -369,
+     884,  -348,   337,  -371,   511,  -349,  1105,   458,   387,   326,
+     338,  -349,  -373,  -370,   385,  -372,   123,  1166,   406,   766,
+    -360,  -353,  -314,   279,  -354,   401,  -360,  -353,   115,  -374,
+    -354,  1174,  -375,  1166,   339,   514,   869,   549,   326,   408,
+     326,   386,   405,  -361,   680,  1180,   835,  -362,   325,  -361,
+     803,   804,   805,  -362,   869,   288,   289,   290,   291,   292,
+     293,   294,  -352,   838,   340,  -351,  -363,   554,  -352,   341,
+    -373,  -351,  -363,  -372,  -364,  1127,   392,   385,  -365,   342,
+    -364,   260,   260,   513,  -365,   325,   343,   260,   260,   260,
+     973,   387,   627,   838,   344,   631,   523,  1097,   326,   239,
+      33,   930,   511,  -366,   386,  1156,   345,  1157,   260,  -366,
+     869,   814,   259,   835,   815,  -324,  -367,   646,  1158,   385,
+     581,  1159,  -367,   258,   258,   961,   618,   618,  -314,   258,
+     258,   258,   400,   514,   346,   326,    38,     5,   347,   351,
+    1170,  1171,   628,   835,  1030,   514,   681,   631,  1142,   392,
+     258,  1143,   418,   419,   387,   374,   823,   325,   430,   325,
+     325,    38,   385,   446,   513,   702,   683,   953,   954,   955,
+      21,    22,   460,   513,   464,   325,   260,   406,   693,   392,
+    -152,   413,   506,   511,   279,   244,   412,   525,    16,   386,
+     532,   632,   511,   261,   261,   627,   682,   514,   646,   261,
+     261,   261,   633,  1126,   649,   653,   654,   326,   656,   326,
+     326,   657,   658,  1059,   514,   659,   813,   660,   258,   697,
+     261,   661,   662,   514,   663,   326,   664,   665,   666,   259,
+     669,   667,   350,   668,   670,   950,  1126,   353,   684,   387,
+     743,  -314,  -254,   573,   260,   628,   262,   262,   727,   610,
+     733,   885,   262,   262,   262,   379,   741,   734,   736,   354,
+     397,   881,   757,   760,   768,   409,   771,   772,   773,   618,
+     777,   779,   753,   262,   427,   428,   776,   780,   781,  1112,
+     784,   724,   811,   816,   818,   825,   258,   821,   261,   840,
+     744,   385,   288,   289,   290,   291,   292,   293,   294,   824,
+     842,   385,   858,   888,   325,   876,   765,   892,   893,   916,
+     325,   896,   898,   899,   919,   447,   922,   449,   681,   288,
+     289,   290,   291,   292,   293,   294,  1041,   905,   386,   923,
+     937,   610,   457,   940,   942,   981,   984,    33,   986,   745,
+     987,   262,   988,  1031,   989,   990,   991,   992,   993,   994,
+     995,  1086,  1144,   996,   326,  1034,   261,  1161,  -320,  1051,
+     326,  1054,  1062,  1063,  1065,   549,  1067,  1068,   682,  1085,
+    1093,  1098,  1102,  1104,   325,   325,   325,   324,   387,  1107,
+     610,  1111,  1163,  1113,  1165,  1114,  1179,  1115,  1135,  1151,
+      89,  1002,  1006,  1028,  1091,  1008,   581,   921,   610,  1009,
+    1175,   928,  1010,  1118,   758,   894,  1011,   759,   970,   262,
+     524,   111,   448,  1014,   450,   379,   581,   397,  1125,  1073,
+     703,   933,  1095,  1129,   326,   326,   326,  1018,   505,   672,
+     958,   505,   549,   549,   671,  1178,   952,   537,   817,   539,
+     749,   567,   568,  1024,   872,   581,   581,   581,  1049,   967,
+     726,  1039,   932,     0,   465,     0,   325,     0,     0,     0,
+       0,   560,     0,   569,     0,   393,   549,   396,   398,    17,
+      18,    19,   260,     0,     0,     0,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,     0,   277,     0,     0,   622,
+     623,     0,   522,     0,     0,     0,     0,     0,     0,     0,
+       0,   392,     0,     0,     0,     0,   326,     0,   529,   582,
+       0,     0,   259,   259,   258,     0,     0,   627,   259,   259,
+     259,     0,     0,     0,     0,     0,     0,   505,     0,   505,
+       0,     0,     0,     0,   538,     0,   540,     0,   408,   259,
+     543,   405,     0,   404,     0,  1087,     0,   560,     0,  1101,
+     564,   565,   566,   127,   357,   325,  1004,     0,   581,   325,
+       0,   325,     0,     0,   581,   581,   581,   628,     0,   104,
+       0,     0,  1021,     0,     0,  1084,  1012,     0,   615,    99,
+       0,   710,     0,  1013,   261,     0,     0,     0,   136,     0,
+       0,   408,     0,     0,   405,     0,     0,     0,  1087,   408,
+       0,  1160,   405,   128,     0,   326,  1087,   259,   560,   326,
+    1168,   326,     0,   357,     0,     0,     0,   505,   287,   505,
+     581,     0,     0,     0,   396,   398,     0,     0,     0,   385,
+       0,   400,   127,  1120,   325,   402,   673,   262,     0,   408,
+       0,     0,   405,   679,     0,     0,  1087,     0,   127,   505,
+     581,  1078,  1022,   323,   465,     0,   386,   127,  1070,     0,
+       0,   325,  1072,   457,     0,   396,   398,  1021,     0,     0,
+       0,  1080,     0,   403,    99,   259,  1088,     0,  1081,   260,
+    1042,   715,   128,   401,   326,     0,   720,     0,     0,     0,
+     512,     0,   400,   365,   391,     0,   385,     0,   128,     0,
+       0,   377,   505,   505,     0,     0,   387,   128,   392,     0,
+     127,   326,     0,     0,     0,     0,   127,     0,   127,  1078,
+     581,   258,     0,   386,   627,   533,   534,   535,     0,     0,
+     581,  1075,   400,  1117,     0,  1021,  1121,  1088,   581,  1080,
+       0,   392,   279,     0,   401,     0,  1081,  1083,     0,     0,
+       0,   513,     0,     0,     0,   122,     0,   627,   127,   767,
+     128,   260,     0,     0,   120,     0,   128,     0,   128,   407,
+     511,     0,     0,   387,   628,     0,     0,  1088,     0,     0,
+    1147,   513,     0,   513,   279,   582,     0,   322,   512,     0,
+     505,   261,     0,     0,   581,     0,   321,   581,     0,   513,
+     511,   514,   511,   258,     0,   582,  1119,   628,   128,   260,
+     260,     0,     0,   812,     0,  1123,     0,   260,   511,     0,
+       0,     0,     0,     0,     0,   819,     0,   581,   260,     0,
+       0,   514,     0,   514,   582,   582,   582,     0,     0,     0,
+       0,     0,     0,     0,   262,   384,     0,     0,   394,   514,
+       0,   258,   258,   396,   398,   925,     0,     0,     0,   258,
+       0,     0,     0,     0,     0,     0,     0,   934,     0,   512,
+     258,     0,     0,   261,     0,     0,   395,     0,   512,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   477,     0,     0,
+       0,   481,   482,   259,   484,   485,   486,   487,   488,   489,
+     490,   491,   492,   493,   494,   495,   496,   497,     0,     0,
+     391,   261,   261,   976,   407,     0,   262,     0,     0,   261,
+       0,     0,     0,     0,   918,     0,     0,     0,     0,     0,
+     261,     0,     0,     0,     0,   365,   927,   582,     0,     0,
+       0,     0,     0,   582,   582,   582,     0,   936,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   396,     0,     0,   262,   262,     0,     0,     0,     0,
+       0,     0,   262,     0,     0,     0,   504,     0,     0,   504,
+       0,     0,     0,   262,     0,     0,     0,     0,     0,     0,
+       0,     0,   407,     0,     0,   451,     0,     0,  1052,   582,
+       0,     0,     0,     0,   407,     0,     0,   975,   391,   322,
+       0,   534,   535,     0,     0,     0,     0,     0,   445,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   582,
+       0,     0,   829,     0,     0,   451,   394,     0,   650,   651,
+     652,   377,     0,   655,     0,  1026,   505,   322,   322,     0,
+       0,     0,     0,     0,     0,     0,   462,   463,  1089,     0,
+    1090,     0,  1092,  1038,   395,     0,     0,     0,     0,     0,
+       0,   391,     0,   396,   398,   504,   687,   504,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,   498,   277,   391,
+       0,     0,     0,   322,     0,   322,     0,   499,   391,   582,
+     259,     0,   520,     0,   521,     0,     0,     0,     0,   582,
+       0,  1122,     0,     0,     0,     0,     0,   582,   384,     0,
+       0,     0,   505,     0,     0,   553,     0,  1132,     0,     0,
+       0,     0,     0,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,     0,     0,
+       0,   407,     0,     0,     0,     0,     0,     0,  1152,     0,
+       0,     0,     0,     0,     0,   504,     0,   504,     0,   626,
+       0,     0,     0,   582,     0,     0,   582,     0,     0,     0,
+       0,   451,   259,     0,     0,     0,     0,     0,     0,     0,
+     322,     0,     0,  1116,     0,     0,     0,   504,     0,   621,
+     630,     0,   505,     0,     0,     0,   582,     0,     0,  1124,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,  1130,   505,     0,     0,  1133,     0,  1134,     0,   785,
+     259,   259,     0,     0,     0,     0,   692,     0,   259,     0,
+    1146,     0,     0,   391,  1148,     0,     0,     0,  1150,   259,
+     504,   504,   635,   820,     0,     0,     0,     0,  1153,     0,
+       0,     0,   322,     0,     0,   322,   692,     0,     0,     0,
+    1164,   691,   626,     0,   696,     0,     0,     0,     0,     0,
+     322,     0,     0,     0,     0,     0,     0,     0,     0,   709,
+       0,     0,     0,   636,   637,     0,     0,     0,     0,     0,
+     202,   203,   204,   638,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,     0,     0,     0,     0,     0,     0,   324,
+       0,     0,     0,     0,     0,     0,     0,     0,   504,     0,
+       0,     0,     0,   897,     0,   742,     0,     0,     0,     0,
+       0,   900,     0,     0,     0,   902,   903,     0,     0,   906,
+     907,   908,   909,   910,   911,   912,   913,   914,   915,     0,
+       0,     0,     0,   407,     0,   687,     0,   639,     0,   640,
+     641,     0,   642,   643,     0,   246,   247,   248,   644,   250,
+     251,   252,   253,   254,   255,   256,     0,     0,     0,     0,
+       0,   938,     0,     0,     0,   692,     0,     0,     0,   322,
+       0,     0,     0,     0,     0,   322,     0,     0,   796,     0,
+       6,     7,     8,     9,    10,    11,    12,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    13,    14,    15,
+      16,    17,    18,    19,    20,     0,   512,     0,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,   997,   998,    31,
+      32,     0,     0,     0,     0,    33,    34,    35,     0,   999,
+       0,     0,     0,     0,   982,     0,   512,   985,   512,   322,
+     322,   322,     0,     0,     0,     0,     0,     0,   878,   879,
+     880,  1023,     0,     0,   512,     0,     0,     0,     0,     0,
+       0,    38,     0,    39,    40,    41,    42,    43,    44,    45,
+      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+    1000,  1001,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   322,    87,     0,     0,     0,     0,     0,     0,     0,
+     696,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   297,   298,   299,   300,   301,   302,
+     303,     0,     0,     0,   626,     0,     0,     0,     0,     0,
+       0,   304,   305,   306,   504,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   297,   298,   299,   300,   301,   302,
+     303,     0,     0,    31,   380,     0,     0,     0,     0,    33,
+    1020,   304,   305,   306,    16,     0,     0,     0,     0,   803,
+     804,   805,     0,     0,     0,     0,     0,   806,     0,     0,
+     407,     0,     0,     0,     0,     0,     0,     0,   122,    33,
+     322,     0,     0,     0,   322,     0,   322,  1019,     0,  1025,
+     407,     0,     0,  1027,     0,     0,   391,     0,     0,     0,
+     504,     0,   309,   310,   311,   312,   313,   314,   315,   316,
+     317,   318,   319,     0,     0,    38,     0,     0,     0,     0,
+       0,     0,     0,   407,     0,     0,   391,     0,   391,  1074,
+       0,   407,   309,   310,   311,   312,   313,   314,   315,   316,
+     317,   318,   319,     0,   391,  1074,    87,     0,     0,     0,
+       0,     0,     0,   451,  1074,     0,     0,     0,     0,   322,
+       0,     0,     0,     0,     0,     0,     0,   407,   321,     0,
+       0,   407,     0,     0,     0,     0,    87,     0,     0,     0,
+     504,     0,     0,     0,     0,     0,   322,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     504,     0,     0,     0,     0,     0,     0,  1074,     0,     0,
+       0,     0,     0,  1074,     0,  1074,     0,     0,     0,     0,
+     451,   553,     0,     0,     0,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,   692,  1074,   179,   180,   181,   182,
+     183,   184,     0,   185,   186,   187,   188,     0,     0,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,   225,   226,   227,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   596,   239,     0,   240,
+     241,   242,   243,     0,   597,   245,   598,   246,   247,   248,
+     249,   250,   251,   252,   253,   254,   255,   256,   257,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
+     226,   227,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     596,   239,   602,   240,   241,   242,   243,     0,   597,   245,
+       0,   246,   247,   248,   249,   250,   251,   252,   253,   254,
+     255,   256,   257,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,   225,   226,   227,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   596,   239,     0,   240,   241,   242,
+     243,     0,   597,   245,   608,   246,   247,   248,   249,   250,
+     251,   252,   253,   254,   255,   256,   257,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   596,   239,
+       0,   240,   241,   242,   243,   611,   597,   245,     0,   246,
+     247,   248,   249,   250,   251,   252,   253,   254,   255,   256,
+     257,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+       0,     0,   179,   180,   181,   182,   183,   184,     0,   185,
+     186,   187,   188,     0,     0,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,   225,   226,   227,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   596,   239,   629,   240,   241,   242,   243,     0,
+     597,   245,     0,   246,   247,   248,   249,   250,   251,   252,
+     253,   254,   255,   256,   257,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,     0,     0,   179,   180,   181,   182,
+     183,   184,     0,   185,   186,   187,   188,     0,     0,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,   225,   226,   227,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   596,   239,   698,   240,
+     241,   242,   243,     0,   597,   245,     0,   246,   247,   248,
+     249,   250,   251,   252,   253,   254,   255,   256,   257,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
+     226,   227,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     596,   239,   935,   240,   241,   242,   243,     0,   597,   245,
+       0,   246,   247,   248,   249,   250,   251,   252,   253,   254,
+     255,   256,   257,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,   225,   226,   227,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   596,   239,  1172,   240,   241,   242,
+     243,     0,   597,   245,     0,   246,   247,   248,   249,   250,
+     251,   252,   253,   254,   255,   256,   257,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   596,   239,
+    1177,   240,   241,   242,   243,     0,   597,   245,     0,   246,
+     247,   248,   249,   250,   251,   252,   253,   254,   255,   256,
+     257,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+       0,     0,   179,   180,   181,   182,   183,   184,     0,   185,
+     186,   187,   188,     0,     0,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,   225,   226,   227,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   609,   239,     0,   240,   241,   242,   243,     0,
+     597,   245,     0,   246,   247,   248,   249,   250,   251,   252,
+     253,   254,   255,   256,   257,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   170,   171,   172,   173,   174,
+     175,   176,   177,   178,     0,     0,   179,   180,   181,   182,
+     183,   184,     0,   185,   186,   187,   188,     0,     0,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   205,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,   225,   226,   227,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   735,   239,     0,   240,
+     241,   242,   243,     0,   597,   245,     0,   246,   247,   248,
+     249,   250,   251,   252,   253,   254,   255,   256,   257,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
+     226,   227,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   239,     0,   240,   241,   242,   243,  1141,   597,   245,
+       0,   246,   247,   248,   249,   250,   251,   252,   253,   254,
+     255,   256,   257,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,   225,   226,   227,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,  1173,   239,     0,   240,   241,   242,
+     243,     0,   597,   245,     0,   246,   247,   248,   249,   250,
+     251,   252,   253,   254,   255,   256,   257,   150,   151,   152,
+     153,   154,   155,   156,   157,   158,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   170,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,   225,   226,   227,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,  1181,   239,
+       0,   240,   241,   242,   243,     0,   597,   245,     0,   246,
+     247,   248,   249,   250,   251,   252,   253,   254,   255,   256,
+     257,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+       0,     0,   179,   180,   181,   182,   183,   184,     0,   185,
+     186,   187,   188,     0,     0,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   205,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,   225,   226,   227,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   239,     0,   240,   241,   242,   243,     0,
+     244,   245,     0,   246,   247,   248,   249,   250,   251,   252,
+     253,   254,   255,   256,   257,   150,   151,   152,   153,   154,
+     155,   156,   441,   442,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   570,   171,   172,   173,   174,
+     175,   176,   177,   178,     0,     0,   179,   180,   181,   182,
+     183,   184,     0,   185,   186,   187,   188,     0,     0,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   571,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,     0,   572,     0,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   965,   573,   966,   574,
+     575,   576,   443,     0,   577,   578,     0,   246,   247,   248,
+     579,   250,   251,   252,   253,   254,   255,   256,   580,   150,
+     151,   152,   153,   154,   155,   156,   157,   158,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   205,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,   225,
+     226,   227,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   239,     0,   240,   241,   242,   243,     0,   597,   245,
+       0,   246,   247,   248,   249,   250,   251,   252,   253,   254,
+     255,   256,   257,   150,   151,   152,   153,   154,   155,   156,
+     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   170,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   205,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,   225,   226,   227,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   239,     0,   240,   241,   242,
+     243,     0,     0,   245,     0,   246,   247,   248,   249,   250,
+     251,   252,   253,   254,   255,   256,   257,   150,   151,   152,
+     153,   154,   155,   156,   441,   442,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   570,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   571,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,     0,   572,     0,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   573,
+       0,   574,   575,   576,   443,   889,   577,   578,     0,   246,
+     247,   248,   579,   250,   251,   252,   253,   254,   255,   256,
+     580,   150,   151,   152,   153,   154,   155,   156,   441,   442,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   570,   171,   172,   173,   174,   175,   176,   177,   178,
+       0,     0,   179,   180,   181,   182,   183,   184,     0,   185,
+     186,   187,   188,     0,     0,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   571,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,     0,   572,     0,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   573,     0,   574,   575,   576,   443,   890,
+     577,   578,     0,   246,   247,   248,   579,   250,   251,   252,
+     253,   254,   255,   256,   580,   150,   151,   152,   153,   154,
+     155,   156,   441,   442,   159,   160,   161,   162,   163,   164,
+     165,   166,   167,   168,   169,   570,   171,   172,   173,   174,
+     175,   176,   177,   178,     0,     0,   179,   180,   181,   182,
+     183,   184,     0,   185,   186,   187,   188,     0,     0,   189,
+     190,   191,   192,   193,   194,   195,   196,   197,   198,   199,
+     200,   201,   202,   203,   204,   571,   206,   207,   208,   209,
+     210,   211,   212,   213,   214,   215,   216,   217,   218,   219,
+     220,   221,   222,   223,   224,     0,   572,     0,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   573,     0,   574,
+     575,   576,   443,   891,   577,   578,     0,   246,   247,   248,
+     579,   250,   251,   252,   253,   254,   255,   256,   580,   150,
+     151,   152,   153,   154,   155,   156,   441,   442,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   570,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   571,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,     0,
+     572,     0,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   573,     0,   574,   575,   576,   443,     0,   577,   578,
+     964,   246,   247,   248,   579,   250,   251,   252,   253,   254,
+     255,   256,   580,   150,   151,   152,   153,   154,   155,   156,
+     441,   442,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   570,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,   571,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,     0,   572,     0,    39,    40,    41,    42,
+      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   573,     0,   574,   575,   576,
+     443,     0,   577,   578,   969,   246,   247,   248,   579,   250,
+     251,   252,   253,   254,   255,   256,   580,   150,   151,   152,
+     153,   154,   155,   156,   441,   442,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   570,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,   571,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,     0,   572,     0,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   573,
+       0,   574,   575,   576,   443,     0,   577,   578,     0,   246,
+     247,   248,   579,   250,   251,   252,   253,   254,   255,   256,
+     580,   150,   151,   152,   153,   154,   155,   156,   441,   442,
+     159,   160,   161,   162,   163,   164,   165,   166,   167,   168,
+     169,   570,   171,   172,   173,   174,   175,   176,   177,   178,
+       0,     0,   179,   180,   181,   182,   183,   184,     0,   185,
+     186,   187,   188,     0,     0,   189,   190,   191,   192,   193,
+     194,   195,   196,   197,   198,   199,   200,   201,   202,   203,
+     204,   434,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,     0,   572,     0,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   573,     0,   832,   575,   833,   443,     0,
+     834,   578,     0,   246,   247,   248,   435,   250,   251,   252,
+     253,   254,   255,   256,   580,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,     0,     0,  -618,  -618,  -618,  -618,
+    -618,  -618,     0,  -618,  -618,  -618,  -618,     0,     0,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,     0,  -618,     0,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,  -618,     0,  -654,
+    -618,  -618,  -618,     0,  -618,  -618,     0,  -618,  -618,  -618,
+    -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,  -618,   150,
+     151,   152,   153,   154,   155,   156,   441,   442,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   570,
+     171,   172,   173,   174,   175,   176,   177,   178,     0,     0,
+     179,   180,   181,   182,   183,   184,     0,   185,   186,   187,
+     188,     0,     0,   189,   190,   191,   192,   193,   194,   195,
+     196,   197,   198,   199,   200,   201,   202,   203,   204,   864,
+     206,   207,   208,   209,   210,   211,   212,   213,   214,   215,
+     216,   217,   218,   219,   220,   221,   222,   223,   224,     0,
+     572,     0,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   573,     0,     0,   575,     0,   443,     0,   865,   578,
+       0,   246,   247,   248,   866,   250,   251,   252,   253,   254,
+     255,   256,   580,   150,   151,   152,   153,   154,   155,   156,
+     441,   442,   159,   160,   161,   162,   163,   164,   165,   166,
+     167,   168,   169,   570,   171,   172,   173,   174,   175,   176,
+     177,   178,     0,     0,   179,   180,   181,   182,   183,   184,
+       0,   185,   186,   187,   188,     0,     0,   189,   190,   191,
+     192,   193,   194,   195,   196,   197,   198,   199,   200,   201,
+     202,   203,   204,     0,   206,   207,   208,   209,   210,   211,
+     212,   213,   214,   215,   216,   217,   218,   219,   220,   221,
+     222,   223,   224,     0,   572,     0,    39,    40,    41,    42,
       43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+      53,   228,   229,   230,   231,   232,   233,   234,   235,   236,
+     237,   238,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   573,     0,     0,   575,     0,
+     443,     0,   834,   578,     0,   246,   247,   248,     0,   250,
+     251,   252,   253,   254,   255,   256,   580,   150,   151,   152,
+     153,   154,   155,   156,   441,   442,   159,   160,   161,   162,
+     163,   164,   165,   166,   167,   168,   169,   570,   171,   172,
+     173,   174,   175,   176,   177,   178,     0,     0,   179,   180,
+     181,   182,   183,   184,     0,   185,   186,   187,   188,     0,
+       0,   189,   190,   191,   192,   193,   194,   195,   196,   197,
+     198,   199,   200,   201,   202,   203,   204,     0,   206,   207,
+     208,   209,   210,   211,   212,   213,   214,   215,   216,   217,
+     218,   219,   220,   221,   222,   223,   224,     0,     0,     0,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   573,
+       0,     0,   575,     0,   443,     0,     0,   578,     0,   246,
+     247,   248,     0,   250,   251,   252,   253,   254,   255,   256,
+     580,   270,   271,   272,   273,   274,   275,   276,     0,     0,
+     635,     0,     0,     0,     0,     0,     0,     0,   167,   168,
+     169,     0,    17,    18,    19,    20,     0,     0,     0,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,     0,   277,
+       0,     0,     0,     0,     0,     0,    33,    34,     0,     0,
+       0,   636,   637,     0,     0,     0,     0,     0,   202,   203,
+     204,   638,   206,   207,   208,   209,   210,   211,   212,   213,
+     214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+     224,     0,    38,     0,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+     470,   471,   472,   473,   474,   475,   476,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   304,   305,   306,
+       0,     0,     0,     0,     0,   639,     0,   640,   641,     0,
+     642,   643,     0,   246,   247,   248,   644,   250,   251,   252,
+     253,   254,   255,   256,     6,     7,     8,     9,    10,    11,
+      12,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    13,    14,    15,    16,    17,    18,    19,    20,     0,
+       0,     0,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,     0,    30,    31,    32,     0,     0,     0,     0,    33,
+      34,    35,    36,    37,     0,     0,     0,     0,   309,   310,
+     311,   312,   313,   314,   315,   316,   317,   318,   319,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    38,     0,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,     0,    86,     6,     7,     8,     9,
+      10,    11,    12,     0,     0,     0,    87,     0,     0,     0,
+       0,     0,     0,    13,    14,    15,     0,    17,    18,    19,
+      20,     0,     0,     0,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,     0,   277,    31,   354,     0,     0,     0,
+       0,    33,    34,     0,     0,   355,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    38,     0,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
+       0,     6,     7,     8,     9,    10,    11,    12,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    13,    14,
+      15,     0,    17,    18,    19,    20,     0,     0,    87,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,     0,   277,
+      31,   354,     0,     0,     0,     0,    33,    34,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    38,     0,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+       0,     0,     0,     0,     0,     0,     6,     7,     8,     9,
+      10,    11,    12,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    13,    14,    15,     0,    17,    18,    19,
+      20,     0,     0,    87,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,     0,   277,    31,     0,     0,     0,     0,
+       0,    33,    34,    35,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    38,     0,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,     0,     0,     0,     0,     0,
+       0,     6,     7,     8,     9,    10,    11,    12,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    13,    14,
+      15,     0,    17,    18,    19,    20,     0,     0,    87,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,     0,   277,
+      31,     0,     0,     0,     0,     0,    33,    34,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    38,     0,    39,    40,    41,    42,    43,    44,
+      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+      55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
+       0,   297,   298,   299,   300,   301,   302,   303,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   304,   305,
+     306,     0,     0,     0,     0,     0,   803,   804,   805,     0,
+       0,     0,     0,    87,   806,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    33,   297,   298,   299,
+     300,   301,   302,   303,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   304,   305,   306,    16,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    38,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    33,     0,     0,     0,     0,     0,     0,   309,
+     310,   311,   312,   313,   314,   315,   316,   317,   318,   319,
+       0,     0,   297,   298,   299,   300,   301,   302,   303,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    38,   304,
+     305,   306,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    87,     0,   309,   310,   311,   312,   313,
+     314,   315,   316,   317,   318,   319,     0,    33,   307,     0,
+     308,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   517,     0,
+       0,     0,   518,     0,     0,     0,     0,     0,     0,    87,
+       0,     0,     0,    38,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     309,   310,   311,   312,   313,   314,   315,   316,   317,   318,
+     319,   297,   298,   299,   300,   301,   302,   303,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   304,   305,
+     306,    16,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    87,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    33,   297,   298,   299,
+     300,   301,   302,   303,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   304,   305,   306,    16,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    38,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,    33,     0,     0,     0,     0,     0,     0,   309,
+     310,   311,   312,   313,   314,   315,   316,   317,   318,   319,
+       0,     0,   297,   298,   299,   300,   301,   302,   303,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    38,   304,
+     305,   306,     0,     0,     0,     0,   518,     0,     0,     0,
+       0,     0,     0,    87,     0,   309,   310,   311,   312,   313,
+     314,   315,   316,   317,   318,   319,     0,    33,   307,   297,
+     298,   299,   300,   301,   302,   303,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   304,   305,   306,     0,
+       0,   297,   298,   299,   300,   301,   302,   303,     0,    87,
+       0,     0,     0,    38,     0,     0,     0,     0,   304,   305,
+     306,     0,     0,     0,    33,     0,     0,     0,     0,     0,
+     309,   310,   311,   312,   313,   314,   315,   316,   317,   318,
+     319,   380,     0,     0,     0,     0,    33,     0,     0,   297,
+     298,   299,   300,   301,   302,   303,     0,     0,     0,     0,
+      38,     0,     0,     0,     0,     0,   304,   305,   306,     0,
+       0,     0,     0,     0,    87,     0,     0,   309,   310,   311,
+     312,   313,   314,   315,   316,   317,   318,   319,    31,     0,
+       0,     0,     0,     0,    33,     0,     0,     0,     0,   309,
+     310,   311,   312,   313,   314,   315,   316,   317,   318,   319,
+       0,     0,     0,   297,   298,   299,   300,   301,   302,   303,
+       0,    87,     0,     0,     0,     0,     0,     0,     0,     0,
+     304,   305,   306,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,    87,     0,     0,     0,   309,   310,   311,
+     312,   313,   314,   315,   316,   317,   318,   319,    33,   297,
+     298,   299,   300,   301,   302,   303,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   304,   305,   306,    16,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,    87,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    33,     0,     0,     0,     0,     0,
+       0,   309,   310,   311,   312,   313,   314,   315,   316,   317,
+     318,   319,     0,     0,   297,   298,   299,   300,   301,   302,
+     303,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      38,   304,   305,   306,    16,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    87,     0,   309,   310,   311,
+     312,   313,   314,   315,   316,   317,   318,   319,     0,    33,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     507,  1142,     0,     0,  1143,   297,   298,   299,   300,   301,
+     302,   303,     0,     0,     0,    38,     0,     0,     0,     0,
+       0,     0,   304,   305,   306,    16,     0,     0,     0,     0,
+       0,     0,   309,   310,   311,   312,   313,   314,   315,   316,
+     317,   318,   319,   297,   298,   299,   300,   301,   302,   303,
+      33,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     304,   305,   306,    16,     0,   507,     0,     0,     0,   508,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    38,     0,    33,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   309,   310,   311,   312,   313,   314,   315,
+     316,   317,   318,   319,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    38,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,  1142,     0,     0,
+    1143,   309,   310,   311,   312,   313,   314,   315,   316,   317,
+     318,   319,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,   498,   277,     0,     0,     0,     0,     0,     0,     0,
+       0,   499,     0,     0,     0,     0,     0,     0,   508,     0,
+      21,    22,    23,    24,    25,    26,    27,    28,    29,   498,
+     277,     0,     0,     0,     0,     0,     0,     0,   417,   499,
+       0,     0,     0,     0,     0,     0,     0,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,     0,     0,     0,     0,   417,     0,     0,     0,
+       0,     0,     0,     0,     0,    39,    40,    41,    42,    43,
+      44,    45,    46,    47,    48,    49,    50,    51,    52,    53,
+       0,     0,     0,     0,     0,  -273,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   418,   419,   270,
+     271,   272,   273,   274,   275,   276,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,   167,   168,   169,     0,
+      17,    18,    19,    20,     0,   418,   419,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,     0,   277,    31,   354,
+       0,     0,     0,     0,    33,    34,     0,     0,   355,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      38,     0,    39,    40,    41,    42,    43,    44,    45,    46,
+      47,    48,    49,    50,    51,    52,    53,   228,   229,   230,
+     231,   232,   233,   234,   235,   236,   237,   238,   270,   271,
+     272,   273,   274,   275,   276,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   167,   168,   169,     0,    17,
+      18,    19,    20,     0,     0,     0,    21,    22,    23,    24,
+      25,    26,    27,    28,    29,     0,   277,    31,     0,     0,
+       0,     0,     0,    33,    34,    35,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,    38,
+       0,    39,    40,    41,    42,    43,    44,    45,    46,    47,
+      48,    49,    50,    51,    52,    53,   228,   229,   230,   231,
+     232,   233,   234,   235,   236,   237,   238,   270,   271,   272,
+     273,   274,   275,   276,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   167,   168,   169,     0,    17,    18,
+      19,    20,     0,     0,     0,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,     0,   277,    31,     0,     0,     0,
+       0,     0,    33,    34,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    38,     0,
+      39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
+      49,    50,    51,    52,    53,   228,   229,   230,   231,   232,
+     233,   234,   235,   236,   237,   238,   270,   271,   272,   273,
+     274,   275,   276,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,   167,   168,   169,     0,    17,    18,    19,
+      20,     0,     0,     0,    21,    22,    23,    24,    25,    26,
+      27,    28,    29,     0,   277,     0,     0,     0,     0,     0,
+       0,    33,    34,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    38,     0,    39,
+      40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
+      50,    51,    52,    53,   228,   229,   230,   231,   232,   233,
+     234,   235,   236,   237,   238,   270,   271,   272,   273,   274,
+     275,   276,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   167,   168,   169,     0,   739,     0,   740,    20,
+       0,     0,     0,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,     0,   277,     0,     0,     0,     0,     0,     0,
+      33,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    38,     0,    39,    40,
+      41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
+      51,    52,    53,   228,   229,   230,   231,   232,   233,   234,
+     235,   236,   237,   238,   270,   271,   272,   273,   274,   275,
+     276,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   167,   168,   169,     0,     0,     0,     0,     0,     0,
+       0,     0,    21,    22,    23,    24,    25,    26,    27,    28,
+      29,     0,   277,     0,     0,     0,     0,     0,     0,    33,
+      34,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,    38,     0,    39,    40,    41,
+      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
+      52,    53,   228,   229,   230,   231,   232,   233,   234,   235,
+     236,   237,   238,   297,   298,   299,   300,   301,   302,   303,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     304,   305,   306,    16,   297,   298,   299,   300,   301,   302,
+     303,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,   304,   305,   306,     0,     0,     0,     0,    33,   297,
+     298,   299,   300,   301,   302,   303,     0,     0,     0,     0,
+       0,     0,     0,     0,   380,     0,   304,   305,   306,    33,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    38,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    33,     0,     0,     0,     0,     0,
+       0,   309,   310,   311,   312,   313,   314,   315,   316,   317,
+     318,   319,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,   309,   310,   311,   312,   313,   314,   315,   316,
+     317,   318,   319,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   309,   310,   311,
+     312,   313,   314,   315,   316,   317,   318,   319
+};
+
+/* YYCONFLP[YYPACT[STATE-NUM]] -- Pointer into YYCONFL of start of
+   list of conflicting reductions corresponding to action entry for
+   state STATE-NUM in yytable.  0 means no conflicts.  The list in
+   yyconfl is terminated by a rule number of 0.  */
+static const unsigned char yyconflp[] =
+{
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     1,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     3,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     5,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,   247,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     249,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     7,     9,    11,    13,    15,
+      17,    19,    21,    23,    25,    27,    29,    31,    33,    35,
+      37,    39,    41,    43,    45,    47,    49,    51,    53,    55,
+      57,    59,    61,    63,     0,     0,    65,    67,    69,    71,
+      73,    75,     0,    77,    79,    81,    83,     0,     0,    85,
+      87,    89,    91,    93,    95,    97,    99,   101,   103,   105,
+     107,   109,   111,   113,   115,   117,   119,   121,   123,   125,
+     127,   129,   131,   133,   135,   137,   139,   141,   143,   145,
+     147,   149,   151,   153,   155,     0,   157,     0,   159,   161,
+     163,   165,   167,   169,   171,   173,   175,   177,   179,   181,
+     183,   185,   187,   189,   191,   193,   195,   197,   199,   201,
+     203,   205,   207,   209,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   211,     0,     0,
+     213,   215,   217,     0,   219,   221,     0,   223,   225,   227,
+     229,   231,   233,   235,   237,   239,   241,   243,   245,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0
+};
+
+/* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
+   0, pointed into by YYCONFLP.  */
+static const short int yyconfl[] =
+{
+       0,   406,     0,   406,     0,   406,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   654,     0,   654,
+       0,   654,     0,   654,     0,   654,     0,   406,     0,   406,
+       0
+};
+
+static const short int yycheck[] =
+{
+       5,   137,   123,     5,    35,   431,   123,   131,    35,   268,
+     131,   110,   131,   323,   416,    36,     5,   124,   439,     5,
+     704,   603,   705,     5,   714,   457,     5,   323,   554,   430,
+       5,     5,    37,   113,   114,   115,   287,   520,   696,   752,
+     449,    32,   972,   845,   448,   867,    35,   746,   545,   351,
+       5,    37,   554,   752,   977,   323,    35,     3,   239,     3,
+      10,    11,     3,   134,   245,    10,    11,     3,    32,   140,
+     946,   918,   705,    23,   552,    10,    11,    84,    63,  1106,
+      23,    84,    37,    32,    10,    11,   267,     3,    84,   140,
+      63,   123,   725,    23,   929,    28,    29,    30,     3,     5,
+     131,    23,    25,   124,   131,   134,    23,    18,     0,  1136,
+       3,   140,    84,    23,   295,     0,    23,   413,   123,   124,
+       3,   126,   134,   705,   110,   529,    49,    77,   140,    35,
+     140,   110,    23,    83,   538,   142,   110,   939,   621,   142,
+     830,    12,   131,    54,    55,   131,   142,   625,    31,   142,
+     997,    77,   131,    32,   612,   613,   614,    83,   149,   469,
+     140,    44,   286,   148,    47,   416,  1042,   693,   123,   124,
+     142,   126,    43,   469,   595,   148,     3,     4,     5,     6,
+       7,     8,     9,    66,   897,   149,  1109,   368,   134,   135,
+     134,   693,   138,   134,   137,   140,   146,   147,   897,   135,
+     149,   469,   138,   136,   110,   140,    32,  1029,  1138,    45,
+     140,   895,  1047,   622,   623,   712,   138,    77,   134,   135,
+     146,   147,   138,   140,   134,   938,   709,   134,   524,   134,
+     135,   632,   729,   138,   867,   537,    84,   539,    12,   938,
+     364,   134,   135,   364,    63,   138,    84,   138,   135,   140,
+      84,   283,   376,    25,   137,   286,   134,   134,   554,   286,
+     944,   139,   975,    84,   269,   978,    10,    11,   140,    43,
+     149,    43,   730,   957,   732,   140,   975,    49,   283,   978,
+      84,  1103,   134,   140,   134,   406,   146,   147,   140,   406,
+     140,   323,  1094,   135,   142,   137,   929,   286,   134,   135,
+     134,    84,   307,   308,   142,    84,   140,   286,   135,    24,
+      25,   447,   563,   449,   269,    84,  1144,   134,   323,   324,
+     139,   142,   139,   149,   135,   140,   134,   138,   283,   148,
+     134,    84,   140,   364,    84,  1163,   140,  1165,   324,    83,
+     134,   135,  1000,  1033,   138,   350,  1059,  1175,   353,   140,
+     355,   134,   307,   308,   140,   134,  1039,   140,   140,   142,
+    1059,   140,   140,   142,   350,   134,  1050,   618,   323,   324,
+     140,   140,    84,   142,   406,    84,   362,  1148,   364,   140,
+     134,   134,   143,   362,   134,   364,   140,   140,   362,   142,
+     140,  1162,   142,  1164,   140,   350,  1029,   693,   353,   523,
+     355,   406,   523,   134,   511,  1176,  1039,   134,   413,   140,
+      28,    29,    30,   140,  1047,     3,     4,     5,     6,     7,
+       8,     9,   134,  1106,   140,   134,   134,   413,   140,   140,
+     142,   140,   140,   142,   134,  1093,   457,   469,   134,   140,
+     140,   432,   433,   448,   140,   450,   140,   438,   439,   440,
+     882,   406,   457,  1136,   140,   460,   362,  1039,   413,   135,
+      48,   137,   448,   134,   469,    31,   140,    33,   459,   140,
+    1103,   136,    32,  1106,   139,   134,   134,   468,    44,   511,
+     429,    47,   140,   432,   433,   140,   622,   623,   143,   438,
+     439,   440,   523,   448,   140,   450,    84,     4,   140,   102,
+    1158,  1159,   457,  1136,   930,   460,   511,   512,   135,   530,
+     459,   138,   146,   147,   469,   140,   697,   522,   135,   524,
+     525,    84,   554,    12,   529,   530,   512,    13,    14,    15,
+      31,    32,   137,   538,   134,   540,   527,   523,   524,   560,
+     134,   136,   135,   529,   523,   142,    83,   138,    23,   554,
+     140,   135,   538,   432,   433,   560,   511,   512,   549,   438,
+     439,   440,   134,  1089,   139,   139,   139,   522,   139,   524,
+     525,   139,   139,   975,   529,   139,   683,   139,   527,   135,
+     459,   139,   139,   538,   139,   540,   139,   139,   139,   149,
+     139,   141,    99,   141,   134,   854,  1122,   104,   134,   554,
+     605,   143,   141,   135,   595,   560,   432,   433,   141,  1030,
+     144,   747,   438,   439,   440,   122,   605,   136,   144,    43,
+     127,   745,   134,   134,   134,   132,     3,   143,   143,   765,
+     144,   139,   607,   459,   141,   142,   141,   141,   141,  1065,
+     139,   139,   138,   137,   134,    83,   595,   139,   527,   134,
+     605,   683,     3,     4,     5,     6,     7,     8,     9,   141,
+     134,   693,   143,    25,   669,   144,   139,   134,   134,   139,
+     675,   136,   144,   144,   138,   278,   139,   280,   683,     3,
+       4,     5,     6,     7,     8,     9,   945,   141,   693,    36,
+     139,  1112,   287,   141,   134,   141,   141,    48,   141,   605,
+     141,   527,   141,   134,   141,   141,   141,   141,   141,   139,
+     139,  1021,  1116,   141,   669,    83,   595,  1143,   144,   144,
+     675,   137,   141,   134,   139,  1021,    13,    13,   683,   134,
+      46,   141,   144,   141,   739,   740,   741,    37,   693,   141,
+    1161,   141,  1146,   141,  1148,   141,  1172,   141,   141,   135,
+       5,   918,   918,   926,  1026,   918,   705,   806,  1179,   918,
+    1164,   815,   918,  1072,   617,   765,   918,   618,   877,   595,
+     365,     5,   279,   918,   281,   282,   725,   284,  1088,   997,
+     531,   821,  1035,  1096,   739,   740,   741,   918,   348,   502,
+     863,   351,  1088,  1089,   501,  1169,   859,   400,   688,   402,
+     605,   425,   425,   918,   729,   754,   755,   756,   959,   874,
+     559,   941,   820,    -1,   321,    -1,   821,    -1,    -1,    -1,
+      -1,   416,    -1,   426,    -1,   125,  1122,   127,   128,    24,
+      25,    26,   823,    -1,    -1,    -1,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    -1,    41,    -1,    -1,   452,
+     453,    -1,   359,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   882,    -1,    -1,    -1,    -1,   821,    -1,   375,   429,
+      -1,    -1,   432,   433,   823,    -1,    -1,   882,   438,   439,
+     440,    -1,    -1,    -1,    -1,    -1,    -1,   447,    -1,   449,
+      -1,    -1,    -1,    -1,   401,    -1,   403,    -1,  1022,   459,
+     407,  1022,    -1,  1022,    -1,  1022,    -1,   502,    -1,  1045,
+     417,   418,   419,   918,  1013,   920,   918,    -1,   867,   924,
+      -1,   926,    -1,    -1,   873,   874,   875,   882,    -1,   918,
+      -1,    -1,   918,    -1,    -1,  1015,   918,    -1,   445,   918,
+      -1,   544,    -1,   918,   823,    -1,    -1,    -1,     5,    -1,
+      -1,  1075,    -1,    -1,  1075,    -1,    -1,    -1,  1075,  1083,
+      -1,  1142,  1083,   918,    -1,   920,  1083,   527,   563,   924,
+    1151,   926,    -1,  1072,    -1,    -1,    -1,   537,    35,   539,
+     929,    -1,    -1,    -1,   284,   285,    -1,    -1,    -1,  1021,
+      -1,  1022,   997,  1073,   999,  1022,   503,   823,    -1,  1123,
+      -1,    -1,  1123,   510,    -1,    -1,  1123,    -1,  1013,   569,
+     959,  1013,   918,   999,   521,    -1,  1021,  1022,   997,    -1,
+      -1,  1026,   997,   618,    -1,   325,   326,  1013,    -1,    -1,
+      -1,  1013,    -1,  1022,  1013,   595,  1022,    -1,  1013,  1030,
+     946,   548,   997,  1022,   999,    -1,   553,    -1,    -1,    -1,
+     350,    -1,  1083,   110,   124,    -1,  1088,    -1,  1013,    -1,
+      -1,   118,   622,   623,    -1,    -1,  1021,  1022,  1089,    -1,
+    1075,  1026,    -1,    -1,    -1,    -1,  1081,    -1,  1083,  1081,
+    1029,  1030,    -1,  1088,  1089,   385,   386,   387,    -1,    -1,
+    1039,   997,  1123,  1072,    -1,  1081,  1075,  1083,  1047,  1081,
+      -1,  1122,  1081,    -1,  1083,    -1,  1081,  1013,    -1,    -1,
+      -1,  1116,    -1,    -1,    -1,     5,    -1,  1122,  1123,   626,
+    1075,  1112,    -1,    -1,     5,    -1,  1081,    -1,  1083,   131,
+    1116,    -1,    -1,  1088,  1089,    -1,    -1,  1123,    -1,    -1,
+    1119,  1146,    -1,  1148,  1123,   705,    -1,    37,   448,    -1,
+     710,  1030,    -1,    -1,  1103,    -1,    37,  1106,    -1,  1164,
+    1146,  1116,  1148,  1112,    -1,   725,  1072,  1122,  1123,  1160,
+    1161,    -1,    -1,   680,    -1,  1081,    -1,  1168,  1164,    -1,
+      -1,    -1,    -1,    -1,    -1,   692,    -1,  1136,  1179,    -1,
+      -1,  1146,    -1,  1148,   754,   755,   756,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,  1030,   123,    -1,    -1,   126,  1164,
+      -1,  1160,  1161,   513,   514,   810,    -1,    -1,    -1,  1168,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   822,    -1,   529,
+    1179,    -1,    -1,  1112,    -1,    -1,   126,    -1,   538,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,   127,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   327,    -1,    -1,
+      -1,   331,   332,   823,   334,   335,   336,   337,   338,   339,
+     340,   341,   342,   343,   344,   345,   346,   347,    -1,    -1,
+     350,  1160,  1161,   886,   286,    -1,  1112,    -1,    -1,  1168,
+      -1,    -1,    -1,    -1,   801,    -1,    -1,    -1,    -1,    -1,
+    1179,    -1,    -1,    -1,    -1,   362,   813,   867,    -1,    -1,
+      -1,    -1,    -1,   873,   874,   875,    -1,   824,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,   127,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+      -1,   631,    -1,    -1,  1160,  1161,    -1,    -1,    -1,    -1,
+      -1,    -1,  1168,    -1,    -1,    -1,   348,    -1,    -1,   351,
+      -1,    -1,    -1,  1179,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   364,    -1,    -1,   283,    -1,    -1,   971,   929,
+      -1,    -1,    -1,    -1,   376,    -1,    -1,   884,   448,   269,
+      -1,   681,   682,    -1,    -1,    -1,    -1,    -1,   269,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   959,
+      -1,    -1,   702,    -1,    -1,   323,   324,    -1,   478,   479,
+     480,   468,    -1,   483,    -1,   922,   976,   307,   308,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   307,   308,  1023,    -1,
+    1025,    -1,  1027,   940,   324,    -1,    -1,    -1,    -1,    -1,
+      -1,   511,    -1,   743,   744,   447,   516,   449,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,   529,
+      -1,    -1,    -1,   353,    -1,   355,    -1,    50,   538,  1029,
+    1030,    -1,   353,    -1,   355,    -1,    -1,    -1,    -1,  1039,
+      -1,  1076,    -1,    -1,    -1,    -1,    -1,  1047,   406,    -1,
+      -1,    -1,  1052,    -1,    -1,   413,    -1,  1100,    -1,    -1,
+      -1,    -1,    -1,    86,    87,    88,    89,    90,    91,    92,
+      93,    94,    95,    96,    97,    98,    99,   100,    -1,    -1,
+      -1,   523,    -1,    -1,    -1,    -1,    -1,    -1,  1131,    -1,
+      -1,    -1,    -1,    -1,    -1,   537,    -1,   539,    -1,   457,
+      -1,    -1,    -1,  1103,    -1,    -1,  1106,    -1,    -1,    -1,
+      -1,   469,  1112,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     450,    -1,    -1,  1070,    -1,    -1,    -1,   569,    -1,   450,
+     460,    -1,  1132,    -1,    -1,    -1,  1136,    -1,    -1,  1086,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,   127,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+      -1,  1098,  1152,    -1,    -1,  1102,    -1,  1104,    -1,   656,
+    1160,  1161,    -1,    -1,    -1,    -1,   524,    -1,  1168,    -1,
+    1117,    -1,    -1,   683,  1121,    -1,    -1,    -1,  1125,  1179,
+     622,   623,    12,   693,    -1,    -1,    -1,    -1,  1135,    -1,
+      -1,    -1,   522,    -1,    -1,   525,   554,    -1,    -1,    -1,
+    1147,   522,   560,    -1,   525,    -1,    -1,    -1,    -1,    -1,
+     540,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   540,
+      -1,    -1,    -1,    53,    54,    -1,    -1,    -1,    -1,    -1,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    -1,    -1,    -1,    -1,    -1,    -1,   999,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   710,    -1,
+      -1,    -1,    -1,   770,    -1,   605,    -1,    -1,    -1,    -1,
+      -1,   778,    -1,    -1,    -1,   782,   783,    -1,    -1,   786,
+     787,   788,   789,   790,   791,   792,   793,   794,   795,    -1,
+      -1,    -1,    -1,   745,    -1,   815,    -1,   137,    -1,   139,
+     140,    -1,   142,   143,    -1,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,    -1,    -1,    -1,    -1,
+      -1,   828,    -1,    -1,    -1,   693,    -1,    -1,    -1,   669,
+      -1,    -1,    -1,    -1,    -1,   675,    -1,    -1,   669,    -1,
+       3,     4,     5,     6,     7,     8,     9,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,
+      23,    24,    25,    26,    27,    -1,  1116,    -1,    31,    32,
+      33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
+      43,    -1,    -1,    -1,    -1,    48,    49,    50,    -1,    52,
+      -1,    -1,    -1,    -1,   901,    -1,  1146,   904,  1148,   739,
+     740,   741,    -1,    -1,    -1,    -1,    -1,    -1,   739,   740,
+     741,   918,    -1,    -1,  1164,    -1,    -1,    -1,    -1,    -1,
+      -1,    84,    -1,    86,    87,    88,    89,    90,    91,    92,
+      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   124,   125,   126,   127,   128,   129,   130,   131,   132,
+     133,   134,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   821,   145,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     821,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    -1,   882,    -1,    -1,    -1,    -1,    -1,
+      -1,    20,    21,    22,   976,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    42,    43,    -1,    -1,    -1,    -1,    48,
+     918,    20,    21,    22,    23,    -1,    -1,    -1,    -1,    28,
+      29,    30,    -1,    -1,    -1,    -1,    -1,    36,    -1,    -1,
+    1022,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   918,    48,
+     920,    -1,    -1,    -1,   924,    -1,   926,   918,    -1,   920,
+    1042,    -1,    -1,   924,    -1,    -1,  1116,    -1,    -1,    -1,
+    1052,    -1,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,    -1,    -1,    84,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,  1075,    -1,    -1,  1146,    -1,  1148,   997,
+      -1,  1083,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,    -1,  1164,  1013,   145,    -1,    -1,    -1,
+      -1,    -1,    -1,  1021,  1022,    -1,    -1,    -1,    -1,   999,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,  1119,   999,    -1,
+      -1,  1123,    -1,    -1,    -1,    -1,   145,    -1,    -1,    -1,
+    1132,    -1,    -1,    -1,    -1,    -1,  1026,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,   131,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+    1152,    -1,    -1,    -1,    -1,    -1,    -1,  1075,    -1,    -1,
+      -1,    -1,    -1,  1081,    -1,  1083,    -1,    -1,    -1,    -1,
+    1088,  1089,    -1,    -1,    -1,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,  1122,  1123,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   134,   135,    -1,   137,
+     138,   139,   140,    -1,   142,   143,   144,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-     123,   124,   125,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-      -1,   124,    -1,   126,    -1,   128,   129,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
-      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
-      23,    24,    25,    26,    -1,    -1,    29,    30,    -1,    32,
-      -1,    34,    35,    36,    37,    38,    39,    40,    -1,    42,
-      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
-      53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
-      63,    64,    65,    66,    67,    68,    69,    70,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
+     134,   135,   136,   137,   138,   139,   140,    -1,   142,   143,
+      -1,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   121,    -1,
-      -1,   124,    -1,   126,    -1,   128,    -1,   130,    -1,   132,
-     133,   134,   135,   136,   137,   138,   139,   140,   141,   142,
-       3,     4,     5,     6,     7,     8,     9,    26,    27,    28,
-      29,    30,    31,    32,    33,    34,    19,    20,    21,    22,
-      39,    -1,    -1,    26,    27,    28,    29,    30,    31,    32,
-      33,    34,    35,    36,    -1,    38,    39,    -1,    41,    -1,
+      -1,    -1,    -1,    -1,   134,   135,    -1,   137,   138,   139,
+     140,    -1,   142,   143,   144,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    74,    75,    76,    77,    78,
-      79,    80,    81,    82,    83,    84,    -1,    -1,    -1,    72,
-      -1,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
-     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,     3,     4,
-       5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,   132,
-      -1,    -1,    -1,    -1,    19,    20,    21,    22,    -1,    -1,
-      -1,    26,    27,    28,    29,    30,    31,    32,    -1,    34,
-      35,    36,    -1,    38,    39,    40,    41,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,   135,
+      -1,   137,   138,   139,   140,   141,   142,   143,    -1,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    44,    -1,    -1,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
-     105,   106,   107,   108,   109,   110,   111,   112,   113,   114,
-     115,   116,   117,   118,    -1,   120,     3,     4,     5,     6,
-       7,     8,     9,    -1,    -1,    -1,    -1,   132,    -1,    -1,
-      -1,    -1,    19,    20,    21,    22,    -1,    -1,    -1,    26,
-      27,    28,    29,    30,    31,    32,    -1,    34,    35,    36,
-      -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   134,   135,   136,   137,   138,   139,   140,    -1,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   134,   135,   136,   137,
+     138,   139,   140,    -1,   142,   143,    -1,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    72,    -1,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    20,    21,
-      22,    -1,    -1,    -1,    26,    27,    28,    29,    30,    31,
-      32,    -1,    34,    35,    -1,   132,    38,    39,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     134,   135,   136,   137,   138,   139,   140,    -1,   142,   143,
+      -1,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    -1,
-      72,    -1,    74,    75,    76,    77,    78,    79,    80,    81,
+      -1,    -1,    -1,    -1,   134,   135,   136,   137,   138,   139,
+     140,    -1,   142,   143,    -1,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,   135,
+     136,   137,   138,   139,   140,    -1,   142,   143,    -1,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    44,    -1,    -1,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
       82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
-      92,    93,    94,    95,    96,    97,     3,     4,     5,     6,
-       7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    19,    20,    21,    22,    -1,    -1,    -1,    26,
-      27,    28,    29,    30,    31,    32,    -1,    34,    35,    -1,
-     132,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,     3,     4,     5,
-       6,     7,     8,     9,    -1,    72,    -1,    74,    75,    76,
-      77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
-      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
-      97,   132,    38,    -1,    40,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
-       8,     9,    10,    11,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   132,    72,     3,     4,     5,
-       6,     7,     8,     9,    10,    11,    -1,    35,    -1,    85,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   134,   135,    -1,   137,   138,   139,   140,    -1,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   134,   135,    -1,   137,
+     138,   139,   140,    -1,   142,   143,    -1,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   135,    -1,   137,   138,   139,   140,   141,   142,   143,
+      -1,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   134,   135,    -1,   137,   138,   139,
+     140,    -1,   142,   143,    -1,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,    -1,     3,     4,     5,     6,     7,     8,     9,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,   135,
+      -1,   137,   138,   139,   140,    -1,   142,   143,    -1,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    44,    -1,    -1,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    83,    84,    85,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,
-       8,     9,    -1,    -1,    -1,    -1,   132,    85,    86,    87,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   135,    -1,   137,   138,   139,   140,    -1,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    -1,    84,    -1,    86,    87,
       88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    35,    36,    85,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   134,   135,   136,   137,
+     138,   139,   140,    -1,   142,   143,    -1,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    83,
+      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   135,    -1,   137,   138,   139,   140,    -1,   142,   143,
+      -1,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   135,    -1,   137,   138,   139,
+     140,    -1,    -1,   143,    -1,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    -1,    84,    -1,
       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,    72,     3,     4,     5,     6,     7,     8,     9,
-      10,    11,    -1,    -1,   132,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    -1,    -1,
-     126,    -1,    -1,    -1,    -1,    -1,   132,    85,    86,    87,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,
+      -1,   137,   138,   139,   140,   141,   142,   143,    -1,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    44,    -1,    -1,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    -1,    84,    -1,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   135,    -1,   137,   138,   139,   140,   141,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    -1,    84,    -1,    86,    87,
       88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
-      -1,   121,    -1,    -1,   124,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   132,    -1,     3,     4,     5,     6,     7,     8,
-       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   132,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97,    -1,    38,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,    -1,   137,
+     138,   139,   140,   141,   142,   143,    -1,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    -1,
+      84,    -1,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,   132,    72,     3,     4,     5,     6,     7,     8,
-       9,    -1,    -1,    -1,    -1,    -1,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    -1,
-       3,     4,     5,     6,     7,     8,     9,    36,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    72,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    35,   132,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    85,    86,    87,    88,
-      89,    90,    91,    92,    93,    94,    95,    96,    97,    -1,
+      -1,   135,    -1,   137,   138,   139,   140,    -1,   142,   143,
+     144,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    -1,    84,    -1,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   135,    -1,   137,   138,   139,
+     140,    -1,   142,   143,   144,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    -1,    84,    -1,
+      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   132,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   132,    26,    27,    28,    29,    30,    31,
-      32,    33,    34,    -1,    -1,    -1,    -1,    39,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   132,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,
+      -1,   137,   138,   139,   140,    -1,   142,   143,    -1,   145,
+     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    10,    11,
+      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
+      22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
+      -1,    -1,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    44,    -1,    -1,    47,    48,    49,    50,    51,
+      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    -1,    84,    -1,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    74,    75,    76,    77,    78,    79,    80,    81,
-      82,    83,    84,    42,    43,    -1,    -1,    -1,    -1,    48,
-      49,    50,    51,    52,    53,    54,    55,    56,    57,    58,
-      59,    60,    61,    62,    63,    64,    65,    66,    67,    68,
-      69,    70,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,
-       6,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   133,   134,    19,    20,    21,    22,    -1,    -1,    -1,
-      26,    27,    28,    29,    30,    31,    32,    -1,    34,    35,
-      36,    -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   123,    -1,   125,   126,    -1,   128,
-     129,   130,    -1,   132,   133,   134,   135,   136,   137,   138,
-     139,   140,   141,    -1,    -1,    -1,    72,    -1,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      -1,    -1,    -1,   135,    -1,   137,   138,   139,   140,    -1,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,   156,     3,     4,     5,     6,     7,
+       8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+      18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
+      28,    29,    30,    31,    -1,    -1,    34,    35,    36,    37,
+      38,    39,    -1,    41,    42,    43,    44,    -1,    -1,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    -1,    84,    -1,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,    -1,   137,
+     138,   139,   140,    -1,   142,   143,    -1,   145,   146,   147,
+     148,   149,   150,   151,   152,   153,   154,   155,   156,     3,
+       4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
+      14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
+      24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      44,    -1,    -1,    47,    48,    49,    50,    51,    52,    53,
+      54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
+      64,    65,    66,    67,    68,    69,    70,    71,    72,    73,
+      74,    75,    76,    77,    78,    79,    80,    81,    82,    -1,
+      84,    -1,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   135,    -1,    -1,   138,    -1,   140,    -1,   142,   143,
+      -1,   145,   146,   147,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,     3,     4,     5,     6,     7,     8,     9,
+      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
+      20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
+      30,    31,    -1,    -1,    34,    35,    36,    37,    38,    39,
+      -1,    41,    42,    43,    44,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
+      60,    61,    62,    -1,    64,    65,    66,    67,    68,    69,
+      70,    71,    72,    73,    74,    75,    76,    77,    78,    79,
+      80,    81,    82,    -1,    84,    -1,    86,    87,    88,    89,
+      90,    91,    92,    93,    94,    95,    96,    97,    98,    99,
+     100,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   135,    -1,    -1,   138,    -1,
+     140,    -1,   142,   143,    -1,   145,   146,   147,    -1,   149,
+     150,   151,   152,   153,   154,   155,   156,     3,     4,     5,
+       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
+      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
+      26,    27,    28,    29,    30,    31,    -1,    -1,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    43,    44,    -1,
+      -1,    47,    48,    49,    50,    51,    52,    53,    54,    55,
+      56,    57,    58,    59,    60,    61,    62,    -1,    64,    65,
+      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
+      76,    77,    78,    79,    80,    81,    82,    -1,    -1,    -1,
       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,     3,     4,     5,     6,     7,     8,     9,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    20,
-      21,    22,    -1,    -1,    -1,    26,    27,    28,    29,    30,
-      31,    32,    -1,    34,    35,    -1,    -1,    38,    39,    -1,
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,
+      -1,    -1,   138,    -1,   140,    -1,    -1,   143,    -1,   145,
+     146,   147,    -1,   149,   150,   151,   152,   153,   154,   155,
+     156,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
+      12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
+      22,    -1,    24,    25,    26,    27,    -1,    -1,    -1,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    -1,    41,
+      -1,    -1,    -1,    -1,    -1,    -1,    48,    49,    -1,    -1,
+      -1,    53,    54,    -1,    -1,    -1,    -1,    -1,    60,    61,
+      62,    63,    64,    65,    66,    67,    68,    69,    70,    71,
+      72,    73,    74,    75,    76,    77,    78,    79,    80,    81,
+      82,    -1,    84,    -1,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+       3,     4,     5,     6,     7,     8,     9,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,
+      -1,    -1,    -1,    -1,    -1,   137,    -1,   139,   140,    -1,
+     142,   143,    -1,   145,   146,   147,   148,   149,   150,   151,
+     152,   153,   154,   155,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    20,    21,    22,    23,    24,    25,    26,    27,    -1,
+      -1,    -1,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    -1,    41,    42,    43,    -1,    -1,    -1,    -1,    48,
+      49,    50,    51,    52,    -1,    -1,    -1,    -1,   101,   102,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    84,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,   112,   113,   114,   115,   116,   117,   118,
+     119,   120,   121,   122,   123,   124,   125,   126,   127,   128,
+     129,   130,   131,   132,    -1,   134,     3,     4,     5,     6,
+       7,     8,     9,    -1,    -1,    -1,   145,    -1,    -1,    -1,
+      -1,    -1,    -1,    20,    21,    22,    -1,    24,    25,    26,
+      27,    -1,    -1,    -1,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    -1,    41,    42,    43,    -1,    -1,    -1,
+      -1,    48,    49,    -1,    -1,    52,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,
+      -1,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
+      22,    -1,    24,    25,    26,    27,    -1,    -1,   145,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    43,    -1,    -1,    -1,    -1,    48,    49,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    84,    -1,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
+       7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    20,    21,    22,    -1,    24,    25,    26,
+      27,    -1,    -1,   145,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    -1,    41,    42,    -1,    -1,    -1,    -1,
+      -1,    48,    49,    50,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,
+      -1,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
+      22,    -1,    24,    25,    26,    27,    -1,    -1,   145,    31,
+      32,    33,    34,    35,    36,    37,    38,    39,    -1,    41,
+      42,    -1,    -1,    -1,    -1,    -1,    48,    49,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    72,    -1,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,     3,     4,     5,
+      -1,    -1,    84,    -1,    86,    87,    88,    89,    90,    91,
+      92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
+      22,    -1,    -1,    -1,    -1,    -1,    28,    29,    30,    -1,
+      -1,    -1,    -1,   145,    36,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    48,     3,     4,     5,
        6,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    19,    20,    21,    22,    -1,    -1,    -1,
-      26,    27,    28,    29,    30,    31,    32,    -1,    34,    35,
-      -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    20,    21,    22,    23,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,    -1,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    20,
+      21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   145,    -1,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    48,    49,    -1,
+      51,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   134,    -1,
+      -1,    -1,   138,    -1,    -1,    -1,    -1,    -1,    -1,   145,
+      -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
-      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,     3,     4,     5,     6,     7,     8,     9,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,    20,
-      21,    22,    -1,    -1,    -1,    26,    27,    28,    29,    30,
-      31,    32,    -1,    34,    -1,    -1,    -1,    38,    -1,    -1,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,     3,     4,     5,     6,     7,     8,     9,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    20,    21,
+      22,    23,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   145,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    48,     3,     4,     5,
+       6,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    20,    21,    22,    23,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,    -1,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,     3,     4,     5,     6,     7,     8,     9,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    20,
+      21,    22,    -1,    -1,    -1,    -1,   138,    -1,    -1,    -1,
+      -1,    -1,    -1,   145,    -1,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,    -1,    48,    49,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    -1,
+      -1,     3,     4,     5,     6,     7,     8,     9,    -1,   145,
+      -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,    20,    21,
+      22,    -1,    -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,
+     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
+     111,    43,    -1,    -1,    -1,    -1,    48,    -1,    -1,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,
+      84,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    -1,
+      -1,    -1,    -1,    -1,   145,    -1,    -1,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    42,    -1,
+      -1,    -1,    -1,    -1,    48,    -1,    -1,    -1,    -1,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      -1,    -1,    -1,     3,     4,     5,     6,     7,     8,     9,
+      -1,   145,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      20,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   145,    -1,    -1,    -1,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    48,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    23,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   145,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,
+      -1,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      84,    20,    21,    22,    23,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,   145,    -1,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,    -1,    48,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     134,   135,    -1,    -1,   138,     3,     4,     5,     6,     7,
+       8,     9,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,
+      -1,    -1,    20,    21,    22,    23,    -1,    -1,    -1,    -1,
+      -1,    -1,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,     3,     4,     5,     6,     7,     8,     9,
+      48,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      20,    21,    22,    23,    -1,   134,    -1,    -1,    -1,   138,
       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    72,    -1,    74,    75,    76,    77,    78,    79,    80,
-      81,    82,    83,    84,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,     3,     4,     5,
+      -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    48,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   135,    -1,    -1,
+     138,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    40,    41,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    50,    -1,    -1,    -1,    -1,    -1,    -1,   138,    -1,
+      31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+      41,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    77,    50,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,    -1,    -1,    -1,    -1,    77,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    86,    87,    88,    89,    90,
+      91,    92,    93,    94,    95,    96,    97,    98,    99,   100,
+      -1,    -1,    -1,    -1,    -1,   134,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   146,   147,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    20,    21,    22,    -1,
+      24,    25,    26,    27,    -1,   146,   147,    31,    32,    33,
+      34,    35,    36,    37,    38,    39,    -1,    41,    42,    43,
+      -1,    -1,    -1,    -1,    48,    49,    -1,    -1,    52,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      84,    -1,    86,    87,    88,    89,    90,    91,    92,    93,
+      94,    95,    96,    97,    98,    99,   100,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111,     3,     4,
+       5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    20,    21,    22,    -1,    24,
+      25,    26,    27,    -1,    -1,    -1,    31,    32,    33,    34,
+      35,    36,    37,    38,    39,    -1,    41,    42,    -1,    -1,
+      -1,    -1,    -1,    48,    49,    50,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,
+      -1,    86,    87,    88,    89,    90,    91,    92,    93,    94,
+      95,    96,    97,    98,    99,   100,   101,   102,   103,   104,
+     105,   106,   107,   108,   109,   110,   111,     3,     4,     5,
        6,     7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    19,    20,    21,    22,    -1,    -1,    -1,
-      26,    27,    28,    29,    30,    31,    32,    -1,    34,    -1,
-      -1,    -1,    38,     3,     4,     5,     6,     7,     8,     9,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    19,
-      -1,    21,    22,    -1,    -1,    -1,    26,    27,    28,    29,
-      30,    31,    32,    -1,    34,    -1,    72,    -1,    74,    75,
-      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
+      -1,    -1,    -1,    -1,    20,    21,    22,    -1,    24,    25,
+      26,    27,    -1,    -1,    -1,    31,    32,    33,    34,    35,
+      36,    37,    38,    39,    -1,    41,    42,    -1,    -1,    -1,
+      -1,    -1,    48,    49,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,
       86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
-      96,    97,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    72,    -1,    74,    75,    76,    77,    78,    79,
-      80,    81,    82,    83,    84,    85,    86,    87,    88,    89,
-      90,    91,    92,    93,    94,    95,    96,    97
+      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,     3,     4,     5,     6,
+       7,     8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    20,    21,    22,    -1,    24,    25,    26,
+      27,    -1,    -1,    -1,    31,    32,    33,    34,    35,    36,
+      37,    38,    39,    -1,    41,    -1,    -1,    -1,    -1,    -1,
+      -1,    48,    49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,     3,     4,     5,     6,     7,
+       8,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    20,    21,    22,    -1,    24,    -1,    26,    27,
+      -1,    -1,    -1,    31,    32,    33,    34,    35,    36,    37,
+      38,    39,    -1,    41,    -1,    -1,    -1,    -1,    -1,    -1,
+      48,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    84,    -1,    86,    87,
+      88,    89,    90,    91,    92,    93,    94,    95,    96,    97,
+      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
+     108,   109,   110,   111,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    31,    32,    33,    34,    35,    36,    37,    38,
+      39,    -1,    41,    -1,    -1,    -1,    -1,    -1,    -1,    48,
+      49,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    84,    -1,    86,    87,    88,
+      89,    90,    91,    92,    93,    94,    95,    96,    97,    98,
+      99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,     3,     4,     5,     6,     7,     8,     9,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      20,    21,    22,    23,     3,     4,     5,     6,     7,     8,
+       9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    20,    21,    22,    -1,    -1,    -1,    -1,    48,     3,
+       4,     5,     6,     7,     8,     9,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    43,    -1,    20,    21,    22,    48,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    84,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    48,    -1,    -1,    -1,    -1,    -1,
+      -1,   101,   102,   103,   104,   105,   106,   107,   108,   109,
+     110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,   101,   102,   103,   104,   105,   106,   107,   108,
+     109,   110,   111,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   101,   102,   103,
+     104,   105,   106,   107,   108,   109,   110,   111
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
-static const yytype_uint16 yystos[] =
+static const unsigned short int yystos[] =
 {
-       0,   144,   145,     0,   146,     3,     4,     5,     6,     7,
-       8,     9,    19,    20,    21,    22,    26,    27,    28,    29,
-      30,    31,    32,    34,    35,    36,    38,    39,    40,    41,
-      72,    74,    75,    76,    77,    78,    79,    80,    81,    82,
-      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,    98,    99,   100,   101,   102,
-     103,   104,   105,   106,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   120,   132,   147,   148,
-     149,   150,   152,   153,   154,   155,   156,   158,   161,   175,
-     176,   178,   186,   187,   196,   198,   199,   216,   217,   218,
-     219,   222,   223,   226,   232,   259,   289,   290,   291,   292,
-     294,   295,   296,   298,   299,   302,   303,   304,   305,   306,
-     308,   309,   312,   319,   320,   321,   327,     3,     4,     5,
-       6,     7,     8,     9,    85,    86,    87,    88,    89,    90,
-      91,    92,    93,    94,    95,    96,    97,   289,   291,   292,
-     296,    12,   128,   313,     3,     4,     5,     6,     7,     8,
-       9,    34,    85,    86,    87,    88,    89,    90,    91,    92,
-      93,    94,    95,    96,    97,   156,   161,   176,   291,   296,
-     302,   308,     3,     4,     5,     6,     7,     8,     9,   121,
-     299,    38,    40,   197,   289,   292,   295,   126,   126,   126,
-     126,   126,   126,   126,   126,   126,   126,   126,   126,   126,
-     126,   126,   126,   126,   126,   126,   126,   126,     3,     4,
-       5,     6,     7,     8,     9,   300,   157,   160,   289,   300,
-     121,    22,   148,   154,   155,   183,   199,   216,   302,   308,
-     120,   121,   237,   237,   237,   237,   126,   161,   302,   308,
-     120,    36,   223,   240,   241,   244,   290,   294,   296,   298,
-     295,   290,   291,   295,   128,   156,   161,   176,   187,   223,
-     292,   303,   312,    10,    11,   227,   229,   231,   232,   233,
-     238,   240,   260,   268,   271,   279,   292,   296,   298,   133,
-     134,   265,   322,   323,   324,   326,   310,   296,   121,   129,
-     200,   289,    12,   300,   289,   300,   156,   176,     3,     4,
-       5,     6,     7,     8,     9,   191,   192,   195,   268,   279,
-     298,   375,   123,   151,   289,   289,   120,   226,   231,   232,
-     292,   298,   329,   332,   333,   298,   298,   337,   298,   298,
-     298,   298,   298,   298,   298,   298,   298,   298,   298,   298,
-     298,   298,    33,    39,   261,   264,   265,   301,   303,   321,
-     121,   124,   168,   169,   120,   159,   261,   177,   289,   302,
-     292,   298,   375,   224,   289,   293,   126,   242,   295,   295,
-     297,   300,   289,   300,   223,   241,   311,   228,   126,    42,
-      43,    48,    49,    50,    51,    52,    53,    54,    55,    56,
-      57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
-      67,    68,    69,    70,   123,   125,   126,   128,   129,   130,
-     132,   133,   134,   135,   136,   137,   138,   139,   140,   141,
-     351,   352,   234,   126,   262,   123,   256,   257,   268,   277,
-     322,   281,   282,   283,   227,   233,   296,   124,   325,   323,
-     324,   300,   145,   201,   203,   204,   206,   208,   188,   190,
-     265,   188,   300,   300,   189,   126,     3,     4,     5,     6,
-       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
-      17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
-      29,    30,    32,    34,    35,    36,    37,    38,    39,    40,
-      42,    43,    44,    45,    46,    47,    71,    72,    73,   120,
-     121,   122,   123,   124,   125,   126,   128,   129,   130,   142,
-     319,   352,   353,   354,   377,   378,   379,   380,   381,   382,
-     291,   296,   121,   120,   226,   231,   125,   298,   298,   298,
-     125,   125,   298,   125,   125,   125,   125,   125,   125,   125,
-     125,   125,   125,   125,   127,   127,   125,   120,   262,   260,
-     162,    23,    24,    25,    30,   170,   171,   174,   289,   168,
-     120,   179,   180,   181,   298,   298,   122,   249,   250,   296,
-     299,   245,   124,   246,   361,   261,   120,   261,   300,   234,
-     230,   130,   130,   127,   131,    26,    37,   123,   235,   239,
-     120,   125,   258,   127,   268,   130,   284,   285,    13,    14,
-      15,   280,   306,   307,   122,   125,   129,    19,    21,    22,
-     291,   296,   302,   314,   315,   318,   319,    20,    38,   211,
-     199,   120,   189,   195,   120,   188,   188,   120,   125,   193,
-     375,   375,   375,   120,   145,   328,   125,   127,   127,   334,
-     336,   125,   308,   340,   342,   344,   346,   341,   343,   345,
-     347,   348,   349,   298,    23,    24,    25,   122,   163,   164,
-     173,   174,   125,    30,   172,   122,   125,   123,   123,   127,
-     251,   253,   254,   295,   249,   247,   248,   289,   243,    10,
-      11,    72,   121,   123,   124,   125,   126,   128,   129,   130,
-     142,   320,   321,   352,   353,   354,   356,   363,   364,   365,
-     367,   369,   373,   120,   120,   249,   131,   131,   236,    18,
-     249,   263,   128,   129,   355,   356,   358,   269,   286,   285,
-     306,   202,   289,   289,   289,   312,    10,    11,   126,   266,
-     270,   278,   279,   265,   316,   266,    20,   120,   120,   190,
-     249,   122,   131,   127,   122,   308,   330,   308,   308,   338,
-     127,   308,   308,   308,   308,   308,   308,   308,   308,   308,
-     308,   125,   350,    33,    41,   119,   120,   153,   155,   165,
-     166,   167,   175,   186,   196,   199,   220,   221,   222,   241,
-     259,   289,   292,   296,   302,   308,   327,   124,   289,   171,
-     289,   181,   182,   376,   225,   125,   308,   127,   125,   381,
-     234,   371,   372,   374,   370,   366,   368,   127,   369,   127,
-     264,   358,   126,   272,   282,   287,   288,   203,   317,   205,
-     266,   276,   322,   281,   300,   207,   209,   127,   127,   308,
-     335,   127,   308,   127,   127,   127,   127,   127,   127,   127,
-     127,   125,   125,   127,   153,   161,   184,   199,   221,   296,
-     302,   308,   381,   155,   220,   302,   237,   120,   231,   241,
-     292,   233,   296,   355,   120,   378,   234,    71,   252,   266,
-     248,   357,   357,   362,   357,   361,   357,   273,   131,   355,
-     300,   123,   212,   213,   127,   266,   212,   266,   194,   331,
-     125,   339,    13,    13,   121,   124,   185,   289,   161,   184,
-     302,   237,   161,   120,   231,   253,   255,   123,   125,   127,
-     358,   359,   127,   120,   122,   359,   360,   127,   129,   131,
-     249,   214,   267,   210,   275,   127,   376,   127,   127,   127,
-     375,   376,   185,   289,   161,   185,   289,   120,   256,   127,
-     215,   363,   272,   212,    26,    28,    37,   127,   122,   120,
-     289,   185,   274,   363,   381,   376,   275,   120
-};
-
-#define yyerrok                (yyerrstatus = 0)
-#define yyclearin        (yychar = YYEMPTY)
-#define YYEMPTY                (-2)
-#define YYEOF                0
-
-#define YYACCEPT        goto yyacceptlab
-#define YYABORT                goto yyabortlab
-#define YYERROR                goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror.  This remains here temporarily
-   to ease the transition to the new meaning of YYERROR, for GCC.
-   Once GCC version 2 has supplanted version 1, this can go.  */
-
-#define YYFAIL                goto yyerrlab
-
-#define YYRECOVERING()  (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value)                                        \
-do                                                                \
-  if (yychar == YYEMPTY && yylen == 1)                                \
-    {                                                                \
-      yychar = (Token);                                                \
-      yylval = (Value);                                                \
-      yytoken = YYTRANSLATE (yychar);                                \
-      YYPOPSTACK (1);                                                \
-      goto yybackup;                                                \
-    }                                                                \
-  else                                                                \
-    {                                                                \
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;                                                        \
-    }                                                                \
-while (YYID (0))
-
+       0,   158,   159,     0,   160,   367,     3,     4,     5,     6,
+       7,     8,     9,    20,    21,    22,    23,    24,    25,    26,
+      27,    31,    32,    33,    34,    35,    36,    37,    38,    39,
+      41,    42,    43,    48,    49,    50,    51,    52,    84,    86,
+      87,    88,    89,    90,    91,    92,    93,    94,    95,    96,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   131,   132,   134,   145,   161,   162,
+     163,   164,   165,   167,   168,   169,   170,   171,   173,   176,
+     191,   192,   193,   195,   196,   206,   207,   216,   218,   219,
+     221,   239,   240,   241,   242,   245,   246,   249,   255,   289,
+     319,   320,   321,   322,   324,   325,   326,   327,   329,   331,
+     332,   335,   336,   337,   338,   339,   341,   342,   345,   346,
+     357,   358,   359,   368,   371,   369,    24,    25,    12,    43,
+       3,     4,     5,     6,     7,     8,     9,    10,    11,    12,
+      13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
+      23,    24,    25,    26,    27,    28,    29,    30,    31,    34,
+      35,    36,    37,    38,    39,    41,    42,    43,    44,    47,
+      48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
+      58,    59,    60,    61,    62,    63,    64,    65,    66,    67,
+      68,    69,    70,    71,    72,    73,    74,    75,    76,    77,
+      78,    79,    80,    81,    82,    83,    84,    85,   101,   102,
+     103,   104,   105,   106,   107,   108,   109,   110,   111,   135,
+     137,   138,   139,   140,   142,   143,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   358,   359,
+     396,   397,   398,   428,   429,   430,   431,   432,   330,   347,
+       3,     4,     5,     6,     7,     8,     9,    41,   171,   176,
+     193,   196,   321,   322,   327,   329,   335,   341,     3,     4,
+       5,     6,     7,     8,     9,   135,   332,     3,     4,     5,
+       6,     7,     8,     9,    20,    21,    22,    49,    51,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+     217,   319,   321,   322,   326,   327,   329,   140,   140,   140,
+     140,   140,   140,   140,   140,   140,   140,   140,   140,   140,
+     140,   140,   140,   140,   140,   140,   140,   140,   333,   172,
+     367,   333,   135,   367,    43,    52,   162,   169,   170,   196,
+     202,   219,   221,   239,   335,   341,    45,   134,   135,   265,
+     266,   265,   265,   265,   140,   176,   335,   341,   134,   367,
+      43,   246,   270,   273,   320,   325,   327,   329,   178,   327,
+     329,   331,   332,   326,   320,   321,   326,   367,   326,   142,
+     171,   176,   193,   196,   207,   246,   322,   336,   345,   367,
+      10,    11,    83,   233,   290,   298,   300,    77,   146,   147,
+     295,   360,   361,   362,   363,   366,   343,   367,   367,   404,
+     135,   428,   424,   424,    63,   148,   222,   414,   424,   425,
+     424,    10,    11,   140,   418,   319,    12,   333,   367,   333,
+     367,   320,   171,   193,   211,   212,   215,   233,   298,   424,
+     137,   166,   319,   319,   134,   367,   249,   254,   255,   322,
+       3,     4,     5,     6,     7,     8,     9,   331,   373,   376,
+     377,   331,   331,   381,   331,   331,   331,   331,   331,   331,
+     331,   331,   331,   331,   331,   331,   331,   331,    40,    50,
+     291,   294,   295,   334,   336,   359,   135,   134,   138,   177,
+     178,   322,   326,   327,   329,   291,   194,   134,   138,   197,
+     319,   319,   367,   335,   233,   138,   275,   424,   247,   367,
+     323,   271,   140,   326,   326,   326,   328,   333,   367,   333,
+     367,   246,   270,   367,   344,   301,   250,   252,   254,   255,
+     256,   268,   309,   320,   322,   292,   137,   285,   286,   288,
+     233,   298,   307,   360,   367,   367,   367,   361,   363,   333,
+      23,    63,    84,   135,   137,   138,   139,   142,   143,   148,
+     156,   358,   359,   370,   396,   397,   398,   402,   403,   405,
+     406,   415,   418,   422,   159,   425,   134,   142,   144,   426,
+     427,   428,   136,   223,   225,   226,   228,   230,   144,   134,
+     427,   141,   420,   421,   419,   367,   208,   210,   295,   177,
+     208,   319,   333,   333,   209,   309,   320,   327,   329,   136,
+     321,   327,   135,   134,   137,    12,    53,    54,    63,   137,
+     139,   140,   142,   143,   148,   395,   396,   249,   254,   139,
+     331,   331,   331,   139,   139,   331,   139,   139,   139,   139,
+     139,   139,   139,   139,   139,   139,   139,   141,   141,   139,
+     134,   292,   290,   367,   180,   175,     3,   134,   179,   367,
+     178,   327,   329,   322,   134,   199,   200,   331,   198,   197,
+     367,   319,   320,   322,   276,   277,   319,   135,   136,   278,
+     279,   177,   327,   275,   274,   408,   291,   177,   291,   319,
+     333,   339,   340,   365,   251,   367,   257,   311,   312,   313,
+     367,   250,   256,   134,   139,   287,   422,   141,   298,   364,
+     417,   423,   416,   144,   136,   134,   144,   139,   414,    24,
+      26,   196,   321,   327,   329,   335,   352,   353,   356,   357,
+      25,    49,   234,   221,   404,   404,   404,   134,   209,   215,
+     134,   197,   208,   208,   134,   139,   140,   367,   134,   159,
+     220,     3,   143,   143,    63,   148,   141,   144,   372,   139,
+     141,   141,   378,   380,   139,   341,   384,   386,   388,   390,
+     385,   387,   389,   391,   392,   393,   319,    28,    29,    30,
+     136,   181,   182,    28,    29,    30,    36,   186,   187,   190,
+     319,   138,   367,   178,   136,   139,   137,   342,   134,   367,
+     331,   139,   431,   424,   141,    83,   280,   282,   283,   326,
+     272,   278,   137,   139,   142,   402,   410,   411,   412,   414,
+     134,   134,   134,   197,   339,   257,   140,     3,    31,    44,
+      47,    66,   137,   258,   260,   261,   262,   263,   143,   314,
+     315,   138,   140,   293,    63,   142,   148,   399,   400,   402,
+     412,   299,   365,   404,   409,   404,   144,   224,   319,   319,
+     319,   345,   233,   296,   300,   295,   354,   296,    25,   141,
+     141,   141,   134,   134,   210,   213,   136,   341,   144,   144,
+     341,   374,   341,   341,   382,   141,   341,   341,   341,   341,
+     341,   341,   341,   341,   341,   341,   139,   394,   367,   138,
+     189,   190,   139,    36,   188,   233,   174,   367,   200,   201,
+     137,   203,   429,   277,   233,   136,   367,   139,   341,   257,
+     141,   413,   134,   262,   253,   259,   264,    18,    54,    55,
+     418,   316,   315,    13,    14,    15,   310,   269,   294,   401,
+     400,   140,   302,   312,   144,   134,   136,   406,   407,   144,
+     225,   355,   308,   309,   227,   367,   333,   229,   231,   278,
+     296,   141,   341,   379,   141,   341,   141,   141,   141,   141,
+     141,   141,   141,   141,   139,   139,   141,    40,    41,    52,
+     133,   134,   163,   168,   170,   183,   184,   185,   191,   192,
+     206,   216,   219,   221,   243,   244,   245,   270,   289,   319,
+     320,   322,   335,   341,   371,   319,   367,   319,   186,   399,
+     425,   134,   267,   248,    83,   281,   296,   262,   367,   408,
+     278,   418,   335,   346,   348,   349,   317,   318,   278,   403,
+     303,   144,   333,   302,   137,   235,   236,   296,   306,   360,
+     235,   296,   141,   134,   375,   139,   383,    13,    13,   168,
+     176,   204,   221,   244,   320,   335,   341,   431,   170,   184,
+     219,   221,   243,   335,   265,   134,   254,   270,   322,   233,
+     233,   187,   233,    46,   257,   282,   284,   414,   141,   346,
+     350,   295,   144,   399,   141,   278,   237,   141,   296,   232,
+     214,   141,   425,   141,   141,   141,   367,   176,   204,   335,
+     265,   176,   233,   335,   367,   254,   256,   431,   262,   285,
+     367,   351,   333,   367,   367,   141,   238,   410,   297,   235,
+     305,   141,   135,   138,   177,   205,   367,   176,   367,   134,
+     367,   135,   333,   367,   410,   302,    31,    33,    44,    47,
+     424,   425,   179,   177,   367,   177,   205,   134,   424,   304,
+     431,   431,   136,   134,   205,   177,   179,   136,   305,   425,
+     205,   134
+};
 
-#define YYTERROR        1
-#define YYERRCODE        256
+\f
+/* Prevent warning if -Wmissing-prototypes.  */
+int yyparse (void);
 
+/* Error token number */
+#define YYTERROR 1
 
 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
    If N is 0, then set CURRENT to the empty location which ends
    the previous symbol: RHS[0] (always defined).  */
 
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
-    do                                                                        \
-      if (YYID (N))                                                    \
-        {                                                                \
-          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
-          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;        \
-          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;                \
-          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;        \
-        }                                                                \
-      else                                                                \
-        {                                                                \
-          (Current).first_line   = (Current).last_line   =                \
-            YYRHSLOC (Rhs, 0).last_line;                                \
-          (Current).first_column = (Current).last_column =                \
-            YYRHSLOC (Rhs, 0).last_column;                                \
-        }                                                                \
-    while (YYID (0))
+# define YYLLOC_DEFAULT(Current, Rhs, N) ((void)Rhs)
 #endif
 
 
-/* YY_LOCATION_PRINT -- Print the location on the stream.
-   This macro was not mandated originally: define only if we know
-   we won't break user code: when these are the locations we know.  */
-
 #ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)                        \
-     fprintf (File, "%d.%d-%d.%d",                        \
-              (Loc).first_line, (Loc).first_column,        \
-              (Loc).last_line,  (Loc).last_column)
-# else
-#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
 
 /* YYLEX -- calling `yylex' with the right arguments.  */
+#define YYLEX yylex ()
 
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
+YYSTYPE yylval;
+
+YYLTYPE yylloc;
+
+int yynerrs;
+int yychar;
+
+static const int YYEOF = 0;
+static const int YYEMPTY = -2;
+
+typedef enum { yyok, yyaccept, yyabort, yyerr } YYRESULTTAG;
+
+#define YYCHK(YYE)                                                             \
+   do { YYRESULTTAG yyflag = YYE; if (yyflag != yyok) return yyflag; }             \
+   while (YYID (0))
 
-/* Enable debugging if requested.  */
 #if YYDEBUG
 
 # ifndef YYFPRINTF
-#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 #  define YYFPRINTF fprintf
 # endif
 
@@ -3973,34 +5744,14 @@ do {                                                \
     YYFPRINTF Args;                                \
 } while (YYID (0))
 
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                          \
-do {                                                                          \
-  if (yydebug)                                                                  \
-    {                                                                          \
-      YYFPRINTF (stderr, "%s ", Title);                                          \
-      yy_symbol_print (stderr,                                                  \
-                  Type, Value); \
-      YYFPRINTF (stderr, "\n");                                                  \
-    }                                                                          \
-} while (YYID (0))
-
 
 /*--------------------------------.
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
 /*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
   if (!yyvaluep)
     return;
@@ -4022,17 +5773,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
-    FILE *yyoutput;
-    int yytype;
-    YYSTYPE const * const yyvaluep;
-#endif
 {
   if (yytype < YYNTOKENS)
     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
@@ -4043,85 +5785,27 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
   YYFPRINTF (yyoutput, ")");
 }
 
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included).                                                   |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
-    yytype_int16 *yybottom;
-    yytype_int16 *yytop;
-#endif
-{
-  YYFPRINTF (stderr, "Stack now");
-  for (; yybottom <= yytop; yybottom++)
-    {
-      int yybot = *yybottom;
-      YYFPRINTF (stderr, " %d", yybot);
-    }
-  YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top)                                \
-do {                                                                \
-  if (yydebug)                                                        \
-    yy_stack_print ((Bottom), (Top));                                \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced.  |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
-    YYSTYPE *yyvsp;
-    int yyrule;
-#endif
-{
-  int yynrhs = yyr2[yyrule];
-  int yyi;
-  unsigned long int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
-             yyrule - 1, yylno);
-  /* The symbols being reduced.  */
-  for (yyi = 0; yyi < yynrhs; yyi++)
-    {
-      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
-      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
-                       &(yyvsp[(yyi + 1) - (yynrhs)])
-                                              );
-      YYFPRINTF (stderr, "\n");
-    }
-}
-
-# define YY_REDUCE_PRINT(Rule)                \
-do {                                        \
-  if (yydebug)                                \
-    yy_reduce_print (yyvsp, Rule); \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                            \
+do {                                                                            \
+  if (yydebug)                                                                    \
+    {                                                                            \
+      YYFPRINTF (stderr, "%s ", Title);                                            \
+      yy_symbol_print (stderr, Type,                                            \
+                       Value);  \
+      YYFPRINTF (stderr, "\n");                                                    \
+    }                                                                            \
 } while (YYID (0))
 
 /* Nonzero means print parse trace.  It is left uninitialized so that
    multiple parsers can coexist.  */
 int yydebug;
+
 #else /* !YYDEBUG */
+
 # define YYDPRINTF(Args)
 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
 
+#endif /* !YYDEBUG */
 
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
 #ifndef        YYINITDEPTH
@@ -4132,555 +5816,321 @@ int yydebug;
    if the built-in stack extension method is used).
 
    Do not make this value too large; the results are undefined if
-   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+   SIZE_MAX < YYMAXDEPTH * sizeof (GLRStackItem)
    evaluated with infinite-precision integer arithmetic.  */
 
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-\f
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-#  if defined __GLIBC__ && defined _STRING_H
-#   define yystrlen strlen
-#  else
-/* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
-    const char *yystr;
-#endif
-{
-  YYSIZE_T yylen;
-  for (yylen = 0; yystr[yylen]; yylen++)
-    continue;
-  return yylen;
-}
-#  endif
-# endif
-
-# ifndef yystpcpy
-#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-#   define yystpcpy stpcpy
-#  else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
-   YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
-    char *yydest;
-    const char *yysrc;
-#endif
-{
-  char *yyd = yydest;
-  const char *yys = yysrc;
-
-  while ((*yyd++ = *yys++) != '\0')
-    continue;
-
-  return yyd - 1;
-}
-#  endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
-   quotes and backslashes, so that it's suitable for yyerror.  The
-   heuristic is that double-quoting is unnecessary unless the string
-   contains an apostrophe, a comma, or backslash (other than
-   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
-   null, do not copy; instead, return the length of what the result
-   would have been.  */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
-  if (*yystr == '"')
-    {
-      YYSIZE_T yyn = 0;
-      char const *yyp = yystr;
-
-      for (;;)
-        switch (*++yyp)
-          {
-          case '\'':
-          case ',':
-            goto do_not_strip_quotes;
-
-          case '\\':
-            if (*++yyp != '\\')
-              goto do_not_strip_quotes;
-            /* Fall through.  */
-          default:
-            if (yyres)
-              yyres[yyn] = *yyp;
-            yyn++;
-            break;
-
-          case '"':
-            if (yyres)
-              yyres[yyn] = '\0';
-            return yyn;
-          }
-    do_not_strip_quotes: ;
-    }
-
-  if (! yyres)
-    return yystrlen (yystr);
-
-  return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
-
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
-    {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-         constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-                    + sizeof yyexpecting - 1
-                    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-                       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-         YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-        if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-          {
-            if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-              {
-                yycount = 1;
-                yysize = yysize0;
-                yyformat[sizeof yyunexpected - 1] = '\0';
-                break;
-              }
-            yyarg[yycount++] = yytname[yyx];
-            yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-            yysize_overflow |= (yysize1 < yysize);
-            yysize = yysize1;
-            yyfmt = yystpcpy (yyfmt, yyprefix);
-            yyprefix = yyor;
-          }
-
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
-
-      if (yysize_overflow)
-        return YYSIZE_MAXIMUM;
-
-      if (yyresult)
-        {
-          /* Avoid sprintf, as that infringes on the user's name space.
-             Don't have undefined behavior even if the translation
-             produced a string with the wrong number of "%s"s.  */
-          char *yyp = yyresult;
-          int yyi = 0;
-          while ((*yyp = *yyf) != '\0')
-            {
-              if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-                {
-                  yyp += yytnamerr (yyp, yyarg[yyi++]);
-                  yyf += 2;
-                }
-              else
-                {
-                  yyp++;
-                  yyf++;
-                }
-            }
-        }
-      return yysize;
-    }
-}
-#endif /* YYERROR_VERBOSE */
-\f
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol.  |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
-    const char *yymsg;
-    int yytype;
-    YYSTYPE *yyvaluep;
-#endif
-{
-  YYUSE (yyvaluep);
-
-  if (!yymsg)
-    yymsg = "Deleting";
-  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
-  switch (yytype)
-    {
-
-      default:
-        break;
-    }
-}
-
-/* Prevent warnings from -Wmissing-prototypes.  */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/* The lookahead symbol.  */
-int yychar;
-
-/* The semantic value of the lookahead symbol.  */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far.  */
-int yynerrs;
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
-    void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
-     || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-
-
-    int yystate;
-    /* Number of tokens to shift before error messages enabled.  */
-    int yyerrstatus;
-
-    /* The stacks and their tools:
-       `yyss': related to states.
-       `yyvs': related to semantic values.
-
-       Refer to the stacks thru separate pointers, to allow yyoverflow
-       to reallocate them elsewhere.  */
-
-    /* The state stack.  */
-    yytype_int16 yyssa[YYINITDEPTH];
-    yytype_int16 *yyss;
-    yytype_int16 *yyssp;
-
-    /* The semantic value stack.  */
-    YYSTYPE yyvsa[YYINITDEPTH];
-    YYSTYPE *yyvs;
-    YYSTYPE *yyvsp;
-
-    YYSIZE_T yystacksize;
-
-  int yyn;
-  int yyresult;
-  /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
-  /* The variables used to return semantic value and location from the
-     action routines.  */
-  YYSTYPE yyval;
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
 
-#if YYERROR_VERBOSE
-  /* Buffer for error messages, and its allocated size.  */
-  char yymsgbuf[128];
-  char *yymsg = yymsgbuf;
-  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+/* Minimum number of free items on the stack allowed after an
+   allocation.  This is to allow allocation and initialization
+   to be completed by functions that call yyexpandGLRStack before the
+   stack is expanded, thus insuring that all necessary pointers get
+   properly redirected to new data.  */
+#define YYHEADROOM 2
+
+#ifndef YYSTACKEXPANDABLE
+# if (! defined __cplusplus \
+      || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))
+#  define YYSTACKEXPANDABLE 1
+# else
+#  define YYSTACKEXPANDABLE 0
+# endif
 #endif
 
-#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
+#if YYSTACKEXPANDABLE
+# define YY_RESERVE_GLRSTACK(Yystack)                        \
+  do {                                                        \
+    if (Yystack->yyspaceLeft < YYHEADROOM)                \
+      yyexpandGLRStack (Yystack);                        \
+  } while (YYID (0))
+#else
+# define YY_RESERVE_GLRSTACK(Yystack)                        \
+  do {                                                        \
+    if (Yystack->yyspaceLeft < YYHEADROOM)                \
+      yyMemoryExhausted (Yystack);                        \
+  } while (YYID (0))
+#endif
 
-  /* The number of symbols on the RHS of the reduced rule.
-     Keep to zero when no symbol should be popped.  */
-  int yylen = 0;
 
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yystacksize = YYINITDEPTH;
+#if YYERROR_VERBOSE
 
-  YYDPRINTF ((stderr, "Starting parse\n"));
+# ifndef yystpcpy
+#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+#   define yystpcpy stpcpy
+#  else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+   YYDEST.  */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+  char *yyd = yydest;
+  const char *yys = yysrc;
 
-  yystate = 0;
-  yyerrstatus = 0;
-  yynerrs = 0;
-  yychar = YYEMPTY; /* Cause a token to be read.  */
+  while ((*yyd++ = *yys++) != '\0')
+    continue;
 
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
+  return yyd - 1;
+}
+#  endif
+# endif
 
-  goto yysetstate;
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static size_t
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      size_t yyn = 0;
+      char const *yyp = yystr;
 
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
-`------------------------------------------------------------*/
- yynewstate:
-  /* In all cases, when you get here, the value and location stacks
-     have just been pushed.  So pushing a state here evens the stacks.  */
-  yyssp++;
+      for (;;)
+        switch (*++yyp)
+          {
+          case '\'':
+          case ',':
+            goto do_not_strip_quotes;
 
- yysetstate:
-  *yyssp = yystate;
+          case '\\':
+            if (*++yyp != '\\')
+              goto do_not_strip_quotes;
+            /* Fall through.  */
+          default:
+            if (yyres)
+              yyres[yyn] = *yyp;
+            yyn++;
+            break;
 
-  if (yyss + yystacksize - 1 <= yyssp)
-    {
-      /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
+          case '"':
+            if (yyres)
+              yyres[yyn] = '\0';
+            return yyn;
+          }
+    do_not_strip_quotes: ;
+    }
 
-#ifdef yyoverflow
-      {
-        /* Give user a chance to reallocate the stack.  Use copies of
-           these so that the &'s don't force the real ones into
-           memory.  */
-        YYSTYPE *yyvs1 = yyvs;
-        yytype_int16 *yyss1 = yyss;
-
-        /* Each stack pointer address is followed by the size of the
-           data in use in that stack, in bytes.  This used to be a
-           conditional around just the two extra args, but that might
-           be undefined if yyoverflow is a macro.  */
-        yyoverflow (YY_("memory exhausted"),
-                    &yyss1, yysize * sizeof (*yyssp),
-                    &yyvs1, yysize * sizeof (*yyvsp),
-                    &yystacksize);
-
-        yyss = yyss1;
-        yyvs = yyvs1;
-      }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
-      /* Extend the stack our own way.  */
-      if (YYMAXDEPTH <= yystacksize)
-        goto yyexhaustedlab;
-      yystacksize *= 2;
-      if (YYMAXDEPTH < yystacksize)
-        yystacksize = YYMAXDEPTH;
+  if (! yyres)
+    return strlen (yystr);
 
-      {
-        yytype_int16 *yyss1 = yyss;
-        union yyalloc *yyptr =
-          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
-        if (! yyptr)
-          goto yyexhaustedlab;
-        YYSTACK_RELOCATE (yyss_alloc, yyss);
-        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
-        if (yyss1 != yyssa)
-          YYSTACK_FREE (yyss1);
-      }
+  return yystpcpy (yyres, yystr) - yyres;
+}
 # endif
-#endif /* no yyoverflow */
 
-      yyssp = yyss + yysize - 1;
-      yyvsp = yyvs + yysize - 1;
+#endif /* !YYERROR_VERBOSE */
+
+/** State numbers, as in LALR(1) machine */
+typedef int yyStateNum;
+
+/** Rule numbers, as in LALR(1) machine */
+typedef int yyRuleNum;
+
+/** Grammar symbol */
+typedef short int yySymbol;
+
+/** Item references, as in LALR(1) machine */
+typedef short int yyItemNum;
+
+typedef struct yyGLRState yyGLRState;
+typedef struct yyGLRStateSet yyGLRStateSet;
+typedef struct yySemanticOption yySemanticOption;
+typedef union yyGLRStackItem yyGLRStackItem;
+typedef struct yyGLRStack yyGLRStack;
+
+struct yyGLRState {
+  /** Type tag: always true.  */
+  yybool yyisState;
+  /** Type tag for yysemantics.  If true, yysval applies, otherwise
+   *  yyfirstVal applies.  */
+  yybool yyresolved;
+  /** Number of corresponding LALR(1) machine state.  */
+  yyStateNum yylrState;
+  /** Preceding state in this stack */
+  yyGLRState* yypred;
+  /** Source position of the first token produced by my symbol */
+  size_t yyposn;
+  union {
+    /** First in a chain of alternative reductions producing the
+     *  non-terminal corresponding to this state, threaded through
+     *  yynext.  */
+    yySemanticOption* yyfirstVal;
+    /** Semantic value for this state.  */
+    YYSTYPE yysval;
+  } yysemantics;
+  /** Source location for this state.  */
+  YYLTYPE yyloc;
+};
 
-      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                  (unsigned long int) yystacksize));
+struct yyGLRStateSet {
+  yyGLRState** yystates;
+  /** During nondeterministic operation, yylookaheadNeeds tracks which
+   *  stacks have actually needed the current lookahead.  During deterministic
+   *  operation, yylookaheadNeeds[0] is not maintained since it would merely
+   *  duplicate yychar != YYEMPTY.  */
+  yybool* yylookaheadNeeds;
+  size_t yysize, yycapacity;
+};
 
-      if (yyss + yystacksize - 1 <= yyssp)
-        YYABORT;
-    }
+struct yySemanticOption {
+  /** Type tag: always false.  */
+  yybool yyisState;
+  /** Rule number for this reduction */
+  yyRuleNum yyrule;
+  /** The last RHS state in the list of states to be reduced.  */
+  yyGLRState* yystate;
+  /** The lookahead for this reduction.  */
+  int yyrawchar;
+  YYSTYPE yyval;
+  YYLTYPE yyloc;
+  /** Next sibling in chain of options.  To facilitate merging,
+   *  options are chained in decreasing order by address.  */
+  yySemanticOption* yynext;
+};
 
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+/** Type of the items in the GLR stack.  The yyisState field
+ *  indicates which item of the union is valid.  */
+union yyGLRStackItem {
+  yyGLRState yystate;
+  yySemanticOption yyoption;
+};
 
-  if (yystate == YYFINAL)
-    YYACCEPT;
+struct yyGLRStack {
+  int yyerrState;
 
-  goto yybackup;
 
-/*-----------.
-| yybackup.  |
-`-----------*/
-yybackup:
+  YYJMP_BUF yyexception_buffer;
+  yyGLRStackItem* yyitems;
+  yyGLRStackItem* yynextFree;
+  size_t yyspaceLeft;
+  yyGLRState* yysplitPoint;
+  yyGLRState* yylastDeleted;
+  yyGLRStateSet yytops;
+};
 
-  /* Do appropriate processing given the current state.  Read a
-     lookahead token if we need one and don't already have one.  */
+#if YYSTACKEXPANDABLE
+static void yyexpandGLRStack (yyGLRStack* yystackp);
+#endif
 
-  /* First try to decide what to do without reference to lookahead token.  */
-  yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
-    goto yydefault;
+static void yyFail (yyGLRStack* yystackp, const char* yymsg)
+  __attribute__ ((__noreturn__));
+static void
+yyFail (yyGLRStack* yystackp, const char* yymsg)
+{
+  if (yymsg != NULL)
+    yyerror (yymsg);
+  YYLONGJMP (yystackp->yyexception_buffer, 1);
+}
 
-  /* Not known => get a lookahead token if don't already have one.  */
+static void yyMemoryExhausted (yyGLRStack* yystackp)
+  __attribute__ ((__noreturn__));
+static void
+yyMemoryExhausted (yyGLRStack* yystackp)
+{
+  YYLONGJMP (yystackp->yyexception_buffer, 2);
+}
 
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
-  if (yychar == YYEMPTY)
-    {
-      YYDPRINTF ((stderr, "Reading a token: "));
-      yychar = YYLEX;
-    }
+#if YYDEBUG || YYERROR_VERBOSE
+/** A printable representation of TOKEN.  */
+static const char*
+yytokenName (yySymbol yytoken)
+{
+  if (yytoken == YYEMPTY)
+    return "";
 
-  if (yychar <= YYEOF)
-    {
-      yychar = yytoken = YYEOF;
-      YYDPRINTF ((stderr, "Now at end of input.\n"));
-    }
-  else
-    {
-      yytoken = YYTRANSLATE (yychar);
-      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
-    }
+  return yytname[yytoken];
+}
+#endif
 
-  /* If the proper action on seeing token YYTOKEN is to reduce or to
-     detect an error, take that action.  */
-  yyn += yytoken;
-  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
-    goto yydefault;
-  yyn = yytable[yyn];
-  if (yyn <= 0)
+/** Fill in YYVSP[YYLOW1 .. YYLOW0-1] from the chain of states starting
+ *  at YYVSP[YYLOW0].yystate.yypred.  Leaves YYVSP[YYLOW1].yystate.yypred
+ *  containing the pointer to the next state in the chain.  */
+static void yyfillin (yyGLRStackItem *, int, int);
+static void
+yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
+{
+  yyGLRState* s;
+  int i;
+  s = yyvsp[yylow0].yystate.yypred;
+  for (i = yylow0-1; i >= yylow1; i -= 1)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-        goto yyerrlab;
-      yyn = -yyn;
-      goto yyreduce;
+      YYASSERT (s->yyresolved);
+      yyvsp[i].yystate.yyresolved = yytrue;
+      yyvsp[i].yystate.yysemantics.yysval = s->yysemantics.yysval;
+      yyvsp[i].yystate.yyloc = s->yyloc;
+      s = yyvsp[i].yystate.yypred = s->yypred;
     }
+}
 
-  /* Count tokens shifted since error; after three, turn off error
-     status.  */
-  if (yyerrstatus)
-    yyerrstatus--;
-
-  /* Shift the lookahead token.  */
-  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
-  /* Discard the shifted token.  */
-  yychar = YYEMPTY;
-
-  yystate = yyn;
-  *++yyvsp = yylval;
-
-  goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state.  |
-`-----------------------------------------------------------*/
-yydefault:
-  yyn = yydefact[yystate];
-  if (yyn == 0)
-    goto yyerrlab;
-  goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction.  |
-`-----------------------------*/
-yyreduce:
-  /* yyn is the number of a rule to reduce with.  */
-  yylen = yyr2[yyn];
-
-  /* If YYLEN is nonzero, implement the default value of the action:
-     `$$ = $1'.
+/* Do nothing if YYNORMAL or if *YYLOW <= YYLOW1.  Otherwise, fill in
+ * YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
+ * For convenience, always return YYLOW1.  */
+static int yyfill (yyGLRStackItem *, int *, int, yybool);
 
-     Otherwise, the following line sets YYVAL to garbage.
-     This behavior is undocumented and Bison
-     users should not rely upon it.  Assigning to YYVAL
-     unconditionally makes the parser a bit smaller, and it avoids a
-     GCC warning that YYVAL may be used uninitialized.  */
-  yyval = yyvsp[1-yylen];
+static int
+yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
+{
+  if (!yynormal && yylow1 < *yylow)
+    {
+      yyfillin (yyvsp, *yylow, yylow1);
+      *yylow = yylow1;
+    }
+  return yylow1;
+}
 
+/** Perform user action for rule number YYN, with RHS length YYRHSLEN,
+ *  and top stack item YYVSP.  YYLVALP points to place to put semantic
+ *  value ($$), and yylocp points to place for location information
+ *  (@$).  Returns yyok for normal return, yyaccept for YYACCEPT,
+ *  yyerr for YYERROR, yyabort for YYABORT.  */
+/*ARGSUSED*/ static YYRESULTTAG
+yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
+              YYSTYPE* yyvalp,
+              YYLTYPE* YYOPTIONAL_LOC (yylocp),
+              yyGLRStack* yystackp
+              )
+{
+  yybool yynormal =
+    (yystackp->yysplitPoint == NULL);
+  int yylow;
+# undef yyerrok
+# define yyerrok (yystackp->yyerrState = 0)
+# undef YYACCEPT
+# define YYACCEPT return yyaccept
+# undef YYABORT
+# define YYABORT return yyabort
+# undef YYERROR
+# define YYERROR return yyerrok, yyerr
+# undef YYRECOVERING
+# define YYRECOVERING() (yystackp->yyerrState != 0)
+# undef yyclearin
+# define yyclearin (yychar = YYEMPTY)
+# undef YYFILL
+# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
+# undef YYBACKUP
+# define YYBACKUP(Token, Value)                                                     \
+  return yyerror (YY_("syntax error: cannot back up")),     \
+         yyerrok, yyerr
+
+  yylow = 1;
+  if (yyrhslen == 0)
+    *yyvalp = yyval_default;
+  else
+    *yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;
+  YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
 
-  YY_REDUCE_PRINT (yyn);
   switch (yyn)
     {
         case 4:
 
-/* Line 1455 of yacc.c  */
-#line 1464 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1471 "vtkParse.y"
     {
       startSig();
       clearType();
@@ -4690,31 +6140,31 @@ yyreduce:
     }
     break;
 
-  case 27:
+  case 33:
 
-/* Line 1455 of yacc.c  */
-#line 1509 "vtkParse.y"
-    { pushNamespace((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 1524 "vtkParse.y"
+    { pushNamespace((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 28:
+  case 34:
 
-/* Line 1455 of yacc.c  */
-#line 1510 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1525 "vtkParse.y"
     { popNamespace(); }
     break;
 
-  case 36:
+  case 43:
 
-/* Line 1455 of yacc.c  */
-#line 1532 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1548 "vtkParse.y"
     { pushType(); }
     break;
 
-  case 37:
+  case 44:
 
-/* Line 1455 of yacc.c  */
-#line 1533 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1549 "vtkParse.y"
     {
       const char *name = (currentClass ? currentClass->Name : NULL);
       popType();
@@ -4728,45 +6178,97 @@ yyreduce:
     }
     break;
 
-  case 38:
+  case 45:
 
-/* Line 1455 of yacc.c  */
-#line 1546 "vtkParse.y"
-    { start_class((yyvsp[(2) - (2)].str), (yyvsp[(1) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 1563 "vtkParse.y"
+    {
+      start_class((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (5))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.integer));
+      currentClass->IsFinal = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.integer);
+    }
     break;
 
-  case 40:
+  case 47:
 
-/* Line 1455 of yacc.c  */
-#line 1548 "vtkParse.y"
-    { start_class(NULL, (yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 1569 "vtkParse.y"
+    {
+      start_class((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.integer));
+      currentClass->IsFinal = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (4))].yystate.yysemantics.yysval.integer);
+    }
+    break;
+
+  case 48:
+
+/* Line 936 of glr.c  */
+#line 1574 "vtkParse.y"
+    {
+      start_class(NULL, (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.integer));
+    }
     break;
 
-  case 42:
+  case 50:
 
-/* Line 1455 of yacc.c  */
-#line 1552 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 1579 "vtkParse.y"
+    {
+      start_class(NULL, (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer));
+    }
     break;
 
-  case 43:
+  case 51:
 
-/* Line 1455 of yacc.c  */
-#line 1553 "vtkParse.y"
-    { (yyval.integer) = 1; }
+/* Line 936 of glr.c  */
+#line 1584 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 44:
+  case 52:
+
+/* Line 936 of glr.c  */
+#line 1585 "vtkParse.y"
+    { ((*yyvalp).integer) = 1; }
+    break;
+
+  case 53:
+
+/* Line 936 of glr.c  */
+#line 1586 "vtkParse.y"
+    { ((*yyvalp).integer) = 2; }
+    break;
+
+  case 54:
 
-/* Line 1455 of yacc.c  */
-#line 1554 "vtkParse.y"
-    { (yyval.integer) = 2; }
+/* Line 936 of glr.c  */
+#line 1590 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 46:
+  case 55:
 
-/* Line 1455 of yacc.c  */
-#line 1558 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1592 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3("::", (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (4))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 59:
+
+/* Line 936 of glr.c  */
+#line 1600 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
+    break;
+
+  case 60:
+
+/* Line 936 of glr.c  */
+#line 1601 "vtkParse.y"
+    { ((*yyvalp).integer) = (strcmp((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str), "final") == 0); }
+    break;
+
+  case 62:
+
+/* Line 936 of glr.c  */
+#line 1605 "vtkParse.y"
     {
       startSig();
       clearType();
@@ -4776,187 +6278,239 @@ yyreduce:
     }
     break;
 
-  case 49:
+  case 65:
 
-/* Line 1455 of yacc.c  */
-#line 1570 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1617 "vtkParse.y"
     { access_level = VTK_ACCESS_PUBLIC; }
     break;
 
-  case 50:
+  case 66:
 
-/* Line 1455 of yacc.c  */
-#line 1571 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1618 "vtkParse.y"
     { access_level = VTK_ACCESS_PRIVATE; }
     break;
 
-  case 51:
+  case 67:
 
-/* Line 1455 of yacc.c  */
-#line 1572 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1619 "vtkParse.y"
     { access_level = VTK_ACCESS_PROTECTED; }
     break;
 
-  case 70:
+  case 91:
 
-/* Line 1455 of yacc.c  */
-#line 1597 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1649 "vtkParse.y"
     { output_friend_function(); }
     break;
 
-  case 76:
+  case 94:
 
-/* Line 1455 of yacc.c  */
-#line 1611 "vtkParse.y"
-    { add_base_class(currentClass, (yyvsp[(1) - (1)].str), access_level, 0); }
+/* Line 936 of glr.c  */
+#line 1657 "vtkParse.y"
+    { add_base_class(currentClass, (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), access_level, (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 77:
+  case 95:
 
-/* Line 1455 of yacc.c  */
-#line 1613 "vtkParse.y"
-    { add_base_class(currentClass, (yyvsp[(3) - (3)].str), (yyvsp[(2) - (3)].integer), 1); }
+/* Line 936 of glr.c  */
+#line 1659 "vtkParse.y"
+    { add_base_class(currentClass, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (4))].yystate.yysemantics.yysval.integer),
+                     (VTK_PARSE_VIRTUAL | (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (4))].yystate.yysemantics.yysval.integer))); }
     break;
 
-  case 78:
+  case 96:
 
-/* Line 1455 of yacc.c  */
-#line 1615 "vtkParse.y"
-    { add_base_class(currentClass, (yyvsp[(3) - (3)].str), (yyvsp[(1) - (3)].integer), (yyvsp[(2) - (3)].integer)); }
+/* Line 936 of glr.c  */
+#line 1662 "vtkParse.y"
+    { add_base_class(currentClass, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.integer),
+                     ((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (4))].yystate.yysemantics.yysval.integer) | (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (4))].yystate.yysemantics.yysval.integer))); }
     break;
 
-  case 79:
+  case 97:
 
-/* Line 1455 of yacc.c  */
-#line 1618 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 1666 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 80:
+  case 98:
 
-/* Line 1455 of yacc.c  */
-#line 1619 "vtkParse.y"
-    { (yyval.integer) = 1; }
+/* Line 936 of glr.c  */
+#line 1667 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_PARSE_VIRTUAL; }
     break;
 
-  case 81:
+  case 99:
 
-/* Line 1455 of yacc.c  */
-#line 1622 "vtkParse.y"
-    { (yyval.integer) = access_level; }
+/* Line 936 of glr.c  */
+#line 1670 "vtkParse.y"
+    { ((*yyvalp).integer) = access_level; }
     break;
 
-  case 83:
+  case 101:
 
-/* Line 1455 of yacc.c  */
-#line 1626 "vtkParse.y"
-    { (yyval.integer) = VTK_ACCESS_PUBLIC; }
+/* Line 936 of glr.c  */
+#line 1674 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_ACCESS_PUBLIC; }
     break;
 
-  case 84:
+  case 102:
 
-/* Line 1455 of yacc.c  */
-#line 1627 "vtkParse.y"
-    { (yyval.integer) = VTK_ACCESS_PRIVATE; }
+/* Line 936 of glr.c  */
+#line 1675 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_ACCESS_PRIVATE; }
     break;
 
-  case 85:
+  case 103:
 
-/* Line 1455 of yacc.c  */
-#line 1628 "vtkParse.y"
-    { (yyval.integer) = VTK_ACCESS_PROTECTED; }
+/* Line 936 of glr.c  */
+#line 1676 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_ACCESS_PROTECTED; }
     break;
 
-  case 88:
+  case 109:
 
-/* Line 1455 of yacc.c  */
-#line 1644 "vtkParse.y"
-    { pushType(); start_enum((yyvsp[(1) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 1698 "vtkParse.y"
+    { pushType(); }
     break;
 
-  case 89:
+  case 110:
 
-/* Line 1455 of yacc.c  */
-#line 1645 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1699 "vtkParse.y"
     {
       popType();
       clearTypeId();
-      if ((yyvsp[(1) - (5)].str) != NULL)
+      if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.str) != NULL)
         {
-        setTypeId((yyvsp[(1) - (5)].str));
-        setTypeBase(guess_id_type((yyvsp[(1) - (5)].str)));
+        setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.str));
+        setTypeBase(guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.str)));
         }
       end_enum();
     }
     break;
 
-  case 90:
+  case 111:
 
-/* Line 1455 of yacc.c  */
-#line 1657 "vtkParse.y"
-    { (yyval.str) = (yyvsp[(2) - (2)].str); }
+/* Line 936 of glr.c  */
+#line 1712 "vtkParse.y"
+    {
+      start_enum((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (4))].yystate.yysemantics.yysval.integer), getTypeId());
+      clearTypeId();
+      ((*yyvalp).str) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str);
+    }
     break;
 
-  case 91:
+  case 112:
 
-/* Line 1455 of yacc.c  */
-#line 1658 "vtkParse.y"
-    { (yyval.str) = NULL; }
+/* Line 936 of glr.c  */
+#line 1718 "vtkParse.y"
+    {
+      start_enum(NULL, (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer), getTypeId());
+      clearTypeId();
+      ((*yyvalp).str) = NULL;
+    }
     break;
 
-  case 97:
+  case 113:
+
+/* Line 936 of glr.c  */
+#line 1725 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
+    break;
 
-/* Line 1455 of yacc.c  */
-#line 1669 "vtkParse.y"
-    { add_enum((yyvsp[(1) - (1)].str), NULL); }
+  case 114:
+
+/* Line 936 of glr.c  */
+#line 1726 "vtkParse.y"
+    { ((*yyvalp).integer) = 1; }
     break;
 
-  case 98:
+  case 115:
 
-/* Line 1455 of yacc.c  */
-#line 1670 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1727 "vtkParse.y"
+    { ((*yyvalp).integer) = 1; }
+    break;
+
+  case 116:
+
+/* Line 936 of glr.c  */
+#line 1730 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
+    break;
+
+  case 117:
+
+/* Line 936 of glr.c  */
+#line 1731 "vtkParse.y"
+    { pushType(); }
+    break;
+
+  case 118:
+
+/* Line 936 of glr.c  */
+#line 1732 "vtkParse.y"
+    { ((*yyvalp).integer) = getType(); popType(); }
+    break;
+
+  case 122:
+
+/* Line 936 of glr.c  */
+#line 1739 "vtkParse.y"
+    { add_enum((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str), NULL); }
+    break;
+
+  case 123:
+
+/* Line 936 of glr.c  */
+#line 1740 "vtkParse.y"
     { postSig("="); markSig(); }
     break;
 
-  case 99:
+  case 124:
 
-/* Line 1455 of yacc.c  */
-#line 1671 "vtkParse.y"
-    { chopSig(); add_enum((yyvsp[(1) - (4)].str), copySig()); }
+/* Line 936 of glr.c  */
+#line 1741 "vtkParse.y"
+    { chopSig(); add_enum((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.str), copySig()); }
     break;
 
-  case 120:
+  case 147:
 
-/* Line 1455 of yacc.c  */
-#line 1724 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1801 "vtkParse.y"
     { pushFunction(); postSig("("); }
     break;
 
-  case 121:
+  case 148:
 
-/* Line 1455 of yacc.c  */
-#line 1725 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1802 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 122:
+  case 149:
 
-/* Line 1455 of yacc.c  */
-#line 1726 "vtkParse.y"
-    { (yyval.integer) = VTK_PARSE_FUNCTION; popFunction(); }
+/* Line 936 of glr.c  */
+#line 1803 "vtkParse.y"
+    { ((*yyvalp).integer) = (VTK_PARSE_FUNCTION | (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (8))].yystate.yysemantics.yysval.integer)); popFunction(); }
     break;
 
-  case 123:
+  case 150:
 
-/* Line 1455 of yacc.c  */
-#line 1730 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1807 "vtkParse.y"
     {
       ValueInfo *item = (ValueInfo *)malloc(sizeof(ValueInfo));
       vtkParse_InitValue(item);
       item->ItemType = VTK_TYPEDEF_INFO;
       item->Access = access_level;
 
-      handle_complex_type(item, getType(), (yyvsp[(1) - (1)].integer), getSig());
+      handle_complex_type(item, getType(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer), getSig());
 
       if (getVarName())
         {
@@ -4978,66 +6532,102 @@ yyreduce:
     }
     break;
 
-  case 124:
+  case 151:
+
+/* Line 936 of glr.c  */
+#line 1840 "vtkParse.y"
+    { add_using((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), 0); }
+    break;
+
+  case 153:
+
+/* Line 936 of glr.c  */
+#line 1844 "vtkParse.y"
+    { ((*yyvalp).str) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str); }
+    break;
+
+  case 154:
 
-/* Line 1455 of yacc.c  */
-#line 1763 "vtkParse.y"
-    { add_using((yyvsp[(2) - (3)].str), 0); }
+/* Line 936 of glr.c  */
+#line 1846 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 126:
+  case 155:
 
-/* Line 1455 of yacc.c  */
-#line 1767 "vtkParse.y"
-    { (yyval.str) = (yyvsp[(2) - (2)].str); }
+/* Line 936 of glr.c  */
+#line 1848 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 127:
+  case 156:
 
-/* Line 1455 of yacc.c  */
-#line 1769 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 1850 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 128:
+  case 157:
 
-/* Line 1455 of yacc.c  */
-#line 1771 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 1852 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 129:
+  case 158:
 
-/* Line 1455 of yacc.c  */
-#line 1773 "vtkParse.y"
-    { (yyval.str) = vtkstrcat3((yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 1855 "vtkParse.y"
+    { add_using((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), 1); }
     break;
 
-  case 130:
+  case 159:
 
-/* Line 1455 of yacc.c  */
-#line 1775 "vtkParse.y"
-    { (yyval.str) = vtkstrcat3((yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 1858 "vtkParse.y"
+    { markSig(); }
     break;
 
-  case 131:
+  case 160:
+
+/* Line 936 of glr.c  */
+#line 1860 "vtkParse.y"
+    {
+      ValueInfo *item = (ValueInfo *)malloc(sizeof(ValueInfo));
+      vtkParse_InitValue(item);
+      item->ItemType = VTK_TYPEDEF_INFO;
+      item->Access = access_level;
+
+      handle_complex_type(item, getType(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (8))].yystate.yysemantics.yysval.integer), copySig());
+
+      item->Name = (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (8))].yystate.yysemantics.yysval.str);
 
-/* Line 1455 of yacc.c  */
-#line 1778 "vtkParse.y"
-    { add_using((yyvsp[(3) - (4)].str), 1); }
+      if (currentTemplate)
+        {
+        vtkParse_FreeValue(item);
+        }
+      else if (currentClass)
+        {
+        vtkParse_AddTypedefToClass(currentClass, item);
+        }
+      else
+        {
+        vtkParse_AddTypedefToNamespace(currentNamespace, item);
+        }
+    }
     break;
 
-  case 132:
+  case 161:
 
-/* Line 1455 of yacc.c  */
-#line 1786 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1890 "vtkParse.y"
     { postSig("template<> "); clearTypeId(); }
     break;
 
-  case 133:
+  case 162:
 
-/* Line 1455 of yacc.c  */
-#line 1788 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1892 "vtkParse.y"
     {
       postSig("template<");
       pushType();
@@ -5047,10 +6637,10 @@ yyreduce:
     }
     break;
 
-  case 134:
+  case 163:
 
-/* Line 1455 of yacc.c  */
-#line 1796 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1900 "vtkParse.y"
     {
       chopSig();
       if (getSig()[getSigLength()-1] == '>') { postSig(" "); }
@@ -5060,94 +6650,108 @@ yyreduce:
     }
     break;
 
-  case 136:
+  case 165:
 
-/* Line 1455 of yacc.c  */
-#line 1807 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1911 "vtkParse.y"
     { chopSig(); postSig(", "); clearType(); clearTypeId(); }
     break;
 
-  case 138:
+  case 167:
 
-/* Line 1455 of yacc.c  */
-#line 1811 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1915 "vtkParse.y"
     { markSig(); }
     break;
 
-  case 139:
+  case 168:
 
-/* Line 1455 of yacc.c  */
-#line 1813 "vtkParse.y"
-    { add_template_parameter(getType(), (yyvsp[(3) - (3)].integer), copySig()); }
+/* Line 936 of glr.c  */
+#line 1917 "vtkParse.y"
+    { add_template_parameter(getType(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer), copySig()); }
     break;
 
-  case 141:
+  case 170:
 
-/* Line 1455 of yacc.c  */
-#line 1815 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1919 "vtkParse.y"
     { markSig(); }
     break;
 
-  case 142:
+  case 171:
 
-/* Line 1455 of yacc.c  */
-#line 1817 "vtkParse.y"
-    { add_template_parameter(0, (yyvsp[(3) - (3)].integer), copySig()); }
+/* Line 936 of glr.c  */
+#line 1921 "vtkParse.y"
+    { add_template_parameter(0, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer), copySig()); }
     break;
 
-  case 144:
+  case 173:
 
-/* Line 1455 of yacc.c  */
-#line 1819 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1923 "vtkParse.y"
     { pushTemplate(); markSig(); }
     break;
 
-  case 145:
+  case 174:
 
-/* Line 1455 of yacc.c  */
-#line 1820 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1924 "vtkParse.y"
     { postSig("class "); }
     break;
 
-  case 146:
+  case 175:
 
-/* Line 1455 of yacc.c  */
-#line 1822 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1926 "vtkParse.y"
     {
       int i;
       TemplateInfo *newTemplate = currentTemplate;
       popTemplate();
-      add_template_parameter(0, (yyvsp[(5) - (5)].integer), copySig());
+      add_template_parameter(0, (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.integer), copySig());
       i = currentTemplate->NumberOfParameters-1;
       currentTemplate->Parameters[i]->Template = newTemplate;
     }
     break;
 
-  case 148:
+  case 177:
+
+/* Line 936 of glr.c  */
+#line 1937 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
+    break;
+
+  case 178:
+
+/* Line 936 of glr.c  */
+#line 1938 "vtkParse.y"
+    { postSig("..."); ((*yyvalp).integer) = VTK_PARSE_PACK; }
+    break;
+
+  case 179:
 
-/* Line 1455 of yacc.c  */
-#line 1833 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1941 "vtkParse.y"
     { postSig("class "); }
     break;
 
-  case 149:
+  case 180:
 
-/* Line 1455 of yacc.c  */
-#line 1834 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1942 "vtkParse.y"
     { postSig("typename "); }
     break;
 
-  case 152:
+  case 183:
 
-/* Line 1455 of yacc.c  */
-#line 1840 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1948 "vtkParse.y"
     { postSig("="); markSig(); }
     break;
 
-  case 153:
+  case 184:
 
-/* Line 1455 of yacc.c  */
-#line 1842 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1950 "vtkParse.y"
     {
       int i = currentTemplate->NumberOfParameters-1;
       ValueInfo *param = currentTemplate->Parameters[i];
@@ -5156,62 +6760,63 @@ yyreduce:
     }
     break;
 
-  case 156:
+  case 187:
 
-/* Line 1455 of yacc.c  */
-#line 1859 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1967 "vtkParse.y"
     { output_function(); }
     break;
 
-  case 157:
+  case 188:
 
-/* Line 1455 of yacc.c  */
-#line 1860 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1968 "vtkParse.y"
     { output_function(); }
     break;
 
-  case 158:
+  case 189:
 
-/* Line 1455 of yacc.c  */
-#line 1861 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1969 "vtkParse.y"
     { reject_function(); }
     break;
 
-  case 159:
+  case 190:
 
-/* Line 1455 of yacc.c  */
-#line 1862 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1970 "vtkParse.y"
     { reject_function(); }
     break;
 
-  case 167:
+  case 198:
 
-/* Line 1455 of yacc.c  */
-#line 1878 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 1986 "vtkParse.y"
     { output_function(); }
     break;
 
-  case 177:
+  case 208:
 
-/* Line 1455 of yacc.c  */
-#line 1895 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2004 "vtkParse.y"
     {
       postSig("(");
+      currentFunction->IsExplicit = ((getType() & VTK_PARSE_EXPLICIT) != 0);
       set_return(currentFunction, getType(), getTypeId(), 0);
     }
     break;
 
-  case 178:
+  case 209:
 
-/* Line 1455 of yacc.c  */
-#line 1899 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2009 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 179:
+  case 210:
 
-/* Line 1455 of yacc.c  */
-#line 1901 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2011 "vtkParse.y"
     {
       postSig(";");
       closeSig();
@@ -5222,37 +6827,37 @@ yyreduce:
     }
     break;
 
-  case 180:
+  case 211:
 
-/* Line 1455 of yacc.c  */
-#line 1912 "vtkParse.y"
-    { (yyval.str) = copySig(); }
+/* Line 936 of glr.c  */
+#line 2022 "vtkParse.y"
+    { ((*yyvalp).str) = copySig(); }
     break;
 
-  case 181:
+  case 212:
 
-/* Line 1455 of yacc.c  */
-#line 1915 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2025 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 182:
+  case 213:
 
-/* Line 1455 of yacc.c  */
-#line 1916 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2027 "vtkParse.y"
     {
       postSig(";");
       closeSig();
-      currentFunction->Name = (yyvsp[(1) - (3)].str);
+      currentFunction->Name = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.str);
       currentFunction->Comment = vtkstrdup(getComment());
       vtkParseDebug("Parsed operator", currentFunction->Name);
     }
     break;
 
-  case 183:
+  case 214:
 
-/* Line 1455 of yacc.c  */
-#line 1926 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2037 "vtkParse.y"
     {
       postSig("(");
       currentFunction->IsOperator = 1;
@@ -5260,58 +6865,58 @@ yyreduce:
     }
     break;
 
-  case 185:
+  case 216:
 
-/* Line 1455 of yacc.c  */
-#line 1935 "vtkParse.y"
-    { chopSig(); (yyval.str) = vtkstrcat(copySig(), (yyvsp[(2) - (2)].str)); postSig((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2046 "vtkParse.y"
+    { chopSig(); ((*yyvalp).str) = vtkstrcat(copySig(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 186:
+  case 217:
 
-/* Line 1455 of yacc.c  */
-#line 1938 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2049 "vtkParse.y"
     { markSig(); postSig("operator "); }
     break;
 
-  case 187:
+  case 218:
 
-/* Line 1455 of yacc.c  */
-#line 1942 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2053 "vtkParse.y"
     {
       postSig(";");
       closeSig();
-      currentFunction->Name = (yyvsp[(1) - (2)].str);
+      currentFunction->Name = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str);
       currentFunction->Comment = vtkstrdup(getComment());
       vtkParseDebug("Parsed func", currentFunction->Name);
     }
     break;
 
-  case 190:
+  case 221:
 
-/* Line 1455 of yacc.c  */
-#line 1954 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2065 "vtkParse.y"
     { postSig(" throw "); }
     break;
 
-  case 191:
+  case 222:
 
-/* Line 1455 of yacc.c  */
-#line 1954 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2065 "vtkParse.y"
     { chopSig(); }
     break;
 
-  case 192:
+  case 223:
 
-/* Line 1455 of yacc.c  */
-#line 1955 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2066 "vtkParse.y"
     { postSig(" const"); currentFunction->IsConst = 1; }
     break;
 
-  case 193:
+  case 224:
 
-/* Line 1455 of yacc.c  */
-#line 1957 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2068 "vtkParse.y"
     {
       postSig(" = 0");
       currentFunction->IsPureVirtual = 1;
@@ -5319,41 +6924,89 @@ yyreduce:
     }
     break;
 
-  case 196:
+  case 225:
 
-/* Line 1455 of yacc.c  */
-#line 1969 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2074 "vtkParse.y"
+    {
+      postSig(" "); postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str));
+      if (strcmp((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str), "final") == 0) { currentFunction->IsFinal = 1; }
+    }
+    break;
+
+  case 226:
+
+/* Line 936 of glr.c  */
+#line 2078 "vtkParse.y"
+    { chopSig(); }
+    break;
+
+  case 229:
+
+/* Line 936 of glr.c  */
+#line 2083 "vtkParse.y"
+    { postSig(" noexcept"); }
+    break;
+
+  case 230:
+
+/* Line 936 of glr.c  */
+#line 2086 "vtkParse.y"
+    { currentFunction->IsDeleted = 1; }
+    break;
+
+  case 234:
+
+/* Line 936 of glr.c  */
+#line 2093 "vtkParse.y"
+    { postSig(" -> "); clearType(); clearTypeId(); }
+    break;
+
+  case 235:
+
+/* Line 936 of glr.c  */
+#line 2095 "vtkParse.y"
+    {
+      chopSig();
+      set_return(currentFunction, getType(), getTypeId(), 0);
+    }
+    break;
+
+  case 242:
+
+/* Line 936 of glr.c  */
+#line 2113 "vtkParse.y"
     {
       postSig("(");
       set_return(currentFunction, getType(), getTypeId(), 0);
     }
     break;
 
-  case 197:
+  case 243:
 
-/* Line 1455 of yacc.c  */
-#line 1973 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2117 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 200:
+  case 244:
 
-/* Line 1455 of yacc.c  */
-#line 1985 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2125 "vtkParse.y"
     { closeSig(); }
     break;
 
-  case 201:
+  case 245:
 
-/* Line 1455 of yacc.c  */
-#line 1986 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2126 "vtkParse.y"
     { openSig(); }
     break;
 
-  case 202:
+  case 246:
 
-/* Line 1455 of yacc.c  */
-#line 1987 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2128 "vtkParse.y"
     {
       postSig(";");
       closeSig();
@@ -5365,70 +7018,77 @@ yyreduce:
         {
         currentFunction->IsExplicit = 1;
         }
-      currentFunction->Name = (yyvsp[(1) - (5)].str);
+      currentFunction->Name = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (6))].yystate.yysemantics.yysval.str);
       currentFunction->Comment = vtkstrdup(getComment());
       vtkParseDebug("Parsed func", currentFunction->Name);
     }
     break;
 
-  case 203:
+  case 247:
 
-/* Line 1455 of yacc.c  */
-#line 2004 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2145 "vtkParse.y"
     { pushType(); postSig("("); }
     break;
 
-  case 204:
+  case 248:
 
-/* Line 1455 of yacc.c  */
-#line 2005 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2147 "vtkParse.y"
     { popType(); postSig(")"); }
     break;
 
-  case 211:
+  case 255:
 
-/* Line 1455 of yacc.c  */
-#line 2022 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2164 "vtkParse.y"
     { clearType(); clearTypeId(); }
     break;
 
-  case 213:
+  case 257:
 
-/* Line 1455 of yacc.c  */
-#line 2025 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2167 "vtkParse.y"
     { clearType(); clearTypeId(); }
     break;
 
-  case 214:
+  case 258:
 
-/* Line 1455 of yacc.c  */
-#line 2026 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2168 "vtkParse.y"
     { clearType(); clearTypeId(); postSig(", "); }
     break;
 
-  case 216:
+  case 260:
 
-/* Line 1455 of yacc.c  */
-#line 2029 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2171 "vtkParse.y"
     { currentFunction->IsVariadic = 1; postSig(", ..."); }
     break;
 
-  case 217:
+  case 261:
+
+/* Line 936 of glr.c  */
+#line 2173 "vtkParse.y"
+    { currentFunction->IsVariadic = 1; postSig("..."); }
+    break;
+
+  case 262:
 
-/* Line 1455 of yacc.c  */
-#line 2032 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2176 "vtkParse.y"
     { markSig(); }
     break;
 
-  case 218:
+  case 263:
 
-/* Line 1455 of yacc.c  */
-#line 2034 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2178 "vtkParse.y"
     {
       ValueInfo *param = (ValueInfo *)malloc(sizeof(ValueInfo));
       vtkParse_InitValue(param);
 
-      handle_complex_type(param, getType(), (yyvsp[(3) - (3)].integer), copySig());
+      handle_complex_type(param, getType(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer), copySig());
       add_legacy_parameter(currentFunction, param);
 
       if (getVarName())
@@ -5440,10 +7100,10 @@ yyreduce:
     }
     break;
 
-  case 219:
+  case 264:
 
-/* Line 1455 of yacc.c  */
-#line 2049 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2193 "vtkParse.y"
     {
       int i = currentFunction->NumberOfParameters-1;
       if (getVarValue())
@@ -5453,31 +7113,45 @@ yyreduce:
     }
     break;
 
-  case 220:
+  case 265:
 
-/* Line 1455 of yacc.c  */
-#line 2058 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2202 "vtkParse.y"
     { clearVarValue(); }
     break;
 
-  case 222:
+  case 267:
 
-/* Line 1455 of yacc.c  */
-#line 2062 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2206 "vtkParse.y"
     { postSig("="); clearVarValue(); markSig(); }
     break;
 
-  case 223:
+  case 268:
 
-/* Line 1455 of yacc.c  */
-#line 2063 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2207 "vtkParse.y"
     { chopSig(); setVarValue(copySig()); }
     break;
 
-  case 225:
+  case 269:
 
-/* Line 1455 of yacc.c  */
-#line 2074 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2208 "vtkParse.y"
+    { clearVarValue(); markSig(); }
+    break;
+
+  case 270:
+
+/* Line 936 of glr.c  */
+#line 2209 "vtkParse.y"
+    { chopSig(); setVarValue(copySig()); }
+    break;
+
+  case 272:
+
+/* Line 936 of glr.c  */
+#line 2220 "vtkParse.y"
     {
       unsigned int type = getType();
       ValueInfo *var = (ValueInfo *)malloc(sizeof(ValueInfo));
@@ -5485,7 +7159,7 @@ yyreduce:
       var->ItemType = VTK_VARIABLE_INFO;
       var->Access = access_level;
 
-      handle_complex_type(var, type, (yyvsp[(1) - (2)].integer), getSig());
+      handle_complex_type(var, type, (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer), getSig());
 
       var->Name = getVarName();
 
@@ -5500,11 +7174,11 @@ yyreduce:
         var->ItemType = VTK_TYPEDEF_INFO;
         if (currentClass)
           {
-          vtkParse_AddVariableToClass(currentClass, var);
+          vtkParse_AddTypedefToClass(currentClass, var);
           }
         else
           {
-          vtkParse_AddVariableToNamespace(currentNamespace, var);
+          vtkParse_AddTypedefToNamespace(currentNamespace, var);
           }
         }
       /* Is this a constant? */
@@ -5537,1061 +7211,1165 @@ yyreduce:
     }
     break;
 
-  case 229:
+  case 276:
 
-/* Line 1455 of yacc.c  */
-#line 2136 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2282 "vtkParse.y"
     { postSig(", "); }
     break;
 
-  case 232:
+  case 279:
 
-/* Line 1455 of yacc.c  */
-#line 2142 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2288 "vtkParse.y"
     { setTypePtr(0); }
     break;
 
-  case 233:
+  case 280:
 
-/* Line 1455 of yacc.c  */
-#line 2143 "vtkParse.y"
-    { setTypePtr((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2289 "vtkParse.y"
+    { setTypePtr((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 234:
+  case 281:
 
-/* Line 1455 of yacc.c  */
-#line 2147 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2294 "vtkParse.y"
+    {
+      if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer) == VTK_PARSE_FUNCTION)
+        {
+        ((*yyvalp).integer) = (VTK_PARSE_FUNCTION_PTR | (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.integer));
+        }
+      else
+        {
+        ((*yyvalp).integer) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.integer);
+        }
+    }
     break;
 
-  case 235:
+  case 282:
 
-/* Line 1455 of yacc.c  */
-#line 2148 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2304 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 236:
+  case 283:
 
-/* Line 1455 of yacc.c  */
-#line 2150 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2306 "vtkParse.y"
     {
       const char *scope = getScope();
-      unsigned int parens = add_indirection((yyvsp[(1) - (5)].integer), (yyvsp[(2) - (5)].integer));
-      if ((yyvsp[(5) - (5)].integer) == VTK_PARSE_FUNCTION)
+      unsigned int parens = add_indirection((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (6))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (6))].yystate.yysemantics.yysval.integer));
+      if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (6))].yystate.yysemantics.yysval.integer) == VTK_PARSE_FUNCTION)
         {
         if (scope) { scope = vtkstrndup(scope, strlen(scope) - 2); }
         getFunction()->Class = scope;
-        (yyval.integer) = (parens | VTK_PARSE_FUNCTION);
+        ((*yyvalp).integer) = (parens | VTK_PARSE_FUNCTION);
         }
-      else if ((yyvsp[(5) - (5)].integer) == VTK_PARSE_ARRAY)
+      else if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((6) - (6))].yystate.yysemantics.yysval.integer) == VTK_PARSE_ARRAY)
         {
-        (yyval.integer) = add_indirection_to_array(parens);
+        ((*yyvalp).integer) = add_indirection_to_array(parens);
         }
     }
     break;
 
-  case 237:
+  case 284:
 
-/* Line 1455 of yacc.c  */
-#line 2167 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2324 "vtkParse.y"
+    { ((*yyvalp).integer) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.integer); }
     break;
 
-  case 238:
+  case 285:
 
-/* Line 1455 of yacc.c  */
-#line 2168 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2325 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 239:
+  case 286:
 
-/* Line 1455 of yacc.c  */
-#line 2170 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2327 "vtkParse.y"
     {
       const char *scope = getScope();
-      unsigned int parens = add_indirection((yyvsp[(1) - (5)].integer), (yyvsp[(2) - (5)].integer));
-      if ((yyvsp[(5) - (5)].integer) == VTK_PARSE_FUNCTION)
+      unsigned int parens = add_indirection((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (5))].yystate.yysemantics.yysval.integer));
+      if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.integer) == VTK_PARSE_FUNCTION)
         {
         if (scope) { scope = vtkstrndup(scope, strlen(scope) - 2); }
         getFunction()->Class = scope;
-        (yyval.integer) = (parens | VTK_PARSE_FUNCTION);
+        ((*yyvalp).integer) = (parens | VTK_PARSE_FUNCTION);
         }
-      else if ((yyvsp[(5) - (5)].integer) == VTK_PARSE_ARRAY)
+      else if ((((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.integer) == VTK_PARSE_ARRAY)
         {
-        (yyval.integer) = add_indirection_to_array(parens);
+        ((*yyvalp).integer) = add_indirection_to_array(parens);
         }
     }
     break;
 
-  case 240:
-
-/* Line 1455 of yacc.c  */
-#line 2186 "vtkParse.y"
-    { postSig("("); scopeSig(""); (yyval.integer) = 0; }
-    break;
-
-  case 241:
-
-/* Line 1455 of yacc.c  */
-#line 2187 "vtkParse.y"
-    { postSig("("); scopeSig((yyvsp[(1) - (1)].str)); postSig("*");
-         (yyval.integer) = VTK_PARSE_POINTER; }
-    break;
-
-  case 242:
+  case 287:
 
-/* Line 1455 of yacc.c  */
-#line 2189 "vtkParse.y"
-    { postSig("("); scopeSig((yyvsp[(1) - (1)].str)); postSig("&");
-         (yyval.integer) = VTK_PARSE_REF; }
+/* Line 936 of glr.c  */
+#line 2343 "vtkParse.y"
+    { postSig("("); scopeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig("*"); }
     break;
 
-  case 243:
+  case 288:
 
-/* Line 1455 of yacc.c  */
-#line 2193 "vtkParse.y"
-    { postSig("("); scopeSig((yyvsp[(1) - (1)].str)); postSig("*");
-         (yyval.integer) = VTK_PARSE_POINTER; }
+/* Line 936 of glr.c  */
+#line 2344 "vtkParse.y"
+    { ((*yyvalp).integer) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.integer); }
     break;
 
-  case 244:
+  case 289:
 
-/* Line 1455 of yacc.c  */
-#line 2195 "vtkParse.y"
-    { postSig("("); scopeSig((yyvsp[(1) - (1)].str)); postSig("&");
-         (yyval.integer) = VTK_PARSE_REF; }
+/* Line 936 of glr.c  */
+#line 2345 "vtkParse.y"
+    { postSig("("); scopeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig("&");
+         ((*yyvalp).integer) = VTK_PARSE_REF; }
     break;
 
-  case 245:
+  case 290:
 
-/* Line 1455 of yacc.c  */
-#line 2198 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2349 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 246:
+  case 291:
 
-/* Line 1455 of yacc.c  */
-#line 2199 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2350 "vtkParse.y"
     { pushFunction(); postSig("("); }
     break;
 
-  case 247:
+  case 292:
 
-/* Line 1455 of yacc.c  */
-#line 2200 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2351 "vtkParse.y"
     { postSig(")"); }
     break;
 
-  case 248:
+  case 293:
 
-/* Line 1455 of yacc.c  */
-#line 2201 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2352 "vtkParse.y"
     {
-      (yyval.integer) = VTK_PARSE_FUNCTION;
+      ((*yyvalp).integer) = VTK_PARSE_FUNCTION;
       popFunction();
     }
     break;
 
-  case 249:
+  case 294:
 
-/* Line 1455 of yacc.c  */
-#line 2205 "vtkParse.y"
-    { (yyval.integer) = VTK_PARSE_ARRAY; }
+/* Line 936 of glr.c  */
+#line 2356 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_PARSE_ARRAY; }
     break;
 
-  case 252:
+  case 297:
 
-/* Line 1455 of yacc.c  */
-#line 2209 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2360 "vtkParse.y"
     { currentFunction->IsConst = 1; }
     break;
 
-  case 255:
+  case 302:
 
-/* Line 1455 of yacc.c  */
-#line 2215 "vtkParse.y"
-    { (yyval.integer) = add_indirection((yyvsp[(1) - (2)].integer), (yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2368 "vtkParse.y"
+    { ((*yyvalp).integer) = add_indirection((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 257:
+  case 304:
 
-/* Line 1455 of yacc.c  */
-#line 2220 "vtkParse.y"
-    { (yyval.integer) = add_indirection((yyvsp[(1) - (2)].integer), (yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2373 "vtkParse.y"
+    { ((*yyvalp).integer) = add_indirection((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 258:
+  case 305:
 
-/* Line 1455 of yacc.c  */
-#line 2223 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2376 "vtkParse.y"
     { clearVarName(); chopSig(); }
     break;
 
-  case 260:
+  case 307:
 
-/* Line 1455 of yacc.c  */
-#line 2227 "vtkParse.y"
-    { setVarName((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2380 "vtkParse.y"
+    { setVarName((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 261:
+  case 308:
 
-/* Line 1455 of yacc.c  */
-#line 2228 "vtkParse.y"
-    { setVarName((yyvsp[(1) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 2382 "vtkParse.y"
+    { setVarName((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (4))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 265:
+  case 312:
 
-/* Line 1455 of yacc.c  */
-#line 2236 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2390 "vtkParse.y"
     { clearArray(); }
     break;
 
-  case 267:
+  case 314:
 
-/* Line 1455 of yacc.c  */
-#line 2240 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2394 "vtkParse.y"
     { clearArray(); }
     break;
 
-  case 271:
+  case 318:
 
-/* Line 1455 of yacc.c  */
-#line 2247 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2401 "vtkParse.y"
     { postSig("["); }
     break;
 
-  case 272:
+  case 319:
 
-/* Line 1455 of yacc.c  */
-#line 2247 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2402 "vtkParse.y"
     { postSig("]"); }
     break;
 
-  case 273:
+  case 320:
 
-/* Line 1455 of yacc.c  */
-#line 2250 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2405 "vtkParse.y"
     { pushArraySize(""); }
     break;
 
-  case 274:
+  case 321:
 
-/* Line 1455 of yacc.c  */
-#line 2251 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2406 "vtkParse.y"
     { markSig(); }
     break;
 
-  case 275:
+  case 322:
 
-/* Line 1455 of yacc.c  */
-#line 2251 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2406 "vtkParse.y"
     { chopSig(); pushArraySize(copySig()); }
     break;
 
-  case 280:
+  case 328:
 
-/* Line 1455 of yacc.c  */
-#line 2267 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2420 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat("~", (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 281:
+  case 329:
 
-/* Line 1455 of yacc.c  */
-#line 2269 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2421 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat("~", (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 282:
+  case 330:
+
+/* Line 936 of glr.c  */
+#line 2425 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 331:
+
+/* Line 936 of glr.c  */
+#line 2427 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 332:
+
+/* Line 936 of glr.c  */
+#line 2429 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 333:
+
+/* Line 936 of glr.c  */
+#line 2433 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 334:
+
+/* Line 936 of glr.c  */
+#line 2435 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 335:
+
+/* Line 936 of glr.c  */
+#line 2437 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 336:
+
+/* Line 936 of glr.c  */
+#line 2439 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 337:
+
+/* Line 936 of glr.c  */
+#line 2441 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 338:
+
+/* Line 936 of glr.c  */
+#line 2443 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat3((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (3))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 339:
+
+/* Line 936 of glr.c  */
+#line 2444 "vtkParse.y"
+    { postSig("template "); }
+    break;
+
+  case 340:
+
+/* Line 936 of glr.c  */
+#line 2446 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat4((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (5))].yystate.yysemantics.yysval.str), "template ", (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.str), (((yyGLRStackItem const *)yyvsp)[YYFILL ((5) - (5))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 341:
+
+/* Line 936 of glr.c  */
+#line 2449 "vtkParse.y"
+    { postSig("~"); }
+    break;
+
+  case 342:
+
+/* Line 936 of glr.c  */
+#line 2452 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 343:
+
+/* Line 936 of glr.c  */
+#line 2455 "vtkParse.y"
+    { ((*yyvalp).str) = "::"; postSig(((*yyvalp).str)); }
+    break;
+
+  case 344:
 
-/* Line 1455 of yacc.c  */
-#line 2271 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2458 "vtkParse.y"
+    { markSig(); postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); postSig("<"); }
     break;
 
-  case 283:
+  case 345:
 
-/* Line 1455 of yacc.c  */
-#line 2275 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2460 "vtkParse.y"
+    {
+      chopSig(); if (getSig()[getSigLength()-1] == '>') { postSig(" "); }
+      postSig(">"); ((*yyvalp).str) = copySig(); clearTypeId();
+    }
     break;
 
-  case 284:
+  case 346:
 
-/* Line 1455 of yacc.c  */
-#line 2277 "vtkParse.y"
-    { (yyval.str) = vtkstrcat((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2466 "vtkParse.y"
+    { markSig(); postSig("decltype"); }
     break;
 
-  case 285:
+  case 347:
 
-/* Line 1455 of yacc.c  */
-#line 2279 "vtkParse.y"
-    { (yyval.str) = vtkstrcat3((yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 2467 "vtkParse.y"
+    { chopSig(); ((*yyvalp).str) = copySig(); clearTypeId(); }
     break;
 
-  case 286:
+  case 348:
 
-/* Line 1455 of yacc.c  */
-#line 2281 "vtkParse.y"
-    { (yyval.str) = vtkstrcat3((yyvsp[(1) - (3)].str), (yyvsp[(2) - (3)].str), (yyvsp[(3) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 2475 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 287:
+  case 349:
 
-/* Line 1455 of yacc.c  */
-#line 2282 "vtkParse.y"
-    { postSig("template "); }
+/* Line 936 of glr.c  */
+#line 2476 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 288:
+  case 350:
 
-/* Line 1455 of yacc.c  */
-#line 2284 "vtkParse.y"
-    { (yyval.str) = vtkstrcat4((yyvsp[(1) - (5)].str), "template ", (yyvsp[(4) - (5)].str), (yyvsp[(5) - (5)].str)); }
+/* Line 936 of glr.c  */
+#line 2477 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 289:
+  case 351:
 
-/* Line 1455 of yacc.c  */
-#line 2287 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2478 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 290:
+  case 352:
 
-/* Line 1455 of yacc.c  */
-#line 2290 "vtkParse.y"
-    { (yyval.str) = "::"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2479 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 291:
+  case 353:
 
-/* Line 1455 of yacc.c  */
-#line 2293 "vtkParse.y"
-    { markSig(); postSig((yyvsp[(1) - (2)].str)); postSig("<"); }
+/* Line 936 of glr.c  */
+#line 2480 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 292:
+  case 354:
 
-/* Line 1455 of yacc.c  */
-#line 2295 "vtkParse.y"
-    {
-      chopSig(); if (getSig()[getSigLength()-1] == '>') { postSig(" "); }
-      postSig(">"); (yyval.str) = copySig(); clearTypeId();
-    }
+/* Line 936 of glr.c  */
+#line 2481 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 293:
+  case 355:
 
-/* Line 1455 of yacc.c  */
-#line 2308 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2482 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 294:
+  case 356:
 
-/* Line 1455 of yacc.c  */
-#line 2309 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2483 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 295:
+  case 357:
 
-/* Line 1455 of yacc.c  */
-#line 2310 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2484 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 296:
+  case 358:
 
-/* Line 1455 of yacc.c  */
-#line 2311 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2485 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeInt8"; postSig(((*yyvalp).str)); }
     break;
 
-  case 297:
+  case 359:
 
-/* Line 1455 of yacc.c  */
-#line 2312 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2486 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeUInt8"; postSig(((*yyvalp).str)); }
     break;
 
-  case 298:
+  case 360:
 
-/* Line 1455 of yacc.c  */
-#line 2313 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2487 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeInt16"; postSig(((*yyvalp).str)); }
     break;
 
-  case 299:
+  case 361:
 
-/* Line 1455 of yacc.c  */
-#line 2314 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2488 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeUInt16"; postSig(((*yyvalp).str)); }
     break;
 
-  case 300:
+  case 362:
 
-/* Line 1455 of yacc.c  */
-#line 2315 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2489 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeInt32"; postSig(((*yyvalp).str)); }
     break;
 
-  case 301:
+  case 363:
 
-/* Line 1455 of yacc.c  */
-#line 2316 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2490 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeUInt32"; postSig(((*yyvalp).str)); }
     break;
 
-  case 302:
+  case 364:
 
-/* Line 1455 of yacc.c  */
-#line 2317 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2491 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeInt64"; postSig(((*yyvalp).str)); }
     break;
 
-  case 303:
+  case 365:
 
-/* Line 1455 of yacc.c  */
-#line 2318 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2492 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeUInt64"; postSig(((*yyvalp).str)); }
     break;
 
-  case 304:
+  case 366:
 
-/* Line 1455 of yacc.c  */
-#line 2319 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2493 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeFloat32"; postSig(((*yyvalp).str)); }
     break;
 
-  case 305:
+  case 367:
 
-/* Line 1455 of yacc.c  */
-#line 2320 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2494 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkTypeFloat64"; postSig(((*yyvalp).str)); }
     break;
 
-  case 306:
+  case 368:
 
-/* Line 1455 of yacc.c  */
-#line 2321 "vtkParse.y"
-    { (yyval.str) = vtkstrcat("~",(yyvsp[(2) - (2)].str)); postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2495 "vtkParse.y"
+    { ((*yyvalp).str) = "vtkIdType"; postSig(((*yyvalp).str)); }
     break;
 
-  case 307:
+  case 379:
 
-/* Line 1455 of yacc.c  */
-#line 2322 "vtkParse.y"
-    { (yyval.str) = "size_t"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2520 "vtkParse.y"
+    { setTypeBase(buildTypeBase(getType(), (((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer))); }
     break;
 
-  case 308:
+  case 380:
 
-/* Line 1455 of yacc.c  */
-#line 2323 "vtkParse.y"
-    { (yyval.str) = "ssize_t"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2521 "vtkParse.y"
+    { setTypeMod(VTK_PARSE_TYPEDEF); }
     break;
 
-  case 309:
+  case 381:
 
-/* Line 1455 of yacc.c  */
-#line 2324 "vtkParse.y"
-    { (yyval.str) = "vtkTypeInt8"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2522 "vtkParse.y"
+    { setTypeMod(VTK_PARSE_FRIEND); }
     break;
 
-  case 310:
+  case 384:
 
-/* Line 1455 of yacc.c  */
-#line 2325 "vtkParse.y"
-    { (yyval.str) = "vtkTypeUInt8"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2529 "vtkParse.y"
+    { setTypeMod((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 311:
+  case 385:
 
-/* Line 1455 of yacc.c  */
-#line 2326 "vtkParse.y"
-    { (yyval.str) = "vtkTypeInt16"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2530 "vtkParse.y"
+    { setTypeMod((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 312:
+  case 386:
 
-/* Line 1455 of yacc.c  */
-#line 2327 "vtkParse.y"
-    { (yyval.str) = "vtkTypeUInt16"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2531 "vtkParse.y"
+    { setTypeMod((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 313:
+  case 387:
 
-/* Line 1455 of yacc.c  */
-#line 2328 "vtkParse.y"
-    { (yyval.str) = "vtkTypeInt32"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2532 "vtkParse.y"
+    { postSig("constexpr "); ((*yyvalp).integer) = 0; }
     break;
 
-  case 314:
+  case 388:
 
-/* Line 1455 of yacc.c  */
-#line 2329 "vtkParse.y"
-    { (yyval.str) = "vtkTypeUInt32"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2535 "vtkParse.y"
+    { postSig("mutable "); ((*yyvalp).integer) = VTK_PARSE_MUTABLE; }
     break;
 
-  case 315:
+  case 389:
 
-/* Line 1455 of yacc.c  */
-#line 2330 "vtkParse.y"
-    { (yyval.str) = "vtkTypeInt64"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2536 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 316:
+  case 390:
 
-/* Line 1455 of yacc.c  */
-#line 2331 "vtkParse.y"
-    { (yyval.str) = "vtkTypeUInt64"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2537 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 317:
+  case 391:
 
-/* Line 1455 of yacc.c  */
-#line 2332 "vtkParse.y"
-    { (yyval.str) = "vtkTypeFloat32"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2538 "vtkParse.y"
+    { postSig("static "); ((*yyvalp).integer) = VTK_PARSE_STATIC; }
     break;
 
-  case 318:
+  case 392:
 
-/* Line 1455 of yacc.c  */
-#line 2333 "vtkParse.y"
-    { (yyval.str) = "vtkTypeFloat64"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2540 "vtkParse.y"
+    { postSig("thread_local "); ((*yyvalp).integer) = VTK_PARSE_THREAD_LOCAL; }
     break;
 
-  case 319:
+  case 393:
 
-/* Line 1455 of yacc.c  */
-#line 2334 "vtkParse.y"
-    { (yyval.str) = "vtkIdType"; postSig((yyval.str)); }
+/* Line 936 of glr.c  */
+#line 2543 "vtkParse.y"
+    { ((*yyvalp).integer) = 0; }
     break;
 
-  case 330:
+  case 394:
 
-/* Line 1455 of yacc.c  */
-#line 2360 "vtkParse.y"
-    { setTypeBase(buildTypeBase(getType(), (yyvsp[(1) - (1)].integer))); }
+/* Line 936 of glr.c  */
+#line 2544 "vtkParse.y"
+    { postSig("virtual "); ((*yyvalp).integer) = VTK_PARSE_VIRTUAL; }
     break;
 
-  case 331:
+  case 395:
 
-/* Line 1455 of yacc.c  */
-#line 2361 "vtkParse.y"
-    { setTypeMod(VTK_PARSE_TYPEDEF); }
+/* Line 936 of glr.c  */
+#line 2545 "vtkParse.y"
+    { postSig("explicit "); ((*yyvalp).integer) = VTK_PARSE_EXPLICIT; }
     break;
 
-  case 332:
+  case 396:
 
-/* Line 1455 of yacc.c  */
-#line 2362 "vtkParse.y"
-    { setTypeMod(VTK_PARSE_FRIEND); }
+/* Line 936 of glr.c  */
+#line 2548 "vtkParse.y"
+    { postSig("const "); ((*yyvalp).integer) = VTK_PARSE_CONST; }
     break;
 
-  case 335:
+  case 397:
 
-/* Line 1455 of yacc.c  */
-#line 2369 "vtkParse.y"
-    { setTypeMod((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2549 "vtkParse.y"
+    { postSig("volatile "); ((*yyvalp).integer) = VTK_PARSE_VOLATILE; }
     break;
 
-  case 336:
+  case 399:
 
-/* Line 1455 of yacc.c  */
-#line 2370 "vtkParse.y"
-    { setTypeMod((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2554 "vtkParse.y"
+    { ((*yyvalp).integer) = ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer) | (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 337:
+  case 401:
 
-/* Line 1455 of yacc.c  */
-#line 2371 "vtkParse.y"
-    { setTypeMod((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2564 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 338:
+  case 403:
 
-/* Line 1455 of yacc.c  */
-#line 2374 "vtkParse.y"
-    { postSig("mutable "); (yyval.integer) = VTK_PARSE_MUTABLE; }
+/* Line 936 of glr.c  */
+#line 2566 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 339:
+  case 406:
 
-/* Line 1455 of yacc.c  */
-#line 2375 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2572 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (3))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 340:
+  case 407:
 
-/* Line 1455 of yacc.c  */
-#line 2376 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2574 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 341:
+  case 409:
 
-/* Line 1455 of yacc.c  */
-#line 2377 "vtkParse.y"
-    { postSig("static "); (yyval.integer) = VTK_PARSE_STATIC; }
+/* Line 936 of glr.c  */
+#line 2579 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = 0; }
     break;
 
-  case 342:
+  case 410:
 
-/* Line 1455 of yacc.c  */
-#line 2380 "vtkParse.y"
-    { (yyval.integer) = 0; }
+/* Line 936 of glr.c  */
+#line 2580 "vtkParse.y"
+    { postSig("typename "); }
     break;
 
-  case 343:
+  case 411:
 
-/* Line 1455 of yacc.c  */
-#line 2381 "vtkParse.y"
-    { postSig("virtual "); (yyval.integer) = VTK_PARSE_VIRTUAL; }
+/* Line 936 of glr.c  */
+#line 2581 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 344:
+  case 412:
 
-/* Line 1455 of yacc.c  */
-#line 2382 "vtkParse.y"
-    { postSig("explicit "); (yyval.integer) = VTK_PARSE_EXPLICIT; }
+/* Line 936 of glr.c  */
+#line 2583 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 345:
+  case 413:
 
-/* Line 1455 of yacc.c  */
-#line 2385 "vtkParse.y"
-    { postSig("const "); (yyval.integer) = VTK_PARSE_CONST; }
+/* Line 936 of glr.c  */
+#line 2585 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 346:
+  case 415:
 
-/* Line 1455 of yacc.c  */
-#line 2386 "vtkParse.y"
-    { postSig("volatile "); (yyval.integer) = VTK_PARSE_VOLATILE; }
+/* Line 936 of glr.c  */
+#line 2591 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 348:
+  case 417:
 
-/* Line 1455 of yacc.c  */
-#line 2391 "vtkParse.y"
-    { (yyval.integer) = ((yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2593 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 350:
+  case 420:
 
-/* Line 1455 of yacc.c  */
-#line 2402 "vtkParse.y"
-    { setTypeBase((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2600 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 352:
+  case 422:
 
-/* Line 1455 of yacc.c  */
-#line 2404 "vtkParse.y"
-    { setTypeBase((yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2602 "vtkParse.y"
+    { setTypeBase((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 355:
+  case 425:
 
-/* Line 1455 of yacc.c  */
-#line 2409 "vtkParse.y"
-    { postSig("typename "); }
+/* Line 936 of glr.c  */
+#line 2608 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = 0; }
     break;
 
-  case 356:
+  case 426:
 
-/* Line 1455 of yacc.c  */
-#line 2410 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(3) - (3)].str)); (yyval.integer) = guess_id_type((yyvsp[(3) - (3)].str)); }
+/* Line 936 of glr.c  */
+#line 2610 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 357:
+  case 427:
 
-/* Line 1455 of yacc.c  */
-#line 2412 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(1) - (1)].str)); (yyval.integer) = guess_id_type((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2612 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 358:
+  case 428:
 
-/* Line 1455 of yacc.c  */
-#line 2414 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(1) - (1)].str)); (yyval.integer) = guess_id_type((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2614 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 359:
+  case 429:
 
-/* Line 1455 of yacc.c  */
-#line 2416 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(2) - (2)].str)); (yyval.integer) = guess_id_type((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2616 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 360:
+  case 430:
 
-/* Line 1455 of yacc.c  */
-#line 2418 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(2) - (2)].str)); (yyval.integer) = guess_id_type((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2618 "vtkParse.y"
+    { postSig(" "); setTypeId((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = guess_id_type((((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
     break;
 
-  case 362:
+  case 431:
 
-/* Line 1455 of yacc.c  */
-#line 2424 "vtkParse.y"
-    { setTypeBase((yyvsp[(1) - (1)].integer)); }
+/* Line 936 of glr.c  */
+#line 2621 "vtkParse.y"
+    { setTypeId(""); }
     break;
 
-  case 364:
+  case 433:
 
-/* Line 1455 of yacc.c  */
-#line 2426 "vtkParse.y"
-    { setTypeBase((yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2625 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_STRING; }
     break;
 
-  case 367:
+  case 434:
 
-/* Line 1455 of yacc.c  */
-#line 2432 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(1) - (1)].str)); (yyval.integer) = guess_id_type((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2626 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_UNICODE_STRING;}
     break;
 
-  case 368:
+  case 435:
 
-/* Line 1455 of yacc.c  */
-#line 2434 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(1) - (1)].str)); (yyval.integer) = guess_id_type((yyvsp[(1) - (1)].str)); }
+/* Line 936 of glr.c  */
+#line 2627 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_OSTREAM; }
     break;
 
-  case 369:
+  case 436:
 
-/* Line 1455 of yacc.c  */
-#line 2436 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(2) - (2)].str)); (yyval.integer) = guess_id_type((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2628 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_ISTREAM; }
     break;
 
-  case 370:
+  case 437:
 
-/* Line 1455 of yacc.c  */
-#line 2438 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(2) - (2)].str)); (yyval.integer) = guess_id_type((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2629 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_UNKNOWN; }
     break;
 
-  case 371:
+  case 438:
 
-/* Line 1455 of yacc.c  */
-#line 2440 "vtkParse.y"
-    { postSig(" "); setTypeId((yyvsp[(2) - (2)].str)); (yyval.integer) = guess_id_type((yyvsp[(2) - (2)].str)); }
+/* Line 936 of glr.c  */
+#line 2630 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_OBJECT; }
     break;
 
-  case 372:
+  case 439:
 
-/* Line 1455 of yacc.c  */
-#line 2443 "vtkParse.y"
-    { setTypeId(""); }
+/* Line 936 of glr.c  */
+#line 2631 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_QOBJECT; }
     break;
 
-  case 374:
+  case 440:
 
-/* Line 1455 of yacc.c  */
-#line 2447 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_STRING; }
+/* Line 936 of glr.c  */
+#line 2632 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_NULLPTR_T; }
     break;
 
-  case 375:
+  case 441:
 
-/* Line 1455 of yacc.c  */
-#line 2448 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_UNICODE_STRING;}
+/* Line 936 of glr.c  */
+#line 2633 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_SSIZE_T; }
     break;
 
-  case 376:
+  case 442:
 
-/* Line 1455 of yacc.c  */
-#line 2449 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_OSTREAM; }
+/* Line 936 of glr.c  */
+#line 2634 "vtkParse.y"
+    { typeSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); ((*yyvalp).integer) = VTK_PARSE_SIZE_T; }
     break;
 
-  case 377:
+  case 443:
 
-/* Line 1455 of yacc.c  */
-#line 2450 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_ISTREAM; }
+/* Line 936 of glr.c  */
+#line 2635 "vtkParse.y"
+    { typeSig("vtkTypeInt8"); ((*yyvalp).integer) = VTK_PARSE_INT8; }
     break;
 
-  case 378:
+  case 444:
 
-/* Line 1455 of yacc.c  */
-#line 2451 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_UNKNOWN; }
+/* Line 936 of glr.c  */
+#line 2636 "vtkParse.y"
+    { typeSig("vtkTypeUInt8"); ((*yyvalp).integer) = VTK_PARSE_UINT8; }
     break;
 
-  case 379:
+  case 445:
 
-/* Line 1455 of yacc.c  */
-#line 2452 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_OBJECT; }
+/* Line 936 of glr.c  */
+#line 2637 "vtkParse.y"
+    { typeSig("vtkTypeInt16"); ((*yyvalp).integer) = VTK_PARSE_INT16; }
     break;
 
-  case 380:
+  case 446:
 
-/* Line 1455 of yacc.c  */
-#line 2453 "vtkParse.y"
-    { typeSig((yyvsp[(1) - (1)].str)); (yyval.integer) = VTK_PARSE_QOBJECT; }
+/* Line 936 of glr.c  */
+#line 2638 "vtkParse.y"
+    { typeSig("vtkTypeUInt16"); ((*yyvalp).integer) = VTK_PARSE_UINT16; }
     break;
 
-  case 381:
+  case 447:
 
-/* Line 1455 of yacc.c  */
-#line 2454 "vtkParse.y"
-    { typeSig("ssize_t"); (yyval.integer) = VTK_PARSE_SSIZE_T; }
+/* Line 936 of glr.c  */
+#line 2639 "vtkParse.y"
+    { typeSig("vtkTypeInt32"); ((*yyvalp).integer) = VTK_PARSE_INT32; }
     break;
 
-  case 382:
+  case 448:
 
-/* Line 1455 of yacc.c  */
-#line 2455 "vtkParse.y"
-    { typeSig("size_t"); (yyval.integer) = VTK_PARSE_SIZE_T; }
+/* Line 936 of glr.c  */
+#line 2640 "vtkParse.y"
+    { typeSig("vtkTypeUInt32"); ((*yyvalp).integer) = VTK_PARSE_UINT32; }
     break;
 
-  case 383:
+  case 449:
 
-/* Line 1455 of yacc.c  */
-#line 2456 "vtkParse.y"
-    { typeSig("vtkTypeInt8"); (yyval.integer) = VTK_PARSE_INT8; }
+/* Line 936 of glr.c  */
+#line 2641 "vtkParse.y"
+    { typeSig("vtkTypeInt64"); ((*yyvalp).integer) = VTK_PARSE_INT64; }
     break;
 
-  case 384:
+  case 450:
 
-/* Line 1455 of yacc.c  */
-#line 2457 "vtkParse.y"
-    { typeSig("vtkTypeUInt8"); (yyval.integer) = VTK_PARSE_UINT8; }
+/* Line 936 of glr.c  */
+#line 2642 "vtkParse.y"
+    { typeSig("vtkTypeUInt64"); ((*yyvalp).integer) = VTK_PARSE_UINT64; }
     break;
 
-  case 385:
+  case 451:
 
-/* Line 1455 of yacc.c  */
-#line 2458 "vtkParse.y"
-    { typeSig("vtkTypeInt16"); (yyval.integer) = VTK_PARSE_INT16; }
+/* Line 936 of glr.c  */
+#line 2643 "vtkParse.y"
+    { typeSig("vtkTypeFloat32"); ((*yyvalp).integer) = VTK_PARSE_FLOAT32; }
     break;
 
-  case 386:
+  case 452:
 
-/* Line 1455 of yacc.c  */
-#line 2459 "vtkParse.y"
-    { typeSig("vtkTypeUInt16"); (yyval.integer) = VTK_PARSE_UINT16; }
+/* Line 936 of glr.c  */
+#line 2644 "vtkParse.y"
+    { typeSig("vtkTypeFloat64"); ((*yyvalp).integer) = VTK_PARSE_FLOAT64; }
     break;
 
-  case 387:
+  case 453:
 
-/* Line 1455 of yacc.c  */
-#line 2460 "vtkParse.y"
-    { typeSig("vtkTypeInt32"); (yyval.integer) = VTK_PARSE_INT32; }
+/* Line 936 of glr.c  */
+#line 2645 "vtkParse.y"
+    { typeSig("vtkIdType"); ((*yyvalp).integer) = VTK_PARSE_ID_TYPE; }
     break;
 
-  case 388:
+  case 454:
 
-/* Line 1455 of yacc.c  */
-#line 2461 "vtkParse.y"
-    { typeSig("vtkTypeUInt32"); (yyval.integer) = VTK_PARSE_UINT32; }
+/* Line 936 of glr.c  */
+#line 2648 "vtkParse.y"
+    { postSig("auto "); ((*yyvalp).integer) = 0; }
     break;
 
-  case 389:
+  case 455:
 
-/* Line 1455 of yacc.c  */
-#line 2462 "vtkParse.y"
-    { typeSig("vtkTypeInt64"); (yyval.integer) = VTK_PARSE_INT64; }
+/* Line 936 of glr.c  */
+#line 2649 "vtkParse.y"
+    { postSig("void "); ((*yyvalp).integer) = VTK_PARSE_VOID; }
     break;
 
-  case 390:
+  case 456:
 
-/* Line 1455 of yacc.c  */
-#line 2463 "vtkParse.y"
-    { typeSig("vtkTypeUInt64"); (yyval.integer) = VTK_PARSE_UINT64; }
+/* Line 936 of glr.c  */
+#line 2650 "vtkParse.y"
+    { postSig("bool "); ((*yyvalp).integer) = VTK_PARSE_BOOL; }
     break;
 
-  case 391:
+  case 457:
 
-/* Line 1455 of yacc.c  */
-#line 2464 "vtkParse.y"
-    { typeSig("vtkTypeFloat32"); (yyval.integer) = VTK_PARSE_FLOAT32; }
+/* Line 936 of glr.c  */
+#line 2651 "vtkParse.y"
+    { postSig("float "); ((*yyvalp).integer) = VTK_PARSE_FLOAT; }
     break;
 
-  case 392:
+  case 458:
 
-/* Line 1455 of yacc.c  */
-#line 2465 "vtkParse.y"
-    { typeSig("vtkTypeFloat64"); (yyval.integer) = VTK_PARSE_FLOAT64; }
+/* Line 936 of glr.c  */
+#line 2652 "vtkParse.y"
+    { postSig("double "); ((*yyvalp).integer) = VTK_PARSE_DOUBLE; }
     break;
 
-  case 393:
+  case 459:
 
-/* Line 1455 of yacc.c  */
-#line 2466 "vtkParse.y"
-    { typeSig("vtkIdType"); (yyval.integer) = VTK_PARSE_ID_TYPE; }
+/* Line 936 of glr.c  */
+#line 2653 "vtkParse.y"
+    { postSig("char "); ((*yyvalp).integer) = VTK_PARSE_CHAR; }
     break;
 
-  case 394:
+  case 460:
 
-/* Line 1455 of yacc.c  */
-#line 2469 "vtkParse.y"
-    { postSig("void "); (yyval.integer) = VTK_PARSE_VOID; }
+/* Line 936 of glr.c  */
+#line 2654 "vtkParse.y"
+    { postSig("char16_t "); ((*yyvalp).integer) = VTK_PARSE_CHAR16_T; }
     break;
 
-  case 395:
+  case 461:
 
-/* Line 1455 of yacc.c  */
-#line 2470 "vtkParse.y"
-    { postSig("bool "); (yyval.integer) = VTK_PARSE_BOOL; }
+/* Line 936 of glr.c  */
+#line 2655 "vtkParse.y"
+    { postSig("char32_t "); ((*yyvalp).integer) = VTK_PARSE_CHAR32_T; }
     break;
 
-  case 396:
+  case 462:
 
-/* Line 1455 of yacc.c  */
-#line 2471 "vtkParse.y"
-    { postSig("float "); (yyval.integer) = VTK_PARSE_FLOAT; }
+/* Line 936 of glr.c  */
+#line 2656 "vtkParse.y"
+    { postSig("wchar_t "); ((*yyvalp).integer) = VTK_PARSE_WCHAR_T; }
     break;
 
-  case 397:
+  case 463:
 
-/* Line 1455 of yacc.c  */
-#line 2472 "vtkParse.y"
-    { postSig("double "); (yyval.integer) = VTK_PARSE_DOUBLE; }
+/* Line 936 of glr.c  */
+#line 2657 "vtkParse.y"
+    { postSig("int "); ((*yyvalp).integer) = VTK_PARSE_INT; }
     break;
 
-  case 398:
+  case 464:
 
-/* Line 1455 of yacc.c  */
-#line 2473 "vtkParse.y"
-    { postSig("char "); (yyval.integer) = VTK_PARSE_CHAR; }
+/* Line 936 of glr.c  */
+#line 2658 "vtkParse.y"
+    { postSig("short "); ((*yyvalp).integer) = VTK_PARSE_SHORT; }
     break;
 
-  case 399:
+  case 465:
 
-/* Line 1455 of yacc.c  */
-#line 2474 "vtkParse.y"
-    { postSig("int "); (yyval.integer) = VTK_PARSE_INT; }
+/* Line 936 of glr.c  */
+#line 2659 "vtkParse.y"
+    { postSig("long "); ((*yyvalp).integer) = VTK_PARSE_LONG; }
     break;
 
-  case 400:
+  case 466:
 
-/* Line 1455 of yacc.c  */
-#line 2475 "vtkParse.y"
-    { postSig("short "); (yyval.integer) = VTK_PARSE_SHORT; }
+/* Line 936 of glr.c  */
+#line 2660 "vtkParse.y"
+    { postSig("__int64 "); ((*yyvalp).integer) = VTK_PARSE___INT64; }
     break;
 
-  case 401:
+  case 467:
 
-/* Line 1455 of yacc.c  */
-#line 2476 "vtkParse.y"
-    { postSig("long "); (yyval.integer) = VTK_PARSE_LONG; }
+/* Line 936 of glr.c  */
+#line 2661 "vtkParse.y"
+    { postSig("signed "); ((*yyvalp).integer) = VTK_PARSE_INT; }
     break;
 
-  case 402:
+  case 468:
 
-/* Line 1455 of yacc.c  */
-#line 2477 "vtkParse.y"
-    { postSig("__int64 "); (yyval.integer) = VTK_PARSE___INT64; }
+/* Line 936 of glr.c  */
+#line 2662 "vtkParse.y"
+    { postSig("unsigned "); ((*yyvalp).integer) = VTK_PARSE_UNSIGNED_INT; }
     break;
 
-  case 403:
+  case 472:
 
-/* Line 1455 of yacc.c  */
-#line 2478 "vtkParse.y"
-    { postSig("signed "); (yyval.integer) = VTK_PARSE_INT; }
+/* Line 936 of glr.c  */
+#line 2685 "vtkParse.y"
+    { ((*yyvalp).integer) = ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer) | (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer)); }
     break;
 
-  case 404:
+  case 473:
 
-/* Line 1455 of yacc.c  */
-#line 2479 "vtkParse.y"
-    { postSig("unsigned "); (yyval.integer) = VTK_PARSE_UNSIGNED_INT; }
+/* Line 936 of glr.c  */
+#line 2689 "vtkParse.y"
+    { postSig("&"); ((*yyvalp).integer) = VTK_PARSE_REF; }
     break;
 
-  case 407:
+  case 474:
 
-/* Line 1455 of yacc.c  */
-#line 2501 "vtkParse.y"
-    { (yyval.integer) = ((yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer)); }
+/* Line 936 of glr.c  */
+#line 2693 "vtkParse.y"
+    { postSig("&&"); ((*yyvalp).integer) = (VTK_PARSE_RVALUE | VTK_PARSE_REF); }
     break;
 
-  case 408:
+  case 475:
 
-/* Line 1455 of yacc.c  */
-#line 2504 "vtkParse.y"
-    { postSig("&"); (yyval.integer) = VTK_PARSE_REF; }
+/* Line 936 of glr.c  */
+#line 2696 "vtkParse.y"
+    { postSig("*"); }
     break;
 
-  case 409:
+  case 476:
 
-/* Line 1455 of yacc.c  */
-#line 2507 "vtkParse.y"
-    { postSig("*"); (yyval.integer) = VTK_PARSE_POINTER; }
+/* Line 936 of glr.c  */
+#line 2697 "vtkParse.y"
+    { ((*yyvalp).integer) = (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (4))].yystate.yysemantics.yysval.integer); }
     break;
 
-  case 410:
+  case 477:
 
-/* Line 1455 of yacc.c  */
-#line 2508 "vtkParse.y"
-    { postSig("*"); }
+/* Line 936 of glr.c  */
+#line 2700 "vtkParse.y"
+    { ((*yyvalp).integer) = VTK_PARSE_POINTER; }
     break;
 
-  case 411:
+  case 478:
 
-/* Line 1455 of yacc.c  */
-#line 2509 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2702 "vtkParse.y"
     {
-      if (((yyvsp[(3) - (3)].integer) & VTK_PARSE_CONST) != 0)
+      if (((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer) & VTK_PARSE_CONST) != 0)
         {
-        (yyval.integer) = VTK_PARSE_CONST_POINTER;
+        ((*yyvalp).integer) = VTK_PARSE_CONST_POINTER;
         }
-      if (((yyvsp[(3) - (3)].integer) & VTK_PARSE_VOLATILE) != 0)
+      if (((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.integer) & VTK_PARSE_VOLATILE) != 0)
         {
-        (yyval.integer) = VTK_PARSE_BAD_INDIRECT;
+        ((*yyvalp).integer) = VTK_PARSE_BAD_INDIRECT;
         }
     }
     break;
 
-  case 413:
+  case 480:
 
-/* Line 1455 of yacc.c  */
-#line 2525 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2718 "vtkParse.y"
     {
       unsigned int n;
-      n = (((yyvsp[(1) - (2)].integer) << 2) | (yyvsp[(2) - (2)].integer));
+      n = (((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (2))].yystate.yysemantics.yysval.integer) << 2) | (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.integer));
       if ((n & VTK_PARSE_INDIRECT) != n)
         {
         n = VTK_PARSE_BAD_INDIRECT;
         }
-      (yyval.integer) = n;
+      ((*yyvalp).integer) = n;
     }
     break;
 
-  case 414:
+  case 483:
+
+/* Line 936 of glr.c  */
+#line 2737 "vtkParse.y"
+    { closeSig(); }
+    break;
+
+  case 484:
+
+/* Line 936 of glr.c  */
+#line 2737 "vtkParse.y"
+    { openSig(); }
+    break;
+
+  case 486:
 
-/* Line 1455 of yacc.c  */
-#line 2541 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2744 "vtkParse.y"
     {preSig("void Set"); postSig("(");}
     break;
 
-  case 415:
+  case 487:
 
-/* Line 1455 of yacc.c  */
-#line 2542 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2745 "vtkParse.y"
     {
    postSig("a);");
    currentFunction->Macro = "vtkSetMacro";
-   currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (7)].str));
+   currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    add_parameter(currentFunction, getType(), getTypeId(), 0);
    set_return(currentFunction, VTK_PARSE_VOID, "void", 0);
@@ -6599,56 +8377,56 @@ yyreduce:
    }
     break;
 
-  case 416:
+  case 488:
 
-/* Line 1455 of yacc.c  */
-#line 2551 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2754 "vtkParse.y"
     {postSig("Get");}
     break;
 
-  case 417:
+  case 489:
 
-/* Line 1455 of yacc.c  */
-#line 2552 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2755 "vtkParse.y"
     {markSig();}
     break;
 
-  case 418:
+  case 490:
 
-/* Line 1455 of yacc.c  */
-#line 2552 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2755 "vtkParse.y"
     {swapSig();}
     break;
 
-  case 419:
+  case 491:
 
-/* Line 1455 of yacc.c  */
-#line 2553 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2756 "vtkParse.y"
     {
    postSig("();");
    currentFunction->Macro = "vtkGetMacro";
-   currentFunction->Name = vtkstrcat("Get", (yyvsp[(4) - (9)].str));
+   currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (9))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    set_return(currentFunction, getType(), getTypeId(), 0);
    output_function();
    }
     break;
 
-  case 420:
+  case 492:
 
-/* Line 1455 of yacc.c  */
-#line 2561 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2764 "vtkParse.y"
     {preSig("void Set");}
     break;
 
-  case 421:
+  case 493:
 
-/* Line 1455 of yacc.c  */
-#line 2562 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2765 "vtkParse.y"
     {
    postSig("(char *);");
    currentFunction->Macro = "vtkSetStringMacro";
-   currentFunction->Name = vtkstrcat("Set", (yyvsp[(4) - (5)].str));
+   currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    add_parameter(currentFunction, VTK_PARSE_CHAR_PTR, "char", 0);
    set_return(currentFunction, VTK_PARSE_VOID, "void", 0);
@@ -6656,52 +8434,52 @@ yyreduce:
    }
     break;
 
-  case 422:
+  case 494:
 
-/* Line 1455 of yacc.c  */
-#line 2571 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2774 "vtkParse.y"
     {preSig("char *Get");}
     break;
 
-  case 423:
+  case 495:
 
-/* Line 1455 of yacc.c  */
-#line 2572 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2775 "vtkParse.y"
     {
    postSig("();");
    currentFunction->Macro = "vtkGetStringMacro";
-   currentFunction->Name = vtkstrcat("Get", (yyvsp[(4) - (5)].str));
+   currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (5))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    set_return(currentFunction, VTK_PARSE_CHAR_PTR, "char", 0);
    output_function();
    }
     break;
 
-  case 424:
+  case 496:
 
-/* Line 1455 of yacc.c  */
-#line 2580 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2783 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 425:
+  case 497:
 
-/* Line 1455 of yacc.c  */
-#line 2580 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2783 "vtkParse.y"
     {closeSig();}
     break;
 
-  case 426:
+  case 498:
 
-/* Line 1455 of yacc.c  */
-#line 2582 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2785 "vtkParse.y"
     {
    const char *typeText;
    chopSig();
    typeText = copySig();
 
    currentFunction->Macro = "vtkSetClampMacro";
-   currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (10)].str));
+   currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (10))].yystate.yysemantics.yysval.str));
    currentFunction->Signature =
      vtkstrcat5("void ", currentFunction->Name, "(", typeText, ");");
    currentFunction->Comment = vtkstrdup(getComment());
@@ -6710,7 +8488,7 @@ yyreduce:
    output_function();
 
    currentFunction->Macro = "vtkSetClampMacro";
-   currentFunction->Name = vtkstrcat3("Get", (yyvsp[(3) - (10)].str), "MinValue");
+   currentFunction->Name = vtkstrcat3("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (10))].yystate.yysemantics.yysval.str), "MinValue");
    currentFunction->Signature =
      vtkstrcat4(typeText, " ", currentFunction->Name, "();");
    currentFunction->Comment = vtkstrdup(getComment());
@@ -6718,7 +8496,7 @@ yyreduce:
    output_function();
 
    currentFunction->Macro = "vtkSetClampMacro";
-   currentFunction->Name = vtkstrcat3("Get", (yyvsp[(3) - (10)].str), "MaxValue");
+   currentFunction->Name = vtkstrcat3("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (10))].yystate.yysemantics.yysval.str), "MaxValue");
    currentFunction->Signature =
      vtkstrcat4(typeText, " ", currentFunction->Name, "();");
    currentFunction->Comment = vtkstrdup(getComment());
@@ -6727,21 +8505,21 @@ yyreduce:
    }
     break;
 
-  case 427:
+  case 499:
 
-/* Line 1455 of yacc.c  */
-#line 2613 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2816 "vtkParse.y"
     {preSig("void Set"); postSig("("); }
     break;
 
-  case 428:
+  case 500:
 
-/* Line 1455 of yacc.c  */
-#line 2614 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2817 "vtkParse.y"
     {
    postSig("*);");
    currentFunction->Macro = "vtkSetObjectMacro";
-   currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (7)].str));
+   currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    add_parameter(currentFunction, VTK_PARSE_OBJECT_PTR, getTypeId(), 0);
    set_return(currentFunction, VTK_PARSE_VOID, "void", 0);
@@ -6749,48 +8527,48 @@ yyreduce:
    }
     break;
 
-  case 429:
+  case 501:
 
-/* Line 1455 of yacc.c  */
-#line 2623 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2826 "vtkParse.y"
     {postSig("*Get");}
     break;
 
-  case 430:
+  case 502:
 
-/* Line 1455 of yacc.c  */
-#line 2624 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2827 "vtkParse.y"
     {markSig();}
     break;
 
-  case 431:
+  case 503:
 
-/* Line 1455 of yacc.c  */
-#line 2624 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2827 "vtkParse.y"
     {swapSig();}
     break;
 
-  case 432:
+  case 504:
 
-/* Line 1455 of yacc.c  */
-#line 2625 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2828 "vtkParse.y"
     {
    postSig("();");
    currentFunction->Macro = "vtkGetObjectMacro";
-   currentFunction->Name = vtkstrcat("Get", (yyvsp[(4) - (9)].str));
+   currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((4) - (9))].yystate.yysemantics.yysval.str));
    currentFunction->Comment = vtkstrdup(getComment());
    set_return(currentFunction, VTK_PARSE_OBJECT_PTR, getTypeId(), 0);
    output_function();
    }
     break;
 
-  case 433:
+  case 505:
 
-/* Line 1455 of yacc.c  */
-#line 2634 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2837 "vtkParse.y"
     {
    currentFunction->Macro = "vtkBooleanMacro";
-   currentFunction->Name = vtkstrcat((yyvsp[(3) - (6)].str), "On");
+   currentFunction->Name = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (6))].yystate.yysemantics.yysval.str), "On");
    currentFunction->Comment = vtkstrdup(getComment());
    currentFunction->Signature =
      vtkstrcat3("void ", currentFunction->Name, "();");
@@ -6798,7 +8576,7 @@ yyreduce:
    output_function();
 
    currentFunction->Macro = "vtkBooleanMacro";
-   currentFunction->Name = vtkstrcat((yyvsp[(3) - (6)].str), "Off");
+   currentFunction->Name = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (6))].yystate.yysemantics.yysval.str), "Off");
    currentFunction->Comment = vtkstrdup(getComment());
    currentFunction->Signature =
      vtkstrcat3("void ", currentFunction->Name, "();");
@@ -6807,202 +8585,202 @@ yyreduce:
    }
     break;
 
-  case 434:
+  case 506:
 
-/* Line 1455 of yacc.c  */
-#line 2651 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2854 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 435:
+  case 507:
 
-/* Line 1455 of yacc.c  */
-#line 2652 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2855 "vtkParse.y"
     {
    chopSig();
-   outputSetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 2);
+   outputSetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 2);
    }
     break;
 
-  case 436:
+  case 508:
 
-/* Line 1455 of yacc.c  */
-#line 2656 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2859 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 437:
+  case 509:
 
-/* Line 1455 of yacc.c  */
-#line 2657 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2860 "vtkParse.y"
     {
    chopSig();
-   outputGetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 2);
+   outputGetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 2);
    }
     break;
 
-  case 438:
+  case 510:
 
-/* Line 1455 of yacc.c  */
-#line 2661 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2864 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 439:
+  case 511:
 
-/* Line 1455 of yacc.c  */
-#line 2662 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2865 "vtkParse.y"
     {
    chopSig();
-   outputSetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 3);
+   outputSetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 3);
    }
     break;
 
-  case 440:
+  case 512:
 
-/* Line 1455 of yacc.c  */
-#line 2666 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2869 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 441:
+  case 513:
 
-/* Line 1455 of yacc.c  */
-#line 2667 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2870 "vtkParse.y"
     {
    chopSig();
-   outputGetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 3);
+   outputGetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 3);
    }
     break;
 
-  case 442:
+  case 514:
 
-/* Line 1455 of yacc.c  */
-#line 2671 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2874 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 443:
+  case 515:
 
-/* Line 1455 of yacc.c  */
-#line 2672 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2875 "vtkParse.y"
     {
    chopSig();
-   outputSetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 4);
+   outputSetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 4);
    }
     break;
 
-  case 444:
+  case 516:
 
-/* Line 1455 of yacc.c  */
-#line 2676 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2879 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 445:
+  case 517:
 
-/* Line 1455 of yacc.c  */
-#line 2677 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2880 "vtkParse.y"
     {
    chopSig();
-   outputGetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 4);
+   outputGetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 4);
    }
     break;
 
-  case 446:
+  case 518:
 
-/* Line 1455 of yacc.c  */
-#line 2681 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2884 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 447:
+  case 519:
 
-/* Line 1455 of yacc.c  */
-#line 2682 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2885 "vtkParse.y"
     {
    chopSig();
-   outputSetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 6);
+   outputSetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 6);
    }
     break;
 
-  case 448:
+  case 520:
 
-/* Line 1455 of yacc.c  */
-#line 2686 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2889 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 449:
+  case 521:
 
-/* Line 1455 of yacc.c  */
-#line 2687 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2890 "vtkParse.y"
     {
    chopSig();
-   outputGetVectorMacro((yyvsp[(3) - (7)].str), getType(), copySig(), 6);
+   outputGetVectorMacro((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), getType(), copySig(), 6);
    }
     break;
 
-  case 450:
+  case 522:
 
-/* Line 1455 of yacc.c  */
-#line 2691 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2894 "vtkParse.y"
     {startSig(); markSig();}
     break;
 
-  case 451:
+  case 523:
 
-/* Line 1455 of yacc.c  */
-#line 2693 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2896 "vtkParse.y"
     {
    const char *typeText;
    chopSig();
    typeText = copySig();
    currentFunction->Macro = "vtkSetVectorMacro";
-   currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (9)].str));
+   currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (9))].yystate.yysemantics.yysval.str));
    currentFunction->Signature =
      vtkstrcat7("void ", currentFunction->Name, "(", typeText,
-                " a[", (yyvsp[(8) - (9)].str), "]);");
+                " a[", (((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (9))].yystate.yysemantics.yysval.str), "]);");
    currentFunction->Comment = vtkstrdup(getComment());
    add_parameter(currentFunction, (VTK_PARSE_POINTER | getType()),
-                 getTypeId(), (int)strtol((yyvsp[(8) - (9)].str), NULL, 0));
+                 getTypeId(), (int)strtol((((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (9))].yystate.yysemantics.yysval.str), NULL, 0));
    set_return(currentFunction, VTK_PARSE_VOID, "void", 0);
    output_function();
    }
     break;
 
-  case 452:
+  case 524:
 
-/* Line 1455 of yacc.c  */
-#line 2708 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2911 "vtkParse.y"
     {startSig();}
     break;
 
-  case 453:
+  case 525:
 
-/* Line 1455 of yacc.c  */
-#line 2710 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2913 "vtkParse.y"
     {
    chopSig();
    currentFunction->Macro = "vtkGetVectorMacro";
-   currentFunction->Name = vtkstrcat("Get", (yyvsp[(3) - (9)].str));
+   currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (9))].yystate.yysemantics.yysval.str));
    postSig(" *");
    postSig(currentFunction->Name);
    postSig("();");
    currentFunction->Comment = vtkstrdup(getComment());
    set_return(currentFunction, (VTK_PARSE_POINTER | getType()),
-              getTypeId(), (int)strtol((yyvsp[(8) - (9)].str), NULL, 0));
+              getTypeId(), (int)strtol((((yyGLRStackItem const *)yyvsp)[YYFILL ((8) - (9))].yystate.yysemantics.yysval.str), NULL, 0));
    output_function();
    }
     break;
 
-  case 454:
+  case 526:
 
-/* Line 1455 of yacc.c  */
-#line 2723 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2926 "vtkParse.y"
     {
      currentFunction->Macro = "vtkViewportCoordinateMacro";
-     currentFunction->Name = vtkstrcat3("Get", (yyvsp[(3) - (4)].str), "Coordinate");
+     currentFunction->Name = vtkstrcat3("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), "Coordinate");
      currentFunction->Signature =
        vtkstrcat3("vtkCoordinate *", currentFunction->Name, "();");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7010,7 +8788,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkViewportCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("void ", currentFunction->Name, "(double, double);");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7020,7 +8798,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkViewportCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("void ", currentFunction->Name, "(double a[2]);");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7029,7 +8807,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkViewportCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Get", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("double *", currentFunction->Name, "();");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7038,13 +8816,13 @@ yyreduce:
    }
     break;
 
-  case 455:
+  case 527:
 
-/* Line 1455 of yacc.c  */
-#line 2760 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 2963 "vtkParse.y"
     {
      currentFunction->Macro = "vtkWorldCoordinateMacro";
-     currentFunction->Name = vtkstrcat3("Get", (yyvsp[(3) - (4)].str), "Coordinate");
+     currentFunction->Name = vtkstrcat3("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str), "Coordinate");
      currentFunction->Signature =
        vtkstrcat3("vtkCoordinate *", currentFunction->Name, "();");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7052,7 +8830,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkWorldCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("void ", currentFunction->Name, "(double, double, double);");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7063,7 +8841,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkWorldCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Set", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Set", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("void ", currentFunction->Name, "(double a[3]);");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7072,7 +8850,7 @@ yyreduce:
      output_function();
 
      currentFunction->Macro = "vtkWorldCoordinateMacro";
-     currentFunction->Name = vtkstrcat("Get", (yyvsp[(3) - (4)].str));
+     currentFunction->Name = vtkstrcat("Get", (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (4))].yystate.yysemantics.yysval.str));
      currentFunction->Signature =
        vtkstrcat3("double *", currentFunction->Name, "();");
      currentFunction->Comment = vtkstrdup(getComment());
@@ -7081,10 +8859,10 @@ yyreduce:
    }
     break;
 
-  case 456:
+  case 528:
 
-/* Line 1455 of yacc.c  */
-#line 2798 "vtkParse.y"
+/* Line 936 of glr.c  */
+#line 3001 "vtkParse.y"
     {
    currentFunction->Macro = "vtkTypeMacro";
    currentFunction->Name = "GetClassName";
@@ -7105,932 +8883,2512 @@ yyreduce:
 
    currentFunction->Macro = "vtkTypeMacro";
    currentFunction->Name = "NewInstance";
-   currentFunction->Signature = vtkstrcat((yyvsp[(3) - (7)].str), " *NewInstance();");
+   currentFunction->Signature = vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), " *NewInstance();");
    currentFunction->Comment = vtkstrdup(getComment());
-   set_return(currentFunction, VTK_PARSE_OBJECT_PTR, (yyvsp[(3) - (7)].str), 0);
+   set_return(currentFunction, VTK_PARSE_OBJECT_PTR, (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), 0);
    output_function();
 
    currentFunction->Macro = "vtkTypeMacro";
    currentFunction->Name = "SafeDownCast";
    currentFunction->Signature =
-     vtkstrcat((yyvsp[(3) - (7)].str), " *SafeDownCast(vtkObject* o);");
+     vtkstrcat((((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), " *SafeDownCast(vtkObject* o);");
    currentFunction->Comment = vtkstrdup(getComment());
    add_parameter(currentFunction, VTK_PARSE_OBJECT_PTR, "vtkObject", 0);
    set_return(currentFunction, (VTK_PARSE_STATIC | VTK_PARSE_OBJECT_PTR),
-              (yyvsp[(3) - (7)].str), 0);
+              (((yyGLRStackItem const *)yyvsp)[YYFILL ((3) - (7))].yystate.yysemantics.yysval.str), 0);
    output_function();
    }
     break;
 
-  case 459:
+  case 531:
+
+/* Line 936 of glr.c  */
+#line 3045 "vtkParse.y"
+    { ((*yyvalp).str) = "()"; }
+    break;
+
+  case 532:
+
+/* Line 936 of glr.c  */
+#line 3046 "vtkParse.y"
+    { ((*yyvalp).str) = "[]"; }
+    break;
+
+  case 533:
+
+/* Line 936 of glr.c  */
+#line 3047 "vtkParse.y"
+    { ((*yyvalp).str) = " new[]"; }
+    break;
+
+  case 534:
+
+/* Line 936 of glr.c  */
+#line 3048 "vtkParse.y"
+    { ((*yyvalp).str) = " delete[]"; }
+    break;
+
+  case 535:
+
+/* Line 936 of glr.c  */
+#line 3049 "vtkParse.y"
+    { ((*yyvalp).str) = "<"; }
+    break;
+
+  case 536:
+
+/* Line 936 of glr.c  */
+#line 3050 "vtkParse.y"
+    { ((*yyvalp).str) = ">"; }
+    break;
+
+  case 537:
+
+/* Line 936 of glr.c  */
+#line 3051 "vtkParse.y"
+    { ((*yyvalp).str) = ","; }
+    break;
+
+  case 538:
+
+/* Line 936 of glr.c  */
+#line 3052 "vtkParse.y"
+    { ((*yyvalp).str) = "="; }
+    break;
+
+  case 539:
+
+/* Line 936 of glr.c  */
+#line 3053 "vtkParse.y"
+    { ((*yyvalp).str) = ">>"; }
+    break;
+
+  case 540:
+
+/* Line 936 of glr.c  */
+#line 3054 "vtkParse.y"
+    { ((*yyvalp).str) = ">>"; }
+    break;
+
+  case 541:
+
+/* Line 936 of glr.c  */
+#line 3055 "vtkParse.y"
+    { ((*yyvalp).str) = vtkstrcat("\"\" ", (((yyGLRStackItem const *)yyvsp)[YYFILL ((2) - (2))].yystate.yysemantics.yysval.str)); }
+    break;
+
+  case 543:
+
+/* Line 936 of glr.c  */
+#line 3059 "vtkParse.y"
+    { ((*yyvalp).str) = "%"; }
+    break;
+
+  case 544:
+
+/* Line 936 of glr.c  */
+#line 3060 "vtkParse.y"
+    { ((*yyvalp).str) = "*"; }
+    break;
+
+  case 545:
+
+/* Line 936 of glr.c  */
+#line 3061 "vtkParse.y"
+    { ((*yyvalp).str) = "/"; }
+    break;
+
+  case 546:
+
+/* Line 936 of glr.c  */
+#line 3062 "vtkParse.y"
+    { ((*yyvalp).str) = "-"; }
+    break;
+
+  case 547:
+
+/* Line 936 of glr.c  */
+#line 3063 "vtkParse.y"
+    { ((*yyvalp).str) = "+"; }
+    break;
+
+  case 548:
+
+/* Line 936 of glr.c  */
+#line 3064 "vtkParse.y"
+    { ((*yyvalp).str) = "!"; }
+    break;
+
+  case 549:
+
+/* Line 936 of glr.c  */
+#line 3065 "vtkParse.y"
+    { ((*yyvalp).str) = "~"; }
+    break;
+
+  case 550:
+
+/* Line 936 of glr.c  */
+#line 3066 "vtkParse.y"
+    { ((*yyvalp).str) = "&"; }
+    break;
+
+  case 551:
+
+/* Line 936 of glr.c  */
+#line 3067 "vtkParse.y"
+    { ((*yyvalp).str) = "|"; }
+    break;
+
+  case 552:
+
+/* Line 936 of glr.c  */
+#line 3068 "vtkParse.y"
+    { ((*yyvalp).str) = "^"; }
+    break;
+
+  case 553:
+
+/* Line 936 of glr.c  */
+#line 3069 "vtkParse.y"
+    { ((*yyvalp).str) = " new"; }
+    break;
+
+  case 554:
+
+/* Line 936 of glr.c  */
+#line 3070 "vtkParse.y"
+    { ((*yyvalp).str) = " delete"; }
+    break;
+
+  case 555:
+
+/* Line 936 of glr.c  */
+#line 3071 "vtkParse.y"
+    { ((*yyvalp).str) = "<<="; }
+    break;
+
+  case 556:
+
+/* Line 936 of glr.c  */
+#line 3072 "vtkParse.y"
+    { ((*yyvalp).str) = ">>="; }
+    break;
+
+  case 557:
+
+/* Line 936 of glr.c  */
+#line 3073 "vtkParse.y"
+    { ((*yyvalp).str) = "<<"; }
+    break;
+
+  case 558:
+
+/* Line 936 of glr.c  */
+#line 3074 "vtkParse.y"
+    { ((*yyvalp).str) = ".*"; }
+    break;
+
+  case 559:
+
+/* Line 936 of glr.c  */
+#line 3075 "vtkParse.y"
+    { ((*yyvalp).str) = "->*"; }
+    break;
+
+  case 560:
+
+/* Line 936 of glr.c  */
+#line 3076 "vtkParse.y"
+    { ((*yyvalp).str) = "->"; }
+    break;
+
+  case 561:
+
+/* Line 936 of glr.c  */
+#line 3077 "vtkParse.y"
+    { ((*yyvalp).str) = "+="; }
+    break;
+
+  case 562:
+
+/* Line 936 of glr.c  */
+#line 3078 "vtkParse.y"
+    { ((*yyvalp).str) = "-="; }
+    break;
+
+  case 563:
+
+/* Line 936 of glr.c  */
+#line 3079 "vtkParse.y"
+    { ((*yyvalp).str) = "*="; }
+    break;
+
+  case 564:
+
+/* Line 936 of glr.c  */
+#line 3080 "vtkParse.y"
+    { ((*yyvalp).str) = "/="; }
+    break;
+
+  case 565:
+
+/* Line 936 of glr.c  */
+#line 3081 "vtkParse.y"
+    { ((*yyvalp).str) = "%="; }
+    break;
+
+  case 566:
+
+/* Line 936 of glr.c  */
+#line 3082 "vtkParse.y"
+    { ((*yyvalp).str) = "++"; }
+    break;
+
+  case 567:
+
+/* Line 936 of glr.c  */
+#line 3083 "vtkParse.y"
+    { ((*yyvalp).str) = "--"; }
+    break;
+
+  case 568:
+
+/* Line 936 of glr.c  */
+#line 3084 "vtkParse.y"
+    { ((*yyvalp).str) = "&="; }
+    break;
+
+  case 569:
+
+/* Line 936 of glr.c  */
+#line 3085 "vtkParse.y"
+    { ((*yyvalp).str) = "|="; }
+    break;
+
+  case 570:
+
+/* Line 936 of glr.c  */
+#line 3086 "vtkParse.y"
+    { ((*yyvalp).str) = "^="; }
+    break;
+
+  case 571:
+
+/* Line 936 of glr.c  */
+#line 3087 "vtkParse.y"
+    { ((*yyvalp).str) = "&&"; }
+    break;
+
+  case 572:
+
+/* Line 936 of glr.c  */
+#line 3088 "vtkParse.y"
+    { ((*yyvalp).str) = "||"; }
+    break;
+
+  case 573:
+
+/* Line 936 of glr.c  */
+#line 3089 "vtkParse.y"
+    { ((*yyvalp).str) = "=="; }
+    break;
+
+  case 574:
+
+/* Line 936 of glr.c  */
+#line 3090 "vtkParse.y"
+    { ((*yyvalp).str) = "!="; }
+    break;
+
+  case 575:
+
+/* Line 936 of glr.c  */
+#line 3091 "vtkParse.y"
+    { ((*yyvalp).str) = "<="; }
+    break;
+
+  case 576:
+
+/* Line 936 of glr.c  */
+#line 3092 "vtkParse.y"
+    { ((*yyvalp).str) = ">="; }
+    break;
+
+  case 577:
+
+/* Line 936 of glr.c  */
+#line 3095 "vtkParse.y"
+    { ((*yyvalp).str) = "typedef"; }
+    break;
+
+  case 578:
+
+/* Line 936 of glr.c  */
+#line 3096 "vtkParse.y"
+    { ((*yyvalp).str) = "typename"; }
+    break;
+
+  case 579:
 
-/* Line 1455 of yacc.c  */
-#line 2842 "vtkParse.y"
-    { (yyval.str) = "()"; }
+/* Line 936 of glr.c  */
+#line 3097 "vtkParse.y"
+    { ((*yyvalp).str) = "class"; }
     break;
 
-  case 460:
+  case 580:
 
-/* Line 1455 of yacc.c  */
-#line 2843 "vtkParse.y"
-    { (yyval.str) = "[]"; }
+/* Line 936 of glr.c  */
+#line 3098 "vtkParse.y"
+    { ((*yyvalp).str) = "struct"; }
     break;
 
-  case 461:
+  case 581:
 
-/* Line 1455 of yacc.c  */
-#line 2844 "vtkParse.y"
-    { (yyval.str) = " new[]"; }
+/* Line 936 of glr.c  */
+#line 3099 "vtkParse.y"
+    { ((*yyvalp).str) = "union"; }
     break;
 
-  case 462:
+  case 582:
 
-/* Line 1455 of yacc.c  */
-#line 2845 "vtkParse.y"
-    { (yyval.str) = " delete[]"; }
+/* Line 936 of glr.c  */
+#line 3100 "vtkParse.y"
+    { ((*yyvalp).str) = "template"; }
     break;
 
-  case 463:
+  case 583:
 
-/* Line 1455 of yacc.c  */
-#line 2846 "vtkParse.y"
-    { (yyval.str) = "<"; }
+/* Line 936 of glr.c  */
+#line 3101 "vtkParse.y"
+    { ((*yyvalp).str) = "public"; }
     break;
 
-  case 464:
+  case 584:
 
-/* Line 1455 of yacc.c  */
-#line 2847 "vtkParse.y"
-    { (yyval.str) = ">"; }
+/* Line 936 of glr.c  */
+#line 3102 "vtkParse.y"
+    { ((*yyvalp).str) = "protected"; }
     break;
 
-  case 465:
+  case 585:
 
-/* Line 1455 of yacc.c  */
-#line 2848 "vtkParse.y"
-    { (yyval.str) = ","; }
+/* Line 936 of glr.c  */
+#line 3103 "vtkParse.y"
+    { ((*yyvalp).str) = "private"; }
     break;
 
-  case 466:
+  case 586:
 
-/* Line 1455 of yacc.c  */
-#line 2849 "vtkParse.y"
-    { (yyval.str) = "="; }
+/* Line 936 of glr.c  */
+#line 3104 "vtkParse.y"
+    { ((*yyvalp).str) = "const"; }
     break;
 
-  case 468:
+  case 587:
 
-/* Line 1455 of yacc.c  */
-#line 2853 "vtkParse.y"
-    { (yyval.str) = "%"; }
+/* Line 936 of glr.c  */
+#line 3105 "vtkParse.y"
+    { ((*yyvalp).str) = "static"; }
     break;
 
-  case 469:
+  case 588:
 
-/* Line 1455 of yacc.c  */
-#line 2854 "vtkParse.y"
-    { (yyval.str) = "*"; }
+/* Line 936 of glr.c  */
+#line 3106 "vtkParse.y"
+    { ((*yyvalp).str) = "thread_local"; }
     break;
 
-  case 470:
+  case 589:
 
-/* Line 1455 of yacc.c  */
-#line 2855 "vtkParse.y"
-    { (yyval.str) = "/"; }
+/* Line 936 of glr.c  */
+#line 3107 "vtkParse.y"
+    { ((*yyvalp).str) = "constexpr"; }
     break;
 
-  case 471:
+  case 590:
 
-/* Line 1455 of yacc.c  */
-#line 2856 "vtkParse.y"
-    { (yyval.str) = "-"; }
+/* Line 936 of glr.c  */
+#line 3108 "vtkParse.y"
+    { ((*yyvalp).str) = "inline"; }
     break;
 
-  case 472:
+  case 591:
 
-/* Line 1455 of yacc.c  */
-#line 2857 "vtkParse.y"
-    { (yyval.str) = "+"; }
+/* Line 936 of glr.c  */
+#line 3109 "vtkParse.y"
+    { ((*yyvalp).str) = "virtual"; }
     break;
 
-  case 473:
+  case 592:
 
-/* Line 1455 of yacc.c  */
-#line 2858 "vtkParse.y"
-    { (yyval.str) = "!"; }
+/* Line 936 of glr.c  */
+#line 3110 "vtkParse.y"
+    { ((*yyvalp).str) = "explicit"; }
     break;
 
-  case 474:
+  case 593:
 
-/* Line 1455 of yacc.c  */
-#line 2859 "vtkParse.y"
-    { (yyval.str) = "~"; }
+/* Line 936 of glr.c  */
+#line 3111 "vtkParse.y"
+    { ((*yyvalp).str) = "decltype"; }
     break;
 
-  case 475:
+  case 594:
 
-/* Line 1455 of yacc.c  */
-#line 2860 "vtkParse.y"
-    { (yyval.str) = "&"; }
+/* Line 936 of glr.c  */
+#line 3112 "vtkParse.y"
+    { ((*yyvalp).str) = "default"; }
     break;
 
-  case 476:
+  case 595:
 
-/* Line 1455 of yacc.c  */
-#line 2861 "vtkParse.y"
-    { (yyval.str) = "|"; }
+/* Line 936 of glr.c  */
+#line 3113 "vtkParse.y"
+    { ((*yyvalp).str) = "extern"; }
     break;
 
-  case 477:
+  case 596:
 
-/* Line 1455 of yacc.c  */
-#line 2862 "vtkParse.y"
-    { (yyval.str) = "^"; }
+/* Line 936 of glr.c  */
+#line 3114 "vtkParse.y"
+    { ((*yyvalp).str) = "using"; }
     break;
 
-  case 478:
+  case 597:
 
-/* Line 1455 of yacc.c  */
-#line 2863 "vtkParse.y"
-    { (yyval.str) = " new"; }
+/* Line 936 of glr.c  */
+#line 3115 "vtkParse.y"
+    { ((*yyvalp).str) = "namespace"; }
     break;
 
-  case 479:
+  case 598:
 
-/* Line 1455 of yacc.c  */
-#line 2864 "vtkParse.y"
-    { (yyval.str) = " delete"; }
+/* Line 936 of glr.c  */
+#line 3116 "vtkParse.y"
+    { ((*yyvalp).str) = "operator"; }
     break;
 
-  case 480:
+  case 599:
 
-/* Line 1455 of yacc.c  */
-#line 2865 "vtkParse.y"
-    { (yyval.str) = "<<="; }
+/* Line 936 of glr.c  */
+#line 3117 "vtkParse.y"
+    { ((*yyvalp).str) = "enum"; }
     break;
 
-  case 481:
+  case 600:
 
-/* Line 1455 of yacc.c  */
-#line 2866 "vtkParse.y"
-    { (yyval.str) = ">>="; }
+/* Line 936 of glr.c  */
+#line 3118 "vtkParse.y"
+    { ((*yyvalp).str) = "throw"; }
     break;
 
-  case 482:
+  case 601:
 
-/* Line 1455 of yacc.c  */
-#line 2867 "vtkParse.y"
-    { (yyval.str) = "<<"; }
+/* Line 936 of glr.c  */
+#line 3119 "vtkParse.y"
+    { ((*yyvalp).str) = "noexcept"; }
     break;
 
-  case 483:
+  case 602:
 
-/* Line 1455 of yacc.c  */
-#line 2868 "vtkParse.y"
-    { (yyval.str) = ">>"; }
+/* Line 936 of glr.c  */
+#line 3120 "vtkParse.y"
+    { ((*yyvalp).str) = "const_cast"; }
     break;
 
-  case 484:
+  case 603:
 
-/* Line 1455 of yacc.c  */
-#line 2869 "vtkParse.y"
-    { (yyval.str) = ".*"; }
+/* Line 936 of glr.c  */
+#line 3121 "vtkParse.y"
+    { ((*yyvalp).str) = "dynamic_cast"; }
     break;
 
-  case 485:
+  case 604:
 
-/* Line 1455 of yacc.c  */
-#line 2870 "vtkParse.y"
-    { (yyval.str) = "->*"; }
+/* Line 936 of glr.c  */
+#line 3122 "vtkParse.y"
+    { ((*yyvalp).str) = "static_cast"; }
     break;
 
-  case 486:
+  case 605:
 
-/* Line 1455 of yacc.c  */
-#line 2871 "vtkParse.y"
-    { (yyval.str) = "->"; }
+/* Line 936 of glr.c  */
+#line 3123 "vtkParse.y"
+    { ((*yyvalp).str) = "reinterpret_cast"; }
     break;
 
-  case 487:
+  case 618:
 
-/* Line 1455 of yacc.c  */
-#line 2872 "vtkParse.y"
-    { (yyval.str) = "+="; }
+/* Line 936 of glr.c  */
+#line 3146 "vtkParse.y"
+    { postSig("< "); }
     break;
 
-  case 488:
+  case 619:
 
-/* Line 1455 of yacc.c  */
-#line 2873 "vtkParse.y"
-    { (yyval.str) = "-="; }
+/* Line 936 of glr.c  */
+#line 3147 "vtkParse.y"
+    { postSig("> "); }
     break;
 
-  case 489:
+  case 621:
 
-/* Line 1455 of yacc.c  */
-#line 2874 "vtkParse.y"
-    { (yyval.str) = "*="; }
+/* Line 936 of glr.c  */
+#line 3148 "vtkParse.y"
+    { postSig(">"); }
     break;
 
-  case 490:
+  case 623:
 
-/* Line 1455 of yacc.c  */
-#line 2875 "vtkParse.y"
-    { (yyval.str) = "/="; }
+/* Line 936 of glr.c  */
+#line 3152 "vtkParse.y"
+    { chopSig(); postSig("::"); }
     break;
 
-  case 491:
+  case 627:
 
-/* Line 1455 of yacc.c  */
-#line 2876 "vtkParse.y"
-    { (yyval.str) = "%="; }
+/* Line 936 of glr.c  */
+#line 3159 "vtkParse.y"
+    {
+      if ((((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str))[0] == '+' || ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str))[0] == '-' ||
+           ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str))[0] == '*' || ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str))[0] == '&') &&
+          ((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str))[1] == '\0')
+        {
+        int c1 = 0;
+        size_t l;
+        const char *cp;
+        chopSig();
+        cp = getSig();
+        l = getSigLength();
+        if (l != 0) { c1 = cp[l-1]; }
+        if (c1 != 0 && c1 != '(' && c1 != '[' && c1 != '=')
+          {
+          postSig(" ");
+          }
+        postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str));
+        if (vtkParse_CharType(c1, (CPRE_IDGIT|CPRE_QUOTE)) ||
+            c1 == ')' || c1 == ']')
+          {
+          postSig(" ");
+          }
+        }
+       else
+        {
+        postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str));
+        postSig(" ");
+        }
+    }
     break;
 
-  case 492:
+  case 628:
 
-/* Line 1455 of yacc.c  */
-#line 2877 "vtkParse.y"
-    { (yyval.str) = "++"; }
+/* Line 936 of glr.c  */
+#line 3188 "vtkParse.y"
+    { postSig(":"); postSig(" "); }
     break;
 
-  case 493:
+  case 629:
 
-/* Line 1455 of yacc.c  */
-#line 2878 "vtkParse.y"
-    { (yyval.str) = "--"; }
+/* Line 936 of glr.c  */
+#line 3188 "vtkParse.y"
+    { postSig("."); }
     break;
 
-  case 494:
+  case 630:
 
-/* Line 1455 of yacc.c  */
-#line 2879 "vtkParse.y"
-    { (yyval.str) = "&="; }
+/* Line 936 of glr.c  */
+#line 3189 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig(" "); }
     break;
 
-  case 495:
+  case 631:
 
-/* Line 1455 of yacc.c  */
-#line 2880 "vtkParse.y"
-    { (yyval.str) = "|="; }
+/* Line 936 of glr.c  */
+#line 3190 "vtkParse.y"
+    { postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig(" "); }
     break;
 
-  case 496:
+  case 633:
 
-/* Line 1455 of yacc.c  */
-#line 2881 "vtkParse.y"
-    { (yyval.str) = "^="; }
+/* Line 936 of glr.c  */
+#line 3193 "vtkParse.y"
+    {
+      int c1 = 0;
+      size_t l;
+      const char *cp;
+      chopSig();
+      cp = getSig();
+      l = getSigLength();
+      if (l != 0) { c1 = cp[l-1]; }
+      while (vtkParse_CharType(c1, CPRE_IDGIT) && l != 0)
+        {
+        --l;
+        c1 = cp[l-1];
+        }
+      if (l < 2 || cp[l-1] != ':' || cp[l-2] != ':')
+        {
+        cp = add_const_scope(&cp[l]);
+        resetSig(l);
+        postSig(cp);
+        }
+      postSig(" ");
+    }
     break;
 
-  case 497:
+  case 637:
 
-/* Line 1455 of yacc.c  */
-#line 2882 "vtkParse.y"
-    { (yyval.str) = "&&"; }
+/* Line 936 of glr.c  */
+#line 3220 "vtkParse.y"
+    { postSig("< "); }
     break;
 
-  case 498:
+  case 638:
 
-/* Line 1455 of yacc.c  */
-#line 2883 "vtkParse.y"
-    { (yyval.str) = "||"; }
+/* Line 936 of glr.c  */
+#line 3221 "vtkParse.y"
+    { postSig("> "); }
     break;
 
-  case 499:
+  case 639:
 
-/* Line 1455 of yacc.c  */
-#line 2884 "vtkParse.y"
-    { (yyval.str) = "=="; }
+/* Line 936 of glr.c  */
+#line 3222 "vtkParse.y"
+    { postSig(">"); }
     break;
 
-  case 500:
+  case 641:
 
-/* Line 1455 of yacc.c  */
-#line 2885 "vtkParse.y"
-    { (yyval.str) = "!="; }
+/* Line 936 of glr.c  */
+#line 3226 "vtkParse.y"
+    { postSig("= "); }
     break;
 
-  case 501:
+  case 642:
 
-/* Line 1455 of yacc.c  */
-#line 2886 "vtkParse.y"
-    { (yyval.str) = "<="; }
+/* Line 936 of glr.c  */
+#line 3227 "vtkParse.y"
+    { chopSig(); postSig(", "); }
     break;
 
-  case 502:
+  case 644:
 
-/* Line 1455 of yacc.c  */
-#line 2887 "vtkParse.y"
-    { (yyval.str) = ">="; }
+/* Line 936 of glr.c  */
+#line 3231 "vtkParse.y"
+    { chopSig(); postSig(";"); }
     break;
 
-  case 503:
+  case 652:
 
-/* Line 1455 of yacc.c  */
-#line 2890 "vtkParse.y"
-    { (yyval.str) = "typedef"; }
+/* Line 936 of glr.c  */
+#line 3245 "vtkParse.y"
+    { postSig("= "); }
     break;
 
-  case 504:
+  case 653:
 
-/* Line 1455 of yacc.c  */
-#line 2891 "vtkParse.y"
-    { (yyval.str) = "typename"; }
+/* Line 936 of glr.c  */
+#line 3246 "vtkParse.y"
+    { chopSig(); postSig(", "); }
     break;
 
-  case 505:
+  case 654:
 
-/* Line 1455 of yacc.c  */
-#line 2892 "vtkParse.y"
-    { (yyval.str) = "class"; }
+/* Line 936 of glr.c  */
+#line 3250 "vtkParse.y"
+    {
+      chopSig();
+      if (getSig()[getSigLength()-1] == '<') { postSig(" "); }
+      postSig("<");
+    }
     break;
 
-  case 506:
+  case 655:
 
-/* Line 1455 of yacc.c  */
-#line 2893 "vtkParse.y"
-    { (yyval.str) = "struct"; }
+/* Line 936 of glr.c  */
+#line 3256 "vtkParse.y"
+    {
+      chopSig();
+      if (getSig()[getSigLength()-1] == '>') { postSig(" "); }
+      postSig("> ");
+    }
     break;
 
-  case 507:
+  case 658:
 
-/* Line 1455 of yacc.c  */
-#line 2894 "vtkParse.y"
-    { (yyval.str) = "union"; }
+/* Line 936 of glr.c  */
+#line 3267 "vtkParse.y"
+    { postSig("["); }
     break;
 
-  case 508:
+  case 659:
 
-/* Line 1455 of yacc.c  */
-#line 2895 "vtkParse.y"
-    { (yyval.str) = "template"; }
+/* Line 936 of glr.c  */
+#line 3268 "vtkParse.y"
+    { chopSig(); postSig("] "); }
     break;
 
-  case 509:
+  case 660:
 
-/* Line 1455 of yacc.c  */
-#line 2896 "vtkParse.y"
-    { (yyval.str) = "public"; }
+/* Line 936 of glr.c  */
+#line 3269 "vtkParse.y"
+    { postSig("[["); }
     break;
 
-  case 510:
+  case 661:
 
-/* Line 1455 of yacc.c  */
-#line 2897 "vtkParse.y"
-    { (yyval.str) = "protected"; }
+/* Line 936 of glr.c  */
+#line 3270 "vtkParse.y"
+    { chopSig(); postSig("]] "); }
     break;
 
-  case 511:
+  case 662:
 
-/* Line 1455 of yacc.c  */
-#line 2898 "vtkParse.y"
-    { (yyval.str) = "private"; }
+/* Line 936 of glr.c  */
+#line 3273 "vtkParse.y"
+    { postSig("("); }
     break;
 
-  case 512:
+  case 663:
 
-/* Line 1455 of yacc.c  */
-#line 2899 "vtkParse.y"
-    { (yyval.str) = "const"; }
+/* Line 936 of glr.c  */
+#line 3274 "vtkParse.y"
+    { chopSig(); postSig(") "); }
     break;
 
-  case 513:
+  case 664:
 
-/* Line 1455 of yacc.c  */
-#line 2900 "vtkParse.y"
-    { (yyval.str) = "static"; }
+/* Line 936 of glr.c  */
+#line 3275 "vtkParse.y"
+    { postSig("("); postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig("*"); }
     break;
 
-  case 514:
+  case 665:
 
-/* Line 1455 of yacc.c  */
-#line 2901 "vtkParse.y"
-    { (yyval.str) = "inline"; }
+/* Line 936 of glr.c  */
+#line 3276 "vtkParse.y"
+    { chopSig(); postSig(") "); }
     break;
 
-  case 515:
+  case 666:
 
-/* Line 1455 of yacc.c  */
-#line 2902 "vtkParse.y"
-    { (yyval.str) = "virtual"; }
+/* Line 936 of glr.c  */
+#line 3277 "vtkParse.y"
+    { postSig("("); postSig((((yyGLRStackItem const *)yyvsp)[YYFILL ((1) - (1))].yystate.yysemantics.yysval.str)); postSig("&"); }
     break;
 
-  case 516:
+  case 667:
 
-/* Line 1455 of yacc.c  */
-#line 2903 "vtkParse.y"
-    { (yyval.str) = "extern"; }
+/* Line 936 of glr.c  */
+#line 3278 "vtkParse.y"
+    { chopSig(); postSig(") "); }
     break;
 
-  case 517:
+  case 668:
 
-/* Line 1455 of yacc.c  */
-#line 2904 "vtkParse.y"
-    { (yyval.str) = "namespace"; }
+/* Line 936 of glr.c  */
+#line 3281 "vtkParse.y"
+    { postSig("{ "); }
     break;
 
-  case 518:
+  case 669:
 
-/* Line 1455 of yacc.c  */
-#line 2905 "vtkParse.y"
-    { (yyval.str) = "operator"; }
+/* Line 936 of glr.c  */
+#line 3281 "vtkParse.y"
+    { postSig("} "); }
     break;
 
-  case 519:
 
-/* Line 1455 of yacc.c  */
-#line 2906 "vtkParse.y"
-    { (yyval.str) = "enum"; }
-    break;
 
-  case 520:
+/* Line 936 of glr.c  */
+#line 9710 "vtkParse.tab.c"
+      default: break;
+    }
 
-/* Line 1455 of yacc.c  */
-#line 2907 "vtkParse.y"
-    { (yyval.str) = "throw"; }
-    break;
+  return yyok;
+# undef yyerrok
+# undef YYABORT
+# undef YYACCEPT
+# undef YYERROR
+# undef YYBACKUP
+# undef yyclearin
+# undef YYRECOVERING
+}
+\f
 
-  case 521:
+/*ARGSUSED*/ static void
+yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
+{
+  YYUSE (yy0);
+  YYUSE (yy1);
 
-/* Line 1455 of yacc.c  */
-#line 2908 "vtkParse.y"
-    { (yyval.str) = "const_cast"; }
-    break;
+  switch (yyn)
+    {
 
-  case 522:
+      default: break;
+    }
+}
 
-/* Line 1455 of yacc.c  */
-#line 2909 "vtkParse.y"
-    { (yyval.str) = "dynamic_cast"; }
-    break;
+                              /* Bison grammar-table manipulation.  */
 
-  case 523:
+/*-----------------------------------------------.
+| Release the memory associated to this symbol.  |
+`-----------------------------------------------*/
 
-/* Line 1455 of yacc.c  */
-#line 2910 "vtkParse.y"
-    { (yyval.str) = "static_cast"; }
-    break;
+/*ARGSUSED*/
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+{
+  YYUSE (yyvaluep);
 
-  case 524:
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+  switch (yytype)
+    {
+
+      default:
+        break;
+    }
+}
+
+/** Number of symbols composing the right hand side of rule #RULE.  */
+static int
+yyrhsLength (yyRuleNum yyrule)
+{
+  return yyr2[yyrule];
+}
+
+static void
+yydestroyGLRState (char const *yymsg, yyGLRState *yys)
+{
+  if (yys->yyresolved)
+    yydestruct (yymsg, yystos[yys->yylrState],
+                &yys->yysemantics.yysval);
+  else
+    {
+#if YYDEBUG
+      if (yydebug)
+        {
+          if (yys->yysemantics.yyfirstVal)
+            YYFPRINTF (stderr, "%s unresolved ", yymsg);
+          else
+            YYFPRINTF (stderr, "%s incomplete ", yymsg);
+          yy_symbol_print (stderr, yystos[yys->yylrState],
+                           NULL);
+          YYFPRINTF (stderr, "\n");
+        }
+#endif
+
+      if (yys->yysemantics.yyfirstVal)
+        {
+          yySemanticOption *yyoption = yys->yysemantics.yyfirstVal;
+          yyGLRState *yyrh;
+          int yyn;
+          for (yyrh = yyoption->yystate, yyn = yyrhsLength (yyoption->yyrule);
+               yyn > 0;
+               yyrh = yyrh->yypred, yyn -= 1)
+            yydestroyGLRState (yymsg, yyrh);
+        }
+    }
+}
+
+/** Left-hand-side symbol for rule #RULE.  */
+static yySymbol
+yylhsNonterm (yyRuleNum yyrule)
+{
+  return yyr1[yyrule];
+}
+
+#define yyis_pact_ninf(yystate) \
+  ((yystate) == YYPACT_NINF)
+
+/** True iff LR state STATE has only a default reduction (regardless
+ *  of token).  */
+static yybool
+yyisDefaultedState (yyStateNum yystate)
+{
+  return yyis_pact_ninf (yypact[yystate]);
+}
+
+/** The default reduction for STATE, assuming it has one.  */
+static yyRuleNum
+yydefaultAction (yyStateNum yystate)
+{
+  return yydefact[yystate];
+}
+
+#define yyis_table_ninf(yytable_value) \
+  YYID (0)
+
+/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
+ *  Result R means
+ *    R < 0:  Reduce on rule -R.
+ *    R = 0:  Error.
+ *    R > 0:  Shift to state R.
+ *  Set *CONFLICTS to a pointer into yyconfl to 0-terminated list of
+ *  conflicting reductions.
+ */
+static void
+yygetLRActions (yyStateNum yystate, int yytoken,
+                int* yyaction, const short int** yyconflicts)
+{
+  int yyindex = yypact[yystate] + yytoken;
+  if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
+    {
+      *yyaction = -yydefact[yystate];
+      *yyconflicts = yyconfl;
+    }
+  else if (! yyis_table_ninf (yytable[yyindex]))
+    {
+      *yyaction = yytable[yyindex];
+      *yyconflicts = yyconfl + yyconflp[yyindex];
+    }
+  else
+    {
+      *yyaction = 0;
+      *yyconflicts = yyconfl + yyconflp[yyindex];
+    }
+}
+
+static yyStateNum
+yyLRgotoState (yyStateNum yystate, yySymbol yylhs)
+{
+  int yyr;
+  yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
+  if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
+    return yytable[yyr];
+  else
+    return yydefgoto[yylhs - YYNTOKENS];
+}
+
+static yybool
+yyisShiftAction (int yyaction)
+{
+  return 0 < yyaction;
+}
+
+static yybool
+yyisErrorAction (int yyaction)
+{
+  return yyaction == 0;
+}
+
+                                /* GLRStates */
+
+/** Return a fresh GLRStackItem.  Callers should call
+ * YY_RESERVE_GLRSTACK afterwards to make sure there is sufficient
+ * headroom.  */
+
+static yyGLRStackItem*
+yynewGLRStackItem (yyGLRStack* yystackp, yybool yyisState)
+{
+  yyGLRStackItem* yynewItem = yystackp->yynextFree;
+  yystackp->yyspaceLeft -= 1;
+  yystackp->yynextFree += 1;
+  yynewItem->yystate.yyisState = yyisState;
+  return yynewItem;
+}
+
+/** Add a new semantic action that will execute the action for rule
+ *  RULENUM on the semantic values in RHS to the list of
+ *  alternative actions for STATE.  Assumes that RHS comes from
+ *  stack #K of *STACKP. */
+static void
+yyaddDeferredAction (yyGLRStack* yystackp, size_t yyk, yyGLRState* yystate,
+                     yyGLRState* rhs, yyRuleNum yyrule)
+{
+  yySemanticOption* yynewOption =
+    &yynewGLRStackItem (yystackp, yyfalse)->yyoption;
+  yynewOption->yystate = rhs;
+  yynewOption->yyrule = yyrule;
+  if (yystackp->yytops.yylookaheadNeeds[yyk])
+    {
+      yynewOption->yyrawchar = yychar;
+      yynewOption->yyval = yylval;
+      yynewOption->yyloc = yylloc;
+    }
+  else
+    yynewOption->yyrawchar = YYEMPTY;
+  yynewOption->yynext = yystate->yysemantics.yyfirstVal;
+  yystate->yysemantics.yyfirstVal = yynewOption;
+
+  YY_RESERVE_GLRSTACK (yystackp);
+}
+
+                                /* GLRStacks */
+
+/** Initialize SET to a singleton set containing an empty stack.  */
+static yybool
+yyinitStateSet (yyGLRStateSet* yyset)
+{
+  yyset->yysize = 1;
+  yyset->yycapacity = 16;
+  yyset->yystates = (yyGLRState**) YYMALLOC (16 * sizeof yyset->yystates[0]);
+  if (! yyset->yystates)
+    return yyfalse;
+  yyset->yystates[0] = NULL;
+  yyset->yylookaheadNeeds =
+    (yybool*) YYMALLOC (16 * sizeof yyset->yylookaheadNeeds[0]);
+  if (! yyset->yylookaheadNeeds)
+    {
+      YYFREE (yyset->yystates);
+      return yyfalse;
+    }
+  return yytrue;
+}
+
+static void yyfreeStateSet (yyGLRStateSet* yyset)
+{
+  YYFREE (yyset->yystates);
+  YYFREE (yyset->yylookaheadNeeds);
+}
+
+/** Initialize STACK to a single empty stack, with total maximum
+ *  capacity for all stacks of SIZE.  */
+static yybool
+yyinitGLRStack (yyGLRStack* yystackp, size_t yysize)
+{
+  yystackp->yyerrState = 0;
+  yynerrs = 0;
+  yystackp->yyspaceLeft = yysize;
+  yystackp->yyitems =
+    (yyGLRStackItem*) YYMALLOC (yysize * sizeof yystackp->yynextFree[0]);
+  if (!yystackp->yyitems)
+    return yyfalse;
+  yystackp->yynextFree = yystackp->yyitems;
+  yystackp->yysplitPoint = NULL;
+  yystackp->yylastDeleted = NULL;
+  return yyinitStateSet (&yystackp->yytops);
+}
 
-/* Line 1455 of yacc.c  */
-#line 2911 "vtkParse.y"
-    { (yyval.str) = "reinterpret_cast"; }
-    break;
 
-  case 537:
+#if YYSTACKEXPANDABLE
+# define YYRELOC(YYFROMITEMS,YYTOITEMS,YYX,YYTYPE) \
+  &((YYTOITEMS) - ((YYFROMITEMS) - (yyGLRStackItem*) (YYX)))->YYTYPE
 
-/* Line 1455 of yacc.c  */
-#line 2935 "vtkParse.y"
-    {
-      if ((((yyvsp[(1) - (1)].str))[0] == '+' || ((yyvsp[(1) - (1)].str))[0] == '-' ||
-           ((yyvsp[(1) - (1)].str))[0] == '*' || ((yyvsp[(1) - (1)].str))[0] == '&') &&
-          ((yyvsp[(1) - (1)].str))[1] == '\0')
+/** If STACK is expandable, extend it.  WARNING: Pointers into the
+    stack from outside should be considered invalid after this call.
+    We always expand when there are 1 or fewer items left AFTER an
+    allocation, so that we can avoid having external pointers exist
+    across an allocation.  */
+static void
+yyexpandGLRStack (yyGLRStack* yystackp)
+{
+  yyGLRStackItem* yynewItems;
+  yyGLRStackItem* yyp0, *yyp1;
+  size_t yysize, yynewSize;
+  size_t yyn;
+  yysize = yystackp->yynextFree - yystackp->yyitems;
+  if (YYMAXDEPTH - YYHEADROOM < yysize)
+    yyMemoryExhausted (yystackp);
+  yynewSize = 2*yysize;
+  if (YYMAXDEPTH < yynewSize)
+    yynewSize = YYMAXDEPTH;
+  yynewItems = (yyGLRStackItem*) YYMALLOC (yynewSize * sizeof yynewItems[0]);
+  if (! yynewItems)
+    yyMemoryExhausted (yystackp);
+  for (yyp0 = yystackp->yyitems, yyp1 = yynewItems, yyn = yysize;
+       0 < yyn;
+       yyn -= 1, yyp0 += 1, yyp1 += 1)
+    {
+      *yyp1 = *yyp0;
+      if (*(yybool *) yyp0)
         {
-        int c1 = 0;
-        size_t l;
-        const char *cp;
-        chopSig();
-        cp = getSig();
-        l = getSigLength();
-        if (l != 0) { c1 = cp[l-1]; }
-        if (c1 != 0 && c1 != '(' && c1 != '[' && c1 != '=')
-          {
-          postSig(" ");
-          }
-        postSig((yyvsp[(1) - (1)].str));
-        if ((c1 >= 'A' && c1 <= 'Z') || (c1 >= 'a' && c1 <= 'z') ||
-            (c1 >= '0' && c1 <= '9') || c1 == '_' || c1 == '\'' ||
-            c1 == '\"' || c1 == ')' || c1 == ']')
-          {
-          postSig(" ");
-          }
+          yyGLRState* yys0 = &yyp0->yystate;
+          yyGLRState* yys1 = &yyp1->yystate;
+          if (yys0->yypred != NULL)
+            yys1->yypred =
+              YYRELOC (yyp0, yyp1, yys0->yypred, yystate);
+          if (! yys0->yyresolved && yys0->yysemantics.yyfirstVal != NULL)
+            yys1->yysemantics.yyfirstVal =
+              YYRELOC(yyp0, yyp1, yys0->yysemantics.yyfirstVal, yyoption);
         }
-       else
+      else
         {
-        postSig((yyvsp[(1) - (1)].str));
-        postSig(" ");
+          yySemanticOption* yyv0 = &yyp0->yyoption;
+          yySemanticOption* yyv1 = &yyp1->yyoption;
+          if (yyv0->yystate != NULL)
+            yyv1->yystate = YYRELOC (yyp0, yyp1, yyv0->yystate, yystate);
+          if (yyv0->yynext != NULL)
+            yyv1->yynext = YYRELOC (yyp0, yyp1, yyv0->yynext, yyoption);
         }
     }
-    break;
+  if (yystackp->yysplitPoint != NULL)
+    yystackp->yysplitPoint = YYRELOC (yystackp->yyitems, yynewItems,
+                                 yystackp->yysplitPoint, yystate);
+
+  for (yyn = 0; yyn < yystackp->yytops.yysize; yyn += 1)
+    if (yystackp->yytops.yystates[yyn] != NULL)
+      yystackp->yytops.yystates[yyn] =
+        YYRELOC (yystackp->yyitems, yynewItems,
+                 yystackp->yytops.yystates[yyn], yystate);
+  YYFREE (yystackp->yyitems);
+  yystackp->yyitems = yynewItems;
+  yystackp->yynextFree = yynewItems + yysize;
+  yystackp->yyspaceLeft = yynewSize - yysize;
+}
+#endif
 
-  case 538:
+static void
+yyfreeGLRStack (yyGLRStack* yystackp)
+{
+  YYFREE (yystackp->yyitems);
+  yyfreeStateSet (&yystackp->yytops);
+}
 
-/* Line 1455 of yacc.c  */
-#line 2965 "vtkParse.y"
-    { postSig(":"); postSig(" "); }
-    break;
+/** Assuming that S is a GLRState somewhere on STACK, update the
+ *  splitpoint of STACK, if needed, so that it is at least as deep as
+ *  S.  */
+static void
+yyupdateSplit (yyGLRStack* yystackp, yyGLRState* yys)
+{
+  if (yystackp->yysplitPoint != NULL && yystackp->yysplitPoint > yys)
+    yystackp->yysplitPoint = yys;
+}
 
-  case 539:
+/** Invalidate stack #K in STACK.  */
+static void
+yymarkStackDeleted (yyGLRStack* yystackp, size_t yyk)
+{
+  if (yystackp->yytops.yystates[yyk] != NULL)
+    yystackp->yylastDeleted = yystackp->yytops.yystates[yyk];
+  yystackp->yytops.yystates[yyk] = NULL;
+}
 
-/* Line 1455 of yacc.c  */
-#line 2965 "vtkParse.y"
-    { postSig("."); }
-    break;
+/** Undelete the last stack that was marked as deleted.  Can only be
+    done once after a deletion, and only when all other stacks have
+    been deleted.  */
+static void
+yyundeleteLastStack (yyGLRStack* yystackp)
+{
+  if (yystackp->yylastDeleted == NULL || yystackp->yytops.yysize != 0)
+    return;
+  yystackp->yytops.yystates[0] = yystackp->yylastDeleted;
+  yystackp->yytops.yysize = 1;
+  YYDPRINTF ((stderr, "Restoring last deleted stack as stack #0.\n"));
+  yystackp->yylastDeleted = NULL;
+}
 
-  case 540:
+static void
+yyremoveDeletes (yyGLRStack* yystackp)
+{
+  size_t yyi, yyj;
+  yyi = yyj = 0;
+  while (yyj < yystackp->yytops.yysize)
+    {
+      if (yystackp->yytops.yystates[yyi] == NULL)
+        {
+          if (yyi == yyj)
+            {
+              YYDPRINTF ((stderr, "Removing dead stacks.\n"));
+            }
+          yystackp->yytops.yysize -= 1;
+        }
+      else
+        {
+          yystackp->yytops.yystates[yyj] = yystackp->yytops.yystates[yyi];
+          /* In the current implementation, it's unnecessary to copy
+             yystackp->yytops.yylookaheadNeeds[yyi] since, after
+             yyremoveDeletes returns, the parser immediately either enters
+             deterministic operation or shifts a token.  However, it doesn't
+             hurt, and the code might evolve to need it.  */
+          yystackp->yytops.yylookaheadNeeds[yyj] =
+            yystackp->yytops.yylookaheadNeeds[yyi];
+          if (yyj != yyi)
+            {
+              YYDPRINTF ((stderr, "Rename stack %lu -> %lu.\n",
+                          (unsigned long int) yyi, (unsigned long int) yyj));
+            }
+          yyj += 1;
+        }
+      yyi += 1;
+    }
+}
 
-/* Line 1455 of yacc.c  */
-#line 2966 "vtkParse.y"
-    { chopSig(); postSig("::"); }
-    break;
+/** Shift to a new state on stack #K of STACK, corresponding to LR state
+ * LRSTATE, at input position POSN, with (resolved) semantic value SVAL.  */
+static void
+yyglrShift (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+            size_t yyposn,
+            YYSTYPE* yyvalp, YYLTYPE* yylocp)
+{
+  yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
 
-  case 541:
+  yynewState->yylrState = yylrState;
+  yynewState->yyposn = yyposn;
+  yynewState->yyresolved = yytrue;
+  yynewState->yypred = yystackp->yytops.yystates[yyk];
+  yynewState->yysemantics.yysval = *yyvalp;
+  yynewState->yyloc = *yylocp;
+  yystackp->yytops.yystates[yyk] = yynewState;
 
-/* Line 1455 of yacc.c  */
-#line 2967 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); postSig(" "); }
-    break;
+  YY_RESERVE_GLRSTACK (yystackp);
+}
 
-  case 542:
+/** Shift stack #K of YYSTACK, to a new state corresponding to LR
+ *  state YYLRSTATE, at input position YYPOSN, with the (unresolved)
+ *  semantic value of YYRHS under the action for YYRULE.  */
+static void
+yyglrShiftDefer (yyGLRStack* yystackp, size_t yyk, yyStateNum yylrState,
+                 size_t yyposn, yyGLRState* rhs, yyRuleNum yyrule)
+{
+  yyGLRState* yynewState = &yynewGLRStackItem (yystackp, yytrue)->yystate;
 
-/* Line 1455 of yacc.c  */
-#line 2968 "vtkParse.y"
-    { postSig((yyvsp[(1) - (1)].str)); postSig(" "); }
-    break;
+  yynewState->yylrState = yylrState;
+  yynewState->yyposn = yyposn;
+  yynewState->yyresolved = yyfalse;
+  yynewState->yypred = yystackp->yytops.yystates[yyk];
+  yynewState->yysemantics.yyfirstVal = NULL;
+  yystackp->yytops.yystates[yyk] = yynewState;
 
-  case 544:
+  /* Invokes YY_RESERVE_GLRSTACK.  */
+  yyaddDeferredAction (yystackp, yyk, yynewState, rhs, yyrule);
+}
 
-/* Line 1455 of yacc.c  */
-#line 2971 "vtkParse.y"
+/** Pop the symbols consumed by reduction #RULE from the top of stack
+ *  #K of STACK, and perform the appropriate semantic action on their
+ *  semantic values.  Assumes that all ambiguities in semantic values
+ *  have been previously resolved.  Set *VALP to the resulting value,
+ *  and *LOCP to the computed location (if any).  Return value is as
+ *  for userAction.  */
+static YYRESULTTAG
+yydoAction (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+            YYSTYPE* yyvalp, YYLTYPE* yylocp)
+{
+  int yynrhs = yyrhsLength (yyrule);
+
+  if (yystackp->yysplitPoint == NULL)
+    {
+      /* Standard special case: single stack.  */
+      yyGLRStackItem* rhs = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
+      YYASSERT (yyk == 0);
+      yystackp->yynextFree -= yynrhs;
+      yystackp->yyspaceLeft += yynrhs;
+      yystackp->yytops.yystates[0] = & yystackp->yynextFree[-1].yystate;
+      return yyuserAction (yyrule, yynrhs, rhs,
+                           yyvalp, yylocp, yystackp);
+    }
+  else
     {
-      int c1 = 0;
-      size_t l;
-      const char *cp;
-      chopSig();
-      cp = getSig();
-      l = getSigLength();
-      if (l != 0) { c1 = cp[l-1]; }
-      while (((c1 >= 'A' && c1 <= 'Z') || (c1 >= 'a' && c1 <= 'z') ||
-              (c1 >= '0' && c1 <= '9') || c1 == '_') && l != 0)
-        {
-        --l;
-        c1 = cp[l-1];
-        }
-      if (l < 2 || cp[l-1] != ':' || cp[l-2] != ':')
+      /* At present, doAction is never called in nondeterministic
+       * mode, so this branch is never taken.  It is here in
+       * anticipation of a future feature that will allow immediate
+       * evaluation of selected actions in nondeterministic mode.  */
+      int yyi;
+      yyGLRState* yys;
+      yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
+      yys = yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred
+        = yystackp->yytops.yystates[yyk];
+      for (yyi = 0; yyi < yynrhs; yyi += 1)
         {
-        cp = add_const_scope(&cp[l]);
-        resetSig(l);
-        postSig(cp);
+          yys = yys->yypred;
+          YYASSERT (yys);
         }
+      yyupdateSplit (yystackp, yys);
+      yystackp->yytops.yystates[yyk] = yys;
+      return yyuserAction (yyrule, yynrhs, yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
+                           yyvalp, yylocp, yystackp);
     }
-    break;
+}
 
-  case 548:
+#if !YYDEBUG
+# define YY_REDUCE_PRINT(Args)
+#else
+# define YY_REDUCE_PRINT(Args)                \
+do {                                        \
+  if (yydebug)                                \
+    yy_reduce_print Args;                \
+} while (YYID (0))
 
-/* Line 1455 of yacc.c  */
-#line 2997 "vtkParse.y"
-    { postSig("< "); }
-    break;
+/*----------------------------------------------------------.
+| Report that the RULE is going to be reduced on stack #K.  |
+`----------------------------------------------------------*/
 
-  case 549:
+/*ARGSUSED*/ static void
+yy_reduce_print (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+                 YYSTYPE* yyvalp, YYLTYPE* yylocp)
+{
+  int yynrhs = yyrhsLength (yyrule);
+  yybool yynormal __attribute__ ((__unused__)) =
+    (yystackp->yysplitPoint == NULL);
+  yyGLRStackItem* yyvsp = (yyGLRStackItem*) yystackp->yytops.yystates[yyk];
+  int yylow = 1;
+  int yyi;
+  YYUSE (yyvalp);
+  YYUSE (yylocp);
+  YYFPRINTF (stderr, "Reducing stack %lu by rule %d (line %lu):\n",
+             (unsigned long int) yyk, yyrule - 1,
+             (unsigned long int) yyrline[yyrule]);
+  /* The symbols being reduced.  */
+  for (yyi = 0; yyi < yynrhs; yyi++)
+    {
+      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
+      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+                       &(((yyGLRStackItem const *)yyvsp)[YYFILL ((yyi + 1) - (yynrhs))].yystate.yysemantics.yysval)
+                                              );
+      YYFPRINTF (stderr, "\n");
+    }
+}
+#endif
 
-/* Line 1455 of yacc.c  */
-#line 2998 "vtkParse.y"
-    { postSig("> "); }
-    break;
+/** Pop items off stack #K of STACK according to grammar rule RULE,
+ *  and push back on the resulting nonterminal symbol.  Perform the
+ *  semantic action associated with RULE and store its value with the
+ *  newly pushed state, if FORCEEVAL or if STACK is currently
+ *  unambiguous.  Otherwise, store the deferred semantic action with
+ *  the new state.  If the new state would have an identical input
+ *  position, LR state, and predecessor to an existing state on the stack,
+ *  it is identified with that existing state, eliminating stack #K from
+ *  the STACK.  In this case, the (necessarily deferred) semantic value is
+ *  added to the options for the existing state's semantic value.
+ */
+static YYRESULTTAG
+yyglrReduce (yyGLRStack* yystackp, size_t yyk, yyRuleNum yyrule,
+             yybool yyforceEval)
+{
+  size_t yyposn = yystackp->yytops.yystates[yyk]->yyposn;
 
-  case 551:
+  if (yyforceEval || yystackp->yysplitPoint == NULL)
+    {
+      YYSTYPE yysval;
+      YYLTYPE yyloc = {0};
 
-/* Line 1455 of yacc.c  */
-#line 3001 "vtkParse.y"
-    { postSig("= "); }
-    break;
+      YY_REDUCE_PRINT ((yystackp, yyk, yyrule, &yysval, &yyloc));
+      YYCHK (yydoAction (yystackp, yyk, yyrule, &yysval,
+                         &yyloc));
+      YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyrule], &yysval, &yyloc);
+      yyglrShift (yystackp, yyk,
+                  yyLRgotoState (yystackp->yytops.yystates[yyk]->yylrState,
+                                 yylhsNonterm (yyrule)),
+                  yyposn, &yysval, &yyloc);
+    }
+  else
+    {
+      size_t yyi;
+      int yyn;
+      yyGLRState* yys, *yys0 = yystackp->yytops.yystates[yyk];
+      yyStateNum yynewLRState;
 
-  case 552:
+      for (yys = yystackp->yytops.yystates[yyk], yyn = yyrhsLength (yyrule);
+           0 < yyn; yyn -= 1)
+        {
+          yys = yys->yypred;
+          YYASSERT (yys);
+        }
+      yyupdateSplit (yystackp, yys);
+      yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
+      YYDPRINTF ((stderr,
+                  "Reduced stack %lu by rule #%d; action deferred.  Now in state %d.\n",
+                  (unsigned long int) yyk, yyrule - 1, yynewLRState));
+      for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
+        if (yyi != yyk && yystackp->yytops.yystates[yyi] != NULL)
+          {
+            yyGLRState* yyp, *yysplit = yystackp->yysplitPoint;
+            yyp = yystackp->yytops.yystates[yyi];
+            while (yyp != yys && yyp != yysplit && yyp->yyposn >= yyposn)
+              {
+                if (yyp->yylrState == yynewLRState && yyp->yypred == yys)
+                  {
+                    yyaddDeferredAction (yystackp, yyk, yyp, yys0, yyrule);
+                    yymarkStackDeleted (yystackp, yyk);
+                    YYDPRINTF ((stderr, "Merging stack %lu into stack %lu.\n",
+                                (unsigned long int) yyk,
+                                (unsigned long int) yyi));
+                    return yyok;
+                  }
+                yyp = yyp->yypred;
+              }
+          }
+      yystackp->yytops.yystates[yyk] = yys;
+      yyglrShiftDefer (yystackp, yyk, yynewLRState, yyposn, yys0, yyrule);
+    }
+  return yyok;
+}
 
-/* Line 1455 of yacc.c  */
-#line 3002 "vtkParse.y"
-    { chopSig(); postSig(", "); }
-    break;
+static size_t
+yysplitStack (yyGLRStack* yystackp, size_t yyk)
+{
+  if (yystackp->yysplitPoint == NULL)
+    {
+      YYASSERT (yyk == 0);
+      yystackp->yysplitPoint = yystackp->yytops.yystates[yyk];
+    }
+  if (yystackp->yytops.yysize >= yystackp->yytops.yycapacity)
+    {
+      yyGLRState** yynewStates;
+      yybool* yynewLookaheadNeeds;
 
-  case 554:
+      yynewStates = NULL;
 
-/* Line 1455 of yacc.c  */
-#line 3005 "vtkParse.y"
-    { chopSig(); postSig(";"); }
-    break;
+      if (yystackp->yytops.yycapacity
+          > (YYSIZEMAX / (2 * sizeof yynewStates[0])))
+        yyMemoryExhausted (yystackp);
+      yystackp->yytops.yycapacity *= 2;
 
-  case 562:
+      yynewStates =
+        (yyGLRState**) YYREALLOC (yystackp->yytops.yystates,
+                                  (yystackp->yytops.yycapacity
+                                   * sizeof yynewStates[0]));
+      if (yynewStates == NULL)
+        yyMemoryExhausted (yystackp);
+      yystackp->yytops.yystates = yynewStates;
 
-/* Line 1455 of yacc.c  */
-#line 3019 "vtkParse.y"
-    { postSig("= "); }
-    break;
+      yynewLookaheadNeeds =
+        (yybool*) YYREALLOC (yystackp->yytops.yylookaheadNeeds,
+                             (yystackp->yytops.yycapacity
+                              * sizeof yynewLookaheadNeeds[0]));
+      if (yynewLookaheadNeeds == NULL)
+        yyMemoryExhausted (yystackp);
+      yystackp->yytops.yylookaheadNeeds = yynewLookaheadNeeds;
+    }
+  yystackp->yytops.yystates[yystackp->yytops.yysize]
+    = yystackp->yytops.yystates[yyk];
+  yystackp->yytops.yylookaheadNeeds[yystackp->yytops.yysize]
+    = yystackp->yytops.yylookaheadNeeds[yyk];
+  yystackp->yytops.yysize += 1;
+  return yystackp->yytops.yysize-1;
+}
 
-  case 563:
+/** True iff Y0 and Y1 represent identical options at the top level.
+ *  That is, they represent the same rule applied to RHS symbols
+ *  that produce the same terminal symbols.  */
+static yybool
+yyidenticalOptions (yySemanticOption* yyy0, yySemanticOption* yyy1)
+{
+  if (yyy0->yyrule == yyy1->yyrule)
+    {
+      yyGLRState *yys0, *yys1;
+      int yyn;
+      for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
+           yyn = yyrhsLength (yyy0->yyrule);
+           yyn > 0;
+           yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
+        if (yys0->yyposn != yys1->yyposn)
+          return yyfalse;
+      return yytrue;
+    }
+  else
+    return yyfalse;
+}
 
-/* Line 1455 of yacc.c  */
-#line 3020 "vtkParse.y"
-    { chopSig(); postSig(", "); }
-    break;
+/** Assuming identicalOptions (Y0,Y1), destructively merge the
+ *  alternative semantic values for the RHS-symbols of Y1 and Y0.  */
+static void
+yymergeOptionSets (yySemanticOption* yyy0, yySemanticOption* yyy1)
+{
+  yyGLRState *yys0, *yys1;
+  int yyn;
+  for (yys0 = yyy0->yystate, yys1 = yyy1->yystate,
+       yyn = yyrhsLength (yyy0->yyrule);
+       yyn > 0;
+       yys0 = yys0->yypred, yys1 = yys1->yypred, yyn -= 1)
+    {
+      if (yys0 == yys1)
+        break;
+      else if (yys0->yyresolved)
+        {
+          yys1->yyresolved = yytrue;
+          yys1->yysemantics.yysval = yys0->yysemantics.yysval;
+        }
+      else if (yys1->yyresolved)
+        {
+          yys0->yyresolved = yytrue;
+          yys0->yysemantics.yysval = yys1->yysemantics.yysval;
+        }
+      else
+        {
+          yySemanticOption** yyz0p;
+          yySemanticOption* yyz1;
+          yyz0p = &yys0->yysemantics.yyfirstVal;
+          yyz1 = yys1->yysemantics.yyfirstVal;
+          while (YYID (yytrue))
+            {
+              if (yyz1 == *yyz0p || yyz1 == NULL)
+                break;
+              else if (*yyz0p == NULL)
+                {
+                  *yyz0p = yyz1;
+                  break;
+                }
+              else if (*yyz0p < yyz1)
+                {
+                  yySemanticOption* yyz = *yyz0p;
+                  *yyz0p = yyz1;
+                  yyz1 = yyz1->yynext;
+                  (*yyz0p)->yynext = yyz;
+                }
+              yyz0p = &(*yyz0p)->yynext;
+            }
+          yys1->yysemantics.yyfirstVal = yys0->yysemantics.yyfirstVal;
+        }
+    }
+}
 
-  case 564:
+/** Y0 and Y1 represent two possible actions to take in a given
+ *  parsing state; return 0 if no combination is possible,
+ *  1 if user-mergeable, 2 if Y0 is preferred, 3 if Y1 is preferred.  */
+static int
+yypreference (yySemanticOption* y0, yySemanticOption* y1)
+{
+  yyRuleNum r0 = y0->yyrule, r1 = y1->yyrule;
+  int p0 = yydprec[r0], p1 = yydprec[r1];
 
-/* Line 1455 of yacc.c  */
-#line 3024 "vtkParse.y"
+  if (p0 == p1)
     {
-      chopSig();
-      if (getSig()[getSigLength()-1] == '<') { postSig(" "); }
-      postSig("<");
+      if (yymerger[r0] == 0 || yymerger[r0] != yymerger[r1])
+        return 0;
+      else
+        return 1;
     }
-    break;
+  if (p0 == 0 || p1 == 0)
+    return 0;
+  if (p0 < p1)
+    return 3;
+  if (p1 < p0)
+    return 2;
+  return 0;
+}
+
+static YYRESULTTAG yyresolveValue (yyGLRState* yys,
+                                   yyGLRStack* yystackp);
 
-  case 565:
 
-/* Line 1455 of yacc.c  */
-#line 3030 "vtkParse.y"
+/** Resolve the previous N states starting at and including state S.  If result
+ *  != yyok, some states may have been left unresolved possibly with empty
+ *  semantic option chains.  Regardless of whether result = yyok, each state
+ *  has been left with consistent data so that yydestroyGLRState can be invoked
+ *  if necessary.  */
+static YYRESULTTAG
+yyresolveStates (yyGLRState* yys, int yyn,
+                 yyGLRStack* yystackp)
+{
+  if (0 < yyn)
     {
-      chopSig();
-      if (getSig()[getSigLength()-1] == '>') { postSig(" "); }
-      postSig("> ");
+      YYASSERT (yys->yypred);
+      YYCHK (yyresolveStates (yys->yypred, yyn-1, yystackp));
+      if (! yys->yyresolved)
+        YYCHK (yyresolveValue (yys, yystackp));
     }
-    break;
+  return yyok;
+}
 
-  case 566:
+/** Resolve the states for the RHS of OPT, perform its user action, and return
+ *  the semantic value and location.  Regardless of whether result = yyok, all
+ *  RHS states have been destroyed (assuming the user action destroys all RHS
+ *  semantic values if invoked).  */
+static YYRESULTTAG
+yyresolveAction (yySemanticOption* yyopt, yyGLRStack* yystackp,
+                 YYSTYPE* yyvalp, YYLTYPE* yylocp)
+{
+  yyGLRStackItem yyrhsVals[YYMAXRHS + YYMAXLEFT + 1];
+  int yynrhs;
+  int yychar_current;
+  YYSTYPE yylval_current;
+  YYLTYPE yylloc_current;
+  YYRESULTTAG yyflag;
+
+  yynrhs = yyrhsLength (yyopt->yyrule);
+  yyflag = yyresolveStates (yyopt->yystate, yynrhs, yystackp);
+  if (yyflag != yyok)
+    {
+      yyGLRState *yys;
+      for (yys = yyopt->yystate; yynrhs > 0; yys = yys->yypred, yynrhs -= 1)
+        yydestroyGLRState ("Cleanup: popping", yys);
+      return yyflag;
+    }
+
+  yyrhsVals[YYMAXRHS + YYMAXLEFT].yystate.yypred = yyopt->yystate;
+  yychar_current = yychar;
+  yylval_current = yylval;
+  yylloc_current = yylloc;
+  yychar = yyopt->yyrawchar;
+  yylval = yyopt->yyval;
+  yylloc = yyopt->yyloc;
+  yyflag = yyuserAction (yyopt->yyrule, yynrhs,
+                           yyrhsVals + YYMAXRHS + YYMAXLEFT - 1,
+                           yyvalp, yylocp, yystackp);
+  yychar = yychar_current;
+  yylval = yylval_current;
+  yylloc = yylloc_current;
+  return yyflag;
+}
 
-/* Line 1455 of yacc.c  */
-#line 3037 "vtkParse.y"
-    { postSig("["); }
-    break;
+#if YYDEBUG
+static void
+yyreportTree (yySemanticOption* yyx, int yyindent)
+{
+  int yynrhs = yyrhsLength (yyx->yyrule);
+  int yyi;
+  yyGLRState* yys;
+  yyGLRState* yystates[1 + YYMAXRHS];
+  yyGLRState yyleftmost_state;
 
-  case 567:
+  for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred)
+    yystates[yyi] = yys;
+  if (yys == NULL)
+    {
+      yyleftmost_state.yyposn = 0;
+      yystates[0] = &yyleftmost_state;
+    }
+  else
+    yystates[0] = yys;
 
-/* Line 1455 of yacc.c  */
-#line 3038 "vtkParse.y"
-    { chopSig(); postSig("] "); }
-    break;
+  if (yyx->yystate->yyposn < yys->yyposn + 1)
+    YYFPRINTF (stderr, "%*s%s -> <Rule %d, empty>\n",
+               yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+               yyx->yyrule - 1);
+  else
+    YYFPRINTF (stderr, "%*s%s -> <Rule %d, tokens %lu .. %lu>\n",
+               yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
+               yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1),
+               (unsigned long int) yyx->yystate->yyposn);
+  for (yyi = 1; yyi <= yynrhs; yyi += 1)
+    {
+      if (yystates[yyi]->yyresolved)
+        {
+          if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
+            YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
+                       yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]));
+          else
+            YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
+                       yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]),
+                       (unsigned long int) (yystates[yyi - 1]->yyposn + 1),
+                       (unsigned long int) yystates[yyi]->yyposn);
+        }
+      else
+        yyreportTree (yystates[yyi]->yysemantics.yyfirstVal, yyindent+2);
+    }
+}
+#endif
 
-  case 568:
+/*ARGSUSED*/ static YYRESULTTAG
+yyreportAmbiguity (yySemanticOption* yyx0,
+                   yySemanticOption* yyx1)
+{
+  YYUSE (yyx0);
+  YYUSE (yyx1);
 
-/* Line 1455 of yacc.c  */
-#line 3041 "vtkParse.y"
-    { postSig("("); }
-    break;
+#if YYDEBUG
+  YYFPRINTF (stderr, "Ambiguity detected.\n");
+  YYFPRINTF (stderr, "Option 1,\n");
+  yyreportTree (yyx0, 2);
+  YYFPRINTF (stderr, "\nOption 2,\n");
+  yyreportTree (yyx1, 2);
+  YYFPRINTF (stderr, "\n");
+#endif
 
-  case 569:
+  yyerror (YY_("syntax is ambiguous"));
+  return yyabort;
+}
+
+/** Starting at and including state S1, resolve the location for each of the
+ *  previous N1 states that is unresolved.  The first semantic option of a state
+ *  is always chosen.  */
+static void
+yyresolveLocations (yyGLRState* yys1, int yyn1,
+                    yyGLRStack *yystackp)
+{
+  if (0 < yyn1)
+    {
+      yyresolveLocations (yys1->yypred, yyn1 - 1, yystackp);
+      if (!yys1->yyresolved)
+        {
+          yySemanticOption *yyoption;
+          yyGLRStackItem yyrhsloc[1 + YYMAXRHS];
+          int yynrhs;
+          int yychar_current;
+          YYSTYPE yylval_current;
+          YYLTYPE yylloc_current;
+          yyoption = yys1->yysemantics.yyfirstVal;
+          YYASSERT (yyoption != NULL);
+          yynrhs = yyrhsLength (yyoption->yyrule);
+          if (yynrhs > 0)
+            {
+              yyGLRState *yys;
+              int yyn;
+              yyresolveLocations (yyoption->yystate, yynrhs,
+                                  yystackp);
+              for (yys = yyoption->yystate, yyn = yynrhs;
+                   yyn > 0;
+                   yys = yys->yypred, yyn -= 1)
+                yyrhsloc[yyn].yystate.yyloc = yys->yyloc;
+            }
+          else
+            {
+              /* Both yyresolveAction and yyresolveLocations traverse the GSS
+                 in reverse rightmost order.  It is only necessary to invoke
+                 yyresolveLocations on a subforest for which yyresolveAction
+                 would have been invoked next had an ambiguity not been
+                 detected.  Thus the location of the previous state (but not
+                 necessarily the previous state itself) is guaranteed to be
+                 resolved already.  */
+              yyGLRState *yyprevious = yyoption->yystate;
+              yyrhsloc[0].yystate.yyloc = yyprevious->yyloc;
+            }
+          yychar_current = yychar;
+          yylval_current = yylval;
+          yylloc_current = yylloc;
+          yychar = yyoption->yyrawchar;
+          yylval = yyoption->yyval;
+          yylloc = yyoption->yyloc;
+          YYLLOC_DEFAULT ((yys1->yyloc), yyrhsloc, yynrhs);
+          yychar = yychar_current;
+          yylval = yylval_current;
+          yylloc = yylloc_current;
+        }
+    }
+}
+
+/** Resolve the ambiguity represented in state S, perform the indicated
+ *  actions, and set the semantic value of S.  If result != yyok, the chain of
+ *  semantic options in S has been cleared instead or it has been left
+ *  unmodified except that redundant options may have been removed.  Regardless
+ *  of whether result = yyok, S has been left with consistent data so that
+ *  yydestroyGLRState can be invoked if necessary.  */
+static YYRESULTTAG
+yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp)
+{
+  yySemanticOption* yyoptionList = yys->yysemantics.yyfirstVal;
+  yySemanticOption* yybest;
+  yySemanticOption** yypp;
+  yybool yymerge;
+  YYSTYPE yysval;
+  YYRESULTTAG yyflag;
+  YYLTYPE *yylocp = &yys->yyloc;
+
+  yybest = yyoptionList;
+  yymerge = yyfalse;
+  for (yypp = &yyoptionList->yynext; *yypp != NULL; )
+    {
+      yySemanticOption* yyp = *yypp;
+
+      if (yyidenticalOptions (yybest, yyp))
+        {
+          yymergeOptionSets (yybest, yyp);
+          *yypp = yyp->yynext;
+        }
+      else
+        {
+          switch (yypreference (yybest, yyp))
+            {
+            case 0:
+              yyresolveLocations (yys, 1, yystackp);
+              return yyreportAmbiguity (yybest, yyp);
+              break;
+            case 1:
+              yymerge = yytrue;
+              break;
+            case 2:
+              break;
+            case 3:
+              yybest = yyp;
+              yymerge = yyfalse;
+              break;
+            default:
+              /* This cannot happen so it is not worth a YYASSERT (yyfalse),
+                 but some compilers complain if the default case is
+                 omitted.  */
+              break;
+            }
+          yypp = &yyp->yynext;
+        }
+    }
+
+  if (yymerge)
+    {
+      yySemanticOption* yyp;
+      int yyprec = yydprec[yybest->yyrule];
+      yyflag = yyresolveAction (yybest, yystackp, &yysval,
+                                yylocp);
+      if (yyflag == yyok)
+        for (yyp = yybest->yynext; yyp != NULL; yyp = yyp->yynext)
+          {
+            if (yyprec == yydprec[yyp->yyrule])
+              {
+                YYSTYPE yysval_other;
+                YYLTYPE yydummy;
+                yyflag = yyresolveAction (yyp, yystackp, &yysval_other,
+                                          &yydummy);
+                if (yyflag != yyok)
+                  {
+                    yydestruct ("Cleanup: discarding incompletely merged value for",
+                                yystos[yys->yylrState],
+                                &yysval);
+                    break;
+                  }
+                yyuserMerge (yymerger[yyp->yyrule], &yysval, &yysval_other);
+              }
+          }
+    }
+  else
+    yyflag = yyresolveAction (yybest, yystackp, &yysval, yylocp);
 
-/* Line 1455 of yacc.c  */
-#line 3042 "vtkParse.y"
-    { chopSig(); postSig(") "); }
-    break;
+  if (yyflag == yyok)
+    {
+      yys->yyresolved = yytrue;
+      yys->yysemantics.yysval = yysval;
+    }
+  else
+    yys->yysemantics.yyfirstVal = NULL;
+  return yyflag;
+}
 
-  case 570:
+static YYRESULTTAG
+yyresolveStack (yyGLRStack* yystackp)
+{
+  if (yystackp->yysplitPoint != NULL)
+    {
+      yyGLRState* yys;
+      int yyn;
 
-/* Line 1455 of yacc.c  */
-#line 3043 "vtkParse.y"
-    { postSig("("); postSig((yyvsp[(1) - (1)].str)); postSig("*"); }
-    break;
+      for (yyn = 0, yys = yystackp->yytops.yystates[0];
+           yys != yystackp->yysplitPoint;
+           yys = yys->yypred, yyn += 1)
+        continue;
+      YYCHK (yyresolveStates (yystackp->yytops.yystates[0], yyn, yystackp
+                             ));
+    }
+  return yyok;
+}
 
-  case 571:
+static void
+yycompressStack (yyGLRStack* yystackp)
+{
+  yyGLRState* yyp, *yyq, *yyr;
 
-/* Line 1455 of yacc.c  */
-#line 3044 "vtkParse.y"
-    { chopSig(); postSig(") "); }
-    break;
+  if (yystackp->yytops.yysize != 1 || yystackp->yysplitPoint == NULL)
+    return;
 
-  case 572:
+  for (yyp = yystackp->yytops.yystates[0], yyq = yyp->yypred, yyr = NULL;
+       yyp != yystackp->yysplitPoint;
+       yyr = yyp, yyp = yyq, yyq = yyp->yypred)
+    yyp->yypred = yyr;
 
-/* Line 1455 of yacc.c  */
-#line 3045 "vtkParse.y"
-    { postSig("("); postSig((yyvsp[(1) - (1)].str)); postSig("&"); }
-    break;
+  yystackp->yyspaceLeft += yystackp->yynextFree - yystackp->yyitems;
+  yystackp->yynextFree = ((yyGLRStackItem*) yystackp->yysplitPoint) + 1;
+  yystackp->yyspaceLeft -= yystackp->yynextFree - yystackp->yyitems;
+  yystackp->yysplitPoint = NULL;
+  yystackp->yylastDeleted = NULL;
 
-  case 573:
+  while (yyr != NULL)
+    {
+      yystackp->yynextFree->yystate = *yyr;
+      yyr = yyr->yypred;
+      yystackp->yynextFree->yystate.yypred = &yystackp->yynextFree[-1].yystate;
+      yystackp->yytops.yystates[0] = &yystackp->yynextFree->yystate;
+      yystackp->yynextFree += 1;
+      yystackp->yyspaceLeft -= 1;
+    }
+}
 
-/* Line 1455 of yacc.c  */
-#line 3046 "vtkParse.y"
-    { chopSig(); postSig(") "); }
-    break;
+static YYRESULTTAG
+yyprocessOneStack (yyGLRStack* yystackp, size_t yyk,
+                   size_t yyposn)
+{
+  int yyaction;
+  const short int* yyconflicts;
+  yyRuleNum yyrule;
 
-  case 574:
+  while (yystackp->yytops.yystates[yyk] != NULL)
+    {
+      yyStateNum yystate = yystackp->yytops.yystates[yyk]->yylrState;
+      YYDPRINTF ((stderr, "Stack %lu Entering state %d\n",
+                  (unsigned long int) yyk, yystate));
 
-/* Line 1455 of yacc.c  */
-#line 3049 "vtkParse.y"
-    { postSig("{ "); }
-    break;
+      YYASSERT (yystate != YYFINAL);
 
-  case 575:
+      if (yyisDefaultedState (yystate))
+        {
+          yyrule = yydefaultAction (yystate);
+          if (yyrule == 0)
+            {
+              YYDPRINTF ((stderr, "Stack %lu dies.\n",
+                          (unsigned long int) yyk));
+              yymarkStackDeleted (yystackp, yyk);
+              return yyok;
+            }
+          YYCHK (yyglrReduce (yystackp, yyk, yyrule, yyfalse));
+        }
+      else
+        {
+          yySymbol yytoken;
+          yystackp->yytops.yylookaheadNeeds[yyk] = yytrue;
+          if (yychar == YYEMPTY)
+            {
+              YYDPRINTF ((stderr, "Reading a token: "));
+              yychar = YYLEX;
+            }
 
-/* Line 1455 of yacc.c  */
-#line 3049 "vtkParse.y"
-    { postSig("} "); }
-    break;
+          if (yychar <= YYEOF)
+            {
+              yychar = yytoken = YYEOF;
+              YYDPRINTF ((stderr, "Now at end of input.\n"));
+            }
+          else
+            {
+              yytoken = YYTRANSLATE (yychar);
+              YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+            }
 
+          yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
 
+          while (*yyconflicts != 0)
+            {
+              size_t yynewStack = yysplitStack (yystackp, yyk);
+              YYDPRINTF ((stderr, "Splitting off stack %lu from %lu.\n",
+                          (unsigned long int) yynewStack,
+                          (unsigned long int) yyk));
+              YYCHK (yyglrReduce (yystackp, yynewStack,
+                                  *yyconflicts, yyfalse));
+              YYCHK (yyprocessOneStack (yystackp, yynewStack,
+                                        yyposn));
+              yyconflicts += 1;
+            }
 
-/* Line 1455 of yacc.c  */
-#line 7941 "vtkParse.tab.c"
-      default: break;
+          if (yyisShiftAction (yyaction))
+            break;
+          else if (yyisErrorAction (yyaction))
+            {
+              YYDPRINTF ((stderr, "Stack %lu dies.\n",
+                          (unsigned long int) yyk));
+              yymarkStackDeleted (yystackp, yyk);
+              break;
+            }
+          else
+            YYCHK (yyglrReduce (yystackp, yyk, -yyaction,
+                                yyfalse));
+        }
     }
-  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-
-  *++yyvsp = yyval;
+  return yyok;
+}
 
-  /* Now `shift' the result of the reduction.  Determine what state
-     that goes to, based on the state we popped back to and the rule
-     number reduced by.  */
+/*ARGSUSED*/ static void
+yyreportSyntaxError (yyGLRStack* yystackp)
+{
+  if (yystackp->yyerrState == 0)
+    {
+#if YYERROR_VERBOSE
+      int yyn;
+      yyn = yypact[yystackp->yytops.yystates[0]->yylrState];
+      if (YYPACT_NINF < yyn && yyn <= YYLAST)
+        {
+          yySymbol yytoken = YYTRANSLATE (yychar);
+          size_t yysize0 = yytnamerr (NULL, yytokenName (yytoken));
+          size_t yysize = yysize0;
+          size_t yysize1;
+          yybool yysize_overflow = yyfalse;
+          char* yymsg = NULL;
+          enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+          char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+          int yyx;
+          char *yyfmt;
+          char const *yyf;
+          static char const yyunexpected[] = "syntax error, unexpected %s";
+          static char const yyexpecting[] = ", expecting %s";
+          static char const yyor[] = " or %s";
+          char yyformat[sizeof yyunexpected
+                        + sizeof yyexpecting - 1
+                        + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+                           * (sizeof yyor - 1))];
+          char const *yyprefix = yyexpecting;
+
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yycount = 1;
+
+          yyarg[0] = yytokenName (yytoken);
+          yyfmt = yystpcpy (yyformat, yyunexpected);
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    yyformat[sizeof yyunexpected - 1] = '\0';
+                    break;
+                  }
+                yyarg[yycount++] = yytokenName (yyx);
+                yysize1 = yysize + yytnamerr (NULL, yytokenName (yyx));
+                yysize_overflow |= yysize1 < yysize;
+                yysize = yysize1;
+                yyfmt = yystpcpy (yyfmt, yyprefix);
+                yyprefix = yyor;
+              }
 
-  yyn = yyr1[yyn];
+          yyf = YY_(yyformat);
+          yysize1 = yysize + strlen (yyf);
+          yysize_overflow |= yysize1 < yysize;
+          yysize = yysize1;
 
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
+          if (!yysize_overflow)
+            yymsg = (char *) YYMALLOC (yysize);
 
-  goto yynewstate;
+          if (yymsg)
+            {
+              char *yyp = yymsg;
+              int yyi = 0;
+              while ((*yyp = *yyf))
+                {
+                  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+                    {
+                      yyp += yytnamerr (yyp, yyarg[yyi++]);
+                      yyf += 2;
+                    }
+                  else
+                    {
+                      yyp++;
+                      yyf++;
+                    }
+                }
+              yyerror (yymsg);
+              YYFREE (yymsg);
+            }
+          else
+            {
+              yyerror (YY_("syntax error"));
+              yyMemoryExhausted (yystackp);
+            }
+        }
+      else
+#endif /* YYERROR_VERBOSE */
+        yyerror (YY_("syntax error"));
+      yynerrs += 1;
+    }
+}
 
+/* Recover from a syntax error on *YYSTACKP, assuming that *YYSTACKP->YYTOKENP,
+   yylval, and yylloc are the syntactic category, semantic value, and location
+   of the lookahead.  */
+/*ARGSUSED*/ static void
+yyrecoverSyntaxError (yyGLRStack* yystackp)
+{
+  size_t yyk;
+  int yyj;
 
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
-  /* If not already recovering from an error, report this error.  */
-  if (!yyerrstatus)
-    {
-      ++yynerrs;
-#if ! YYERROR_VERBOSE
-      yyerror (YY_("syntax error"));
-#else
+  if (yystackp->yyerrState == 3)
+    /* We just shifted the error token and (perhaps) took some
+       reductions.  Skip tokens until we can proceed.  */
+    while (YYID (yytrue))
       {
-        YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-        if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+        yySymbol yytoken;
+        if (yychar == YYEOF)
+          yyFail (yystackp, NULL);
+        if (yychar != YYEMPTY)
           {
-            YYSIZE_T yyalloc = 2 * yysize;
-            if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-              yyalloc = YYSTACK_ALLOC_MAXIMUM;
-            if (yymsg != yymsgbuf)
-              YYSTACK_FREE (yymsg);
-            yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-            if (yymsg)
-              yymsg_alloc = yyalloc;
-            else
-              {
-                yymsg = yymsgbuf;
-                yymsg_alloc = sizeof yymsgbuf;
-              }
+            yytoken = YYTRANSLATE (yychar);
+            yydestruct ("Error: discarding",
+                        yytoken, &yylval);
           }
-
-        if (0 < yysize && yysize <= yymsg_alloc)
+        YYDPRINTF ((stderr, "Reading a token: "));
+        yychar = YYLEX;
+        if (yychar <= YYEOF)
           {
-            (void) yysyntax_error (yymsg, yystate, yychar);
-            yyerror (yymsg);
+            yychar = yytoken = YYEOF;
+            YYDPRINTF ((stderr, "Now at end of input.\n"));
           }
         else
           {
-            yyerror (YY_("syntax error"));
-            if (yysize != 0)
-              goto yyexhaustedlab;
+            yytoken = YYTRANSLATE (yychar);
+            YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
           }
+        yyj = yypact[yystackp->yytops.yystates[0]->yylrState];
+        if (yyis_pact_ninf (yyj))
+          return;
+        yyj += yytoken;
+        if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
+          {
+            if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
+              return;
+          }
+        else if (yytable[yyj] != 0 && ! yyis_table_ninf (yytable[yyj]))
+          return;
       }
-#endif
-    }
-
-
-
-  if (yyerrstatus == 3)
-    {
-      /* If just tried and failed to reuse lookahead token after an
-         error, discard it.  */
 
-      if (yychar <= YYEOF)
-        {
-          /* Return failure if at end of input.  */
-          if (yychar == YYEOF)
-            YYABORT;
-        }
-      else
+  /* Reduce to one stack.  */
+  for (yyk = 0; yyk < yystackp->yytops.yysize; yyk += 1)
+    if (yystackp->yytops.yystates[yyk] != NULL)
+      break;
+  if (yyk >= yystackp->yytops.yysize)
+    yyFail (yystackp, NULL);
+  for (yyk += 1; yyk < yystackp->yytops.yysize; yyk += 1)
+    yymarkStackDeleted (yystackp, yyk);
+  yyremoveDeletes (yystackp);
+  yycompressStack (yystackp);
+
+  /* Now pop stack until we find a state that shifts the error token.  */
+  yystackp->yyerrState = 3;
+  while (yystackp->yytops.yystates[0] != NULL)
+    {
+      yyGLRState *yys = yystackp->yytops.yystates[0];
+      yyj = yypact[yys->yylrState];
+      if (! yyis_pact_ninf (yyj))
         {
-          yydestruct ("Error: discarding",
-                      yytoken, &yylval);
-          yychar = YYEMPTY;
+          yyj += YYTERROR;
+          if (0 <= yyj && yyj <= YYLAST && yycheck[yyj] == YYTERROR
+              && yyisShiftAction (yytable[yyj]))
+            {
+              /* Shift the error token having adjusted its location.  */
+              YYLTYPE yyerrloc = {0};
+              YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
+                               &yylval, &yyerrloc);
+              yyglrShift (yystackp, 0, yytable[yyj],
+                          yys->yyposn, &yylval, &yyerrloc);
+              yys = yystackp->yytops.yystates[0];
+              break;
+            }
         }
-    }
 
-  /* Else will try to reuse lookahead token after shifting the error
-     token.  */
-  goto yyerrlab1;
+      if (yys->yypred != NULL)
+        yydestroyGLRState ("Error: popping", yys);
+      yystackp->yytops.yystates[0] = yys->yypred;
+      yystackp->yynextFree -= 1;
+      yystackp->yyspaceLeft += 1;
+    }
+  if (yystackp->yytops.yystates[0] == NULL)
+    yyFail (yystackp, NULL);
+}
 
+#define YYCHK1(YYE)                                                             \
+  do {                                                                             \
+    switch (YYE) {                                                             \
+    case yyok:                                                                     \
+      break;                                                                     \
+    case yyabort:                                                             \
+      goto yyabortlab;                                                             \
+    case yyaccept:                                                             \
+      goto yyacceptlab;                                                             \
+    case yyerr:                                                                     \
+      goto yyuser_error;                                                     \
+    default:                                                                     \
+      goto yybuglab;                                                             \
+    }                                                                             \
+  } while (YYID (0))
+
+
+/*----------.
+| yyparse.  |
+`----------*/
 
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR.  |
-`---------------------------------------------------*/
-yyerrorlab:
+int
+yyparse (void)
+{
+  int yyresult;
+  yyGLRStack yystack;
+  yyGLRStack* const yystackp = &yystack;
+  size_t yyposn;
 
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
+  YYDPRINTF ((stderr, "Starting parse\n"));
 
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYERROR.  */
-  YYPOPSTACK (yylen);
-  yylen = 0;
-  YY_STACK_PRINT (yyss, yyssp);
-  yystate = *yyssp;
+  yychar = YYEMPTY;
+  yylval = yyval_default;
 
 
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR.  |
-`-------------------------------------------------------------*/
-yyerrlab1:
-  yyerrstatus = 3;        /* Each real token shifted decrements this.  */
+  if (! yyinitGLRStack (yystackp, YYINITDEPTH))
+    goto yyexhaustedlab;
+  switch (YYSETJMP (yystack.yyexception_buffer))
+    {
+    case 0: break;
+    case 1: goto yyabortlab;
+    case 2: goto yyexhaustedlab;
+    default: goto yybuglab;
+    }
+  yyglrShift (&yystack, 0, 0, 0, &yylval, &yylloc);
+  yyposn = 0;
 
-  for (;;)
+  while (YYID (yytrue))
     {
-      yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      /* For efficiency, we have two loops, the first of which is
+         specialized to deterministic operation (single stack, no
+         potential ambiguity).  */
+      /* Standard mode */
+      while (YYID (yytrue))
         {
-          yyn += YYTERROR;
-          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+          yyRuleNum yyrule;
+          int yyaction;
+          const short int* yyconflicts;
+
+          yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
+          YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+          if (yystate == YYFINAL)
+            goto yyacceptlab;
+          if (yyisDefaultedState (yystate))
+            {
+              yyrule = yydefaultAction (yystate);
+              if (yyrule == 0)
+                {
+
+                  yyreportSyntaxError (&yystack);
+                  goto yyuser_error;
+                }
+              YYCHK1 (yyglrReduce (&yystack, 0, yyrule, yytrue));
+            }
+          else
             {
-              yyn = yytable[yyn];
-              if (0 < yyn)
+              yySymbol yytoken;
+              if (yychar == YYEMPTY)
+                {
+                  YYDPRINTF ((stderr, "Reading a token: "));
+                  yychar = YYLEX;
+                }
+
+              if (yychar <= YYEOF)
+                {
+                  yychar = yytoken = YYEOF;
+                  YYDPRINTF ((stderr, "Now at end of input.\n"));
+                }
+              else
+                {
+                  yytoken = YYTRANSLATE (yychar);
+                  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+                }
+
+              yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
+              if (*yyconflicts != 0)
                 break;
+              if (yyisShiftAction (yyaction))
+                {
+                  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+                  yychar = YYEMPTY;
+                  yyposn += 1;
+                  yyglrShift (&yystack, 0, yyaction, yyposn, &yylval, &yylloc);
+                  if (0 < yystack.yyerrState)
+                    yystack.yyerrState -= 1;
+                }
+              else if (yyisErrorAction (yyaction))
+                {
+
+                  yyreportSyntaxError (&yystack);
+                  goto yyuser_error;
+                }
+              else
+                YYCHK1 (yyglrReduce (&yystack, 0, -yyaction, yytrue));
             }
         }
 
-      /* Pop the current state because it cannot handle the error token.  */
-      if (yyssp == yyss)
-        YYABORT;
+      while (YYID (yytrue))
+        {
+          yySymbol yytoken_to_shift;
+          size_t yys;
 
+          for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+            yystackp->yytops.yylookaheadNeeds[yys] = yychar != YYEMPTY;
 
-      yydestruct ("Error: popping",
-                  yystos[yystate], yyvsp);
-      YYPOPSTACK (1);
-      yystate = *yyssp;
-      YY_STACK_PRINT (yyss, yyssp);
-    }
+          /* yyprocessOneStack returns one of three things:
 
-  *++yyvsp = yylval;
+              - An error flag.  If the caller is yyprocessOneStack, it
+                immediately returns as well.  When the caller is finally
+                yyparse, it jumps to an error label via YYCHK1.
 
+              - yyok, but yyprocessOneStack has invoked yymarkStackDeleted
+                (&yystack, yys), which sets the top state of yys to NULL.  Thus,
+                yyparse's following invocation of yyremoveDeletes will remove
+                the stack.
 
-  /* Shift the error token.  */
-  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+              - yyok, when ready to shift a token.
 
-  yystate = yyn;
-  goto yynewstate;
+             Except in the first case, yyparse will invoke yyremoveDeletes and
+             then shift the next token onto all remaining stacks.  This
+             synchronization of the shift (that is, after all preceding
+             reductions on all stacks) helps prevent double destructor calls
+             on yylval in the event of memory exhaustion.  */
 
+          for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+            YYCHK1 (yyprocessOneStack (&yystack, yys, yyposn));
+          yyremoveDeletes (&yystack);
+          if (yystack.yytops.yysize == 0)
+            {
+              yyundeleteLastStack (&yystack);
+              if (yystack.yytops.yysize == 0)
+                yyFail (&yystack, YY_("syntax error"));
+              YYCHK1 (yyresolveStack (&yystack));
+              YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
+
+              yyreportSyntaxError (&yystack);
+              goto yyuser_error;
+            }
+
+          /* If any yyglrShift call fails, it will fail after shifting.  Thus,
+             a copy of yylval will already be on stack 0 in the event of a
+             failure in the following loop.  Thus, yychar is set to YYEMPTY
+             before the loop to make sure the user destructor for yylval isn't
+             called twice.  */
+          yytoken_to_shift = YYTRANSLATE (yychar);
+          yychar = YYEMPTY;
+          yyposn += 1;
+          for (yys = 0; yys < yystack.yytops.yysize; yys += 1)
+            {
+              int yyaction;
+              const short int* yyconflicts;
+              yyStateNum yystate = yystack.yytops.yystates[yys]->yylrState;
+              yygetLRActions (yystate, yytoken_to_shift, &yyaction,
+                              &yyconflicts);
+              /* Note that yyconflicts were handled by yyprocessOneStack.  */
+              YYDPRINTF ((stderr, "On stack %lu, ", (unsigned long int) yys));
+              YY_SYMBOL_PRINT ("shifting", yytoken_to_shift, &yylval, &yylloc);
+              yyglrShift (&yystack, yys, yyaction, yyposn,
+                          &yylval, &yylloc);
+              YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
+                          (unsigned long int) yys,
+                          yystack.yytops.yystates[yys]->yylrState));
+            }
+
+          if (yystack.yytops.yysize == 1)
+            {
+              YYCHK1 (yyresolveStack (&yystack));
+              YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
+              yycompressStack (&yystack);
+              break;
+            }
+        }
+      continue;
+    yyuser_error:
+      yyrecoverSyntaxError (&yystack);
+      yyposn = yystack.yytops.yystates[0]->yyposn;
+    }
 
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here.  |
-`-------------------------------------*/
-yyacceptlab:
+ yyacceptlab:
   yyresult = 0;
   goto yyreturn;
 
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here.  |
-`-----------------------------------*/
-yyabortlab:
+ yybuglab:
+  YYASSERT (yyfalse);
+  goto yyabortlab;
+
+ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here.  |
-`-------------------------------------------------*/
-yyexhaustedlab:
+ yyexhaustedlab:
   yyerror (YY_("memory exhausted"));
   yyresult = 2;
-  /* Fall through.  */
-#endif
+  goto yyreturn;
 
-yyreturn:
+ yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-                 yytoken, &yylval);
-  /* Do not reclaim the symbols of the rule which action triggered
-     this YYABORT or YYACCEPT.  */
-  YYPOPSTACK (yylen);
-  YY_STACK_PRINT (yyss, yyssp);
-  while (yyssp != yyss)
-    {
-      yydestruct ("Cleanup: popping",
-                  yystos[*yyssp], yyvsp);
-      YYPOPSTACK (1);
-    }
-#ifndef yyoverflow
-  if (yyss != yyssa)
-    YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
-  if (yymsg != yymsgbuf)
-    YYSTACK_FREE (yymsg);
-#endif
+    yydestruct ("Cleanup: discarding lookahead",
+                YYTRANSLATE (yychar),
+                &yylval);
+
+  /* If the stack is well-formed, pop the stack until it is empty,
+     destroying its entries as we go.  But free the stack regardless
+     of whether it is well-formed.  */
+  if (yystack.yyitems)
+    {
+      yyGLRState** yystates = yystack.yytops.yystates;
+      if (yystates)
+        {
+          size_t yysize = yystack.yytops.yysize;
+          size_t yyk;
+          for (yyk = 0; yyk < yysize; yyk += 1)
+            if (yystates[yyk])
+              {
+                while (yystates[yyk])
+                  {
+                    yyGLRState *yys = yystates[yyk];
+                    if (yys->yypred != NULL)
+                      yydestroyGLRState ("Cleanup: popping", yys);
+                    yystates[yyk] = yys->yypred;
+                    yystack.yynextFree -= 1;
+                    yystack.yyspaceLeft += 1;
+                  }
+                break;
+              }
+        }
+      yyfreeGLRStack (&yystack);
+    }
+
   /* Make sure YYID is used.  */
   return YYID (yyresult);
 }
 
+/* DEBUGGING ONLY */
+#if YYDEBUG
+static void yypstack (yyGLRStack* yystackp, size_t yyk)
+  __attribute__ ((__unused__));
+static void yypdumpstack (yyGLRStack* yystackp) __attribute__ ((__unused__));
 
+static void
+yy_yypstack (yyGLRState* yys)
+{
+  if (yys->yypred)
+    {
+      yy_yypstack (yys->yypred);
+      YYFPRINTF (stderr, " -> ");
+    }
+  YYFPRINTF (stderr, "%d@%lu", yys->yylrState,
+             (unsigned long int) yys->yyposn);
+}
 
-/* Line 1675 of yacc.c  */
-#line 3088 "vtkParse.y"
+static void
+yypstates (yyGLRState* yyst)
+{
+  if (yyst == NULL)
+    YYFPRINTF (stderr, "<null>");
+  else
+    yy_yypstack (yyst);
+  YYFPRINTF (stderr, "\n");
+}
+
+static void
+yypstack (yyGLRStack* yystackp, size_t yyk)
+{
+  yypstates (yystackp->yytops.yystates[yyk]);
+}
+
+#define YYINDEX(YYX)                                                             \
+    ((YYX) == NULL ? -1 : (yyGLRStackItem*) (YYX) - yystackp->yyitems)
+
+
+static void
+yypdumpstack (yyGLRStack* yystackp)
+{
+  yyGLRStackItem* yyp;
+  size_t yyi;
+  for (yyp = yystackp->yyitems; yyp < yystackp->yynextFree; yyp += 1)
+    {
+      YYFPRINTF (stderr, "%3lu. ",
+                 (unsigned long int) (yyp - yystackp->yyitems));
+      if (*(yybool *) yyp)
+        {
+          YYFPRINTF (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
+                     yyp->yystate.yyresolved, yyp->yystate.yylrState,
+                     (unsigned long int) yyp->yystate.yyposn,
+                     (long int) YYINDEX (yyp->yystate.yypred));
+          if (! yyp->yystate.yyresolved)
+            YYFPRINTF (stderr, ", firstVal: %ld",
+                       (long int) YYINDEX (yyp->yystate
+                                             .yysemantics.yyfirstVal));
+        }
+      else
+        {
+          YYFPRINTF (stderr, "Option. rule: %d, state: %ld, next: %ld",
+                     yyp->yyoption.yyrule - 1,
+                     (long int) YYINDEX (yyp->yyoption.yystate),
+                     (long int) YYINDEX (yyp->yyoption.yynext));
+        }
+      YYFPRINTF (stderr, "\n");
+    }
+  YYFPRINTF (stderr, "Tops:");
+  for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
+    YYFPRINTF (stderr, "%lu: %ld; ", (unsigned long int) yyi,
+               (long int) YYINDEX (yystackp->yytops.yystates[yyi]));
+  YYFPRINTF (stderr, "\n");
+}
+#endif
+
+
+
+/* Line 2634 of glr.c  */
+#line 3328 "vtkParse.y"
 
 #include <string.h>
 #include "lex.yy.c"
@@ -8044,6 +11402,9 @@ const char *type_class(unsigned int type, const char *classname)
       {
       switch ((type & VTK_PARSE_BASE_TYPE))
         {
+        case 0:
+          classname = "auto";
+          break;
         case VTK_PARSE_VOID:
           classname = "void";
           break;
@@ -8062,6 +11423,15 @@ const char *type_class(unsigned int type, const char *classname)
         case VTK_PARSE_CHAR:
           classname = "char";
           break;
+        case VTK_PARSE_CHAR16_T:
+          classname = "char16_t";
+          break;
+        case VTK_PARSE_CHAR32_T:
+          classname = "char32_t";
+          break;
+        case VTK_PARSE_WCHAR_T:
+          classname = "wchar_t";
+          break;
         case VTK_PARSE_UNSIGNED_CHAR:
           classname = "unsigned char";
           break;
@@ -8155,27 +11525,6 @@ void start_class(const char *classname, int is_struct_or_union)
   clearComment();
 }
 
-/* reject the class */
-void reject_class(const char *classname, int is_struct_or_union)
-{
-  static ClassInfo static_class;
-
-  pushClass();
-  currentClass = &static_class;
-  currentClass->Name = classname;
-  vtkParse_InitClass(currentClass);
-
-  access_level = VTK_ACCESS_PRIVATE;
-  if (is_struct_or_union)
-    {
-    access_level = VTK_ACCESS_PUBLIC;
-    }
-
-  vtkParse_InitFunction(currentFunction);
-  startSig();
-  clearComment();
-}
-
 /* reached the end of a class definition */
 void end_class()
 {
@@ -8186,9 +11535,13 @@ void end_class()
 }
 
 /* add a base class to the specified class */
-void add_base_class(ClassInfo *cls, const char *name, int al, int virt)
+void add_base_class(ClassInfo *cls, const char *name, int al,
+  unsigned int extra)
 {
-  if (cls && al == VTK_ACCESS_PUBLIC && virt == 0)
+  /* "extra" can contain VTK_PARSE_VIRTUAL and VTK_PARSE_PACK */
+  if (cls && al == VTK_ACCESS_PUBLIC &&
+      (extra & VTK_PARSE_VIRTUAL) == 0 &&
+      (extra & VTK_PARSE_PACK) == 0)
     {
     vtkParse_AddStringToArray(&cls->SuperClasses,
                               &cls->NumberOfSuperClasses,
@@ -8229,12 +11582,20 @@ void add_using(const char *name, int is_namespace)
 }
 
 /* start a new enum */
-void start_enum(const char *name)
+void start_enum(const char *name, int is_scoped,
+                unsigned int type, const char *basename)
 {
   EnumInfo *item;
 
+  currentEnumType = (type ? type : VTK_PARSE_INT);
   currentEnumName = "int";
   currentEnumValue = NULL;
+
+  if (type == 0 && is_scoped)
+    {
+    type = VTK_PARSE_INT;
+    }
+
   if (name)
     {
     currentEnumName = name;
@@ -8242,6 +11603,7 @@ void start_enum(const char *name)
     vtkParse_InitEnum(item);
     item->Name = name;
     item->Access = access_level;
+
     if (currentClass)
       {
       vtkParse_AddEnumToClass(currentClass, item);
@@ -8250,12 +11612,30 @@ void start_enum(const char *name)
       {
       vtkParse_AddEnumToNamespace(currentNamespace, item);
       }
+
+    if (type)
+      {
+      vtkParse_AddStringToArray(&item->SuperClasses,
+                                &item->NumberOfSuperClasses,
+                                type_class(type, basename));
+      }
+
+    if (is_scoped)
+      {
+      pushClass();
+      currentClass = item;
+      }
     }
 }
 
 /* finish the enum */
 void end_enum()
 {
+  if (currentClass && currentClass->ItemType == VTK_ENUM_INFO)
+    {
+    popClass();
+    }
+
   currentEnumName = NULL;
   currentEnumValue = NULL;
 }
@@ -8302,7 +11682,7 @@ void add_enum(const char *name, const char *value)
     currentEnumValue = "0";
     }
 
-  add_constant(name, currentEnumValue, VTK_PARSE_INT, currentEnumName, 2);
+  add_constant(name, currentEnumValue, currentEnumType, currentEnumName, 2);
 }
 
 /* for a macro constant, guess the constant type, doesn't do any math */
@@ -8318,18 +11698,10 @@ unsigned int guess_constant_type(const char *valstring)
     return 0;
     }
 
-  if (valstring[0] < '0' || valstring[0] > '9')
+  k = vtkParse_SkipId(valstring);
+  if (valstring[k] == '\0')
     {
-    k = 0;
-    while ((valstring[k] >= '0' && valstring[k] <= '9') ||
-           (valstring[k] >= 'a' && valstring[k] <= 'z') ||
-           (valstring[k] >= 'A' && valstring[k] <= 'Z') ||
-           valstring[k] == '_') { k++; }
-
-    if (valstring[k] == '\0')
-      {
-      is_name = 1;
-      }
+    is_name = 1;
     }
 
   if (strcmp(valstring, "true") == 0 || strcmp(valstring, "false") == 0)
@@ -8337,6 +11709,11 @@ unsigned int guess_constant_type(const char *valstring)
     return VTK_PARSE_BOOL;
     }
 
+  if (strcmp(valstring, "nullptr") == 0)
+    {
+    return VTK_PARSE_NULLPTR_T;
+    }
+
   if (valstring[0] == '\'')
     {
     return VTK_PARSE_CHAR;
@@ -8755,6 +12132,13 @@ void handle_complex_type(
   /* remove specifiers like "friend" and "typedef" */
   datatype &= VTK_PARSE_QUALIFIED_TYPE;
 
+  /* remove the pack specifier caused by "..." */
+  if ((extra & VTK_PARSE_PACK) != 0)
+    {
+    val->IsPack = 1;
+    extra ^= VTK_PARSE_PACK;
+    }
+
   /* if "extra" was set, parentheses were involved */
   if ((extra & VTK_PARSE_BASE_TYPE) == VTK_PARSE_FUNCTION)
     {
@@ -8775,7 +12159,7 @@ void handle_complex_type(
     /* the val type is whatever was inside the parentheses */
     clearTypeId();
     setTypeId(func->Class ? "method" : "function");
-    datatype = (extra & VTK_PARSE_UNQUALIFIED_TYPE);
+    datatype = (extra & (VTK_PARSE_UNQUALIFIED_TYPE | VTK_PARSE_RVALUE));
     }
   else if ((extra & VTK_PARSE_INDIRECT) == VTK_PARSE_BAD_INDIRECT)
     {
@@ -8783,12 +12167,12 @@ void handle_complex_type(
     }
   else if ((extra & VTK_PARSE_INDIRECT) != 0)
     {
-    extra = (extra & VTK_PARSE_INDIRECT);
+    extra = (extra & (VTK_PARSE_INDIRECT | VTK_PARSE_RVALUE));
 
     if ((extra & VTK_PARSE_REF) != 0)
       {
-      datatype = (datatype | VTK_PARSE_REF);
-      extra = (extra & ~VTK_PARSE_REF);
+      datatype = (datatype | (extra & (VTK_PARSE_REF | VTK_PARSE_RVALUE)));
+      extra = (extra & ~(VTK_PARSE_REF | VTK_PARSE_RVALUE));
       }
 
     if (extra != 0 && getArrayNDims() > 0)
@@ -8902,6 +12286,25 @@ void output_function()
       }
     }
 
+  /* friend */
+  if (currentFunction->ReturnValue &&
+      currentFunction->ReturnValue->Type & VTK_PARSE_FRIEND)
+    {
+    currentFunction->ReturnValue->Type ^= VTK_PARSE_FRIEND;
+    output_friend_function();
+    return;
+    }
+
+  /* typedef */
+  if (currentFunction->ReturnValue &&
+      currentFunction->ReturnValue->Type & VTK_PARSE_TYPEDEF)
+    {
+    /* for now, reject it instead of turning a method into a typedef */
+    currentFunction->ReturnValue->Type ^= VTK_PARSE_TYPEDEF;
+    reject_function();
+    return;
+    }
+
   /* static */
   if (currentFunction->ReturnValue &&
       currentFunction->ReturnValue->Type & VTK_PARSE_STATIC)
@@ -9179,6 +12582,12 @@ void vtkParse_SetRecursive(int option)
     }
 }
 
+/* Set the global variable that stores the current executable */
+void vtkParse_SetCommandName(const char *name)
+{
+  CommandName = name;
+}
+
 /* Parse a header file and return a FileInfo struct */
 FileInfo *vtkParse_ParseFile(
   const char *filename, FILE *ifile, FILE *errfile)
@@ -9197,6 +12606,7 @@ FileInfo *vtkParse_ParseFile(
   /* "preprocessor" is a global struct used by the parser */
   preprocessor = (PreprocessInfo *)malloc(sizeof(PreprocessInfo));
   vtkParsePreprocess_Init(preprocessor, filename);
+  preprocessor->Strings = data->Strings;
   vtkParsePreprocess_AddStandardMacros(preprocessor, VTK_PARSE_NATIVE);
 
   /* add include files specified on the command line */
@@ -9266,7 +12676,6 @@ FileInfo *vtkParse_ParseFile(
 
   if (ret)
     {
-    print_parser_error("syntax error", NULL, 0);
     return NULL;
     }
 
@@ -9427,7 +12836,7 @@ void vtkParse_Free(FileInfo *file_info)
 /** Define a preprocessor macro. Function macros are not supported.  */
 void vtkParse_DefineMacro(const char *name, const char *definition)
 {
-  size_t n = vtkidlen(name);
+  size_t n = vtkParse_SkipId(name);
   size_t l;
   char *cp;
 
@@ -9454,7 +12863,7 @@ void vtkParse_DefineMacro(const char *name, const char *definition)
 /** Undefine a preprocessor macro.  */
 void vtkParse_UndefineMacro(const char *name)
 {
-  size_t n = vtkidlen(name);
+  size_t n = vtkParse_SkipId(name);
   char *cp;
 
   cp = (char *)malloc(n+2);
@@ -9491,7 +12900,8 @@ void vtkParse_IncludeDirectory(const char *dirname)
 /** Return the full path to a header file.  */
 const char *vtkParse_FindIncludeFile(const char *filename)
 {
-  static PreprocessInfo info = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+  static StringCache cache = {0, 0, 0, 0};
+  static PreprocessInfo info = {0, 0, 0, 0, 0, 0, &cache, 0, 0, 0};
   int val;
   int i;
 
index 6b27e862d610d2069d9a50e6dec9ecf6d380a44f..95a73730fa1bcdb6ff7a34956c0f8da0dfa4a8d2 100644 (file)
@@ -124,6 +124,8 @@ void vtkParse_InitFunction(FunctionInfo *func)
   func->IsOperator = 0;
   func->IsVariadic = 0;
   func->IsConst = 0;
+  func->IsDeleted = 0;
+  func->IsFinal = 0;
   func->IsExplicit = 0;
   func->IsLegacy = 0;
 
@@ -194,6 +196,8 @@ void vtkParse_CopyFunction(FunctionInfo *func, const FunctionInfo *orig)
   func->IsOperator = orig->IsOperator;
   func->IsVariadic = orig->IsVariadic;
   func->IsConst = orig->IsConst;
+  func->IsDeleted = orig->IsDeleted;
+  func->IsFinal = orig->IsFinal;
   func->IsExplicit = orig->IsExplicit;
   func->IsLegacy = orig->IsLegacy;
 
@@ -259,6 +263,7 @@ void vtkParse_InitValue(ValueInfo *val)
   val->Template = NULL;
   val->IsStatic = 0;
   val->IsEnum = 0;
+  val->IsPack = 0;
 }
 
 /* Copy a Value struct */
@@ -303,6 +308,7 @@ void vtkParse_CopyValue(ValueInfo *val, const ValueInfo *orig)
 
   val->IsStatic = orig->IsStatic;
   val->IsEnum = orig->IsEnum;
+  val->IsPack = orig->IsPack;
 }
 
 /* Free a Value struct */
@@ -328,19 +334,14 @@ void vtkParse_FreeValue(ValueInfo *value_info)
 /* Initialize an Enum struct */
 void vtkParse_InitEnum(EnumInfo *item)
 {
+  vtkParse_InitClass(item);
   item->ItemType = VTK_ENUM_INFO;
-  item->Access = VTK_ACCESS_PUBLIC;
-  item->Name = NULL;
-  item->Comment = NULL;
 }
 
 /* Copy an Enum struct */
 void vtkParse_CopyEnum(EnumInfo *item, const EnumInfo *orig)
 {
-  item->ItemType = orig->ItemType;
-  item->Access = orig->Access;
-  item->Name = orig->Name;
-  item->Comment = orig->Comment;
+  vtkParse_CopyClass(item, orig);
 }
 
 /* Free an Enum struct */
@@ -406,6 +407,7 @@ void vtkParse_InitClass(ClassInfo *cls)
   cls->NumberOfNamespaces = 0;
   cls->Namespaces = NULL;
   cls->IsAbstract = 0;
+  cls->IsFinal = 0;
   cls->HasDelete = 0;
 }
 
@@ -546,6 +548,7 @@ void vtkParse_CopyClass(ClassInfo *cls, const ClassInfo *orig)
     }
 
   cls->IsAbstract = orig->IsAbstract;
+  cls->IsFinal = orig->IsFinal;
   cls->HasDelete = orig->HasDelete;
 }
 
index cd03e67c1f6ada6307813ee855aea5d86b4eac23..7c81c456f1e04c825f6f8dd217bda0283533c969 100644 (file)
@@ -112,6 +112,7 @@ struct _ValueInfo
   TemplateInfo  *Template;   /* template parameters, or NULL */
   int            IsStatic;   /* for class variables only */
   int            IsEnum;     /* for constants only */
+  int            IsPack;     /* for pack expansions */
 };
 
 /**
@@ -138,6 +139,8 @@ struct _FunctionInfo
   int            IsVirtual;   /* methods only */
   int            IsPureVirtual; /* methods only */
   int            IsConst;     /* methods only */
+  int            IsDeleted;   /* methods only */
+  int            IsFinal;     /* methods only */
   int            IsExplicit;  /* constructors only */
 #ifndef VTK_PARSE_LEGACY_REMOVE
   int            NumberOfArguments;   /* legacy */
@@ -154,18 +157,6 @@ struct _FunctionInfo
 #endif
 };
 
-/**
- * EnumInfo is for enums
- * Constants are at the same level as the Enum, not inside it.
- */
-typedef struct _EnumInfo
-{
-  parse_item_t   ItemType;
-  parse_access_t Access;
-  const char    *Name;
-  const char    *Comment;
-} EnumInfo;
-
 /**
  * UsingInfo is for using directives
  */
@@ -201,7 +192,7 @@ typedef struct _ClassInfo
   int            NumberOfVariables;
   ValueInfo    **Variables;
   int            NumberOfEnums;
-  EnumInfo     **Enums;
+  struct _ClassInfo **Enums;
   int            NumberOfTypedefs;
   ValueInfo    **Typedefs;
   int            NumberOfUsings;
@@ -209,9 +200,17 @@ typedef struct _ClassInfo
   int            NumberOfNamespaces;
   struct _ClassInfo **Namespaces;
   int            IsAbstract;
+  int            IsFinal;
   int            HasDelete;
 } ClassInfo;
 
+/**
+ * EnumInfo is for enums
+ * For scoped enums, the constants are in the enum itself, but for
+ * standard enums, the constants are at the same level as the enum.
+ */
+typedef struct _ClassInfo EnumInfo;
+
 /**
  * Namespace is for namespaces
  */
index 6504d3b8380fb204d1140e8a0fa32e45bf4760f4..fd04c019f3f90df9510924b18b5cb7013a84e130 100644 (file)
 #include <ctype.h>
 #include <assert.h>
 
-/* skip over an identifier */
-static size_t vtkparse_id_len(const char *text)
-{
-  size_t i = 0;
-  char c = text[0];
-
-  if ((c >= 'a' && c <= 'z') ||
-      (c >= 'A' && c <= 'Z') ||
-       c == '_')
-    {
-    do
-      {
-      c = text[++i];
-      }
-    while ((c >= 'a' && c <= 'z') ||
-           (c >= 'A' && c <= 'Z') ||
-           (c >= '0' && c <= '9') ||
-           c == '_');
-    }
-
-  return i;
-}
-
-/* skip over numbers, int or float, including suffixes */
-static size_t vtkparse_number_len(const char *text)
-{
-  size_t i = 0;
-  char c = text[0];
-
-  if (c == '.')
-    {
-    c = text[1];
-    }
-
-  if (c >= '0' && c <= '9')
-    {
-    do
-      {
-      do
-        {
-        c = text[++i];
-        }
-      while ((c >= '0' && c <= '9') ||
-             (c >= 'a' && c <= 'z') ||
-             (c >= 'A' && c <= 'Z') ||
-             c == '_' || c == '.');
-      }
-    while ((c == '-' || c == '+') &&
-           (text[i-1] == 'e' || text[i-1] == 'E'));
-    }
-
-  return i;
-}
-
-/* skip over string and char literals. */
-static size_t vtkparse_quote_len(const char *text)
-{
-  size_t i = 0;
-  const char qc = text[0];
-  char c = text[0];
-
-  if (c == '\'' || c == '\"')
-    {
-    do
-      {
-      do
-        {
-        c = text[++i];
-        }
-      while (c != qc && c != '\n' && c != '\0');
-      }
-    while (c == qc && text[i-1] == '\\');
-
-    if (c == qc)
-      {
-      ++i;
-      }
-    }
-
-  return i;
-}
-
 /* skip over an expression in brackets */
 static size_t vtkparse_bracket_len(const char *text)
 {
@@ -131,9 +49,9 @@ static size_t vtkparse_bracket_len(const char *text)
     i += j;
     j = 1;
     c = text[i];
-    if (c == '\'' || c == '\"')
+    if (vtkParse_CharType(c, CPRE_QUOTE))
       {
-      j = vtkparse_quote_len(&text[i]);
+      j = vtkParse_SkipQuotes(&text[i]);
       }
     else if (c == bc || c == '(' || c == '[' || c == '{')
       {
@@ -155,7 +73,7 @@ static size_t vtkparse_bracket_len(const char *text)
  * total number of characters in the name */
 size_t vtkParse_IdentifierLength(const char *text)
 {
-  return vtkparse_id_len(text);
+  return vtkParse_SkipId(text);
 }
 
 /* skip over a name that might be templated, return the
@@ -164,7 +82,7 @@ size_t vtkParse_UnscopedNameLength(const char *text)
 {
   size_t i = 0;
 
-  i += vtkparse_id_len(text);
+  i += vtkParse_SkipId(text);
   if (text[i] == '<')
     {
     i += vtkparse_bracket_len(&text[i]);
@@ -225,17 +143,15 @@ static const char *vtkparse_string_replace(
     lastPos = i;
 
     /* skip all chars that aren't part of a name */
-    while ((cp[i] < 'a' || cp[i] > 'z') &&
-           (cp[i] < 'A' || cp[i] > 'Z') &&
-           cp[i] != '_' && cp[i] != '\0')
+    while (!vtkParse_CharType(cp[i], CPRE_ID) && cp[i] != '\0')
       {
-      if (cp[i] == '\'' || cp[i] == '\"')
+      if (vtkParse_CharType(cp[i], CPRE_QUOTE))
         {
-        i += vtkparse_quote_len(&cp[i]);
+        i += vtkParse_SkipQuotes(&cp[i]);
         }
-      else if (cp[i] >= '0' && cp[i] <= '9')
+      else if (vtkParse_CharType(cp[i], CPRE_QUOTE))
         {
-        i += vtkparse_number_len(&cp[i]);
+        i += vtkParse_SkipNumber(&cp[i]);
         }
       else
         {
@@ -245,7 +161,7 @@ static const char *vtkparse_string_replace(
     nameBegin = i;
 
     /* skip all chars that are part of a name */
-    i += vtkparse_id_len(&cp[i]);
+    i += vtkParse_SkipId(&cp[i]);
     nameEnd = i;
 
     /* search through the list of names to replace */
@@ -589,11 +505,10 @@ size_t vtkParse_BasicTypeFromString(
   const char *classname = NULL;
   size_t len = 0;
 
-  while (*cp == ' ' || *cp == '\t') { cp++; }
+  while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
 
-  while ((*cp >= 'a' && *cp <= 'z') ||
-         (*cp >= 'A' && *cp <= 'Z') ||
-         (*cp == '_') || (cp[0] == ':' && cp[1] == ':'))
+  while (vtkParse_CharType(*cp, CPRE_ID) ||
+         (cp[0] == ':' && cp[1] == ':'))
     {
     /* skip all chars that are part of a name */
     n = vtkParse_NameLength(cp);
@@ -792,7 +707,7 @@ size_t vtkParse_BasicTypeFromString(
       }
 
     cp += n;
-    while (*cp == ' ' || *cp == '\t') { cp++; }
+    while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
     }
 
   if ((unsigned_bits & VTK_PARSE_UNSIGNED) != 0)
@@ -862,15 +777,12 @@ size_t vtkParse_ValueInfoFromString(
     {
     cp++;
     pointer_bits = (pointer_bits << 2);
-    while (*cp == ' ' || *cp == '\t') { cp++; }
+    while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
     if (strncmp(cp, "const", 5) == 0 &&
-        (cp[5] < 'a' || cp[5] > 'z') &&
-        (cp[5] < 'A' || cp[5] > 'Z') &&
-        (cp[5] < '0' || cp[5] > '9') &&
-        cp[5] != '_')
+        !vtkParse_CharType(cp[5], CPRE_IDGIT))
       {
       cp += 5;
-      while (*cp == ' ' || *cp == '\t') { cp++; }
+      while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
       pointer_bits = (pointer_bits | VTK_PARSE_CONST_POINTER);
       }
     else
@@ -884,53 +796,52 @@ size_t vtkParse_ValueInfoFromString(
   if (*cp == '&')
     {
     cp++;
-    while (*cp == ' ' || *cp == '\t') { cp++; }
+    while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
     ref_bits = VTK_PARSE_REF;
     }
 
   /* look for the variable name */
-  if ((*cp >= 'a' && *cp <= 'z') ||
-      (*cp >= 'A' && *cp <= 'Z') ||
-      (*cp == '_'))
+  if (vtkParse_CharType(*cp, CPRE_ID))
     {
     /* skip all chars that are part of a name */
-    n = vtkparse_id_len(cp);
+    n = vtkParse_SkipId(cp);
     data->Name = vtkParse_CacheString(cache, cp, n);
     cp += n;
-    while (*cp == ' ' || *cp == '\t') { cp++; }
+    while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
     }
 
   /* look for array brackets */
   if (*cp == '[')
     {
     count = 1;
-    }
 
-  while (*cp == '[')
-    {
-    n = vtkparse_bracket_len(cp);
-    if (n > 1)
+    while (*cp == '[')
       {
-      cp++;
-      n -= 2;
-      }
-    while (*cp == ' ' || *cp == '\t') { cp++; n--; }
-    while (n > 0 && (cp[n-1] == ' ' || cp[n-1] == '\t')) { n--; }
-    vtkParse_AddStringToArray(
-      &data->Dimensions,
-      &data->NumberOfDimensions,
-      vtkParse_CacheString(cache, cp, n));
-    m = 0;
-    if (*cp >= '0' && *cp <= '9' && vtkparse_number_len(cp) == n)
-      {
-      m = (int)strtol(cp, NULL, 0);
-      }
-    count *= m;
+      n = vtkparse_bracket_len(cp);
+      if (n > 1)
+        {
+        cp++;
+        n -= 2;
+        }
+      while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; n--; }
+      while (n > 0 && vtkParse_CharType(cp[n-1], CPRE_HSPACE)) { n--; }
+      vtkParse_AddStringToArray(
+        &data->Dimensions,
+        &data->NumberOfDimensions,
+        vtkParse_CacheString(cache, cp, n));
+      m = 0;
+      if (vtkParse_CharType(*cp, CPRE_DIGIT) &&
+          vtkParse_SkipNumber(cp) == n)
+        {
+        m = (int)strtol(cp, NULL, 0);
+        }
+      count *= m;
 
-    cp += n;
-    while (*cp == ' ' || *cp == '\t') { cp++; }
-    if (*cp == ']') { cp++; }
-    while (*cp == ' ' || *cp == '\t') { cp++; }
+      cp += n;
+      while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
+      if (*cp == ']') { cp++; }
+      while (vtkParse_CharType(*cp, CPRE_HSPACE)) { cp++; }
+      }
     }
 
   /* add pointer indirection to correspond to first array dimension */
@@ -1237,7 +1148,7 @@ size_t vtkParse_DecomposeTemplatedType(
     /* extract the template arguments */
     for (;;)
       {
-      while (text[i] == ' ' || text[i] == '\t') { i++; }
+      while (vtkParse_CharType(text[i], CPRE_HSPACE)) { i++; }
       j = i;
       while (text[j] != ',' && text[j] != '>' &&
              text[j] != '\n' && text[j] != '\0')
@@ -1247,9 +1158,9 @@ size_t vtkParse_DecomposeTemplatedType(
           {
           j += vtkparse_bracket_len(&text[j]);
           }
-        else if (text[j] == '\'' || text[j] == '\"')
+        else if (vtkParse_CharType(text[j], CPRE_QUOTE))
           {
-          j += vtkparse_quote_len(&text[j]);
+          j += vtkParse_SkipQuotes(&text[j]);
           }
         else
           {
@@ -1258,7 +1169,7 @@ size_t vtkParse_DecomposeTemplatedType(
         }
 
       k = j;
-      while (text[k-1] == ' ' || text[k-1] == '\t') { --k; }
+      while (vtkParse_CharType(text[k-1], CPRE_HSPACE)) { --k; }
 
       new_text = (char *)malloc(k-i + 1);
       strncpy(new_text, &text[i], k-i);
index aa9d1b63863bfea306a99f10df72532bd3d7479d..9fe186877ca0b6d960fd942558e9b3e27b2a9f75 100644 (file)
@@ -169,8 +169,6 @@ HierarchyInfo *vtkParseHierarchy_ReadFile(const char *filename)
   unsigned int bits, pointers;
   static const char *delims = ">,=";
 
-  line = (char *)malloc(maxlen);
-
   fp = fopen(filename, "r");
 
   if (fp == NULL)
@@ -178,6 +176,8 @@ HierarchyInfo *vtkParseHierarchy_ReadFile(const char *filename)
     return NULL;
     }
 
+  line = (char *)malloc(maxlen);
+
   info = (HierarchyInfo *)malloc(sizeof(HierarchyInfo));
   info->NumberOfEntries = 0;
   info->Entries = (HierarchyEntry *)malloc(maxClasses*sizeof(HierarchyEntry));
@@ -529,6 +529,8 @@ HierarchyInfo *vtkParseHierarchy_ReadFile(const char *filename)
 
   sort_hierarchy_entries(info);
 
+  fclose(fp);
+
   return info;
 }
 
@@ -575,7 +577,7 @@ int vtkParseHierarchy_IsTypeOfTemplated(
   const char *baseclass, const char **baseclass_with_args)
 {
   HierarchyEntry *tmph;
-  const char *name;
+  const char *name = NULL;
   const char *supername;
   char *tmp;
   int templated;
diff --git a/src/VTKWrapping/ParaView/vtkParseInternal.h b/src/VTKWrapping/ParaView/vtkParseInternal.h
deleted file mode 100644 (file)
index 8d3c9c6..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*=========================================================================
-
-  Program:   Visualization Toolkit
-  Module:    vtkParseInternal.h
-
-  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
-  All rights reserved.
-  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
-
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notice for more information.
-
-=========================================================================*/
-
-/*
-  This is an internal header for vtkParse.y, it contains methods for
-  manipulating the data structures that are not meant for general
-  use by the wrappers, and that are likely to change over time.
-*/
-
-#ifndef VTK_PARSE_PRIVATE_H
-#define VTK_PARSE_PRIVATE_H
-
-#include "vtkParse.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Initializer methods
- */
-/*@{*/
-void vtkParse_InitFile(FileInfo *file_info);
-void vtkParse_InitNamespace(NamespaceInfo *namespace_info);
-void vtkParse_InitClass(ClassInfo *cls);
-void vtkParse_InitFunction(FunctionInfo *func);
-void vtkParse_InitValue(ValueInfo *val);
-void vtkParse_InitEnum(EnumInfo *item);
-void vtkParse_InitUsing(UsingInfo *item);
-void vtkParse_InitTemplateArgs(TemplateArgs *arg);
-void vtkParse_InitTemplateArg(TemplateArg *arg);
-/*@}*/
-
-/**
- * Copy methods
- */
-/*@{*/
-void vtkParse_CopyNamespace(NamespaceInfo *data, const NamespaceInfo *orig);
-void vtkParse_CopyClass(ClassInfo *data, const ClassInfo *orig);
-void vtkParse_CopyFunction(FunctionInfo *data, const FunctionInfo *orig);
-void vtkParse_CopyValue(ValueInfo *data, const ValueInfo *orig);
-void vtkParse_CopyEnum(EnumInfo *data, const EnumInfo *orig);
-void vtkParse_CopyUsing(UsingInfo *data, const UsingInfo *orig);
-void vtkParse_CopyTemplateArgs(TemplateArgs *data, const TemplateArgs *orig);
-void vtkParse_CopyTemplateArg(TemplateArg *data, const TemplateArg *orig);
-/*@}*/
-
-/**
- * Free methods
- */
-/*@{*/
-void vtkParse_FreeFile(FileInfo *file_info);
-void vtkParse_FreeNamespace(NamespaceInfo *namespace_info);
-void vtkParse_FreeClass(ClassInfo *cls);
-void vtkParse_FreeFunction(FunctionInfo *func);
-void vtkParse_FreeValue(ValueInfo *val);
-void vtkParse_FreeEnum(EnumInfo *item);
-void vtkParse_FreeUsing(UsingInfo *item);
-void vtkParse_FreeTemplateArgs(TemplateArgs *arg);
-void vtkParse_FreeTemplateArg(TemplateArg *arg);
-/*@}*/
-
-/**
- * Make a persistent copy of a string for use with AddStringToArray:
- * At most 'n' chars will be copied, and the string will be terminated.
- * If a null pointer is provided, then a null pointer will be returned.
- */
-const char *vtkParse_DuplicateString(const char *cp, size_t n);
-
-/**
- * Add a string to an array of strings, grow array as necessary.
- */
-void vtkParse_AddStringToArray(
-  const char ***valueArray, int *count, const char *value);
-
-/**
- * Expand the Item array for classes and namespaces.
- */
-void vtkParse_AddItemToArray(
-  ItemInfo **valueArray, int *count, parse_item_t type, int idx);
-
-
-/**
- * Add various items to the structs.
- */
-/*@{*/
-void vtkParse_AddClassToClass(ClassInfo *info, ClassInfo *item);
-void vtkParse_AddFunctionToClass(ClassInfo *info, FunctionInfo *item);
-void vtkParse_AddEnumToClass(ClassInfo *info, EnumInfo *item);
-void vtkParse_AddConstantToClass(ClassInfo *info, ValueInfo *item);
-void vtkParse_AddVariableToClass(ClassInfo *info, ValueInfo *item);
-void vtkParse_AddTypedefToClass(ClassInfo *info, ValueInfo *item);
-void vtkParse_AddUsingToClass(ClassInfo *info, UsingInfo *item);
-void vtkParse_AddNamespaceToNamespace(NamespaceInfo *info,NamespaceInfo *item);
-void vtkParse_AddClassToNamespace(NamespaceInfo *info, ClassInfo *item);
-void vtkParse_AddFunctionToNamespace(NamespaceInfo *info, FunctionInfo *item);
-void vtkParse_AddEnumToNamespace(NamespaceInfo *info, EnumInfo *item);
-void vtkParse_AddConstantToNamespace(NamespaceInfo *info, ValueInfo *item);
-void vtkParse_AddVariableToNamespace(NamespaceInfo *info, ValueInfo *item);
-void vtkParse_AddTypedefToNamespace(NamespaceInfo *info, ValueInfo *item);
-void vtkParse_AddUsingToNamespace(NamespaceInfo *info, UsingInfo *item);
-void vtkParse_AddArgumentToFunction(FunctionInfo *info, ValueInfo *item);
-void vtkParse_AddArgumentToTemplate(TemplateArgs *info, TemplateArg *item);
-/*@}*/
-
-/**
- * Add default constructors if they do not already exist
- */
-void vtkParse_AddDefaultConstructors(ClassInfo *data);
-
-/**
- * Simple utility for mapping VTK types to VTK_PARSE types.
- */
-unsigned int vtkParse_MapType(int vtktype);
-
-/**
- * Ignore BTX/ETX markers
- */
-void vtkParse_SetIgnoreBTX(int option);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
index a9e4f7a81d55d870a17d972c1b96ca49f2515fdc..96fa88c1fe0bff3b110774a92d7d078ebb88620a 100644 (file)
@@ -105,8 +105,6 @@ static int read_option_file(
   int j;
   int in_string;
 
-  line = (char *)malloc(maxlen);
-
   fp = fopen(filename, "r");
 
   if (fp == NULL)
@@ -114,6 +112,8 @@ static int read_option_file(
     return 0;
     }
 
+  line = (char *)malloc(maxlen);
+
   /* read the file line by line */
   while (fgets(line, (int)maxlen, fp))
     {
@@ -370,6 +370,9 @@ FileInfo *vtkParse_Main(int argc, char *argv[])
   int argn;
   char **args;
 
+  /* set the command name for diagnostics */
+  vtkParse_SetCommandName(parse_exename(argv[0]));
+
   /* expand any "@file" args */
   vtkParse_InitStringCache(&strings);
   parse_expand_args(&strings, argc, argv, &argn, &args);
@@ -485,6 +488,9 @@ void vtkParse_MainMulti(int argc, char *argv[])
   char **args;
   StringCache strings;
 
+  /* set the command name for diagnostics */
+  vtkParse_SetCommandName(parse_exename(argv[0]));
+
   /* expand any "@file" args */
   vtkParse_InitStringCache(&strings);
   parse_expand_args(&strings, argc, argv, &argn, &args);
index 8107e37a8cd046fcdb40f8c32ee06b1a9ffe0db9..deb3efccff2b8d7bf6874f45a2cd72cc8b5965a9 100644 (file)
 #define HASH_LINE       0x7c9a15adu
 #define HASH_PRAGMA     0x1566a9fdu
 
-/** Various possible char types */
-#define CPRE_ID         0x01  /* A-Z a-z and _ */
-#define CPRE_DIGIT      0x02  /* 0-9 */
-#define CPRE_IDGIT      0x03  /* 0-9 A-Z a-z and _ */
-#define CPRE_HEX        0x04  /* 0-9A-Fa-f */
-#define CPRE_EXP        0x08  /* EPep (exponents for floats) */
-#define CPRE_SIGN       0x10  /* +- (sign for floats) */
-#define CPRE_QUOTE      0x20  /* " and ' */
-#define CPRE_HSPACE     0x40  /* space, tab, carriage return */
-#define CPRE_VSPACE     0x80  /* newline, vertical tab, form feed */
-#define CPRE_WHITE      0xC0  /* all whitespace characters */
-
-/** Whitespace types.
- * WS_NO_EOL treats newline as end-of-line, instead of whitespace.
- * WS_ALL treats newlines as regular whitespace.
- * WS_COMMENT does not treat comments as whitespace, allowing
- * comments blocks to be returned as tokens. */
-typedef enum _preproc_space_t
-{
-  WS_NO_EOL = CPRE_HSPACE, /* skip horizontal whitespace only */
-  WS_ALL    = CPRE_WHITE,  /* skip all whitespace */
-  WS_COMMENT = (CPRE_WHITE | 0x100), /* comments as tokens */
-} preproc_space_t;
-
-/** Preprocessor tokens. */
-typedef enum _preproc_token_t
-{
-  TOK_OTHER = 257,
-  TOK_ID,        /* any id */
-  TOK_CHAR,      /* char literal */
-  TOK_STRING,    /* string literal */
-  TOK_NUMBER,    /* any numeric literal */
-  TOK_COMMENT,   /* C or C++ comment */
-  TOK_DBLHASH,   /* ## */
-  TOK_SCOPE,     /* :: */
-  TOK_INCR,      /* ++ */
-  TOK_DECR,      /* -- */
-  TOK_RSHIFT,    /* >> */
-  TOK_LSHIFT,    /* << */
-  TOK_AND,       /* && */
-  TOK_OR,        /* || */
-  TOK_EQ,        /* == */
-  TOK_NE,        /* != */
-  TOK_GE,        /* >= */
-  TOK_LE,        /* <= */
-  TOK_ADD_EQ,    /* += */
-  TOK_SUB_EQ,    /* -= */
-  TOK_MUL_EQ,    /* *= */
-  TOK_DIV_EQ,    /* /= */
-  TOK_MOD_EQ,    /* %= */
-  TOK_AND_EQ,    /* &= */
-  TOK_OR_EQ,     /* |= */
-  TOK_XOR_EQ,    /* ^= */
-  TOK_ARROW,     /* -> */
-  TOK_DOT_STAR,  /* .* */
-  TOK_ARROW_STAR,/* ->* */
-  TOK_RSHIFT_EQ, /* >>= */
-  TOK_LSHIFT_EQ, /* <<= */
-  TOK_ELLIPSIS,  /* ... */
-} preproc_token_t;
-
-/** A struct for going through the input one token at a time. */
-typedef struct _preproc_tokenizer
-{
-  int tok;
-  unsigned int hash;
-  const char *text;
-  size_t len;
-} preproc_tokenizer;
-
 /** Extend dynamic arrays in a progression of powers of two.
  * Whenever "n" reaches a power of two, then the array size is
  * doubled so that "n" can be safely incremented. */
@@ -165,354 +95,6 @@ static preproc_uint_t string_to_preproc_uint(const char *cp, int base)
 #endif
 }
 
-/** Array for quick lookup of char types */
-static unsigned char preproc_charbits[] = {
-  0, 0, 0, 0, 0, 0, 0, 0, 0,
-  CPRE_HSPACE, /* tab */
-  CPRE_VSPACE, CPRE_VSPACE, CPRE_VSPACE, /* newline, vtab, form feed */
-  CPRE_HSPACE, /* carriage return */
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  CPRE_HSPACE, /* ' ' */
-  0, CPRE_QUOTE, 0, 0, 0, 0, CPRE_QUOTE, 0, 0, /* !"#$%&'() */
-  0, CPRE_SIGN, 0, CPRE_SIGN, 0, 0, /* *+,-./ */
-  CPRE_DIGIT|CPRE_HEX, /* 0 */
-  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
-  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
-  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
-  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
-  CPRE_DIGIT|CPRE_HEX, /* 9 */
-  0, 0, 0, 0, 0, 0, 0, /* :;<=>?@ */
-  CPRE_ID|CPRE_HEX, /* A */
-  CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, /* BCD */
-  CPRE_ID|CPRE_HEX|CPRE_EXP, /* E */
-  CPRE_ID|CPRE_HEX, CPRE_ID, CPRE_ID, CPRE_ID, /* FGHI */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* JKLM */
-  CPRE_ID, CPRE_ID, CPRE_ID|CPRE_EXP, CPRE_ID, /* NOPQ */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* RSTU */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* VWXY */
-  CPRE_ID, /* Z */
-  0, 0, 0, 0, /* [\\]^ */
-  CPRE_ID, /* _ */
-  0, /* ` */
-  CPRE_ID|CPRE_HEX, /* a */
-  CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, /* bcd */
-  CPRE_ID|CPRE_HEX|CPRE_EXP, /* e */
-  CPRE_ID|CPRE_HEX, CPRE_ID, CPRE_ID, CPRE_ID, /* fghi */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* jklm */
-  CPRE_ID, CPRE_ID, CPRE_ID|CPRE_EXP, CPRE_ID, /* nopq */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* rstu */
-  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* vwxy */
-  CPRE_ID, /* z */
-  0, 0, 0, 0, /* {|}~ */
-  0, /* '\x7f' */
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-/** Macro to get char type */
-#define preproc_chartype(c, bits) \
-  ((preproc_charbits[(unsigned char)(c)] & bits) != 0)
-
-/** Skip over a comment. */
-static void preproc_skip_comment(const char **cpp)
-{
-  const char *cp = *cpp;
-
-  if (cp[0] == '/')
-    {
-    if (cp[1] == '/')
-      {
-      cp += 2;
-      while (*cp != '\n' && *cp != '\0')
-        {
-        if (cp[0] == '\\')
-          {
-          if (cp[1] == '\n') { cp++; }
-          else if (cp[1] == '\r' && cp[2] == '\n') { cp += 2; }
-          }
-        cp++;
-        }
-      }
-    else if (cp[1] == '*')
-      {
-      cp += 2;
-      while (*cp != '\0')
-        {
-        if (cp[0] == '*' && cp[1] == '/') { cp += 2; break; }
-        cp++;
-        }
-      }
-    }
-
-  *cpp = cp;
-}
-
-/** Skip over whitespace, but not newlines unless preceded by backlash. */
-static void preproc_skip_whitespace(
-  const char **cpp, preproc_space_t spacetype)
-{
-  const char *cp = *cpp;
-
-  for (;;)
-    {
-    if (preproc_chartype(*cp, spacetype))
-      {
-      do
-        {
-        cp++;
-        }
-      while (preproc_chartype(*cp, spacetype));
-      }
-    if (cp[0] == '\\')
-      {
-      if (cp[1] == '\n')
-        {
-        cp += 2;
-        }
-      else if (cp[1] == '\r' && cp[2] == '\n')
-        {
-        cp += 3;
-        }
-      else
-        {
-        break;
-        }
-      }
-    else if (cp[0] == '/' && (spacetype & WS_COMMENT) != WS_COMMENT)
-      {
-      if (cp[1] == '/' || cp[1] == '*')
-        {
-        preproc_skip_comment(&cp);
-        }
-      else
-        {
-        break;
-        }
-      }
-    else
-      {
-      break;
-      }
-    }
-
-  *cpp = cp;
-}
-
-/** Skip over string and char literals. */
-static void preproc_skip_quotes(const char **cpp)
-{
-  const char *cp = *cpp;
-  const char qc = *cp;
-
-  if (preproc_chartype(*cp, CPRE_QUOTE))
-    {
-    cp++;
-    while (*cp != qc && *cp != '\n' && *cp != '\0')
-      {
-      if (*cp++ == '\\')
-        {
-        if (cp[0] == '\r' && cp[1] == '\n') { cp += 2; }
-        else if (*cp != '\0') { cp++; }
-        }
-      }
-    }
-  if (*cp == qc)
-    {
-    cp++;
-    }
-
-  *cpp = cp;
-}
-
-/** Skip over a name. */
-static void preproc_skip_name(const char **cpp)
-{
-  const char *cp = *cpp;
-
-  if (preproc_chartype(*cp, CPRE_ID))
-    {
-    do
-      {
-      cp++;
-      }
-    while (preproc_chartype(*cp, CPRE_IDGIT));
-    }
-
-  *cpp = cp;
-}
-
-/** A simple 32-bit hash function based on "djb2". */
-static unsigned int preproc_hash_name(const char **cpp)
-{
-  const char *cp = (*cpp);
-  int h = 5381;
-
-  if (preproc_chartype(*cp, CPRE_ID))
-    {
-    do { h = (h << 5) + h + (unsigned char)*cp++; }
-    while (preproc_chartype(*cp, CPRE_IDGIT));
-    }
-
-  *cpp = cp;
-  return h;
-}
-
-/** Skip over a number. */
-static void preproc_skip_number(const char **cpp)
-{
-  const char *cp = *cpp;
-
-  if (preproc_chartype(cp[0], CPRE_DIGIT) ||
-      (cp[0] == '.' && preproc_chartype(cp[1], CPRE_DIGIT)))
-    {
-    do
-      {
-      char c = *cp++;
-      if (preproc_chartype(c, CPRE_EXP) &&
-          preproc_chartype(*cp, CPRE_SIGN))
-        {
-        cp++;
-        }
-      }
-    while (preproc_chartype(*cp, CPRE_IDGIT) || *cp == '.');
-    }
-
-  *cpp = cp;
-}
-
-/** Return the next preprocessor token, or '0' if none left. */
-static int preproc_next(preproc_tokenizer *tokens)
-{
-  const char *cp = tokens->text + tokens->len;
-  preproc_skip_whitespace(&cp, WS_NO_EOL);
-
-  if (preproc_chartype(*cp, CPRE_ID))
-    {
-    const char *ep = cp;
-    unsigned int h = preproc_hash_name(&ep);
-    tokens->tok = TOK_ID;
-    tokens->hash = h;
-    tokens->text = cp;
-    tokens->len = ep - cp;
-    }
-  else if (preproc_chartype(*cp, CPRE_QUOTE))
-    {
-    const char *ep = cp;
-    preproc_skip_quotes(&ep);
-    tokens->tok = (*cp == '\"' ? TOK_STRING : TOK_CHAR);
-    tokens->hash = 0;
-    tokens->text = cp;
-    tokens->len = ep - cp;
-    }
-  else if (preproc_chartype(*cp, CPRE_DIGIT) ||
-           (cp[0] == '.' && preproc_chartype(cp[1], CPRE_DIGIT)))
-    {
-    const char *ep = cp;
-    preproc_skip_number(&ep);
-    tokens->tok = TOK_NUMBER;
-    tokens->hash = 0;
-    tokens->text = cp;
-    tokens->len = ep - cp;
-    }
-  else if (cp[0] == '/' && (cp[1] == '/' || cp[1] == '*'))
-    {
-    const char *ep = cp;
-    preproc_skip_comment(&ep);
-    tokens->tok = TOK_COMMENT;
-    tokens->hash = 0;
-    tokens->text = cp;
-    tokens->len = ep - cp;
-    }
-  else
-    {
-    int t = cp[0];
-    size_t l = 1;
-
-    switch (cp[0])
-      {
-      case ':':
-        if (cp[1] == ':') { l = 2; t = TOK_SCOPE; }
-        break;
-      case '.':
-        if (cp[1] == '.' && cp[2] == '.') { l = 3; t = TOK_ELLIPSIS; }
-        else if (cp[1] == '*') { l = 2; t = TOK_DOT_STAR; }
-        break;
-      case '=':
-        if (cp[1] == '=') { l = 2; t = TOK_EQ; }
-        break;
-      case '!':
-        if (cp[1] == '=') { l = 2; t = TOK_NE; }
-        break;
-      case '<':
-        if (cp[1] == '<' && cp[2] == '=') { l = 3; t = TOK_LSHIFT_EQ; }
-        else if (cp[1] == '<') { l = 2; t = TOK_LSHIFT; }
-        else if (cp[1] == '=') { l = 2; t = TOK_LE; }
-        break;
-      case '>':
-        if (cp[1] == '>' && cp[2] == '=') { l = 3; t = TOK_RSHIFT_EQ; }
-        else if (cp[1] == '>') { l = 2; t = TOK_RSHIFT; }
-        else if (cp[1] == '=') { l = 2; t = TOK_GE; }
-        break;
-      case '&':
-        if (cp[1] == '=') { l = 2; t = TOK_AND_EQ; }
-        else if (cp[1] == '&') { l = 2; t = TOK_AND; }
-        break;
-      case '|':
-        if (cp[1] == '=') { l = 2; t = TOK_OR_EQ; }
-        else if (cp[1] == '|') { l = 2; t = TOK_OR; }
-        break;
-      case '^':
-        if (cp[1] == '=') { l = 2; t = TOK_XOR_EQ; }
-        break;
-      case '*':
-        if (cp[1] == '=') { l = 2; t = TOK_MUL_EQ; }
-        break;
-      case '/':
-        if (cp[1] == '=') { l = 2; t = TOK_DIV_EQ; }
-        break;
-      case '%':
-        if (cp[1] == '=') { l = 2; t = TOK_MOD_EQ; }
-        break;
-      case '+':
-        if (cp[1] == '+') { l = 2; t = TOK_INCR; }
-        else if (cp[1] == '=') { l = 2; t = TOK_ADD_EQ; }
-        break;
-      case '-':
-        if (cp[1] == '>' && cp[2] == '*') { l = 3; t = TOK_ARROW_STAR; }
-        else if (cp[1] == '>') { l = 2; t = TOK_ARROW; }
-        else if (cp[1] == '-') { l = 2; t = TOK_DECR; }
-        else if (cp[1] == '=') { l = 2; t = TOK_SUB_EQ; }
-        break;
-      case '#':
-        if (cp[1] == '#') { l = 2; t = TOK_DBLHASH; }
-        break;
-      case '\n':
-      case '\0':
-        { l = 0; t = 0; }
-        break;
-      }
-
-    tokens->tok = t;
-    tokens->hash = 0;
-    tokens->text = cp;
-    tokens->len = l;
-    }
-
-  return tokens->tok;
-}
-
-/** Initialize the tokenizer. */
-static void preproc_init(preproc_tokenizer *tokens, const char *text)
-{
-  tokens->tok = 0;
-  tokens->hash = 0;
-  tokens->text = text;
-  tokens->len = 0;
-  preproc_next(tokens);
-}
-
 /** Tokenize and compare two strings */
 static int preproc_identical(const char *text1, const char *text2)
 {
@@ -524,11 +106,11 @@ static int preproc_identical(const char *text1, const char *text2)
 
     if (text1 && text2)
       {
-      preproc_tokenizer t1;
-      preproc_tokenizer t2;
+      StringTokenizer t1;
+      StringTokenizer t2;
 
-      preproc_init(&t1, text1);
-      preproc_init(&t2, text2);
+      vtkParse_InitTokenizer(&t1, text1, WS_PREPROC);
+      vtkParse_InitTokenizer(&t2, text2, WS_PREPROC);
 
       do
         {
@@ -539,8 +121,8 @@ static int preproc_identical(const char *text1, const char *text2)
           {
           break;
           }
-        preproc_next(&t1);
-        preproc_next(&t2);
+        vtkParse_NextToken(&t1);
+        vtkParse_NextToken(&t2);
         }
       while (t1.tok && t2.tok);
 
@@ -551,18 +133,6 @@ static int preproc_identical(const char *text1, const char *text2)
   return result;
 }
 
-/** Duplicate the first n bytes of a string. */
-static const char *preproc_strndup(const char *in, size_t n)
-{
-  char *res = NULL;
-
-  res = (char *)malloc(n+1);
-  strncpy(res, in, n);
-  res[n] = '\0';
-
-  return res;
-}
-
 /** Create a new preprocessor macro. */
 static MacroInfo *preproc_new_macro(
   PreprocessInfo *info, const char *name, const char *definition)
@@ -572,28 +142,25 @@ static MacroInfo *preproc_new_macro(
 
   if (name)
     {
-    size_t n;
-    const char *cp = name;
-    preproc_skip_name(&cp);
-    n = cp - name;
-    macro->Name = preproc_strndup(name, n);
+    size_t n = vtkParse_SkipId(name);
+    macro->Name = vtkParse_CacheString(info->Strings, name, n);
     }
 
   if (definition)
     {
     size_t n;
     const char *cp = definition;
-    preproc_tokenizer tokens;
-    preproc_init(&tokens, cp);
+    StringTokenizer tokens;
+    vtkParse_InitTokenizer(&tokens, cp, WS_PREPROC);
 
     do
       {
       cp = tokens.text + tokens.len;
       }
-    while (preproc_next(&tokens));
+    while (vtkParse_NextToken(&tokens));
 
     n = cp - definition;
-    macro->Definition = preproc_strndup(definition, n);
+    macro->Definition = vtkParse_CacheString(info->Strings, definition, n);
     }
 
   macro->IsExternal = info->IsExternal;
@@ -609,7 +176,7 @@ static void preproc_free_macro(MacroInfo *info)
 
 /** Find a preprocessor macro, return 0 if not found. */
 static MacroInfo *preproc_find_macro(
-  PreprocessInfo *info, preproc_tokenizer *token)
+  PreprocessInfo *info, StringTokenizer *token)
 {
   unsigned int m = PREPROC_HASH_TABLE_SIZE - 1;
   unsigned int i = (token->hash & m);
@@ -641,7 +208,7 @@ static MacroInfo *preproc_find_macro(
 /** Return the address of the macro within the hash table.
   * If "insert" is nonzero, add a new location if macro not found. */
 static MacroInfo **preproc_macro_location(
-  PreprocessInfo *info, preproc_tokenizer *token, int insert)
+  PreprocessInfo *info, StringTokenizer *token, int insert)
 {
   MacroInfo ***htable = info->MacroHashTable;
   unsigned int m = PREPROC_HASH_TABLE_SIZE - 1;
@@ -724,7 +291,7 @@ static MacroInfo **preproc_macro_location(
 
 /** Remove a preprocessor macro.  Returns 0 if macro not found. */
 static int preproc_remove_macro(
-  PreprocessInfo *info, preproc_tokenizer *token)
+  PreprocessInfo *info, StringTokenizer *token)
 {
   MacroInfo **hptr;
 
@@ -751,11 +318,11 @@ static int preproc_remove_macro(
 static MacroInfo *preproc_add_macro_definition(
   PreprocessInfo *info, const char *name, const char *definition)
 {
-  preproc_tokenizer token;
+  StringTokenizer token;
   MacroInfo *macro;
   MacroInfo **macro_p;
 
-  preproc_init(&token, name);
+  vtkParse_InitTokenizer(&token, name, WS_PREPROC);
 
   macro = preproc_new_macro(info, name, definition);
   macro_p = preproc_macro_location(info, &token, 1);
@@ -771,7 +338,7 @@ static MacroInfo *preproc_add_macro_definition(
 }
 
 /** Skip over parentheses, return nonzero if not closed. */
-static int preproc_skip_parentheses(preproc_tokenizer *tokens)
+static int preproc_skip_parentheses(StringTokenizer *tokens)
 {
   int depth = 0;
 
@@ -779,7 +346,7 @@ static int preproc_skip_parentheses(preproc_tokenizer *tokens)
     {
     depth = 1;
 
-    while (depth > 0 && preproc_next(tokens))
+    while (depth > 0 && vtkParse_NextToken(tokens))
       {
       if (tokens->tok == '(')
         {
@@ -794,7 +361,7 @@ static int preproc_skip_parentheses(preproc_tokenizer *tokens)
 
   if (tokens->tok == ')')
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     return VTK_PARSE_OK;
     }
 
@@ -839,7 +406,7 @@ static int preproc_evaluate_char(
       else if (*cp == 'x')
         {
         *val = string_to_preproc_int(cp+1, 16);
-        do { cp++; } while (preproc_chartype(*cp, CPRE_HEX));
+        do { cp++; } while (vtkParse_CharType(*cp, CPRE_HEX));
         }
       }
     if (*cp != '\'')
@@ -874,12 +441,12 @@ static int preproc_evaluate_integer(
     base = 16;
     *is_unsigned = 1;
     ep = cp;
-    while (preproc_chartype(*ep, CPRE_HEX))
+    while (vtkParse_CharType(*ep, CPRE_HEX))
       {
       ep++;
       }
     }
-  else if (cp[0] == '0' && preproc_chartype(cp[1], CPRE_DIGIT))
+  else if (cp[0] == '0' && vtkParse_CharType(cp[1], CPRE_DIGIT))
     {
     cp += 1;
     base = 8;
@@ -894,7 +461,7 @@ static int preproc_evaluate_integer(
     {
     base = 10;
     *is_unsigned = 0;
-    while (preproc_chartype(*ep, CPRE_DIGIT))
+    while (vtkParse_CharType(*ep, CPRE_DIGIT))
       {
       ep++;
       }
@@ -927,12 +494,12 @@ static int preproc_evaluate_integer(
 
 /* forward declaration */
 static int preproc_evaluate_expression(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned);
 
 /** Evaluate a single item in an expression. */
 static int preproc_evaluate_single(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int result = VTK_PARSE_OK;
@@ -944,12 +511,12 @@ static int preproc_evaluate_single(
         strncmp("defined", tokens->text, tokens->len) == 0)
       {
       int paren = 0;
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
 
       if (tokens->tok == '(')
         {
         paren = 1;
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         }
       if (tokens->tok != TOK_ID)
         {
@@ -965,7 +532,7 @@ static int preproc_evaluate_single(
       *is_unsigned = 0;
       *val = (preproc_find_macro(info, tokens) != 0);
 
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
       if (paren)
         {
         if (tokens->tok != ')')
@@ -975,7 +542,7 @@ static int preproc_evaluate_single(
 #endif
           return VTK_PARSE_SYNTAX_ERROR;
           }
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         }
 
       return result;
@@ -987,7 +554,7 @@ static int preproc_evaluate_single(
       const char *args = NULL;
       const char *expansion = NULL;
       const char *cp;
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
       *val = 0;
       *is_unsigned = 0;
 
@@ -1018,7 +585,7 @@ static int preproc_evaluate_single(
         return (args ? VTK_PARSE_MACRO_NUMARGS : VTK_PARSE_SYNTAX_ERROR);
         }
       cp = expansion;
-      preproc_skip_whitespace(&cp, WS_NO_EOL);
+      cp += vtkParse_SkipWhitespace(cp, WS_PREPROC);
       if (*cp != '\0')
         {
         macro->IsExcluded = 1;
@@ -1036,13 +603,13 @@ static int preproc_evaluate_single(
 
   if (tokens->tok == '(')
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     result = preproc_evaluate_expression(info, tokens, val, is_unsigned);
     if ((result & VTK_PARSE_FATAL_ERROR) == 0)
       {
       if (tokens->tok == ')')
         {
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         return result;
         }
 #if PREPROC_DEBUG
@@ -1060,23 +627,23 @@ static int preproc_evaluate_single(
       {
       result = VTK_PARSE_PREPROC_FLOAT;
       }
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     return result;
     }
   else if (tokens->tok == TOK_CHAR)
     {
     result = preproc_evaluate_char(tokens->text, val, is_unsigned);
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     return result;
     }
   else if (tokens->tok == TOK_STRING)
     {
     *val = 0;
     *is_unsigned = 0;
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     while (tokens->tok == TOK_STRING)
       {
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
       }
     return VTK_PARSE_PREPROC_STRING;
     }
@@ -1091,7 +658,7 @@ static int preproc_evaluate_single(
 }
 
 static int preproc_evaluate_unary(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op = tokens->tok;
@@ -1102,7 +669,7 @@ static int preproc_evaluate_unary(
     return preproc_evaluate_single(info, tokens, val, is_unsigned);
     }
 
-  preproc_next(tokens);
+  vtkParse_NextToken(tokens);
 
   result = preproc_evaluate_unary(info, tokens, val, is_unsigned);
   if ((result & VTK_PARSE_FATAL_ERROR) == 0)
@@ -1117,7 +684,7 @@ static int preproc_evaluate_unary(
 }
 
 static int preproc_evaluate_multiply(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op;
@@ -1134,7 +701,7 @@ static int preproc_evaluate_multiply(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_unary(info, tokens, &rval, &rtype);
 
@@ -1215,7 +782,7 @@ static int preproc_evaluate_multiply(
 }
 
 static int preproc_evaluate_add(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op;
@@ -1232,7 +799,7 @@ static int preproc_evaluate_add(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_multiply(info, tokens, &rval, &rtype);
 
@@ -1252,7 +819,7 @@ static int preproc_evaluate_add(
 }
 
 static int preproc_evaluate_bitshift(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op;
@@ -1270,7 +837,7 @@ static int preproc_evaluate_bitshift(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_add(info, tokens, &rval, &rtype);
 
@@ -1302,7 +869,7 @@ static int preproc_evaluate_bitshift(
 }
 
 static int preproc_evaluate_compare(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op;
@@ -1319,7 +886,7 @@ static int preproc_evaluate_compare(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_bitshift(info, tokens, &rval, &rtype);
 
@@ -1370,7 +937,7 @@ static int preproc_evaluate_compare(
 }
 
 static int preproc_evaluate_equal(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   int op;
@@ -1387,7 +954,7 @@ static int preproc_evaluate_equal(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_compare(info, tokens, &rval, &rtype);
 
@@ -1406,7 +973,7 @@ static int preproc_evaluate_equal(
 }
 
 static int preproc_evaluate_and(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval;
@@ -1421,7 +988,7 @@ static int preproc_evaluate_and(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_equal(info, tokens, &rval, &rtype);
 
@@ -1433,7 +1000,7 @@ static int preproc_evaluate_and(
 }
 
 static int preproc_evaluate_xor(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval;
@@ -1448,7 +1015,7 @@ static int preproc_evaluate_xor(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_and(info, tokens, &rval, &rtype);
 
@@ -1460,7 +1027,7 @@ static int preproc_evaluate_xor(
 }
 
 static int preproc_evaluate_or(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval;
@@ -1475,7 +1042,7 @@ static int preproc_evaluate_or(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_xor(info, tokens, &rval, &rtype);
 
@@ -1487,7 +1054,7 @@ static int preproc_evaluate_or(
 }
 
 static int preproc_evaluate_logic_and(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval;
@@ -1502,7 +1069,7 @@ static int preproc_evaluate_logic_and(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     if (*val == 0)
       {
@@ -1523,7 +1090,7 @@ static int preproc_evaluate_logic_and(
           }
         else
           {
-          preproc_next(tokens);
+          vtkParse_NextToken(tokens);
           }
         }
 
@@ -1542,7 +1109,7 @@ static int preproc_evaluate_logic_and(
 }
 
 static int preproc_evaluate_logic_or(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval;
@@ -1557,7 +1124,7 @@ static int preproc_evaluate_logic_or(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     if (*val != 0)
       {
@@ -1578,7 +1145,7 @@ static int preproc_evaluate_logic_or(
           }
         else
           {
-          preproc_next(tokens);
+          vtkParse_NextToken(tokens);
           }
         }
 
@@ -1598,7 +1165,7 @@ static int preproc_evaluate_logic_or(
 
 /** Evaluate an arimetic *expression.  */
 int preproc_evaluate_expression(
-  PreprocessInfo *info, preproc_tokenizer *tokens,
+  PreprocessInfo *info, StringTokenizer *tokens,
   preproc_int_t *val, int *is_unsigned)
 {
   preproc_int_t rval, sval;
@@ -1613,7 +1180,7 @@ int preproc_evaluate_expression(
       return result;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_expression(info, tokens, &rval, &rtype);
     if ((result & VTK_PARSE_FATAL_ERROR) != 0)
@@ -1629,7 +1196,7 @@ int preproc_evaluate_expression(
       return VTK_PARSE_SYNTAX_ERROR;
       }
 
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     result = preproc_evaluate_expression(info, tokens, &sval, &stype);
     if ((result & VTK_PARSE_FATAL_ERROR) != 0)
@@ -1656,7 +1223,7 @@ int preproc_evaluate_expression(
  * Returns VTK_PARSE_OK if the expression is true,
  * or VTK_PARSE_SKIP of the expression is false. */
 int preproc_evaluate_conditional(
-  PreprocessInfo *info, preproc_tokenizer *tokens)
+  PreprocessInfo *info, StringTokenizer *tokens)
 {
   preproc_int_t rval;
   int rtype;
@@ -1685,7 +1252,7 @@ int preproc_evaluate_conditional(
  * the following code block should be skipped.
  */
 static int preproc_evaluate_if(
-  PreprocessInfo *info, preproc_tokenizer *tokens)
+  PreprocessInfo *info, StringTokenizer *tokens)
 {
   MacroInfo *macro;
   int v1, v2;
@@ -1699,13 +1266,13 @@ static int preproc_evaluate_if(
       {
       if (tokens->hash == HASH_IF)
         {
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         result = preproc_evaluate_conditional(info, tokens);
         }
       else
         {
         v1 = (tokens->hash != HASH_IFNDEF);
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         if (tokens->tok != TOK_ID)
           {
 #if PREPROC_DEBUG
@@ -1715,7 +1282,7 @@ static int preproc_evaluate_if(
           }
         macro = preproc_find_macro(info, tokens);
         v2 = (macro && !macro->IsExcluded);
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         result = ( (v1 ^ v2) ? VTK_PARSE_SKIP : VTK_PARSE_OK);
         }
 
@@ -1751,12 +1318,12 @@ static int preproc_evaluate_if(
       {
       if (tokens->hash == HASH_ELIF)
         {
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         result = preproc_evaluate_conditional(info, tokens);
         }
       else
         {
-        preproc_next(tokens);
+        vtkParse_NextToken(tokens);
         }
       if (result != VTK_PARSE_SKIP)
         {
@@ -1769,7 +1336,7 @@ static int preproc_evaluate_if(
     }
   else if (tokens->hash == HASH_ENDIF)
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     if (info->ConditionalDepth > 0)
       {
       /* decrease the skip depth */
@@ -1789,20 +1356,23 @@ static int preproc_evaluate_if(
  * Handle the #define and #undef directives.
  */
 static int preproc_evaluate_define(
-  PreprocessInfo *info, preproc_tokenizer *tokens)
+  PreprocessInfo *info, StringTokenizer *tokens)
 {
   MacroInfo **macro_p;
   MacroInfo *macro;
   int is_function;
+  int is_variadic;
   const char *name;
   size_t namelen;
   const char *definition = 0;
   int n = 0;
   const char **params = NULL;
+  const char *param;
+  size_t l;
 
   if (tokens->hash == HASH_DEFINE)
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     if (tokens->tok != TOK_ID)
       {
 #if PREPROC_DEBUG
@@ -1814,13 +1384,14 @@ static int preproc_evaluate_define(
     macro_p = preproc_macro_location(info, tokens, 1);
     name = tokens->text;
     namelen = tokens->len;
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     is_function = 0;
+    is_variadic = 0;
     if (name[namelen] == '(')
       {
       is_function = 1;
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
       while (tokens->tok != 0 && tokens->tok != ')')
         {
         if (tokens->tok != TOK_ID && tokens->tok != TOK_ELLIPSIS)
@@ -1832,15 +1403,33 @@ static int preproc_evaluate_define(
           return VTK_PARSE_SYNTAX_ERROR;
           }
 
+        param = tokens->text;
+        l = tokens->len;
+
+        if (tokens->tok == TOK_ELLIPSIS)
+          {
+          is_variadic = 1;
+          param = "__VA_ARGS__";
+          l = 11;
+          }
+
         /* add to the arg list */
         params = (const char **)preproc_array_check(
           (char **)params, sizeof(char *), n);
-        params[n++] = preproc_strndup(tokens->text, tokens->len);
+        params[n++] = vtkParse_CacheString(info->Strings, param, l);
+
+        vtkParse_NextToken(tokens);
+
+        /* check for gnu cpp "arg..." parameter */
+        if (tokens->tok == TOK_ELLIPSIS)
+          {
+          is_variadic = 1;
+          vtkParse_NextToken(tokens);
+          }
 
-        preproc_next(tokens);
         if (tokens->tok == ',')
           {
-          preproc_next(tokens);
+          vtkParse_NextToken(tokens);
           }
         else if (tokens->tok != ')')
           {
@@ -1851,7 +1440,7 @@ static int preproc_evaluate_define(
           return VTK_PARSE_SYNTAX_ERROR;
           }
         }
-      preproc_next(tokens);
+      vtkParse_NextToken(tokens);
       }
 
     if (tokens->tok)
@@ -1875,6 +1464,7 @@ static int preproc_evaluate_define(
 
     macro = preproc_new_macro(info, name, definition);
     macro->IsFunction = is_function;
+    macro->IsVariadic = is_variadic;
     macro->NumberOfParameters = n;
     macro->Parameters = params;
     *macro_p = macro;
@@ -1883,7 +1473,7 @@ static int preproc_evaluate_define(
     }
   else if (tokens->hash == HASH_UNDEF)
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
     if (tokens->tok != TOK_ID)
       {
 #if PREPROC_DEBUG
@@ -1904,7 +1494,6 @@ static int preproc_evaluate_define(
 static int preproc_add_include_file(PreprocessInfo *info, const char *name)
 {
   int i, n;
-  char *dp;
 
   n = info->NumberOfIncludeFiles;
   for (i = 0; i < n; i++)
@@ -1915,12 +1504,10 @@ static int preproc_add_include_file(PreprocessInfo *info, const char *name)
       }
     }
 
-  dp = (char *)malloc(strlen(name)+1);
-  strcpy(dp, name);
-
   info->IncludeFiles = (const char **)preproc_array_check(
     (char **)info->IncludeFiles, sizeof(char *), info->NumberOfIncludeFiles);
-  info->IncludeFiles[info->NumberOfIncludeFiles++] = dp;
+  info->IncludeFiles[info->NumberOfIncludeFiles++] =
+    vtkParse_CacheString(info->Strings, name, strlen(name));
 
   return 1;
 }
@@ -1961,7 +1548,7 @@ const char *preproc_find_include_file(
 
   /* check for absolute path of form DRIVE: or /path/to/file */
   j = 0;
-  while (preproc_chartype(filename[j], CPRE_IDGIT)) { j++; }
+  while (vtkParse_CharType(filename[j], CPRE_IDGIT)) { j++; }
 
   if (filename[j] == ':' || filename[0] == '/' || filename[0] == '\\')
     {
@@ -2074,12 +1661,13 @@ const char *preproc_find_include_file(
         }
       else if (stat(output, &fs) == 0)
         {
+        nn = info->NumberOfIncludeFiles;
         info->IncludeFiles = (const char **)preproc_array_check(
-          (char **)info->IncludeFiles, sizeof(char *),
-          info->NumberOfIncludeFiles);
-        info->IncludeFiles[info->NumberOfIncludeFiles++] = output;
-
-        return output;
+          (char **)info->IncludeFiles, sizeof(char *), nn);
+        info->IncludeFiles[info->NumberOfIncludeFiles++] =
+          vtkParse_CacheString(info->Strings, output, strlen(output));
+        free(output);
+        return info->IncludeFiles[nn];
         }
       }
     }
@@ -2088,6 +1676,72 @@ const char *preproc_find_include_file(
   return NULL;
 }
 
+/**
+ * Convert a raw string into a normal string.  This is a helper
+ * function for preproc_include_file() to allow raw strings to
+ * be used in preprocessor directives.
+ */
+void preproc_escape_string(
+  char **linep, size_t *linelenp, size_t *jp, size_t d, size_t dl)
+{
+  char *line = *linep;
+  char *r = 0;
+  size_t linelen = *linelenp;
+  size_t l = *jp - d - 2*dl - 2;
+  size_t i;
+  size_t j = d;
+
+  if (l != 0)
+    {
+    r = (char *)malloc(l);
+    memcpy(r, &line[j+dl+1], l);
+    }
+
+  /* remove the "R" prefix */
+  if (j >= 2 && line[j-1] == '\"' && line[j-2] == 'R')
+    {
+    line[j - 2] = '\"';
+    j--;
+    }
+
+  for (i = 0; i < l; i++)
+    {
+    /* expand line buffer as necessary */
+    while (j+4 > linelen)
+      {
+      linelen *= 2;
+      line = (char *)realloc(line, linelen);
+      }
+
+    if ((r[i] >= ' ' && r[i] <= '~') || (r[i] & 0x80) != 0)
+      {
+      line[j++] = r[i];
+      }
+    else switch (r[i])
+      {
+      case '\a': line[j++] = '\\'; line[j++] = 'a'; break;
+      case '\b': line[j++] = '\\'; line[j++] = 'b'; break;
+      case '\f': line[j++] = '\\'; line[j++] = 'f'; break;
+      case '\n': line[j++] = '\\'; line[j++] = 'n'; break;
+      case '\r': line[j++] = '\\'; line[j++] = 'r'; break;
+      case '\t': line[j++] = '\\'; line[j++] = 't'; break;
+      case '\v': line[j++] = '\\'; line[j++] = 'v'; break;
+      case '\\': line[j++] = '\\'; line[j++] = '\\'; break;
+      case '\'': line[j++] = '\\'; line[j++] = '\''; break;
+      case '\"': line[j++] = '\\'; line[j++] = '\"'; break;
+      default:
+        sprintf(&line[j], "\\%3.3o", r[i]);
+        j += 4;
+        break;
+      }
+    }
+
+  free(r);
+  *linep = line;
+  *linelenp = linelen;
+  *jp = j;
+}
+
 /**
  * Include a file.  All macros defined in the included file
  * will have their IsExternal flag set.
@@ -2095,13 +1749,16 @@ const char *preproc_find_include_file(
 static int preproc_include_file(
   PreprocessInfo *info, const char *filename, int system_first)
 {
+  const char *switchchars = "\n\r\"\'\?\\/*()";
+  char switchchar[256];
   char *tbuf;
   size_t tbuflen = FILE_BUFFER_SIZE;
   char *line;
   size_t linelen = 80;
   size_t i, j, n, r;
-  int in_comment = 0;
-  int in_quote = 0;
+  size_t d = 0;
+  size_t dn = 0;
+  int state = 0;
   int result = VTK_PARSE_OK;
   FILE *fp = NULL;
   const char *path = NULL;
@@ -2158,6 +1815,14 @@ static int preproc_include_file(
   info->IsExternal = 1;
   info->FileName = path;
 
+  /* make a table of interesting characters */
+  memset(switchchar, '\0', 256);
+  n = strlen(switchchars) + 1;
+  for (i = 0; i < n; i++)
+    {
+    switchchar[(unsigned char)(switchchars[i])] = 1;
+    }
+
   tbuf = (char *)malloc(tbuflen+4);
   line = (char *)malloc(linelen);
 
@@ -2241,25 +1906,89 @@ static int preproc_include_file(
         line = (char *)realloc(line, linelen);
         }
 
-      if (in_comment)
+      /* check for uninteresting characters first */
+      if (!switchchar[(unsigned char)(tbuf[i])])
+        {
+        line[j++] = tbuf[i++];
+        }
+      else if (state == '(')
+        {
+        /* look for end of raw string delimiter */
+        if (tbuf[i] == '(')
+          {
+          dn = j - d;
+          state = ')';
+          }
+        line[j++] = tbuf[i++];
+        }
+      else if (state == ')')
+        {
+        /* look for end of raw string */
+        if (tbuf[i] == '\"')
+          {
+          if ((j - d) > 2*dn+1 && line[j-dn-1] == ')' &&
+              strncmp(&line[d], &line[j-dn], dn) == 0)
+            {
+            preproc_escape_string(&line, &linelen, &j, d, dn);
+            state = 0;
+            }
+          }
+        line[j++] = tbuf[i++];
+        }
+#ifdef PREPROC_TRIGRAPHS
+      else if (tbuf[i] == '?' && tbuf[i+1] == '?')
+        {
+        i += 2;
+        switch (tbuf[i])
+          {
+          case '=': tbuf[i] = '#'; break;
+          case '/': tbuf[i] = '\\'; break;
+          case '\'': tbuf[i] = '^'; break;
+          case '(': tbuf[i] = '['; break;
+          case ')': tbuf[i] = ']'; break;
+          case '!': tbuf[i] = '|'; break;
+          case '<': tbuf[i] = '{'; break;
+          case '>': tbuf[i] = '}'; break;
+          case '-': tbuf[i] = '~'; break;
+          default: line[j++] = tbuf[--i];
+          }
+        }
+#endif
+      else if (tbuf[i] == '\\' && tbuf[i+1] == '\n')
+        {
+        i += 2;
+        }
+      else if (tbuf[i] == '\\' && tbuf[i+1] == '\r' && tbuf[i+2] == '\n')
+        {
+        i += 3;
+        }
+      else if (tbuf[i] == '\r' && tbuf[i+1] == '\n')
+        {
+        i++;
+        }
+      else if (state == '*')
         {
         if (tbuf[i] == '*' && tbuf[i+1] == '/')
           {
           line[j++] = tbuf[i++];
           line[j++] = tbuf[i++];
-          in_comment = 0;
+          state = 0;
           }
         else
           {
           line[j++] = tbuf[i++];
           }
         }
-      else if (in_quote)
+      else if (state == '/' && tbuf[i] != '\n')
         {
-        if (tbuf[i] == '\"')
+        line[j++] = tbuf[i++];
+        }
+      else if (state == '\'' || state == '\"')
+        {
+        if (tbuf[i] == state)
           {
           line[j++] = tbuf[i++];
-          in_quote = 0;
+          state = 0;
           }
         else if (tbuf[i] == '\\' && tbuf[i+1] != '\0')
           {
@@ -2271,26 +2000,34 @@ static int preproc_include_file(
           line[j++] = tbuf[i++];
           }
         }
-      else if (tbuf[i] == '/' && tbuf[i+1] == '*')
+      else if (tbuf[i] == '/')
         {
-        line[j++] = tbuf[i++];
-        line[j++] = tbuf[i++];
-        in_comment = 1;
-        }
-      else if (tbuf[i] == '\"')
-        {
-        line[j++] = tbuf[i++];
-        in_quote = 1;
-        }
-      else if (tbuf[i] == '\\' && tbuf[i+1] == '\n')
-        {
-        line[j++] = tbuf[i++];
+        if (tbuf[i+1] == '*' || tbuf[i+1] == '/')
+          {
+          state = tbuf[i+1];
+          line[j++] = tbuf[i++];
+          }
         line[j++] = tbuf[i++];
         }
-      else if (tbuf[i] == '\\' && tbuf[i+1] == '\r' && tbuf[i+2] == '\n')
-        {
-        line[j++] = tbuf[i++];
-        line[j++] = tbuf[i++];
+      else if (tbuf[i] == '\"' || tbuf[i] == '\'')
+        {
+        state = tbuf[i];
+        /* check for raw string prefixes */
+        if (state == '\"' && j > 0 && line[j-1] == 'R' &&
+            ((j > 2 &&
+              (line[j-3] == 'u' || line[j-2] == '8') &&
+              (j == 3 ||
+               !vtkParse_CharType(line[j-4], CPRE_IDGIT|CPRE_QUOTE))) ||
+             (j > 1 &&
+              (line[j-2] == 'u' || line[j-2] == 'U' || line[j-2] == 'L') &&
+              (j == 2 ||
+               !vtkParse_CharType(line[j-3], CPRE_IDGIT|CPRE_QUOTE))) ||
+             (j == 1 ||
+              !vtkParse_CharType(line[j-2], CPRE_IDGIT|CPRE_QUOTE))))
+          {
+          state = '(';
+          d = j + 1;
+          }
         line[j++] = tbuf[i++];
         }
       else if (tbuf[i] != '\n' && tbuf[i] != '\0')
@@ -2309,7 +2046,7 @@ static int preproc_include_file(
       const char *cp = line;
       line[j] = '\0';
       j = 0;
-      preproc_skip_whitespace(&cp, WS_NO_EOL);
+      cp += vtkParse_SkipWhitespace(cp, WS_PREPROC);
       if (*cp == '#')
         {
         vtkParsePreprocess_HandleDirective(info, line);
@@ -2333,14 +2070,14 @@ static int preproc_include_file(
  * only go through the preprocessor.
  */
 static int preproc_evaluate_include(
-  PreprocessInfo *info, preproc_tokenizer *tokens)
+  PreprocessInfo *info, StringTokenizer *tokens)
 {
   const char *cp;
   const char *filename;
 
   if (tokens->hash == HASH_INCLUDE)
     {
-    preproc_next(tokens);
+    vtkParse_NextToken(tokens);
 
     cp = tokens->text;
 
@@ -2364,7 +2101,7 @@ static int preproc_evaluate_include(
     if (*cp == '\"')
       {
       filename = cp + 1;
-      preproc_skip_quotes(&cp);
+      cp += vtkParse_SkipQuotes(cp);
       if (cp <= filename + 1 || *(cp-1) != '\"')
         {
         return VTK_PARSE_SYNTAX_ERROR;
@@ -2397,16 +2134,16 @@ int vtkParsePreprocess_HandleDirective(
   PreprocessInfo *info, const char *directive)
 {
   int result = VTK_PARSE_OK;
-  preproc_tokenizer tokens;
+  StringTokenizer tokens;
 
-  preproc_init(&tokens, directive);
+  vtkParse_InitTokenizer(&tokens, directive, WS_PREPROC);
 
   if (tokens.tok != '#')
     {
     return VTK_PARSE_SYNTAX_ERROR;
     }
 
-  preproc_next(&tokens);
+  vtkParse_NextToken(&tokens);
 
   if (tokens.tok == TOK_ID)
     {
@@ -2424,7 +2161,7 @@ int vtkParsePreprocess_HandleDirective(
          strncmp("endif", tokens.text, tokens.len) == 0))
       {
       result = preproc_evaluate_if(info, &tokens);
-      while (tokens.tok) { preproc_next(&tokens); }
+      while (tokens.tok) { vtkParse_NextToken(&tokens); }
 #if PREPROC_DEBUG
         {
         size_t n = tokens.text - directive;
@@ -2478,8 +2215,8 @@ int vtkParsePreprocess_EvaluateExpression(
   PreprocessInfo *info, const char *text,
   preproc_int_t *val, int *is_unsigned)
 {
-  preproc_tokenizer tokens;
-  preproc_init(&tokens, text);
+  StringTokenizer tokens;
+  vtkParse_InitTokenizer(&tokens, text, WS_PREPROC);
 
   return preproc_evaluate_expression(info, &tokens, val, is_unsigned);
 }
@@ -2582,11 +2319,11 @@ void vtkParsePreprocess_AddStandardMacros(
 int vtkParsePreprocess_AddMacro(
   PreprocessInfo *info, const char *name, const char *definition)
 {
-  preproc_tokenizer token;
+  StringTokenizer token;
   MacroInfo **macro_p;
   MacroInfo *macro;
 
-  preproc_init(&token, name);
+  vtkParse_InitTokenizer(&token, name, WS_PREPROC);
   macro_p = preproc_macro_location(info, &token, 1);
   if (*macro_p)
     {
@@ -2614,10 +2351,10 @@ int vtkParsePreprocess_AddMacro(
 MacroInfo *vtkParsePreprocess_GetMacro(
   PreprocessInfo *info, const char *name)
 {
-  preproc_tokenizer token;
+  StringTokenizer token;
   MacroInfo *macro;
 
-  preproc_init(&token, name);
+  vtkParse_InitTokenizer(&token, name, WS_PREPROC);
   macro = preproc_find_macro(info, &token);
 
   if (macro && !macro->IsExcluded)
@@ -2634,9 +2371,9 @@ MacroInfo *vtkParsePreprocess_GetMacro(
 int vtkParsePreprocess_RemoveMacro(
   PreprocessInfo *info, const char *name)
 {
-  preproc_tokenizer token;
+  StringTokenizer token;
 
-  preproc_init(&token, name);
+  vtkParse_InitTokenizer(&token, name, WS_PREPROC);
 
   if (preproc_remove_macro(info, &token))
     {
@@ -2668,6 +2405,7 @@ const char *vtkParsePreprocess_ExpandMacro(
   size_t k = 0;
   int stringify = 0;
   int noexpand = 0;
+  int empty_variadic = 0;
   int depth = 1;
   int c;
 
@@ -2689,11 +2427,11 @@ const char *vtkParsePreprocess_ExpandMacro(
         {
         if (*cp == '\"' || *cp == '\'')
           {
-          preproc_skip_quotes(&cp);
+          cp += vtkParse_SkipQuotes(cp);
           }
         else if (cp[0] == '/' && (cp[1] == '*' || cp[1] == '/'))
           {
-          preproc_skip_comment(&cp);
+          cp += vtkParse_SkipComment(cp);
           }
         else if (*cp == '(')
           {
@@ -2749,17 +2487,26 @@ const char *vtkParsePreprocess_ExpandMacro(
       }
 #endif
 
+    /* one arg that is only whitespace can also be no args*/
     if (macro->NumberOfParameters == 0 && n == 1)
       {
       const char *tp = values[0];
-      preproc_skip_whitespace(&tp, WS_NO_EOL);
+      tp += vtkParse_SkipWhitespace(tp, WS_PREPROC);
       if (tp + 1 >= values[1])
         {
         n = 0;
         }
       }
 
-    if (n != macro->NumberOfParameters)
+    /* allow the variadic arg to be empty */
+    if (macro->IsVariadic && n == macro->NumberOfParameters-1)
+      {
+      empty_variadic = 1;
+      }
+
+    /* check for correct number of arguments */
+    if (n < (macro->NumberOfParameters - empty_variadic) ||
+        (n > macro->NumberOfParameters && !macro->IsVariadic))
       {
       if (values != stack_values) { free((char **)values); }
 #if PREPROC_DEBUG
@@ -2784,24 +2531,24 @@ const char *vtkParsePreprocess_ExpandMacro(
     stringify = 0;
     noexpand = 0;
     /* skip all chars that aren't part of a name */
-    while (!preproc_chartype(*cp, CPRE_ID) && *cp != '\0')
+    while (!vtkParse_CharType(*cp, CPRE_ID) && *cp != '\0')
       {
       dp = cp;
-      preproc_skip_whitespace(&cp, WS_NO_EOL);
+      cp += vtkParse_SkipWhitespace(cp, WS_PREPROC);
       if (cp > dp)
         {
         dp = cp;
         }
-      else if (preproc_chartype(*cp, CPRE_QUOTE))
+      else if (vtkParse_CharType(*cp, CPRE_QUOTE))
         {
-        preproc_skip_quotes(&cp);
+        cp += vtkParse_SkipQuotes(cp);
         dp = cp;
         wp = cp;
         noexpand = 0;
         }
-      else if (preproc_chartype(*cp, CPRE_DIGIT))
+      else if (vtkParse_CharType(*cp, CPRE_DIGIT))
         {
-        preproc_skip_number(&cp);
+        cp += vtkParse_SkipNumber(cp);
         dp = cp;
         wp = cp;
         noexpand = 0;
@@ -2812,7 +2559,7 @@ const char *vtkParsePreprocess_ExpandMacro(
         dp = wp;
         cp += 2;
         wp = cp;
-        preproc_skip_whitespace(&cp, WS_NO_EOL);
+        cp += vtkParse_SkipWhitespace(cp, WS_PREPROC);
         break;
         }
       else if (*cp == '#')
@@ -2821,7 +2568,7 @@ const char *vtkParsePreprocess_ExpandMacro(
         dp = cp;
         wp = cp;
         cp++;
-        preproc_skip_whitespace(&cp, WS_NO_EOL);
+        cp += vtkParse_SkipWhitespace(cp, WS_PREPROC);
         break;
         }
       else
@@ -2854,22 +2601,31 @@ const char *vtkParsePreprocess_ExpandMacro(
 
     /* get the name */
     pp = cp;
-    preproc_skip_name(&cp);
-    l = cp - pp;
+    l = vtkParse_SkipId(cp);
+    cp += l;
     if (l > 0)
       {
-      for (j = 0; j < n; j++)
+      for (j = 0; j < macro->NumberOfParameters; j++)
         {
         /* check whether the name matches a parameter */
         if (strncmp(pp, macro->Parameters[j], l) == 0 &&
             macro->Parameters[j][l] == '\0')
           {
-          /* substitute the argument value */
-          l = values[j+1] - values[j] - 1;
-          pp = values[j];
+          if (macro->IsVariadic && j == macro->NumberOfParameters-1)
+            {
+            /* if variadic arg, use all remaining args */
+            pp = values[j] - empty_variadic;
+            l = values[n] - pp - 1;
+            }
+          else
+            {
+            /* else just get one arg */
+            pp = values[j];
+            l = values[j+1] - pp - 1;
+            }
           /* remove leading whitespace from argument */
           c = *pp;
-          while (preproc_chartype(c, CPRE_WHITE))
+          while (vtkParse_CharType(c, CPRE_WHITE))
             {
             c = *(++pp);
             l--;
@@ -2878,7 +2634,7 @@ const char *vtkParsePreprocess_ExpandMacro(
           if (l > 0)
             {
             c = pp[l - 1];
-            while (preproc_chartype(c, CPRE_WHITE))
+            while (vtkParse_CharType(c, CPRE_WHITE))
               {
               if (--l == 0)
                 {
@@ -2889,7 +2645,7 @@ const char *vtkParsePreprocess_ExpandMacro(
             }
           /* check if followed by "##" */
           wp = cp;
-          preproc_skip_whitespace(&wp, WS_NO_EOL);
+          wp += vtkParse_SkipWhitespace(wp, WS_PREPROC);
           if (wp[0] == '#' && wp[1] == '#')
             {
             noexpand = 1;
@@ -2925,6 +2681,7 @@ const char *vtkParsePreprocess_ExpandMacro(
         }
       if (stringify)
         {
+        /* convert argument into a string, due to "#" */
         rp[i++] = '\"';
         for (k = 0; k < l; k++)
           {
@@ -2937,8 +2694,26 @@ const char *vtkParsePreprocess_ExpandMacro(
           }
         rp[i++] = '\"';
         }
+      else if (empty_variadic && j == macro->NumberOfParameters-1)
+        {
+        /* remove trailing comma before empty variadic (non-standard) */
+        k = i;
+        if (k > 0)
+          {
+          do
+            {
+            c = rp[--k];
+            }
+          while (k > 0 && vtkParse_CharType(c, CPRE_WHITE));
+          if (rp[k] == ',')
+            {
+            i = k;
+            }
+          }
+        }
       else if (noexpand)
         {
+        /* do not expand args that will be concatenated with "##" */
         strncpy(&rp[i], pp, l);
         i += l;
         }
@@ -3009,8 +2784,8 @@ const char *vtkParsePreprocess_ProcessString(
   size_t i = 0;
   size_t rs = 128;
   int last_tok = 0;
-  preproc_tokenizer tokens;
-  preproc_init(&tokens, text);
+  StringTokenizer tokens;
+  vtkParse_InitTokenizer(&tokens, text, WS_PREPROC);
 
   rp = stack_rp;
   rp[0] = '\0';
@@ -3028,7 +2803,8 @@ const char *vtkParsePreprocess_ProcessString(
         {
         do { --i; } while (i > 0 && rp[i] != '\"');
         }
-      cp++;
+      while (*cp != '\"' && l > 1) { cp++; l--; }
+      if (*cp == '\"' && l > 1) { cp++; l--; }
       }
 
     if (i + l + 2 >= rs)
@@ -3074,12 +2850,12 @@ const char *vtkParsePreprocess_ProcessString(
         if (macro->IsFunction)
           {
           /* expand function macros using the arguments */
-          preproc_next(&tokens);
+          vtkParse_NextToken(&tokens);
           if (tokens.tok == '(')
             {
             int depth = 1;
             args = tokens.text;
-            while (depth > 0 && preproc_next(&tokens))
+            while (depth > 0 && vtkParse_NextToken(&tokens))
               {
               if (tokens.tok == '(')
                 {
@@ -3155,7 +2931,7 @@ const char *vtkParsePreprocess_ProcessString(
     last_tok = tokens.tok;
     l = tokens.len;
     cp = tokens.text;
-    if (preproc_next(&tokens) && tokens.text > cp + l)
+    if (vtkParse_NextToken(&tokens) && tokens.text > cp + l)
       {
       rp[i++] = ' ';
       }
@@ -3233,7 +3009,7 @@ void vtkParsePreprocess_IncludeDirectory(
     (char **)info->IncludeDirectories, sizeof(char *),
     info->NumberOfIncludeDirectories);
   info->IncludeDirectories[info->NumberOfIncludeDirectories++] =
-    preproc_strndup(name, strlen(name));
+    vtkParse_CacheString(info->Strings, name, strlen(name));
 }
 
 /**
@@ -3267,6 +3043,7 @@ void vtkParsePreprocess_InitMacro(MacroInfo *macro)
   macro->NumberOfParameters = 0;
   macro->Parameters = NULL;
   macro->IsFunction = 0;
+  macro->IsVariadic = 0;
   macro->IsExternal = 0;
   macro->IsExcluded = 0;
 }
@@ -3276,17 +3053,6 @@ void vtkParsePreprocess_InitMacro(MacroInfo *macro)
  */
 void vtkParsePreprocess_FreeMacro(MacroInfo *macro)
 {
-  int i, n;
-
-  free((char *)macro->Name);
-  free((char *)macro->Definition);
-  free((char *)macro->Comment);
-
-  n = macro->NumberOfParameters;
-  for (i = 0; i < n; i++)
-    {
-    free((char *)macro->Parameters[i]);
-    }
   free((char **)macro->Parameters);
 
   free(macro);
@@ -3304,13 +3070,16 @@ void vtkParsePreprocess_Init(
   info->IncludeDirectories = NULL;
   info->NumberOfIncludeFiles = 0;
   info->IncludeFiles = NULL;
+  info->Strings = NULL;
   info->IsExternal = 0;
   info->ConditionalDepth = 0;
   info->ConditionalDone = 0;
 
   if (filename)
     {
-    info->FileName = preproc_strndup(filename, strlen(filename));
+    char *cp = (char *)malloc(strlen(filename) + 1);
+    strcpy(cp, filename);
+    info->FileName = cp;
     }
 }
 
@@ -3342,18 +3111,7 @@ void vtkParsePreprocess_Free(PreprocessInfo *info)
     free(info->MacroHashTable);
     }
 
-  n = info->NumberOfIncludeDirectories;
-  for (i = 0; i < n; i++)
-    {
-    free((char *)info->IncludeDirectories[i]);
-    }
   free((char **)info->IncludeDirectories);
-
-  n = info->NumberOfIncludeFiles;
-  for (i = 0; i < n; i++)
-    {
-    free((char *)info->IncludeFiles[i]);
-    }
   free((char **)info->IncludeFiles);
 
   free(info);
index 9a4010b20221d6ef5c96940a359d0bcdb9853513..528294e73c98b95c5cdca038d2a8018a174ce83b 100644 (file)
@@ -43,6 +43,8 @@
 #ifndef VTK_PARSE_PREPROCESS_H
 #define VTK_PARSE_PREPROCESS_H
 
+#include "vtkParseString.h"
+
 /**
  * The preprocessor int type.  Use the compiler's longest int type.
  */
@@ -65,6 +67,7 @@ typedef struct _MacroInfo
   int            NumberOfParameters; /* only if IsFunction == 1 */
   const char   **Parameters; /* symbols for parameters */
   int            IsFunction; /* this macro requires arguments */
+  int            IsVariadic; /* this macro can take unlimited arguments */
   int            IsExternal; /* this macro is from an included file */
   int            IsExcluded; /* do not expand this macro */
 } MacroInfo;
@@ -81,6 +84,7 @@ typedef struct _PreprocessInfo
   const char   **IncludeDirectories;
   int            NumberOfIncludeFiles; /* all included files */
   const char   **IncludeFiles;
+  StringCache   *Strings;          /* to aid string allocation */
   int            IsExternal;       /* label all macros as "external" */
   int            ConditionalDepth; /* internal state variable */
   int            ConditionalDone;  /* internal state variable */
@@ -90,7 +94,7 @@ typedef struct _PreprocessInfo
  * Platforms.  Always choose native unless crosscompiling.
  */
 enum _preproc_platform_t {
-  VTK_PARSE_NATIVE = 0,
+  VTK_PARSE_NATIVE = 0
 };
 
 /**
index f1863c022fa2c4acd3a08aec64d45f39df8d0390..0ebbc0c833473f8a1576f9567cf132d1251dc2c0 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+
+/*----------------------------------------------------------------
+ * String tokenization methods
+ *
+ * Strings must be broken into C++ tokens.
+ * A hash is computed for ids, but not for other tokens.
+ * Comments are generally considered to be whitespace, but
+ * WS_COMMENT can be used to consider comments as tokens.
+ */
+
+/** Array for quick lookup of char types */
+unsigned char parse_charbits[256] = {
+  0, 0, 0, 0, 0, 0, 0, 0, 0,
+  CPRE_HSPACE, /* tab */
+  CPRE_VSPACE, CPRE_VSPACE, CPRE_VSPACE, /* newline, vtab, form feed */
+  CPRE_HSPACE, /* carriage return */
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  CPRE_HSPACE, /* ' ' */
+  0, CPRE_QUOTE, 0, 0, 0, 0, CPRE_QUOTE, 0, 0, /* !"#$%&'() */
+  0, CPRE_SIGN, 0, CPRE_SIGN, 0, 0, /* *+,-./ */
+  CPRE_DIGIT|CPRE_HEX, /* 0 */
+  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
+  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
+  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
+  CPRE_DIGIT|CPRE_HEX, CPRE_DIGIT|CPRE_HEX,
+  CPRE_DIGIT|CPRE_HEX, /* 9 */
+  0, 0, 0, 0, 0, 0, 0, /* :;<=>?@ */
+  CPRE_ID|CPRE_HEX, /* A */
+  CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, /* BCD */
+  CPRE_ID|CPRE_HEX|CPRE_EXP, /* E */
+  CPRE_ID|CPRE_HEX, CPRE_ID, CPRE_ID, CPRE_ID, /* FGHI */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* JKLM */
+  CPRE_ID, CPRE_ID, CPRE_ID|CPRE_EXP, CPRE_ID, /* NOPQ */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* RSTU */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* VWXY */
+  CPRE_ID, /* Z */
+  0, 0, 0, 0, /* [\\]^ */
+  CPRE_ID, /* _ */
+  0, /* ` */
+  CPRE_ID|CPRE_HEX, /* a */
+  CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, CPRE_ID|CPRE_HEX, /* bcd */
+  CPRE_ID|CPRE_HEX|CPRE_EXP, /* e */
+  CPRE_ID|CPRE_HEX, CPRE_ID, CPRE_ID, CPRE_ID, /* fghi */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* jklm */
+  CPRE_ID, CPRE_ID, CPRE_ID|CPRE_EXP, CPRE_ID, /* nopq */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* rstu */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, /* vwxy */
+  CPRE_ID, /* z */
+  0, 0, 0, 0, /* {|}~ */
+  0, /* '\x7f' */
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID,
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID,
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID,
+  CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID, CPRE_ID,
+};
+
+#define parse_chartype(c, bits) \
+  ((parse_charbits[(unsigned char)(c)] & (bits)) != 0)
+
+/** Skip over a comment. */
+size_t vtkParse_SkipComment(const char *text)
+{
+  const char *cp = text;
+
+  if (cp[0] == '/')
+    {
+    if (cp[1] == '/')
+      {
+      cp += 2;
+      while (*cp != '\n' && *cp != '\0')
+        {
+        if (cp[0] == '\\')
+          {
+          if (cp[1] == '\n') { cp++; }
+          else if (cp[1] == '\r' && cp[2] == '\n') { cp += 2; }
+          }
+        cp++;
+        }
+      }
+    else if (cp[1] == '*')
+      {
+      cp += 2;
+      while (*cp != '\0')
+        {
+        if (cp[0] == '*' && cp[1] == '/') { cp += 2; break; }
+        cp++;
+        }
+      }
+    }
+
+  return cp - text;
+}
+
+/** Skip over whitespace. */
+size_t vtkParse_SkipWhitespace(const char *text, parse_space_t spacetype)
+{
+  const char *cp = text;
+
+  for (;;)
+    {
+    if (parse_chartype(*cp, spacetype))
+      {
+      do
+        {
+        cp++;
+        }
+      while (parse_chartype(*cp, spacetype));
+      }
+    if (cp[0] == '\\')
+      {
+      if (cp[1] == '\n')
+        {
+        cp += 2;
+        }
+      else if (cp[1] == '\r' && cp[2] == '\n')
+        {
+        cp += 3;
+        }
+      else
+        {
+        break;
+        }
+      }
+    else if (cp[0] == '/' && (spacetype & WS_COMMENT) != WS_COMMENT)
+      {
+      if (cp[1] == '/' || cp[1] == '*')
+        {
+        cp += vtkParse_SkipComment(cp);
+        }
+      else
+        {
+        break;
+        }
+      }
+    else
+      {
+      break;
+      }
+    }
+
+  return cp - text;
+}
+
+/** Skip over string and char literals. */
+size_t vtkParse_SkipQuotes(const char *text)
+{
+  const char *cp = text;
+  const char qc = *cp;
+
+  if (parse_chartype(*cp, CPRE_QUOTE))
+    {
+    cp++;
+    while (*cp != qc && *cp != '\n' && *cp != '\0')
+      {
+      if (*cp++ == '\\')
+        {
+        if (cp[0] == '\r' && cp[1] == '\n') { cp += 2; }
+        else if (*cp != '\0') { cp++; }
+        }
+      }
+    }
+  if (*cp == qc)
+    {
+    cp++;
+    }
+
+  return cp - text;
+}
+
+/** Skip over a number. */
+size_t vtkParse_SkipNumber(const char *text)
+{
+  const char *cp = text;
+
+  if (parse_chartype(cp[0], CPRE_DIGIT) ||
+      (cp[0] == '.' && parse_chartype(cp[1], CPRE_DIGIT)))
+    {
+    do
+      {
+      char c = *cp++;
+      if (parse_chartype(c, CPRE_EXP) &&
+          parse_chartype(*cp, CPRE_SIGN))
+        {
+        cp++;
+        }
+      }
+    while (parse_chartype(*cp, CPRE_IDGIT) || *cp == '.');
+    }
+
+  return cp - text;
+}
+
+/** Skip over a name. */
+size_t vtkParse_SkipId(const char *text)
+{
+  const char *cp = text;
+
+  if (parse_chartype(*cp, CPRE_ID))
+    {
+    do
+      {
+      cp++;
+      }
+    while (parse_chartype(*cp, CPRE_IDGIT));
+    }
+
+  return cp - text;
+}
+
+/** A simple 32-bit hash function based on "djb2". */
+#define parse_hash_name(cp, h) \
+  h = 5381; \
+  do { h = (h << 5) + h + (unsigned char)*cp++; } \
+  while (parse_chartype(*cp, CPRE_IDGIT));
+
+unsigned int vtkParse_HashId(const char *cp)
+{
+  unsigned int h = 0;
+
+  if (parse_chartype(*cp, CPRE_ID))
+    {
+    parse_hash_name(cp, h);
+    }
+
+  return h;
+}
+
+/** Skip a string or */
+size_t parse_skip_quotes_with_suffix(const char *cp)
+{
+  size_t l = vtkParse_SkipQuotes(cp);
+  if (l && cp[l] == '_')
+    {
+    l += vtkParse_SkipId(cp + l);
+    }
+  return l;
+}
+
+/** Return the next token, or 0 if none left. */
+int vtkParse_NextToken(StringTokenizer *tokens)
+{
+  const char *cp = tokens->text + tokens->len;
+
+  /* avoid extra function call for simple whitespace */
+  if (parse_chartype(*cp, tokens->ws))
+    {
+    do { cp++; } while (parse_chartype(*cp, tokens->ws));
+    }
+  /* function call is necessary if slash encountered */
+  if (*cp == '/' || *cp == '\\')
+    {
+    cp += vtkParse_SkipWhitespace(cp, tokens->ws);
+    }
+
+  if (parse_chartype(*cp, CPRE_ID))
+    {
+    const char *ep = cp;
+    unsigned int h;
+
+    /* use a macro to compute the hash */
+    parse_hash_name(ep, h);
+
+    tokens->tok = TOK_ID;
+    tokens->hash = h;
+    tokens->text = cp;
+    tokens->len = ep - cp;
+
+    /* check if this is a prefixed string */
+    if (parse_chartype(*ep, CPRE_QUOTE) &&
+        ((*ep == '\'' && tokens->len == 1 &&
+          (*cp == 'u' || *cp == 'U' || *cp == 'L')) ||
+         (*ep == '\"' && tokens->len == 1 &&
+          (*cp == 'U' || *cp == 'u' || *cp == 'L')) ||
+         (*ep == '\"' && tokens->len == 2 && cp[0] == 'u' && cp[1] == '8')))
+      {
+      tokens->tok = (*ep == '\"' ? TOK_STRING : TOK_CHAR);
+      tokens->hash = 0;
+      tokens->len += parse_skip_quotes_with_suffix(ep);
+      }
+    else
+      {
+      /* check if this ID is a named operator */
+      static const char *op_str_array[32] = {
+        "compl", 0, 0, 0, 0, "bitor", "or", 0, 0, 0, 0, "not_eq",
+        0, "and_eq", 0, 0, 0, 0, 0, "xor_eq", 0, 0, "not", "bitand",
+        "and", 0, 0, "or_eq", 0, 0, "xor", 0 };
+      static unsigned char op_len_array[32] = {
+        5, 0, 0, 0, 0, 5, 2, 0, 0, 0, 0, 6,
+        0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 3, 6,
+        3, 0, 0, 5, 0, 0, 3, 0 };
+      static int op_tok_array[32] = {
+        '~', 0, 0, 0, 0, '|', TOK_OR, 0, 0, 0, 0, TOK_NE,
+        0, TOK_AND_EQ, 0, 0, 0, 0, 0, TOK_XOR_EQ, 0, 0, '!', '&',
+        TOK_AND, 0, 0, TOK_OR_EQ, 0, 0, '^', 0 };
+
+      h &= 0x1f;
+      ep = op_str_array[h];
+      if (ep && tokens->len == op_len_array[h] &&
+          strncmp(cp, ep, tokens->len) == 0)
+        {
+        tokens->tok = op_tok_array[h];
+        tokens->hash = 0;
+        }
+      }
+    }
+  else if (parse_chartype(*cp, CPRE_QUOTE))
+    {
+    tokens->tok = (*cp == '\"' ? TOK_STRING : TOK_CHAR);
+    tokens->hash = 0;
+    tokens->text = cp;
+    tokens->len = parse_skip_quotes_with_suffix(cp);
+    }
+  else if (parse_chartype(*cp, CPRE_DIGIT) ||
+           (cp[0] == '.' && parse_chartype(cp[1], CPRE_DIGIT)))
+    {
+    tokens->tok = TOK_NUMBER;
+    tokens->hash = 0;
+    tokens->text = cp;
+    tokens->len = vtkParse_SkipNumber(cp);
+    }
+  else if (cp[0] == '/' && (cp[1] == '/' || cp[1] == '*'))
+    {
+    tokens->tok = TOK_COMMENT;
+    tokens->hash = 0;
+    tokens->text = cp;
+    tokens->len = vtkParse_SkipComment(cp);
+    }
+  else
+    {
+    int t = cp[0];
+    size_t l = 1;
+
+    switch (cp[0])
+      {
+      case ':':
+        if (cp[1] == ':') { l = 2; t = TOK_SCOPE; }
+        else if (cp[1] == '>') { l = 2; t = ']'; }
+        break;
+      case '.':
+        if (cp[1] == '.' && cp[2] == '.') { l = 3; t = TOK_ELLIPSIS; }
+        else if (cp[1] == '*') { l = 2; t = TOK_DOT_STAR; }
+        break;
+      case '=':
+        if (cp[1] == '=') { l = 2; t = TOK_EQ; }
+        break;
+      case '!':
+        if (cp[1] == '=') { l = 2; t = TOK_NE; }
+        break;
+      case '<':
+        if (cp[1] == '<' && cp[2] == '=') { l = 3; t = TOK_LSHIFT_EQ; }
+        else if (cp[1] == '<') { l = 2; t = TOK_LSHIFT; }
+        else if (cp[1] == '=') { l = 2; t = TOK_LE; }
+        else if (cp[1] == '%') { l = 2; t = '{'; }
+        else if (cp[1] == ':') { l = 2; t = '['; }
+        break;
+      case '>':
+        if (cp[1] == '>' && cp[2] == '=') { l = 3; t = TOK_RSHIFT_EQ; }
+        else if (cp[1] == '>') { l = 2; t = TOK_RSHIFT; }
+        else if (cp[1] == '=') { l = 2; t = TOK_GE; }
+        break;
+      case '&':
+        if (cp[1] == '=') { l = 2; t = TOK_AND_EQ; }
+        else if (cp[1] == '&') { l = 2; t = TOK_AND; }
+        break;
+      case '|':
+        if (cp[1] == '=') { l = 2; t = TOK_OR_EQ; }
+        else if (cp[1] == '|') { l = 2; t = TOK_OR; }
+        break;
+      case '^':
+        if (cp[1] == '=') { l = 2; t = TOK_XOR_EQ; }
+        break;
+      case '*':
+        if (cp[1] == '=') { l = 2; t = TOK_MUL_EQ; }
+        break;
+      case '/':
+        if (cp[1] == '=') { l = 2; t = TOK_DIV_EQ; }
+        break;
+      case '%':
+        if (cp[1] == '=') { l = 2; t = TOK_MOD_EQ; }
+        else if (cp[1] == '>') { l = 2; t = '}'; }
+        else if (cp[1] == ':') {
+          if (cp[2] == '%' && cp[3] == ':') { l = 4; t = TOK_DBLHASH; }
+          else { l = 2; t = '#'; } }
+        break;
+      case '+':
+        if (cp[1] == '+') { l = 2; t = TOK_INCR; }
+        else if (cp[1] == '=') { l = 2; t = TOK_ADD_EQ; }
+        break;
+      case '-':
+        if (cp[1] == '>' && cp[2] == '*') { l = 3; t = TOK_ARROW_STAR; }
+        else if (cp[1] == '>') { l = 2; t = TOK_ARROW; }
+        else if (cp[1] == '-') { l = 2; t = TOK_DECR; }
+        else if (cp[1] == '=') { l = 2; t = TOK_SUB_EQ; }
+        break;
+      case '#':
+        if (cp[1] == '#') { l = 2; t = TOK_DBLHASH; }
+        break;
+      case '\n':
+      case '\0':
+        { l = 0; t = 0; }
+        break;
+      }
+
+    tokens->tok = t;
+    tokens->hash = 0;
+    tokens->text = cp;
+    tokens->len = l;
+    }
+
+  return tokens->tok;
+}
+
+/** Initialize the tokenizer. */
+void vtkParse_InitTokenizer(
+  StringTokenizer *tokens, const char *text, parse_space_t wstype)
+{
+  tokens->tok = 0;
+  tokens->hash = 0;
+  tokens->text = text;
+  tokens->len = 0;
+  tokens->ws = wstype;
+  vtkParse_NextToken(tokens);
+}
+
+
 /*----------------------------------------------------------------
- * String utility methods
+ * String allocation methods
  *
  * Strings are centrally allocated and are const.  They should not
  * be freed until the parse is complete and all the data structures
index 1143082775529cff8e9f380b861333d48451aafb..47621e941fc0fe1142e1456831c24a34f89a1fa6 100644 (file)
      PURPOSE.  See the above copyright notice for more information.
 
 =========================================================================*/
+/*-------------------------------------------------------------------------
+  Copyright (c) 2012 David Gobbi.
 
-/*
-  String allocation routines used by vtkParse.
+  Contributed to the VisualizationToolkit by the author in April 2012
+  under the terms of the Visualization Toolkit 2008 copyright.
+-------------------------------------------------------------------------*/
 
-  The parser uses "const char *" as its string object type, and expects
-  all string objects to persist and be constant for the entire lifetime
-  of the data generated by the parse (usually this means until the parser
-  executable has exited).  All strings that are stored in the parser's
-  data objects should either be statically allocated, or allocated with
-  the vtkParse_NewString() or vtkParse_CacheString() methods declared here.
+/**
+  This file provides string handling routines.
+
+  The two important jobs done by these routines are string tokenization
+  and string cacheing.
+
+  Tokenization is done as per the rules of a C++ preprocessor, and
+  breaks the strings into ids, literals, and operators.  Any string
+  is a valid input for the tokenizer, and it is up to the parser to
+  decide if the resulting tokens are valid within the grammar.  The
+  two primary tokenization functions are vtkParse_InitTokenizer()
+  and vtkParse_NextToken().
+
+  Cacheing refers to how string memory management is done.  The
+  parser uses "const char *" for all strings, and expects all strings
+  to be persistent and constant.  These conditions are automatically
+  met by static strings, but dynamically-generated strings must be
+  cached until the parse is complete.  The primary cacheing functions
+  are vtkParse_CacheString() and vtkParse_FreeStringCache().
 */
 
 #ifndef VTK_PARSE_STRING_H
 extern "C" {
 #endif
 
+/**
+ * Various important char types for tokenization
+ */
+typedef enum _parse_char_type
+{
+  CPRE_ID       = 0x01,  /* A-Z a-z and _ */
+  CPRE_DIGIT    = 0x02,  /* 0-9 */
+  CPRE_IDGIT    = 0x03,  /* 0-9 A-Z a-z and _ */
+  CPRE_HEX      = 0x04,  /* 0-9A-Fa-f */
+  CPRE_EXP      = 0x08,  /* EPep (exponents for floats) */
+  CPRE_SIGN     = 0x10,  /* +- (sign for floats) */
+  CPRE_QUOTE    = 0x20,  /* " and ' */
+  CPRE_HSPACE   = 0x40,  /* space, tab, carriage return */
+  CPRE_VSPACE   = 0x80,  /* newline, vertical tab, form feed */
+  CPRE_WHITE    = 0xC0,  /* all whitespace characters */
+} parse_char_type;
+
+/**
+ * Character type lookup table
+ */
+extern unsigned char parse_charbits[256];
+
+/**
+ * Macro to check if a char is of a certain type
+ */
+#define vtkParse_CharType(c, bits) \
+  ((parse_charbits[(unsigned char)(c)] & (bits)) != 0)
+
+/**
+ * Whitespace types that can be used with the tokenizer.
+ * - WS_DEFAULT treats newlines and formfeeds as regular whitespace.
+ * - WS_PREPROC treats newline as end-of-line, not as whitespace.
+ * - WS_COMMENT treats comments as tokens, not as whitespace.
+ */
+typedef enum _parse_space_t
+{
+  WS_DEFAULT = CPRE_WHITE,  /* skip all whitespace */
+  WS_PREPROC = CPRE_HSPACE, /* skip horizontal whitespace only */
+  WS_COMMENT = (CPRE_WHITE | 0x100), /* comments as tokens */
+} parse_space_t;
+
+/**
+ * Preprocessor tokens for C++.
+ */
+typedef enum _preproc_token_t
+{
+  TOK_OTHER = 257,
+  TOK_ID,        /* any id */
+  TOK_CHAR,      /* char literal */
+  TOK_STRING,    /* string literal */
+  TOK_NUMBER,    /* any numeric literal */
+  TOK_COMMENT,   /* C or C++ comment */
+  TOK_DBLHASH,   /* ## */
+  TOK_SCOPE,     /* :: */
+  TOK_INCR,      /* ++ */
+  TOK_DECR,      /* -- */
+  TOK_RSHIFT,    /* >> */
+  TOK_LSHIFT,    /* << */
+  TOK_AND,       /* && */
+  TOK_OR,        /* || */
+  TOK_EQ,        /* == */
+  TOK_NE,        /* != */
+  TOK_GE,        /* >= */
+  TOK_LE,        /* <= */
+  TOK_ADD_EQ,    /* += */
+  TOK_SUB_EQ,    /* -= */
+  TOK_MUL_EQ,    /* *= */
+  TOK_DIV_EQ,    /* /= */
+  TOK_MOD_EQ,    /* %= */
+  TOK_AND_EQ,    /* &= */
+  TOK_OR_EQ,     /* |= */
+  TOK_XOR_EQ,    /* ^= */
+  TOK_ARROW,     /* -> */
+  TOK_DOT_STAR,  /* .* */
+  TOK_ARROW_STAR,/* ->* */
+  TOK_RSHIFT_EQ, /* >>= */
+  TOK_LSHIFT_EQ, /* <<= */
+  TOK_ELLIPSIS,  /* ... */
+} preproc_token_t;
+
+/**
+ * A struct for going through a string one token at a time.
+ * If ws is set to WS_PREPROC, then tokenization stops when a
+ * newline or null is encountered.  If ws is set to WS_DEFAULT,
+ * then tokenization only stops when a null is encountered.  If
+ * ws is set to WS_COMMENT, then tokenization stops only when
+ * a null is encountered, and comments are returned as tokens
+ * instead of being skipped as whitespace.
+ */
+typedef struct _StringTokenizer
+{
+  int tok;           /* the current token */
+  unsigned int hash; /* the hash of the current token, if it is an id */
+  const char *text;  /* the text for the current token, not null-teminated */
+  size_t len;        /* the length of the current token */
+  parse_space_t ws;  /* controls what to consider as whitespace */
+} StringTokenizer;
+
+/**
+ * Initialize the tokenizer and get the first token.
+ */
+void vtkParse_InitTokenizer(
+  StringTokenizer *tokens, const char *text, parse_space_t wstype);
+
+/**
+ * Return the next preprocessor token, or '0' if none left.
+ */
+int vtkParse_NextToken(StringTokenizer *tokens);
+
+/**
+ * Skip over whitespace.
+ * Return the number of chars until the first non-whitespace token.
+ * Set spacetype to WS_DEFAULT, WS_PREPROC, or WS_COMMENT.
+ */
+size_t vtkParse_SkipWhitespace(
+  const char *cp, parse_space_t spacetype);
+
+/**
+ * Skip over a comment, C style or C++ style.
+ * Return the number of chars until the end of the comment.
+ */
+size_t vtkParse_SkipComment(const char *cp);
+
+/**
+ * Skip over a string in double or single quotes.
+ * Return the number of chars until the end of the quotes.
+ */
+size_t vtkParse_SkipQuotes(const char *cp);
+
+/**
+ * Skip over a number.  Uses preprocessor semantics.
+ * Return the number of chars until the end of the number.
+ */
+size_t vtkParse_SkipNumber(const char *cp);
+
+/**
+ * Skip over an identifier.
+ * Return the number of chars until the end of the identifier.
+ */
+size_t vtkParse_SkipId(const char *cp);
+
+/**
+ * Compute the hash for a id, for use in hash table lookups.
+ * This stops at the first non-Id character, so it is safe to use
+ * on a string that is not null-terminated as long as there is either
+ * whitespace or an operator character before the end of the string.
+ * It can be used on null-terminated strings as well, of course.
+ */
+unsigned int vtkParse_HashId(const char *cp);
+
+
 /**
  * StringCache provides a simple way of allocating strings centrally.
- * It eliminates the need to allocate and free each individual strings,
+ * It eliminates the need to allocate and free each individual string,
  * which makes the code simpler and more efficient.
  */
 typedef struct _StringCache
@@ -63,7 +230,8 @@ char *vtkParse_NewString(StringCache *cache, size_t n);
  * At most 'n' chars will be copied, and the string will be terminated.
  * If a null pointer is provided, then a null pointer will be returned.
  */
-const char *vtkParse_CacheString(StringCache *cache, const char *cp, size_t n);
+const char *vtkParse_CacheString(
+  StringCache *cache, const char *cp, size_t n);
 
 /**
  * Free all strings that were created with vtkParse_NewString() or
index 25ede98b711dd35942614705b22a08e3166a080e..d9846b9bfa9a59650620442c1b0a66ac08ea0819 100644 (file)
@@ -65,6 +65,13 @@ int vtkWrap_IsCharPointer(ValueInfo *val)
   return (t == VTK_PARSE_CHAR && vtkWrap_IsPointer(val));
 }
 
+int vtkWrap_IsPODPointer(ValueInfo *val)
+{
+  unsigned int t = (val->Type & VTK_PARSE_BASE_TYPE);
+  return (t != VTK_PARSE_CHAR && vtkWrap_IsNumeric(val) &&
+          vtkWrap_IsPointer(val));
+}
+
 int vtkWrap_IsVTKObject(ValueInfo *val)
 {
   unsigned int t = (val->Type & VTK_PARSE_UNQUALIFIED_TYPE);
@@ -921,7 +928,7 @@ void vtkWrap_DeclareVariable(
       fprintf(fp, "*");
       }
     /* arrays of unknown size are handled via pointers */
-    else if (val->CountHint)
+    else if (val->CountHint || vtkWrap_IsPODPointer(val))
       {
       fprintf(fp, "*");
       }
@@ -945,7 +952,8 @@ void vtkWrap_DeclareVariable(
         aType != VTK_PARSE_VOID_PTR &&
         aType != VTK_PARSE_OBJECT_PTR &&
         !vtkWrap_IsQtObject(val) &&
-        val->CountHint == NULL)
+        val->CountHint == NULL &&
+        !vtkWrap_IsPODPointer(val))
       {
       if (val->NumberOfDimensions == 1 && val->Count > 0)
         {
@@ -974,7 +982,7 @@ void vtkWrap_DeclareVariable(
       {
       fprintf(fp, " = NULL");
       }
-    else if (val->CountHint)
+    else if (val->CountHint || vtkWrap_IsPODPointer(val))
       {
       fprintf(fp, " = NULL");
       }
@@ -1016,12 +1024,12 @@ void vtkWrap_DeclareVariableSize(
 
     fprintf(fp, " };\n");
     }
-  else if (val->Count != 0 || val->CountHint)
+  else if (val->Count != 0 || val->CountHint || vtkWrap_IsPODPointer(val))
     {
     fprintf(fp,
             "  %sint %s%s = %d;\n",
-            (val->CountHint ? "" : "const "), name, idx,
-            (val->CountHint ? 0 : val->Count));
+            (val->Count == 0 ? "" : "const "), name, idx,
+            (val->Count == 0 ? 0 : val->Count));
     }
   else if (val->NumberOfDimensions == 1)
     {
index 8b385eb19ec1c136927ea1bc2478acc80aa20f11..04d216db91f85aa7173d7d373ae4271c5aea3715 100644 (file)
@@ -38,12 +38,14 @@ extern "C" {
 
 /**
  * Check for common types.
+ * IsPODPointer is for unsized arrays of POD types.
  */
 /*@{*/
 int vtkWrap_IsVoid(ValueInfo *val);
 int vtkWrap_IsVoidFunction(ValueInfo *val);
 int vtkWrap_IsVoidPointer(ValueInfo *val);
 int vtkWrap_IsCharPointer(ValueInfo *val);
+int vtkWrap_IsPODPointer(ValueInfo *val);
 int vtkWrap_IsVTKObject(ValueInfo *val);
 int vtkWrap_IsSpecialObject(ValueInfo *val);
 int vtkWrap_IsQtObject(ValueInfo *val);
index df65aba469d70ce648eaa173721bd28de396187c..d95f28a507a2401feb704396a1508f59f1f855e0 100644 (file)
@@ -835,7 +835,7 @@ const char *vtkWrapText_PythonSignature(
   const char **delims;
   int i, n;
 
-  n = vtkWrap_CountWrappedArgs(currentFunction);
+  n = vtkWrap_CountWrappedParameters(currentFunction);
 
   result = &staticString;
   result->len = 0;
@@ -849,7 +849,7 @@ const char *vtkWrapText_PythonSignature(
 
   for (i = 0; i < n; i++)
     {
-    arg = currentFunction->Arguments[i];
+    arg = currentFunction->Parameters[i];
 
     if (i != 0)
       {
@@ -931,22 +931,20 @@ static void vtkWrapText_PythonTypeSignature(
     classname = "int";
     }
 
-  if (vtkWrap_IsArray(arg))
+  if ((vtkWrap_IsArray(arg) && arg->CountHint) ||
+      vtkWrap_IsPODPointer(arg))
     {
-    if (arg->CountHint)
-      {
-      vtkWPString_Append(result, braces[0]);
-      vtkWPString_Append(result, classname);
-      vtkWPString_Append(result, ", ...");
-      vtkWPString_Append(result, braces[1]);
-      }
-    else
-      {
-      sprintf(text, "%d", arg->Count);
-      dimension = text;
-      vtkWrapText_PythonArraySignature(result, classname, braces,
-        1, &dimension);
-      }
+    vtkWPString_Append(result, braces[0]);
+    vtkWPString_Append(result, classname);
+    vtkWPString_Append(result, ", ...");
+    vtkWPString_Append(result, braces[1]);
+    }
+  else if (vtkWrap_IsArray(arg))
+    {
+    sprintf(text, "%d", arg->Count);
+    dimension = text;
+    vtkWrapText_PythonArraySignature(result, classname, braces,
+      1, &dimension);
     }
   else if (vtkWrap_IsNArray(arg))
     {
index cdceac2c0015f6c7f86ab914b6af2ad726088e24..c7fff31b1ff16e3ba2ef4f8e8ad1eeb28388373a 100644 (file)
@@ -1,3 +1,3 @@
-The files under the ParaView directory are pure copy from Paraview sources.
-They need for extractor building.
-Them has to be updated if the corresponded files in paraview will be changed
\ No newline at end of file
+The files under the ParaView directory are a pure copy from ParaView sources.
+They are needed for the extractor build.
+They have to be updated if the corresponding files in ParaView are changed
\ No newline at end of file
index a41f7de37eebb5e6146084f6dc92e3e6e73c5e83..5037ecb41425006fc4b666aa87de94e6faaedfc7 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1)
-  ADD_TEST(2DVIEWER_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1)
+ELSE()
+  SET(TEST_NAMES A0)
+ENDIF()
+  
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(2DVIEWER_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(2DVIEWER_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(2DVIEWER_${tfile} PROPERTIES ENVIRONMENT "${tests_env}") 
 ENDFOREACH()
index 8bb08c123d2108843066627093fb21751f5d578e..66248e37f0bb3f00f65f4310e49024c3d35af553 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2)
-  ADD_TEST(3DVIEWER_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2)
+ELSE()
+  SET(TEST_NAMES A1 B0)
+ENDIF()
+  
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(3DVIEWER_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(3DVIEWER_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(3DVIEWER_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 3e8aab60dee66575189329dc2a08f8a029893a8e..67e28248d69dc68f9e27371900559ec67711dc61 100755 (executable)
@@ -84,6 +84,6 @@ scene.PlayMode = 1 #  set RealTime mode for animation performance
 # set period
 scene.Duration = 40 # correspond to set the speed of animation in VISU 
 scene.GoToFirst()
-scene.Loop = 1
+scene.Loop = 0
 print "Animation.................................",
 scene.Play()
index 3ae9fa516953ba8efc5671aeadd60788701e2ada..fd12c304bf82b4489a9d687e60ff33bb87b04403 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A4 A7 A8 B2 B5 B6 C0 C1 C3 C8 D1 D2 D6 D9 
-              E0 E4 E7 E8 F2 F5 F6 G0 G3 G4 G8 H1 H2)
-  ADD_TEST(ANIMATION_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A4 A7 A8 B2 B5 B6 C0 C1 C3 C8 D1 D2 D6 D9 
+                 E0 E4 E7 E8 F2 F5 F6 G0 G3 G4 G8 H1 H2)
+ELSE()
+  SET(TEST_NAMES A1 B2 C0 D1 E0 F2 G0 H1)
+ENDIF()
+  
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(ANIMATION_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE} 
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(ANIMATION_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(ANIMATION_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 65f5249404ba7b581830859790a2b3854b9befde..bb656b15677a851347c21b8434bee19953e06095 100644 (file)
@@ -17,7 +17,9 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+SET(TIMEOUT 10000)
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+SET(PARAVIS_TEST_HELPER_FILE ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py)
 
 SET(TEST_DIRECTORIES 
   Util
@@ -43,7 +45,7 @@ SET(TEST_DIRECTORIES
   imps
   dump_study
 )
-
+  
 FOREACH(test_dir ${TEST_DIRECTORIES})
   ADD_SUBDIRECTORY(${test_dir})
 ENDFOREACH()
index 763ba3aafab83cf0dc492ec6932069c45c191e59..c00a488a1803ccf7f7431190023bdf8f7306f97c 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 
-              E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
-  ADD_TEST(CUTLINES_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 
+                 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+ELSE()
+  SET(TEST_NAMES A0 B0 E0 F1 G0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(CUTLINES_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(CUTLINES_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(CUTLINES_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 47925505fe8435bd145593497b411d948b1f38e4..ed2aff559888ea2691d29c2eecb0f295a28f0b78 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 
-              E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
-  ADD_TEST(CUTPLANES_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 
+                 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+ELSE()
+  SET(TEST_NAMES A0 B0 E0 F1 G0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(CUTPLANES_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(CUTPLANES_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(CUTPLANES_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index b178d2118d217f4d184696b38f7b6d0fa04572df..a80edb9008a51bcf8cc5589c7a8dc2f6bfd504b2 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 
-              E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9)
-  ADD_TEST(DEFORMEDSHAPE_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 
+                 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9)
+ELSE()
+  SET(TEST_NAMES A0 B0 E0 F1)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(DEFORMEDSHAPE_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(DEFORMEDSHAPE_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(DEFORMEDSHAPE_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index b741b7a95dd15b3b2cf88fe3e2b37a861e5e3f44..e6d4e581e67785d24bcf7999025cd3f55d6c1b1c 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A3 A4 A5 A6 A7 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 
-              C0 C1 C2 C3 C4 C5 C6 C7 C8 C9)
-  ADD_TEST(GAUSSPOINTS_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A3 A4 A5 A6 A7 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 
+                 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9)
+ELSE()
+  SET(TEST_NAMES A2 B0 C0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(GAUSSPOINTS_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                     ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(GAUSSPOINTS_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(GAUSSPOINTS_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index d7ca98e77c7fc96b1f7f177e7914e6f64150d3cc..e2ac4fd8d243051a50b580bda52d3ac2c02b98b6 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 C0 C1 C2)
-  ADD_TEST(IMPORTMEDFIELD_${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py ${PARAVIS_TEST_OUTPUT_DIR})
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 C0 C1 C2)
+ELSE()
+  SET(TEST_NAMES A0 B0 C0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(IMPORTMEDFIELD_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(IMPORTMEDFIELD_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(IMPORTMEDFIELD_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index d280a555e6e95d36993b42b9591d59564b7be0be..3df7639055c9f7363ab316872ebc947e8ea7f5b9 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 
-              E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
-  ADD_TEST(ISOSURFACES_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 
+                 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+ELSE()
+  SET(TEST_NAMES A0 B0 E1 F1)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(ISOSURFACES_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(ISOSURFACES_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(ISOSURFACES_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 3ab9d33742dc50f32a6fe584c73d07c66783dd66..26c1a83fb8f4039c6fe93c93fced079740116225 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G3 G4 G5 G6 G7 G8 G9 
-              H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 
-              J0 J1 J2 J3 J4 J5 J6 J7 J8 J9 K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 L0 L1)
-  ADD_TEST(MESH_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G3 G4 G5 G6 G7 G8 G9 
+                 H0 H1 H2 H3 H4 H5 H6 H7 H8 H9 I0 I1 I2 I3 I4 I5 I6 I7 I8 I9 
+                 J0 J1 J2 J3 J4 J5 J6 J7 J8 J9 K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 L0 L1)
+ELSE()
+  SET(TEST_NAMES A0 B0 E2 F2 G3 H1 I0 J0 K1 L0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(MESH_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE} 
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(MESH_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(MESH_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 0a220c8ac44a5853138f909bd3d37d41a937ba7c..039ae9697655bf9589409c85dd88dcecfb49355a 100755 (executable)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
-  ADD_TEST(PLOT3D_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+ELSE()
+  SET(TEST_NAMES A1 B0 E0 F1 G0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(PLOT3D_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(PLOT3D_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(PLOT3D_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index e00266a971893de92f03c11eb1f84a90414127e0..1c1a45423d7668d1029cecad6faca049e2df48a5 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A1 A3 A4 A5 A6 A7 A8 A9 B0 B1 B4 B5 B6 B7 B8 B9 C3 C6 C7)
-  ADD_TEST(SWIGSCRIPTS_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A1 A3 A4 A5 A6 A7 A8 A9 B0 B1 B4 B5 B6 B7 B8 B9 C3 C6 C7)
+ELSE()
+  SET(TEST_NAMES A3 B0 C3)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(SWIGSCRIPTS_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(SWIGSCRIPTS_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(SWIGSCRIPTS_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index e4e6bc95ecea70b2e0a6633dc42e1821754b39f5..fd9fd14d97113640a84fe295bdef8d04189175ba 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
-  ADD_TEST(SCALARMAP_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0 G1 G2)
+ELSE()
+  SET(TEST_NAMES A1 B0 E0 F3 G0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(SCALARMAP_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(SCALARMAP_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(SCALARMAP_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 41a33f54691bee39b07c1b67635a860c5b1b0ace..939a9b3d97f38a00dd35e6ded991cef352b95e50 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8)
-  ADD_TEST(DEFORMEDSHAPESCALARMAP_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8)
+ELSE()
+  SET(TEST_NAMES A0 B0 E0 F2)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(DEFORMEDSHAPESCALARMAP_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE} 
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(DEFORMEDSHAPESCALARMAP_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(DEFORMEDSHAPESCALARMAP_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 906efa20c269be424cd7e2e61ca0528e254fc6c7..05d0ff3eb7f757ffd728468ea1109d19635b9498 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 
-              E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0)
-  ADD_TEST(STREAMLINES_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 B4 
+                 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F2 F3 F4 F5 F6 F7 F8 F9 G0)
+ELSE()
+  SET(TEST_NAMES A1 B2 E0 F2)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(STREAMLINES_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(STREAMLINES_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(STREAMLINES_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index c52678172d0f230b19d7a6f7d35ef28b35ef7c26..2bd84788ee112667ca9454c922ccff3618cbcb18 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A2)
-  ADD_TEST(TABLES_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A2)
+ELSE()
+  SET(TEST_NAMES A0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(TABLES_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(TABLES_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(TABLES_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 6a6349e801fdfc746f6105518053ae382eca9ee0..88ab5c74a6c6fa593f414b22b64fcfe2c8e446d7 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
-              F1 F2 F3 F4 F5 F6 F7 F8 F9)
-  ADD_TEST(VECTORS_${tfile} ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B2 B3 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 
+                 F1 F2 F3 F4 F5 F6 F7 F8 F9)
+ELSE()
+  SET(TEST_NAMES A0 B1 E0 F1)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(VECTORS_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(VECTORS_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(VECTORS_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 5f876a7ed1bdb4b532624e6df54732e91f4a3d90..ab1f0f9541968a0e3fb43c638d57e180a4d81db2 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH ( tfile A0 A1 A2 A3 A4 A5 A6 A7 A9 B1 C3 C4 C5 C6 C7 C8 C9
-                D0 D1 D3 D5 D6 D7 E0)
-  ADD_TEST(BUGS_${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py ${PARAVIS_TEST_OUTPUT_DIR})
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A9 B1 C3 C4 C5 C6 C7 C8 C9
+                 D0 D1 D3 D5 D6 D7 E0)
+ELSE()
+  SET(TEST_NAMES A0 B1 C3 D0 E0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(BUGS_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE} 
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(BUGS_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(BUGS_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 86b9c159fc81313538495291783cc3d2d7015bbd..c3e67f290ea79432c7d518030fe3b50a4211bf03 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B3 B4 B5)
-  ADD_TEST(DUMPSTUDY_${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py ${PARAVIS_TEST_OUTPUT_DIR})
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B3 B4 B5)
+ELSE()
+  SET(TEST_NAMES A0 B0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(DUMPSTUDY_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(DUMPSTUDY_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(DUMPSTUDY_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 995ad14a7f6cff58c94fee28e53fed24815aff62..83698f11b6631a71c0daef87ec679f281bd37dcb 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A1 A2 A3 A4 A6 A9 B1 B2)
-  ADD_TEST(IMPS_${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py ${PARAVIS_TEST_OUTPUT_DIR})
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A1 A2 A3 A4 A6 A9 B1 B2)
+ELSE()
+  SET(TEST_NAMES A1 B1)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(IMPS_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(IMPS_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(IMPS_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()
index 797cccc43f4086330970c4bb02ca8b4945b83bba..c6ee45380f0473026bb60426964301a8f2ba547b 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TIMEOUT 10000)
-FOREACH(tfile A1 A2 A4 A5 B0)
-  ADD_TEST(UNITED_${tfile} ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/test/VisuPrs/Util/paravistesthelper.py ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py ${PARAVIS_TEST_OUTPUT_DIR})
+IF(SALOME_PARAVIS_ALL_TEST)
+  SET(TEST_NAMES A1 A2 A4 A5 B0)
+ELSE()
+  SET(TEST_NAMES A2 B0)
+ENDIF()
+
+FOREACH(tfile ${TEST_NAMES})
+  ADD_TEST(UNITED_${tfile} ${PYTHON_EXECUTABLE} ${PARAVIS_TEST_HELPER_FILE}
+                    ${TIMEOUT} ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
   SET_TESTS_PROPERTIES(UNITED_${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
   SET_TESTS_PROPERTIES(UNITED_${tfile} PROPERTIES ENVIRONMENT "${tests_env}")
 ENDFOREACH()