Salome HOME
Fix for the "0021861: EDF 2226 : Documentation of numeric functor option in split...
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_ObjRefUlils.cxx
index 3667a852a122cfe8a8be3450bf6f888453be625f..910d0aaa870d886314d0a6cd276ee3d0405a7ff7 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
 
 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