Salome HOME
0021530: EDF 2176 SMESH: Projection 1D-2D with compounds
authoreap <eap@opencascade.com>
Wed, 11 Apr 2012 13:08:52 +0000 (13:08 +0000)
committereap <eap@opencascade.com>
Wed, 11 Apr 2012 13:08:52 +0000 (13:08 +0000)
+  static std::string GeomObjectToEntry(GEOM::GEOM_Object_ptr&  theGeomObject);

src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx
src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx

index 3667a852a122cfe8a8be3450bf6f888453be625f..bca540fc8627d1dec07f891b335f641c33a61269 100644 (file)
 
 using namespace std;
 
+//=======================================================================
+//function : GeomObjectToEntry
+//purpose  : Return study entry of GEOM Object
+//=======================================================================
+
+std::string StdMeshers_ObjRefUlils::GeomObjectToEntry(GEOM::GEOM_Object_ptr&  theGeomObject)
+{
+  if ( CORBA::is_nil( theGeomObject ))
+    return "NULL_OBJECT";
+
+  CORBA::String_var entry = theGeomObject->GetStudyEntry();
+  return entry.in();
+}
+
 //=======================================================================
 //function : EntryOrShapeToGeomObject
 //purpose  :  Return GEOM Object by its sytudy entry or TopoDS_Shape
index 8ab879d60b6db7628543c67cb68654642a97651d..913224364ce778e2cc842902006bbb5caf698858 100644 (file)
@@ -66,11 +66,17 @@ public:
   }
 
   /*!
-   * \brief Return GEOM Object by its sytudy entry or 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