Salome HOME
Copyright update 2022
[modules/homard.git] / src / HOMARD_I / HOMARD_Cas_i.hxx
1 // Copyright (C) 2011-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
20 // Remarques :
21 // L'ordre de description des fonctions est le meme dans tous les fichiers
22 // HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
23 // 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
24 // 2. Les caracteristiques
25 // 3. Le lien avec les autres structures
26 //
27 // Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
28 //
29
30 #ifndef _HOMARD_CAS_I_HXX_
31 #define _HOMARD_CAS_I_HXX_
32
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(HOMARD_Gen)
35 #include CORBA_SERVER_HEADER(HOMARD_Cas)
36
37 #include "HOMARD_i.hxx"
38 #include "SALOME_Component_i.hxx"
39 #include "SALOME_NamingService.hxx"
40 #include "Utils_CorbaException.hxx"
41
42 #include <string>
43
44 class HOMARD_Cas;
45
46 class HOMARDENGINE_EXPORT HOMARD_Cas_i:
47   public virtual Engines_Component_i,
48   public virtual POA_HOMARD::HOMARD_Cas,
49   public virtual PortableServer::ServantBase
50 {
51 public:
52   HOMARD_Cas_i( CORBA::ORB_ptr orb, HOMARD::HOMARD_Gen_var gen_i );
53   HOMARD_Cas_i();
54
55   virtual ~HOMARD_Cas_i();
56
57 // Generalites
58   void                   SetName( const char* Name );
59   char*                  GetName();
60
61   CORBA::Long            Delete( CORBA::Long Option );
62
63   char*                  GetDumpPython();
64
65   std::string            Dump() const;
66   bool                   Restore( const std::string& stream );
67
68 // Caracteristiques
69   void                   SetDirName( const char* NomDir );
70   char*                  GetDirName();
71
72   CORBA::Long            GetState();
73
74   CORBA::Long            GetNumberofIter();
75
76   void                   SetConfType( CORBA::Long ConfType );
77   CORBA::Long            GetConfType();
78
79   void                   SetExtType( CORBA::Long ExtType );
80   CORBA::Long            GetExtType();
81
82   void                   SetBoundingBox( const HOMARD::extrema& LesExtremes );
83   HOMARD::extrema*       GetBoundingBox();
84
85   void                   AddGroup( const char* Group);
86   void                   SetGroups(const HOMARD::ListGroupType& ListGroup);
87   HOMARD::ListGroupType* GetGroups();
88
89   void                   AddBoundary(const char* Boundary);
90   void                   AddBoundaryGroup(const char* Boundary, const char* Group);
91   HOMARD::ListBoundaryGroupType*  GetBoundaryGroup();
92   void                   SupprBoundaryGroup( );
93
94   void                   SetPyram( CORBA::Long Pyram );
95   CORBA::Long            GetPyram();
96
97   void                   MeshInfo(CORBA::Long Qual, CORBA::Long Diam, CORBA::Long Conn, CORBA::Long Tail, CORBA::Long Inte);
98
99 // Liens avec les autres structures
100   char*                  GetIter0Name();
101   HOMARD::HOMARD_Iteration_ptr GetIter0() ;
102
103   HOMARD::HOMARD_Iteration_ptr  NextIteration( const char* Name ) ;
104
105   HOMARD::HOMARD_Iteration_ptr  LastIteration() ;
106
107   void                   AddIteration( const char* NomIteration );
108
109 // YACS
110   HOMARD::HOMARD_YACS_ptr CreateYACSSchema( const char* YACSName, const char* ScriptFile, const char* DirName, const char* MeshFile );
111
112 private:
113   ::HOMARD_Cas*          myHomardCas;
114
115   CORBA::ORB_ptr         _orb;
116   HOMARD::HOMARD_Gen_var _gen_i;
117 };
118
119 #endif