HOMARD_Iteration_i.hxx
HOMARD_Zone_i.hxx
HOMARD_Gen_i.hxx
+ HOMARD_Gen_i_Session.hxx
+ HOMARD_Gen_i_No_Session.hxx
HOMARD_Boundary_i.hxx
HOMARD_YACS_i.hxx
HomardMedCommun.h
HOMARD_Hypothesis_i.cxx
HOMARD_Iteration_i.cxx
HOMARD_Gen_i.cxx
+ HOMARD_Gen_i_Session.cxx
+ HOMARD_Gen_i_No_Session.cxx
HOMARD_Zone_i.cxx
HOMARD_Boundary_i.cxx
HOMARD_YACS_i.cxx
_thisObj = this;
_id = _poa->activate_object(_thisObj);
- myHomard = new ::HOMARD_Gen();
+ myHomard = new ::HOMARD_Gen;
_NS = SINGLETON_<SALOME_NamingService>::Instance();
ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
_NS->init_orb(_orb);
- myStudy = SALOMEDS::Study::_duplicate( SMESH_Gen_i::GetSMESHGen()->getStudyServant() );
-
_tag_gene = 0 ;
_tag_boun = 0 ;
_tag_hypo = 0 ;
// HOMARD data file name
std::string aFileName = "";
if (isMultiFile)
- aFileName = SALOMEDS_Tool::GetNameFromPath(Kernel_Utils::encode(SMESH_Gen_i::GetSMESHGen()->getStudyServant()->URL()));
+ aFileName = SALOMEDS_Tool::GetNameFromPath(Kernel_Utils::encode(myStudy->URL()));
aFileName += "_HOMARD.dat";
// initialize sequence of file names
// HOMARD data file name
std::string aFileName = "";
if (isMultiFile)
- aFileName = SALOMEDS_Tool::GetNameFromPath(Kernel_Utils::encode(SMESH_Gen_i::GetSMESHGen()->getStudyServant()->URL()));
+ aFileName = SALOMEDS_Tool::GetNameFromPath(Kernel_Utils::encode(myStudy->URL()));
aFileName = tmpDir + aFileName + "_HOMARD.dat";
StudyContext& context = myStudyContext;
MESSAGE ("Entree dans DumpPython");
isValidScript=1;
- SALOMEDS::SObject_var aSO = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->FindComponent("HOMARD");
+ SALOMEDS::SObject_var aSO = myStudy->FindComponent("HOMARD");
if(CORBA::is_nil(aSO))
return new Engines::TMPFile(0);
void HOMARD_Gen_i::IsValidStudy( )
{
// MESSAGE( "IsValidStudy" );
- if (CORBA::is_nil(SMESH_Gen_i::GetSMESHGen()->getStudyServant()))
+ if (CORBA::is_nil(myStudy))
{
SALOME::ExceptionStruct es;
es.type = SALOME::BAD_PARAM;
return _YACSTypeTest ;
}
-//=============================================================================
-extern "C"
-{
- HOMARDENGINE_EXPORT
- PortableServer::ObjectId* HOMARDEngine_factory(CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId* contId,
- const char* instanceName,
- const char* interfaceName)
- {
- MESSAGE("PortableServer::ObjectId* HOMARDEngine_factory()");
- HOMARD_Gen_i* myHOMARD_Gen = new HOMARD_Gen_i(orb, poa, contId, instanceName, interfaceName);
- return myHOMARD_Gen->getId();
- }
-}
#include <string>
#include <map>
-class HOMARDENGINE_EXPORT HOMARD_Gen_i:
- public virtual Engines_Component_i,
- public virtual POA_HOMARD::HOMARD_Gen
+class HOMARDENGINE_EXPORT HOMARD_Gen_i : public Engines_Component_i, public POA_HOMARD::HOMARD_Gen
{
public:
HOMARD_Gen_i( CORBA::ORB_ptr orb,
};
::HOMARD_Gen* myHomard;
- SALOMEDS::Study_var myStudy;
StudyContext myStudyContext;
SALOME_NamingService* _NS;
int _YACSMaxNode ;
int _YACSMaxElem ;
int _YACSTypeTest ;
- ;
-
+protected:
+ SALOMEDS::Study_var myStudy;
};
#endif
--- /dev/null
+// Copyright (C) 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
+//
+
+#include "HOMARD_Gen_i_No_Session.hxx"
+#include "SALOMEDS_Study_i.hxx"
+
+HOMARD_Gen_i_No_Session::HOMARD_Gen_i_No_Session( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, const char* instanceName, const char* interfaceName ):HOMARD_Gen_i(orb,poa,contId,instanceName,interfaceName)
+{
+ myStudy = KERNEL::getStudyServantSA();
+}
--- /dev/null
+// Copyright (C) 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
+//
+
+#pragma once
+
+#include "HOMARD_Gen_i.hxx"
+
+class HOMARDENGINE_EXPORT HOMARD_Gen_i_No_Session : public HOMARD_Gen_i
+{
+public:
+ HOMARD_Gen_i_No_Session( CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ PortableServer::ObjectId* contId,
+ const char* instanceName,
+ const char* interfaceName );
+};
--- /dev/null
+// Copyright (C) 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
+//
+
+#include "HOMARD_Gen_i_Session.hxx"
+#include "SALOMEDS_Study_i.hxx"
+#include "SALOME_KernelServices.hxx"
+
+HOMARD_Gen_i_Session::HOMARD_Gen_i_Session( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, const char* instanceName, const char* interfaceName ):HOMARD_Gen_i(orb,poa,contId,instanceName,interfaceName)
+{
+ myStudy = SALOMEDS::Study::_duplicate(KERNEL::getStudyServant());
+}
+
+//=============================================================================
+extern "C"
+{
+ HOMARDENGINE_EXPORT
+ PortableServer::ObjectId* HOMARDEngine_factory(CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ PortableServer::ObjectId* contId,
+ const char* instanceName,
+ const char* interfaceName)
+ {
+ MESSAGE("PortableServer::ObjectId* HOMARDEngine_factory()");
+ HOMARD_Gen_i_Session* myHOMARD_Gen = new HOMARD_Gen_i_Session(orb, poa, contId, instanceName, interfaceName);
+ return myHOMARD_Gen->getId();
+ }
+}
--- /dev/null
+// Copyright (C) 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
+//
+
+#pragma once
+
+#include "HOMARD_Gen_i.hxx"
+
+class HOMARDENGINE_EXPORT HOMARD_Gen_i_Session : public HOMARD_Gen_i
+{
+public:
+ HOMARD_Gen_i_Session( CORBA::ORB_ptr orb,
+ PortableServer::POA_ptr poa,
+ PortableServer::ObjectId* contId,
+ const char* instanceName,
+ const char* interfaceName );
+};