X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_ObjRefUlils.hxx;h=ed0ce004c1b7849a666cb3ba819981d1a161e53d;hb=25b7d7ffe76e153c93cb67055192b11b16c3d0e2;hp=994f39594cf867f6fb420eab33fb05bca0c58c39;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index 994f39594..ed0ce004c 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -1,32 +1,30 @@ -// SMESH SMESH : implementaion of SMESH idl descriptions +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // -// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com +// 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 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 : implementaion of SMESH idl descriptions // File : StdMeshers_ObjRefUlils.hxx // Created : Wed Oct 18 15:15:27 2006 // Author : Edward AGAPOV (eap) -// Copyright : Open CASCADE - - +// #ifndef StdMeshers_ObjRefUlils_HeaderFile #define StdMeshers_ObjRefUlils_HeaderFile @@ -67,6 +65,18 @@ public: return TopoDS_Shape(); } + /*! + * \brief Return study entry of GEOM Object + */ + static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr theGeomObject); + + /*! + * \brief Return GEOM Object by its study entry or TopoDS_Shape + */ + static GEOM::GEOM_Object_ptr EntryOrShapeToGeomObject (const std::string& theEntry, + const TopoDS_Shape& theShape); + + /*! * \brief Store the shape in the stream * \param theShape - shape to store @@ -79,14 +89,14 @@ public: * \param stream - the stream * \retval TopoDS_Shape - resulting shape */ - static TopoDS_Shape LoadFromStream( std::istream & stream); + static TopoDS_Shape LoadFromStream( std::istream & stream, std::string* entry=NULL ); /*! * \brief Store the CORBA object in the stream * \param obj - object to store * \param stream - the stream */ - static void SaveToStream( CORBA::Object_ptr obj, std::ostream & stream); + static void SaveToStream( CORBA::Object_ptr obj, std::ostream & stream ); /*! * \brief Retrieve a CORBA object from the stream @@ -109,6 +119,14 @@ public: } return TInterface::_nil(); } + + /*! + * \brief Store the study entry of object in the stream + * \param studyEntry - the study entry + * \param stream - the stream + */ + static void SaveToStream( const std::string& studyEntry, std::ostream & stream); + }; #endif