From c0562941eac9e5a0a8b36d731f3348fe09bf32d0 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 12 Oct 2005 11:17:21 +0000 Subject: [PATCH] Adjust to CVS HEAD modifications --- src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx | 56 +++++++++++++++------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 2fc8b188b..f02301b69 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -113,6 +113,7 @@ DriverMED_R_SMESHDS_Mesh if(MYDEBUG) MESSAGE(aGroupName); aFamily->AddGroupName(aGroupName); } + aFamily->SetId( aFamId ); myFamilies[aFamId] = aFamily; } } @@ -126,6 +127,7 @@ DriverMED_R_SMESHDS_Mesh EBooleen anIsNodeNum = aNodeInfo->IsElemNum(); TInt aNbElems = aNodeInfo->GetNbElem(); if(MYDEBUG) MESSAGE("Perform - aNodeInfo->GetNbElem() = "<MemberOf(aGroupName)) + if (aFamily->GetType() == theGroup->GetType() && aFamily->MemberOf(aGroupName)) { const set& anElements = aFamily->GetElements(); set::const_iterator anElemsIter = anElements.begin(); @@ -704,3 +707,20 @@ void DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes () } } } +/*! + * \brief Ensure aFamily to have required ID + * \param aFamily - a family to check and update + * \param anID - an ID aFamily should have + * \retval bool - true if successful + */ +bool DriverMED_R_SMESHDS_Mesh::checkFamilyID(DriverMED_FamilyPtr & aFamily, int anID) const +{ + if ( !aFamily || aFamily->GetId() != anID ) { + map::const_iterator i_fam = myFamilies.find(anID); + if ( i_fam == myFamilies.end() ) + return false; + aFamily = i_fam->second; + } + return ( aFamily->GetId() == anID ); +} + -- 2.39.2