Salome HOME
a87e344080f005b566a1e533b681d7ea79a94df7
[modules/paravis.git] / src / Plugins / ParaMEDCorba / plugin / ParaMEDCorbaModule / vtkParaMEDCorbaSource.h
1 // Copyright (C) 2010-2021  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20
21 #ifndef __vtkParaMEDCorbaSource_h
22 #define __vtkParaMEDCorbaSource_h
23
24 #include "ParaMEDMEM2VTK_defines.hxx"
25 #include "vtkUnstructuredGridAlgorithm.h"
26 #include <vector>
27
28 class vtkDoubleArray;
29 class vtkUnstructuredGrid;
30
31 namespace ParaMEDMEM2VTK
32 {
33   class MEDCouplingMultiFieldsFetcher;
34 }
35
36 class vtkParaMEDCorbaSource : public vtkAlgorithm //
37 {
38 public:
39   vtkTypeMacro(vtkParaMEDCorbaSource, vtkAlgorithm)
40   ParaMEDMEM2VTK_EXPORT static vtkParaMEDCorbaSource* New();
41   virtual void PrintSelf( ostream& os, vtkIndent indent );
42   const char *GetIORCorba();
43   void SetIORCorba(char *ior);
44   void SetBufferingPolicy(int pol);
45   int GetBufferingPolicy();
46 protected:
47   vtkParaMEDCorbaSource();
48   virtual ~vtkParaMEDCorbaSource();
49   int FillOutputPortInformation(int vtkNotUsed(port), vtkInformation* info);
50   int ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector);
51   //virtual int RequestUpdateExtent( vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo );
52   virtual int RequestInformation( vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo );
53   virtual int RequestData( vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo );
54   //BTX
55   int TotalNumberOfPieces;
56   int NumberOfPieces;
57   int UpdatePiece;
58   int GhostLevel;
59   int StartPiece;
60   int EndPiece;
61   int BufferingPolicy;
62   vtkUnstructuredGrid *MyDataSet;
63   std::vector<char> IOR;
64   ParaMEDMEM2VTK::MEDCouplingMultiFieldsFetcher *mfieldsFetcher;
65   //not clean but to avoid to include CORBA.h in this *.h
66   static void *Orb;
67   //ETX
68 private:
69   /*void traduceMedMeshToUnstructuredDataset(vtkUnstructuredGrid *ret, int nbOfCells, int nbOfNodes, 
70             int nbOfTypes, const int *types, const int *nbOfEltsPerTypes, const int *nodalConnectivity,
71             const double *coords, int spaceDim);
72   vtkDoubleArray *buildDataArrayFromMedCoords(const double *coords, int nbOfNodes, int spaceDim);
73   void reorganizeCellConnectivity(int vtkType, int nbOfNodes, const int *medConn, int *vtkConn);
74   int transformMedGeomEltType2VtkType(int typeMed, int *nbOfNodesPerCell);*/
75   //
76   vtkParaMEDCorbaSource( const vtkParaMEDCorbaSource& ); // Not implemented.
77   void operator = ( const vtkParaMEDCorbaSource& ); // Not implemented.
78 };
79
80 #endif // __vtkParaMEDCorbaSource_h
81