operator<<(CORBA::Object_ptr theArg)
{
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::Study_ptr aStudy = aSMESHGen->GetCurrentStudy();
+ SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
SALOMEDS::SObject_var aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg);
if(!aSObject->_is_nil()) {
- myStream << aSObject->GetID();
+ CORBA::String_var id = aSObject->GetID();
+ myStream << id;
} else if ( !CORBA::is_nil(theArg)) {
if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object
myStream << "smeshObj_" << size_t(theArg);
GEOM_Client* aClient = GetShapeReader();
TCollection_AsciiString IOR;
if ( aClient && aClient->Find( theShape, IOR ))
- aShapeObj = GEOM::GEOM_Object::_narrow
- ( GetORB()->string_to_object( IOR.ToCString() ) );
+ {
+ CORBA::Object_var obj = GetORB()->string_to_object( IOR.ToCString() );
+ aShapeObj = GEOM::GEOM_Object::_narrow ( obj );
+ }
}
return aShapeObj._retn();
}
}
if ( thePixMap ) {
anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributePixMap" );
- SALOMEDS::AttributePixMap::_narrow( anAttr )->SetPixMap( thePixMap );
+ SALOMEDS::AttributePixMap_var pm = SALOMEDS::AttributePixMap::_narrow( anAttr );
+ pm->SetPixMap( thePixMap );
}
if ( !theSelectable ) {
anAttr = aStudyBuilder->FindOrCreateAttribute( SO, "AttributeSelectable" );
// Publish global hypotheses
- SMESH::ListOfHypothesis * hypList = theMesh->GetHypothesisList( aShapeObject );
- if ( hypList )
- for ( int i = 0; i < hypList->length(); i++ ) {
- SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( (*hypList)[ i ]);
- PublishHypothesis( theStudy, aHyp );
- AddHypothesisToShape( theStudy, theMesh, aShapeObject, aHyp );
- }
+ SMESH::ListOfHypothesis_var hypList = theMesh->GetHypothesisList( aShapeObject );
+ for ( int i = 0; i < hypList->length(); i++ ) {
+ SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]);
+ PublishHypothesis( theStudy, aHyp );
+ AddHypothesisToShape( theStudy, theMesh, aShapeObject, aHyp );
+ }
}
// Publish submeshes