//=============================================================================
StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA,
- int theStudyId,
- ::SMESH_Gen* theGenImpl )
- : SALOME::GenericObj_i( thePOA ),
+ int theStudyId,
+ ::SMESH_Gen* theGenImpl )
+ : SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
MESSAGE( "StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i" );
StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i()
{
MESSAGE( "StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i" );
+ if ( !myHyp->_is_nil() )
+ myHyp->UnRegister();
}
//=============================================================================
/*!
* StdMeshers_LayerDistribution_i::SetLayerDistribution
*
-
+
*/
//=============================================================================
void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesis_ptr hyp1D)
- throw ( SALOME::SALOME_Exception )
+ throw ( SALOME::SALOME_Exception )
{
ASSERT( myBaseImpl );
try {
bool isNewHyp = ( hyp_i->GetImpl() != this->GetImpl()->GetLayerDistribution() );
this->GetImpl()->SetLayerDistribution( hyp_i->GetImpl() );
myHyp = SMESH::SMESH_Hypothesis::_duplicate( hyp1D );
+ myHyp->Register();
// Remove SO of 1D hypothesis if it was published
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen())
{
//================================================================================
/*!
* \brief Verify whether hypothesis supports given entity type
- * \param type - dimension (see SMESH::Dimension enumeration)
- * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * \param type - dimension (see SMESH::Dimension enumeration)
+ * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
*
* Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
*/
//================================================================================
+
CORBA::Boolean StdMeshers_LayerDistribution_i::IsDimSupported( SMESH::Dimension type )
{
return type == SMESH::DIM_3D;
//================================================================================
/*!
* \brief Write parameters in a string
- * \retval char* - resulting string
+ * \retval char* - resulting string
*/
//================================================================================
//================================================================================
/*!
* \brief Retrieve parameters from the string
- * \param theStream - the input string
+ * \param theStream - the input string
*/
//================================================================================