#include <SMDS_MeshGroup.hxx>

Definition at line 35 of file SMDS_MeshGroup.hxx.
typedef std::list<const SMDS_MeshGroup *>::const_iterator SMDS_MeshGroup.TGroupIterator [private] |
Definition at line 81 of file SMDS_MeshGroup.hxx.
typedef std::set<const SMDS_MeshElement *>::const_iterator SMDS_MeshGroup.TIterator [private] |
Definition at line 80 of file SMDS_MeshGroup.hxx.
| SMDS_MeshGroup::SMDS_MeshGroup | ( | const SMDS_Mesh * | theMesh, |
| const SMDSAbs_ElementType | theType = SMDSAbs_All |
||
| ) |
Definition at line 42 of file SMDS_MeshGroup.cxx.
| SMDS_MeshGroup::SMDS_MeshGroup | ( | SMDS_MeshGroup * | theParent, |
| const SMDSAbs_ElementType | theType = SMDSAbs_All |
||
| ) | [private] |
| void SMDS_MeshGroup::Add | ( | const SMDS_MeshElement * | theElem | ) |
Definition at line 124 of file SMDS_MeshGroup.cxx.
References SMDS_MeshElement.GetType(), MESSAGE, myElements, and myType.
Referenced by SMESHDS_Group.Add(), SMESH_MeshEditor.AddToSameGroups(), SMESH_Gen_i.CopyMesh(), SMESH_MeshEditor.generateGroups(), DriverMED_R_SMESHDS_Mesh.GetGroup(), StdMeshers_Import_1D.importMesh(), DriverUNV_R_SMDS_Mesh.Perform(), SMESH_MeshEditor.ReplaceElemInGroups(), and SMESH_Mesh.UNVToMesh().
{
// the type of the group is determined by the first element added
if (myElements.empty()) myType = theElem->GetType();
else if (theElem->GetType() != myType) {
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
return;
}
myElements.insert(theElem);
}
| const SMDS_MeshGroup * SMDS_MeshGroup::AddSubGroup | ( | const SMDSAbs_ElementType | theType = SMDSAbs_All | ) |
Definition at line 65 of file SMDS_MeshGroup.cxx.
Referenced by DriverUNV_R_SMDS_Mesh.Perform().
{
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
myChildren.insert(myChildren.end(),subgroup);
return subgroup;
}
| void SMDS_MeshGroup::Clear | ( | ) |
Definition at line 113 of file SMDS_MeshGroup.cxx.
References myElements, myType, and SMDSAbs_All.
Referenced by SMESHDS_Group.Clear().
{
myElements.clear();
myType = SMDSAbs_All;
}
| bool SMDS_MeshGroup::Contains | ( | const SMDS_MeshElement * | theElem | ) | const |
Definition at line 158 of file SMDS_MeshGroup.cxx.
References myElements.
Referenced by SMESHDS_Group.Add(), SMESHDS_Group.Contains(), SMESH_Pattern.createElements(), and SMESHDS_Group.Remove().
{
return myElements.find(theElem)!=myElements.end();
}
| int SMDS_MeshGroup.Extent | ( | ) | const |
Definition at line 52 of file SMDS_MeshGroup.hxx.
Referenced by SMESHDS_Group.Extent().
{ return myElements.size(); }
| const SMDS_Mesh* SMDS_MeshGroup.GetMesh | ( | ) | const |
Definition at line 45 of file SMDS_MeshGroup.hxx.
{ return myMesh; }
| SMDSAbs_ElementType SMDS_MeshGroup.GetType | ( | ) | const |
Definition at line 56 of file SMDS_MeshGroup.hxx.
Referenced by SMESHDS_Group.SetType(), and SMESH_Mesh.UNVToMesh().
{ return myType; }
| void SMDS_MeshGroup.InitIterator | ( | ) | const |
Definition at line 60 of file SMDS_MeshGroup.hxx.
Referenced by MyGroupIterator.MyGroupIterator(), and SMESH_Mesh.UNVToMesh().
{ const_cast<TIterator&>(myIterator) = myElements.begin(); }
| void SMDS_MeshGroup.InitSubGroupsIterator | ( | ) | const |
Definition at line 68 of file SMDS_MeshGroup.hxx.
Referenced by SMESH_Mesh.UNVToMesh().
{ const_cast<TGroupIterator&>(myGroupIterator) = myChildren.begin(); }
| bool SMDS_MeshGroup.IsEmpty | ( | ) | const |
Definition at line 51 of file SMDS_MeshGroup.hxx.
Referenced by SMESHDS_Group.Add(), SMESHDS_Group.IsEmpty(), SMESHDS_Group.SetType(), and SetType().
{ return myElements.empty(); }
| bool SMDS_MeshGroup.More | ( | ) | const |
Definition at line 63 of file SMDS_MeshGroup.hxx.
Referenced by MyGroupIterator.more(), and SMESH_Mesh.UNVToMesh().
{ return myIterator != myElements.end(); }
| bool SMDS_MeshGroup.MoreSubGroups | ( | ) | const |
Definition at line 71 of file SMDS_MeshGroup.hxx.
Referenced by SMESH_Mesh.UNVToMesh().
{ return myGroupIterator != myChildren.end(); }
| const SMDS_MeshElement* SMDS_MeshGroup.Next | ( | ) | const |
Definition at line 65 of file SMDS_MeshGroup.hxx.
Referenced by MyGroupIterator.next(), and SMESH_Mesh.UNVToMesh().
{ return *(const_cast<TIterator&>(myIterator))++; }
| const SMDS_MeshGroup* SMDS_MeshGroup.NextSubGroup | ( | ) | const |
Definition at line 73 of file SMDS_MeshGroup.hxx.
Referenced by SMESH_Mesh.UNVToMesh().
{ return *(const_cast<TGroupIterator&>(myGroupIterator))++; }
| bool SMDS_MeshGroup::Remove | ( | const SMDS_MeshElement * | theElem | ) |
Definition at line 141 of file SMDS_MeshGroup.cxx.
References myElements, myType, and SMDSAbs_All.
Referenced by SMESHDS_Group.Remove(), SMESH_MeshEditor.RemoveElemFromGroups(), SMESHDS_Mesh.RemoveFreeElement(), SMESHDS_Mesh.RemoveFreeNode(), removeFromContainers(), and SMESH_MeshEditor.ReplaceElemInGroups().
{
std::set<const SMDS_MeshElement *>::iterator found
= myElements.find(theElem);
if ( found != myElements.end() ) {
myElements.erase(found);
if (myElements.empty()) myType = SMDSAbs_All;
return true;
}
return false;
}
| bool SMDS_MeshGroup::RemoveFromParent | ( | ) | [virtual] |
Definition at line 99 of file SMDS_MeshGroup.cxx.
References myParent, and RemoveSubGroup().
{
if (myParent==NULL) return false;
else
{
return (myParent->RemoveSubGroup(this));
}
}
| bool SMDS_MeshGroup::RemoveSubGroup | ( | const SMDS_MeshGroup * | theGroup | ) | [virtual] |
Definition at line 77 of file SMDS_MeshGroup.cxx.
References myChildren.
Referenced by RemoveFromParent().
{
bool found = false;
list<const SMDS_MeshGroup*>::iterator itgroup;
for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
{
const SMDS_MeshGroup* subgroup=*itgroup;
if (subgroup == theGroup)
{
found = true;
myChildren.erase(itgroup);
}
}
return found;
}
| void SMDS_MeshGroup::SetType | ( | const SMDSAbs_ElementType | theType | ) |
Definition at line 168 of file SMDS_MeshGroup.cxx.
References IsEmpty(), and myType.
Referenced by SMESHDS_Group.SetType().
| int SMDS_MeshGroup.SubGroupsNb | ( | ) | const |
Definition at line 54 of file SMDS_MeshGroup.hxx.
{ return myChildren.size(); }
std::list<const SMDS_MeshGroup*> SMDS_MeshGroup.myChildren [private] |
Definition at line 87 of file SMDS_MeshGroup.hxx.
Referenced by RemoveSubGroup().
std::set<const SMDS_MeshElement *> SMDS_MeshGroup.myElements [private] |
Definition at line 85 of file SMDS_MeshGroup.hxx.
Referenced by Add(), Clear(), Contains(), and Remove().
TGroupIterator SMDS_MeshGroup.myGroupIterator [private] |
Definition at line 89 of file SMDS_MeshGroup.hxx.
TIterator SMDS_MeshGroup.myIterator [private] |
Definition at line 88 of file SMDS_MeshGroup.hxx.
const SMDS_Mesh* SMDS_MeshGroup.myMesh [private] |
Definition at line 83 of file SMDS_MeshGroup.hxx.
SMDS_MeshGroup* SMDS_MeshGroup.myParent [private] |
Definition at line 86 of file SMDS_MeshGroup.hxx.
Referenced by RemoveFromParent().
SMDSAbs_ElementType SMDS_MeshGroup.myType [private] |