X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FENGINE%2FPARAVIS_Engine_i.cc;h=6eee540aa5da23006f6bb58ab8329379da95d5fa;hb=09c34352cd5ad238ba0f7c1296357d7889c4c47d;hp=3b050c310b7cbb69a93c0755b8ce1d3f41d3e9a0;hpb=45730a713833b123768d9e895d06ffd86bca71d0;p=modules%2Fparavis.git diff --git a/src/ENGINE/PARAVIS_Engine_i.cc b/src/ENGINE/PARAVIS_Engine_i.cc index 3b050c31..6eee540a 100644 --- a/src/ENGINE/PARAVIS_Engine_i.cc +++ b/src/ENGINE/PARAVIS_Engine_i.cc @@ -1,24 +1,22 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2014 CEA/DEN, EDF R&D // -// 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, or (at your option) any later version. // -// 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 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 // + #include "PARAVIS_Engine_i.hh" #include "utilities.h" @@ -85,9 +83,9 @@ namespace PARAVIS { _thisObj = this ; _id = _poa->activate_object(_thisObj); #ifndef WIN32 - Engines::Component_var aComponent = session->GetComponent("libPARAVIS.so"); + Engines::EngineComponent_var aComponent = session->GetComponent("libPARAVIS.so"); #else - Engines::Component_var aComponent = session->GetComponent("PARAVIS.dll"); + Engines::EngineComponent_var aComponent = session->GetComponent("PARAVIS.dll"); #endif if (CORBA::is_nil(aComponent)) { MESSAGE("Component PARAVIS is null"); @@ -172,6 +170,15 @@ namespace PARAVIS { myParaVisGen->ImportFile(theFileName); } + void PARAVIS_Gen_i::ExecuteScript(const char* script) + { + if (CORBA::is_nil(myParaVisGen)) { + MESSAGE("PARAVIS_Gen_i is null"); + return; + } + myParaVisGen->ExecuteScript(script); + } + //=========================================================================== char* PARAVIS_Gen_i::GetTrace() { @@ -250,6 +257,7 @@ namespace PARAVIS { return myParaVisGen->PasteInto(theStream,theObjectID,theObject); } +#ifdef PARAVIS_WITH_FULL_CORBA //=========================================================================== PARAVIS::string_array* PARAVIS_Gen_i::GetClassesList() { @@ -261,6 +269,7 @@ namespace PARAVIS { { return myParaVisGen->CreateClass(theClassName); } +#endif //=========================================================================== void PARAVIS_Gen_i::GetConnectionParameters(CORBA::Long& theId, @@ -276,4 +285,19 @@ namespace PARAVIS { { myParaVisGen->ActivateModule(); } + + //=========================================================================== + void PARAVIS_Gen_i::SetCurrentStudy(SALOMEDS::Study_ptr theStudy){ + myParaVisGen->SetCurrentStudy(theStudy); + } + + + //=========================================================================== + SALOMEDS::Study_ptr PARAVIS_Gen_i::GetCurrentStudy(){ + return myParaVisGen->GetCurrentStudy(); + } + char* PARAVIS_Gen_i::getVersion() + { + return myParaVisGen->getVersion(); + } }