_isAutoColor = false;
_isModified = false;
_shapeDiagonal = 0.0;
- _rmGroupCallUp = 0;
+ _callUp = 0;
_myMeshDS->ShapeToMesh( PseudoShape() );
}
_isAutoColor( false ),
_isModified( false ),
_shapeDiagonal( 0.0 ),
- _rmGroupCallUp( 0 )
+ _callUp( 0 )
{
}
}
_mapSubMesh.clear();
- if ( _rmGroupCallUp) delete _rmGroupCallUp;
- _rmGroupCallUp = 0;
+ if ( _callUp) delete _callUp;
+ _callUp = 0;
// remove self from studyContext
if ( _gen )
return _shapeDiagonal;
}
+//================================================================================
+/*!
+ * \brief Load mesh from study file
+ */
+//================================================================================
+
+void SMESH_Mesh::Load()
+{
+ if (_callUp)
+ _callUp->Load();
+}
+
//=======================================================================
/*!
* \brief Remove all nodes and elements
if ( !GetMeshDS()->IsUsedHypothesis( hyp ))
return;
+ if (_callUp)
+ _callUp->HypothesisModified();
+
const SMESH_Algo *foundAlgo = 0;
SMESH_HypoFilter algoKind, compatibleHypoKind;
list <const SMESHDS_Hypothesis * > usedHyps;
//================================================================================
/*!
- * \brief Set a caller of RemoveGroup() at level of CORBA API implementation.
+ * \brief Set a caller of methods at level of CORBA API implementation.
* The set upCaller will be deleted by SMESH_Mesh
*/
//================================================================================
-void SMESH_Mesh::SetRemoveGroupCallUp( TRmGroupCallUp* upCaller )
+void SMESH_Mesh::SetCallUp( TCallUp* upCaller )
{
- if ( _rmGroupCallUp ) delete _rmGroupCallUp;
- _rmGroupCallUp = upCaller;
+ if ( _callUp ) delete _callUp;
+ _callUp = upCaller;
}
//=============================================================================
GetMeshDS()->RemoveGroup( _mapGroup[theGroupID]->GetGroupDS() );
delete _mapGroup[theGroupID];
_mapGroup.erase (theGroupID);
- if (_rmGroupCallUp)
- _rmGroupCallUp->RemoveGroup( theGroupID );
+ if (_callUp)
+ _callUp->RemoveGroup( theGroupID );
return true;
}
*/
static const TopoDS_Solid& PseudoShape();
+ /*!
+ * \brief Load mesh from study file
+ */
+ void Load();
/*!
* \brief Remove all nodes and elements
*/
void Clear();
-
/*!
* \brief Remove all nodes and elements of indicated shape
*/
SMESH_Group* ConvertToStandalone ( int theGroupID );
- struct TRmGroupCallUp
+ struct TCallUp // callback from SMESH to SMESH_I level
{
virtual void RemoveGroup (const int theGroupID)=0;
- virtual ~TRmGroupCallUp() {}
+ virtual void HypothesisModified ()=0;
+ virtual void Load ()=0;
+ virtual ~TCallUp() {}
};
- void SetRemoveGroupCallUp( TRmGroupCallUp * upCaller );
+ void SetCallUp( TCallUp * upCaller );
bool SynchronizeGroups();
TListOfListOfInt _mySubMeshOrder;
- // Struct calling RemoveGroup at CORBA API implementation level, used
- // to make an upper level be consistent with a lower one when group removal
- // is invoked by hyp modification
- TRmGroupCallUp* _rmGroupCallUp;
+ // Struct calling methods at CORBA API implementation level, used to
+ // 1) make an upper level be consistent with a lower one when group removal
+ // is invoked by hyp modification (issue 0020918)
+ // 2) to forget not loaded mesh data at hyp modification
+ TCallUp* _callUp;
protected:
SMESH_Mesh();