#include <SMESHDS_Document.hxx>
Public Member Functions | |
| SMESHDS_Document (int UserID) | |
| int | NewMesh (bool theIsEmbeddedMode) |
| void | RemoveMesh (int MeshID) |
| SMESHDS_Mesh * | GetMesh (int MeshID) |
| void | AddHypothesis (SMESHDS_Hypothesis *H) |
| void | RemoveHypothesis (int HypID) |
| SMESHDS_Hypothesis * | GetHypothesis (int HypID) |
| int | NbMeshes () |
| int | NbHypothesis () |
| void | InitMeshesIterator () |
| SMESHDS_Mesh * | NextMesh () |
| bool | MoreMesh () |
| void | InitHypothesisIterator () |
| SMESHDS_Hypothesis * | NextHypothesis () |
| bool | MoreHypothesis () |
| ~SMESHDS_Document () | |
Private Attributes | |
| int | myUserID |
| std::map< int, SMESHDS_Mesh * > | myMeshes |
| std::map< int, SMESHDS_Hypothesis * > | myHypothesis |
| std::map< int, SMESHDS_Mesh * > ::iterator | myMeshesIt |
| std::map< int, SMESHDS_Hypothesis * > ::iterator | myHypothesisIt |
Definition at line 37 of file SMESHDS_Document.hxx.
| SMESHDS_Document::SMESHDS_Document | ( | int | UserID | ) |
Definition at line 38 of file SMESHDS_Document.cxx.
:myUserID(UserID) { }
| SMESHDS_Document::~SMESHDS_Document | ( | ) |
Definition at line 47 of file SMESHDS_Document.cxx.
References InitMeshesIterator(), MoreMesh(), and NextMesh().
{
InitMeshesIterator();
while ( MoreMesh() )
delete NextMesh();
}
| void SMESHDS_Document::AddHypothesis | ( | SMESHDS_Hypothesis * | H | ) |
Definition at line 98 of file SMESHDS_Document.cxx.
References SMESHDS_Hypothesis.GetID(), and myHypothesis.
{
myHypothesis[H->GetID()]=H;
}
| SMESHDS_Hypothesis * SMESHDS_Document::GetHypothesis | ( | int | HypID | ) |
Definition at line 107 of file SMESHDS_Document.cxx.
References MESSAGE, and myHypothesis.
{
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
if (it==myHypothesis.end())
{
MESSAGE("SMESHDS_Document::GetHypothesis : ID not found");
return NULL;
}
else return (*it).second;
}
| SMESHDS_Mesh * SMESHDS_Document::GetMesh | ( | int | MeshID | ) |
Definition at line 71 of file SMESHDS_Document.cxx.
References MESSAGE, and myMeshes.
Referenced by SMESH_Mesh.SMESH_Mesh().
| void SMESHDS_Document::InitHypothesisIterator | ( | ) |
Definition at line 181 of file SMESHDS_Document.cxx.
References myHypothesis, and myHypothesisIt.
{
myHypothesisIt=myHypothesis.begin();
}
| void SMESHDS_Document::InitMeshesIterator | ( | ) |
Definition at line 152 of file SMESHDS_Document.cxx.
References myMeshes, and myMeshesIt.
Referenced by ~SMESHDS_Document().
{
myMeshesIt=myMeshes.begin();
}
| bool SMESHDS_Document::MoreHypothesis | ( | ) |
Definition at line 201 of file SMESHDS_Document.cxx.
References myHypothesis, and myHypothesisIt.
{
return myHypothesisIt!=myHypothesis.end();
}
| bool SMESHDS_Document::MoreMesh | ( | ) |
Definition at line 172 of file SMESHDS_Document.cxx.
References myMeshes, and myMeshesIt.
Referenced by ~SMESHDS_Document().
{
return myMeshesIt!=myMeshes.end();
}
| int SMESHDS_Document::NbHypothesis | ( | ) |
Definition at line 143 of file SMESHDS_Document.cxx.
References myHypothesis.
{
return myHypothesis.size();
}
| int SMESHDS_Document::NbMeshes | ( | ) |
Definition at line 134 of file SMESHDS_Document.cxx.
References myMeshes.
{
return myMeshes.size();
}
Definition at line 58 of file SMESHDS_Document.cxx.
References myMeshes.
Referenced by SMESH_Mesh.SMESH_Mesh().
{
static int aNewMeshID = 0;
aNewMeshID++;
SMESHDS_Mesh *aNewMesh = new SMESHDS_Mesh(aNewMeshID,theIsEmbeddedMode);
myMeshes[aNewMeshID] = aNewMesh;
return aNewMeshID;
}
| SMESHDS_Hypothesis * SMESHDS_Document::NextHypothesis | ( | ) |
Definition at line 190 of file SMESHDS_Document.cxx.
References myHypothesisIt.
{
SMESHDS_Hypothesis * toReturn=(*myHypothesisIt).second;
myHypothesisIt++;
return toReturn;
}
| SMESHDS_Mesh * SMESHDS_Document::NextMesh | ( | ) |
Definition at line 161 of file SMESHDS_Document.cxx.
References myMeshesIt.
Referenced by ~SMESHDS_Document().
{
SMESHDS_Mesh * toReturn=(*myMeshesIt).second;
myMeshesIt++;
return toReturn;
}
| void SMESHDS_Document::RemoveHypothesis | ( | int | HypID | ) |
Definition at line 122 of file SMESHDS_Document.cxx.
References MESSAGE, and myHypothesis.
{
map<int,SMESHDS_Hypothesis*>::iterator it=myHypothesis.find(HypID);
if (it==myHypothesis.end())
MESSAGE("SMESHDS_Document::RemoveHypothesis : ID not found");
myHypothesis.erase(it);
}
| void SMESHDS_Document::RemoveMesh | ( | int | MeshID | ) |
std::map<int,SMESHDS_Hypothesis*> SMESHDS_Document.myHypothesis [private] |
Definition at line 60 of file SMESHDS_Document.hxx.
Referenced by AddHypothesis(), GetHypothesis(), InitHypothesisIterator(), MoreHypothesis(), NbHypothesis(), and RemoveHypothesis().
std::map<int,SMESHDS_Hypothesis*>::iterator SMESHDS_Document.myHypothesisIt [private] |
Definition at line 62 of file SMESHDS_Document.hxx.
Referenced by InitHypothesisIterator(), MoreHypothesis(), and NextHypothesis().
std::map<int,SMESHDS_Mesh*> SMESHDS_Document.myMeshes [private] |
Definition at line 59 of file SMESHDS_Document.hxx.
Referenced by GetMesh(), InitMeshesIterator(), MoreMesh(), NbMeshes(), NewMesh(), and RemoveMesh().
std::map<int,SMESHDS_Mesh*>::iterator SMESHDS_Document.myMeshesIt [private] |
Definition at line 61 of file SMESHDS_Document.hxx.
Referenced by InitMeshesIterator(), MoreMesh(), and NextMesh().
int SMESHDS_Document.myUserID [private] |
Definition at line 58 of file SMESHDS_Document.hxx.