28 #ifndef StdMeshers_ObjRefUlils_HeaderFile
29 #define StdMeshers_ObjRefUlils_HeaderFile
51 return gen->ShapeToGeomObject( theShape );
53 return GEOM::GEOM_Object::_nil();
63 return gen->GeomObjectToShape( theGeomObject );
65 return TopoDS_Shape();
77 const TopoDS_Shape& theShape);
85 static void SaveToStream(
const TopoDS_Shape& theShape, std::ostream & stream);
92 static TopoDS_Shape
LoadFromStream( std::istream & stream, std::string* entry=NULL );
99 static void SaveToStream( CORBA::Object_ptr obj, std::ostream & stream );
106 template<
class TInterface>
113 if (
StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) {
114 std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() ));
116 return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() ));
120 return TInterface::_nil();
128 static void SaveToStream(
const std::string& studyEntry, std::ostream & stream);