Salome HOME
Update copyrights
[modules/paravis.git] / src / Insitu / VisualizationComponent / VisualizationComponent.hxx
1 // Copyright (C) 2016-2019  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 #ifndef _VisualizationComponent_HXX_
21 #define _VisualizationComponent_HXX_
22
23 #include <SALOME_Component.hh>
24 #include "Superv_Component_i.hxx"
25 #include "PARAVIS.hh"
26 #include "MPIObject_i.hxx"
27
28 //COMPODEFS
29
30
31 void * th_Visualize(void * s);
32 typedef struct {
33   int ip; // mpi process id
34   Engines::IORTab* tior;
35   SALOME_MED::ParaMEDCouplingFieldDoubleCorbaInterface_ptr field;
36 const char* path_python_file;
37 } thread_Visualize_struct;
38
39
40 //ENDDEF
41
42 class VisualizationComponent_i: public virtual POA_PARAVIS_ORB::VisualizationComponent,
43                       
44                       public virtual MPIObject_i,
45                       public virtual Engines_Component_i
46 {
47   public:
48     VisualizationComponent_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa,
49               PortableServer::ObjectId * contId,
50               const char *instanceName, const char *interfaceName,
51               bool regist = true);
52     VisualizationComponent_i(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa,
53               Engines::Container_ptr container,
54               const char *instanceName, const char *interfaceName,
55               bool regist = true);
56     virtual ~VisualizationComponent_i();
57     void Visualize(SALOME_MED::ParaMEDCouplingFieldDoubleCorbaInterface_ptr field,const char* path_python_file);
58 };
59
60 extern "C"
61 {
62     PortableServer::ObjectId * VisualizationComponentEngine_factory( CORBA::ORB_ptr orb,
63                                                       PortableServer::POA_ptr poa,
64                                                       PortableServer::ObjectId * contId,
65                                                       const char *instanceName,
66                                                       const char *interfaceName);
67 }
68 #endif
69