Salome HOME
Merge from V6_5_BR 05/06/2012
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_ObjRefUlils.hxx
index 0b51dc4a892b25fa823b06f64a49c0e04cd56be4..2f13689c1da73f726b350658b136010df6eaadb8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
@@ -65,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
@@ -77,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 );
 
   /*!
    * \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 
@@ -107,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