Salome HOME
bos #20256 [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git] / src / SMESH_I / MG_ADAPT_i.hxx
index edc398d0792d39566f02264e02a212117905b41d..7b9f26572fc43e0ae7808f65f34a449cd99faa26 100644 (file)
@@ -1,25 +1,40 @@
+// Copyright (C) 2020-2021  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, or (at your option) any later version.
+//
+// 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 MG_ADAPT_I_HXX
 #define MG_ADAPT_I_HXX
 
-#include "MG_ADAPT.hxx"
 #include "SMESH.hxx"
+
 #include <SALOMEconfig.h>
-//~#include CORBA_SERVER_HEADER(ADAPT_Gen)
 #include CORBA_SERVER_HEADER(MG_ADAPT)
-
 #include "SALOME_GenericObj_i.hh"
-#include "SALOME_Component_i.hxx"
-#include "SALOME_NamingService.hxx"
-#include "Utils_CorbaException.hxx"
-#include <vector>
-#include <algorithm>
-#include <iterator>
+#include <SALOME_GenericObj_wrap.hxx>
+
 #include <string>
 
-//~struct MgAdaptHypothesisData;
-//~static void copyHypothesisDataToImpl(SMESH::MgAdaptHypothesisData& from, MG_ADAPT::MgAdaptHypothesisData* to);
-//~static void copyHypothesisDataFromImpl(MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData& to);
-//~class MgAdapt;
+namespace MG_ADAPT
+{
+  class MgAdaptHypothesisData;
+  class MgAdapt;
+}
+
 namespace SMESH
 {
 
@@ -28,12 +43,8 @@ class SMESH_I_EXPORT MG_ADAPT_i :
     public virtual POA_SMESH::MG_ADAPT
 {
 public:
-  //~MG_ADAPT_i( CORBA::ORB_ptr orb, ADAPT::ADAPT_Gen_var gen_i );
-  //~static SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
-  //~MG_ADAPT_i(PortableServer::POA_var poa);
   MG_ADAPT_i();
   virtual ~MG_ADAPT_i();
-  //~void setData( SMESH::MgAdaptHypothesisData* data);
   void setData( SMESH::MgAdaptHypothesisData& data);
 
   void setMedFileIn(const char* str);
@@ -121,21 +132,19 @@ public:
 
   bool hasOptionDefined( const char* optionName ) ;
   void setOptionValue(const char* optionName,
-                                          const char* optionValue) throw (std::invalid_argument);
+                      const char* optionValue);
   char* getOptionValue(const char* optionName,
-                      bool&              isDefault)  throw (std::invalid_argument);
-  str_array* getCustomOptionValuesStrVec() ;
-  str_array* getOptionValuesStrVec() ;
+                       bool&       isDefault);
+  SMESH::string_array* getCustomOptionValuesStrVec() ;
+  SMESH::string_array* getOptionValuesStrVec() ;
   void copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisData* from, SMESH::MgAdaptHypothesisData* to) const;
   void copyHypothesisDataToImpl(const SMESH::MgAdaptHypothesisData& from, ::MG_ADAPT::MgAdaptHypothesisData* to) const;
   //~TOptionValues        getOptionValues()       const;
   //~const TOptionValues& getCustomOptionValues() const ;
   char* getErrMsg();
 private:
-  ::MG_ADAPT::MgAdapt*          myMgAdapt;
-  std::string errStr;
-  //~CORBA::ORB_ptr         _orb;
-  //~ADAPT::ADAPT_Gen_var _gen_i;
+  ::MG_ADAPT::MgAdapt* myMgAdapt;
+  std::string          errStr;
 
 };
 
@@ -154,9 +163,10 @@ private:
 std::string medFileIn, medFileOut, medFileBackground;
 bool checkMeshFileIn();
 bool publish;
-SMESH::SMESH_Mesh_ptr myMesh;
-SMESH::MG_ADAPT_ptr hypothesis;
+SMESH::SMESH_Mesh_var myMesh;
+SALOME::GenericObj_wrap<SMESH::MG_ADAPT> hypothesis;
 };
 
 }
+
 #endif // MG_ADAPT_I_HXX