Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / MEDReader / plugin / MEDLoaderForPV / MEDUtilities.hxx
1 // Copyright (C) 2010-2022  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 // Author : Anthony Geay
20
21 #ifndef __MEDUTILITIES_HXX__
22 #define __MEDUTILITIES_HXX__
23
24 #include "MEDLoaderForPV.h"
25 #include "vtkCellType.h"
26
27 #include <vector>
28
29 class vtkInformationIntegerKey;
30
31 class MEDLOADERFORPV_EXPORT MEDUtilities
32 {
33 public:
34   static vtkInformationIntegerKey *ELGA();
35   static vtkInformationIntegerKey *ELNO();
36 };
37
38 class ExportedTinyInfo
39 {
40 public:
41   void pushGaussAdditionnalInfo(int ct, int dim, const std::vector<double>& refCoo, const std::vector<double>& posInRefCoo);
42   const std::vector<double>& getData() const { return _data; }
43   bool empty() const { return _data.empty(); }
44 private:
45   void prepareForAppend();
46 private:
47   // first place is nb of ct
48   // 2nd place is the size of first ct def (this 2nd place included)
49   // 3rd place is the VTK cell type of first ct def
50   // 4th place is the dimension of first ct def
51   // 5th->n th : ref Coo
52   // nth -> n+p th : posInRefCoo
53   // n+p+1 -> size of second ct def (this n+p+1 place included)
54   // n+p+2 -> VTK cell type of second ct def
55   // ...
56   std::vector<double> _data;
57 };
58
59 #endif