Base class of object holding SMDS_MeshElement pointers. More...
#include <SMDS_ElementHolder.hxx>

Public Member Functions | |
| SMDS_ElementHolder (const SMDS_Mesh *mesh) | |
| register self in the mesh More... | |
| virtual | ~SMDS_ElementHolder () |
| un-register self from the mesh More... | |
Protected Member Functions | |
| virtual SMDS_ElemIteratorPtr | getElements ()=0 |
| < the descendant object return its elements just before the mesh compacting More... | |
| virtual void | tmpClear ()=0 |
| the descendant object re-add its elements after the mesh compacting More... | |
| virtual void | add (const SMDS_MeshElement *element)=0 |
| the descendant squeeze its element storage after re-adding elements More... | |
| virtual void | compact ()=0 |
| allow the descendant treat its elements before mesh clearing More... | |
| virtual void | clear () |
Protected Attributes | |
| SMDS_Mesh * | myMesh |
Private Member Functions | |
| void | beforeCompacting () |
| store vtkIDs of elements More... | |
| void | restoreElements (const std::vector< smIdType > &idNodessOldToNew, const std::vector< smIdType > &idCellsOldToNew) |
| restore pointers to elements More... | |
Private Attributes | |
| std::vector< const SMDS_MeshElement * > | myExternalElems |
| elements not contained in the mesh More... | |
| std::vector< vtkIdType > | myVtkIDs |
| vtk IDs of elements More... | |
| std::vector< bool > | myIsNode |
| std::set< SMDS_ElementHolder * >::iterator | myPtrInMesh |
Friends | |
| class | SMDS_Mesh |
Base class of object holding SMDS_MeshElement pointers.
Registering such an object in SMDS_Mesh assures that the pointers remain valid after compacting the mesh
| SMDS_ElementHolder::SMDS_ElementHolder | ( | const SMDS_Mesh * | mesh | ) |
register self in the mesh
References SMDS_Mesh::myElemHolders, myMesh, and myPtrInMesh.
|
virtual |
un-register self from the mesh
References SMDS_Mesh::myElemHolders, myMesh, and myPtrInMesh.
|
protectedpure virtual |
the descendant squeeze its element storage after re-adding elements
Implemented in SMESH_ProxyMesh::SubMesh, SMDS_MeshGroup, SMESHDS_GroupOnFilter, SMESHDS_SubMesh, and SMESH_BadInputElements.
Referenced by restoreElements().
|
private |
store vtkIDs of elements
References SMDS_Mesh::Contains(), getElements(), SMDS_MeshElement::GetType(), SMDS_MeshElement::GetVtkID(), SMDS_MeshElement::IsNull(), myExternalElems, myIsNode, myMesh, myVtkIDs, and SMDSAbs_Node.
|
protectedvirtual |
Reimplemented in SMESH_ProxyMesh::SubMesh.
Referenced by SMESH_MeshEditor::SplitBiQuadraticIntoLinear().
|
protectedpure virtual |
allow the descendant treat its elements before mesh clearing
Implemented in SMDS_MeshGroup, SMESH_ProxyMesh::SubMesh, SMESHDS_GroupOnFilter, SMESHDS_SubMesh, and SMESH_BadInputElements.
Referenced by restoreElements().
|
protectedpure virtual |
< the descendant object return its elements just before the mesh compacting
the descendant object temporary remove its elements
Implemented in SMDS_MeshGroup, SMESH_ProxyMesh::SubMesh, SMESHDS_GroupOnFilter, SMESHDS_SubMesh, and SMESH_BadInputElements.
Referenced by beforeCompacting().
|
private |
restore pointers to elements
References add(), compact(), SMDS_Mesh::FindElementVtk(), SMDS_Mesh::FindNodeVtk(), myExternalElems, myIsNode, myMesh, myVtkIDs, and tmpClear().
|
protectedpure virtual |
the descendant object re-add its elements after the mesh compacting
Implemented in SMDS_MeshGroup, SMESH_ProxyMesh::SubMesh, SMESHDS_GroupOnFilter, SMESHDS_SubMesh, and SMESH_BadInputElements.
Referenced by restoreElements().
|
friend |
|
private |
elements not contained in the mesh
Referenced by beforeCompacting(), and restoreElements().
|
private |
Referenced by beforeCompacting(), and restoreElements().
|
protected |
Referenced by beforeCompacting(), SMDS_MeshGroup::GetMesh(), restoreElements(), SMDS_ElementHolder(), and ~SMDS_ElementHolder().
|
private |
Referenced by SMDS_ElementHolder(), and ~SMDS_ElementHolder().
|
private |
vtk IDs of elements
Referenced by beforeCompacting(), and restoreElements().