X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Hypothesis.cxx;h=bf1f73ae0616c21067ee1d8a45a7879b3f4ba160;hb=e0f019ccf9e53e6751aa85445acf2cf2831a8c24;hp=fee310f27caa8a44af2a462ba3b359f0074b916a;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index fee310f27..bf1f73ae0 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -24,7 +24,6 @@ // File : SMESH_Hypothesis.cxx // Author : Paul RASCLE, EDF // Module : SMESH -// $Header$ // #include "SMESH_Hypothesis.hxx" #include "SMESH_Gen.hxx" @@ -43,17 +42,13 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId, int studyId, SMESH_Gen* gen) : SMESHDS_Hypothesis(hypId) { - //MESSAGE("SMESH_Hypothesis::SMESH_Hypothesis"); - _gen = gen; - _studyId = studyId; - StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); - myStudyContext->mapHypothesis[_hypId] = this; - _type = PARAM_ALGO; - _shapeType = 0; // to be set by algo with TopAbs_Enum + _gen = gen; + _studyId = studyId; + _type = PARAM_ALGO; + _shapeType = 0; // to be set by algo with TopAbs_Enum _param_algo_dim = -1; // to be set by algo parameter - _parameters = string(); - _lastParameters = string(); - _libName = string(); + StudyContextStruct* myStudyContext = gen->GetStudyContext(_studyId); + myStudyContext->mapHypothesis[hypId] = this; } //============================================================================= @@ -65,6 +60,8 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId, SMESH_Hypothesis::~SMESH_Hypothesis() { MESSAGE("SMESH_Hypothesis::~SMESH_Hypothesis"); + StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); + myStudyContext->mapHypothesis[_hypId] = 0; } //============================================================================= @@ -171,59 +168,3 @@ SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id) } return 0; } - -//============================================================================= -/*! - * - */ -//============================================================================= -void SMESH_Hypothesis::SetParameters(const char *theParameters) -{ - string aNewParameters(theParameters); - if(aNewParameters.size()==0 && _parameters.size()==0) - aNewParameters = " "; - if(_parameters.size()>0) - _parameters +="|"; - _parameters +=aNewParameters; - SetLastParameters(theParameters); -} - -//============================================================================= -/*! - * - */ -//============================================================================= -void SMESH_Hypothesis::ClearParameters() -{ - _parameters = string(); -} - -//============================================================================= -/*! - * - */ -//============================================================================= -char* SMESH_Hypothesis::GetParameters() const -{ - return (char*)_parameters.c_str(); -} - -//============================================================================= -/*! - * - */ -//============================================================================= -char* SMESH_Hypothesis::GetLastParameters() const -{ - return (char*)_lastParameters.c_str(); -} - -//============================================================================= -/*! - * - */ -//============================================================================= -void SMESH_Hypothesis::SetLastParameters(const char* theParameters) -{ - _lastParameters = string(theParameters); -}