X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSALOMEDS%2FSALOMEDS_StudyManager.cxx;h=3ffa83174d3350ddf8e389b3ce6eb8e657b330cd;hb=d4617a5edb41e7acd4025a2b56160ae267ede7f6;hp=76ab7d25306f77b5795239970c2e350dd2e0f26d;hpb=7d2fe213bdf5bf962ce11e253020c9d3e0bc1cce;p=modules%2Fyacs.git diff --git a/src/SALOMEDS/SALOMEDS_StudyManager.cxx b/src/SALOMEDS/SALOMEDS_StudyManager.cxx index 76ab7d253..3ffa83174 100644 --- a/src/SALOMEDS/SALOMEDS_StudyManager.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyManager.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// 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. +// 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. +// 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 +// 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File : SALOMEDSClient_StudyManager.cxx // Author : Sergey RUIN // Module : SALOME @@ -28,8 +29,8 @@ #include "SALOMEDS.hxx" #include "SALOMEDS_Study.hxx" #include "SALOMEDS_SObject.hxx" - #include "SALOMEDS_Driver_i.hxx" +#include "SALOMEDS_SimanStudy.hxx" #include "SALOMEDSImpl_Study.hxx" @@ -45,8 +46,6 @@ #include #endif -using namespace std; - SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb); SALOMEDS_StudyManager::SALOMEDS_StudyManager(SALOMEDS::StudyManager_ptr theManager) @@ -169,7 +168,7 @@ std::vector SALOMEDS_StudyManager::GetOpenStudies() if (_isLocal) { SALOMEDS::Locker lock; - vector aSeq = _local_impl->GetOpenStudies(); + std::vector aSeq = _local_impl->GetOpenStudies(); aLength = aSeq.size(); for(i = 0; i < aLength; i++) aVector.push_back(aSeq[i]->Name()); @@ -315,13 +314,34 @@ SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_p SALOMEDSImpl_SComponent aSCO = theObject.GetFatherComponent(); if(!aSCO.IsNull()) { - string IOREngine = aSCO.GetIOR(); + std::string IOREngine = aSCO.GetIOR(); if(!IOREngine.empty()) { CORBA::Object_var obj = orb->string_to_object(IOREngine.c_str()); - SALOMEDS::Driver_var Engine = SALOMEDS::Driver::_narrow(obj) ; + Engines::EngineComponent_var Engine = Engines::EngineComponent::_narrow(obj) ; driver = new SALOMEDS_Driver_i(Engine, orb); } } return driver; } + +_PTR(SimanStudy) SALOMEDS_StudyManager::GetSimanStudy() +{ + SALOMEDSClient_SimanStudy* aSiman = NULL; + /*if (_isLocal) { + SALOMEDS::Locker lock; + + SALOMEDSImpl_SimanStudy* aSiman_impl = _local_impl->GetSimanStudy(); + if(!aSiman_impl) return _PTR(SimanStudy)(aSiman); + aSiman = new SALOMEDS_SimanStudy(aSiman_impl); + } + else { + SALOMEDS::SimanStudy_var aSiman_impl = _corba_impl->GetSimanStudy(); + if(CORBA::is_nil(aSiman_impl)) return _PTR(SimanStudy)(aSiman); + aSiman = new SALOMEDS_SimanStudy(aSiman_impl); + }*/ + SALOMEDS::SimanStudy_var aSiman_impl = _corba_impl->GetSimanStudy(); + if(CORBA::is_nil(aSiman_impl)) return _PTR(SimanStudy)(aSiman); + aSiman = new SALOMEDS_SimanStudy(aSiman_impl); + return _PTR(SimanStudy)(aSiman); +}