X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MEDMesh_i.cxx;h=9ee46fda3c0c8b9b17b6e94f1e037aaed5c7c42c;hb=a4e0e20f3c55871a70a54e708ed1c42f3d208375;hp=bbf9590069631a612e308244c12bfd7fcd7b9668;hpb=4ff5bd61540272713e48de1eee75625028c32155;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MEDMesh_i.cxx b/src/SMESH_I/SMESH_MEDMesh_i.cxx index bbf959006..9ee46fda3 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.cxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.cxx @@ -1,29 +1,28 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// Copyright (C) 2007-2008 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 +// +// 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. // -// Copyright (C) 2003 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 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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 // +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // File : SMESH_MEDMesh_i.cxx // Module : SMESH - +// #include "SMESH_MEDMesh_i.hxx" #include "SMESH_Mesh_i.hxx" @@ -728,6 +727,22 @@ SMESH_MEDMesh_i::getBoundaryElements(SALOME_MED::medEntityMesh entity) return NULL; } //============================================================================= +/*! + * CORBA: Method return a reference on a support define on all the element of + * an entity. + */ +//============================================================================= +SALOME_MED::SUPPORT_ptr +SMESH_MEDMesh_i::getSupportOnAll(SALOME_MED::medEntityMesh entity) + throw (SALOME::SALOME_Exception) +{ + MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!"); + + THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM); + + return NULL; +} +//============================================================================= /*! * CORBA: Returns references for the support of the skin of the support * mySupport3D @@ -863,8 +878,8 @@ void SMESH_MEDMesh_i::addInStudy(SALOMEDS::Study_ptr myStudy, * ORB_INIT &init = *SINGLETON_::Instance() ; * ASSERT(SINGLETON_::IsAlreadyExisting()) ; * CORBA::ORB_var &orb = init(0,0); - * string iorStr = orb->object_to_string(myIor); - * //myBuilder->AddAttribute(newObj,SALOMEDS::IOR,iorStr.c_str()); + * CORBA::String_var iorStr = orb->object_to_string(myIor); + * //myBuilder->AddAttribute(newObj,SALOMEDS::IOR,iorStr.in()); * SALOMEDS::AttributeIOR_var aIOR = SALOMEDS::AttributeIOR::_narrow( * myBuilder->FindOrCreateAttribute(newObj, "AttributeIOR")); * aIOR->SetValue(iorStr.c_str()); @@ -1081,7 +1096,7 @@ void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception) int nb_of_nodes = elem->NbNodes(); medElement = SALOME_MED::MED_HEXA8; - ASSERT(nb_of_nodes = 8); + ASSERT(nb_of_nodes == 8); if (trouveHexa8 == 0) { @@ -1137,9 +1152,15 @@ void SMESH_MEDMesh_i::createFamilies() throw(SALOME::SALOME_Exception) SMESH_MEDFamily_i *famservant = new SMESH_MEDFamily_i(famIdent, submesh_i, famName, famDes, SALOME_MED::MED_NODE); - SALOME_MED::FAMILY_ptr famille = - SALOME_MED::FAMILY::_narrow(famservant-> - POA_SALOME_MED::FAMILY::_this()); +#ifdef WNT + SALOME_MED::FAMILY_ptr famille = SALOME_MED::FAMILY::_nil(); + POA_SALOME_MED::FAMILY* servantbase = dynamic_cast(famservant); + if ( servantbase ) + famille = SALOME_MED::FAMILY::_narrow( servantbase->_this() ); +#else + SALOME_MED::FAMILY_ptr famille = + SALOME_MED::FAMILY::_narrow( famservant->POA_SALOME_MED::FAMILY::_this() ); +#endif _families.push_back(famille); } }