X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Hypothesis.cxx;h=cc179d31cdf03bf812855d84a6235978f9308d3c;hb=refs%2Ftags%2FT3_2_0b2;hp=fa092219ff4184bbb340df754ce78e785135c200;hpb=bef9beee88cac57394b8dc3bc914381c1a2fff83;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index fa092219f..cc179d31c 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -1,16 +1,36 @@ +// SMESH SMESH : implementaion of SMESH idl descriptions +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : SMESH_Hypothesis.cxx +// Author : Paul RASCLE, EDF +// Module : SMESH +// $Header$ + using namespace std; -//============================================================================= -// File : SMESH_Hypothesis.cxx -// Created : sam mai 18 08:08:50 CEST 2002 -// Author : Paul RASCLE, EDF -// Project : SALOME -// Copyright : EDF 2002 -// $Header$ -//============================================================================= using namespace std; - #include "SMESH_Hypothesis.hxx" #include "SMESH_Gen.hxx" +#include "SMESH_subMesh.hxx" #include "utilities.h" //============================================================================= @@ -29,8 +49,8 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId, StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); myStudyContext->mapHypothesis[_hypId] = this; _type = PARAM_ALGO; -// _shapeType = -1; // to be set by algo with TopAbs_Enum _shapeType = 0; // to be set by algo with TopAbs_Enum + _param_algo_dim = -1; // to be set by algo parameter } //============================================================================= @@ -50,14 +70,16 @@ SMESH_Hypothesis::~SMESH_Hypothesis() */ //============================================================================= -int SMESH_Hypothesis::GetDim() +int SMESH_Hypothesis::GetDim() const { - int dim = -1; + int dim = 0; switch (_type) { case ALGO_1D: dim = 1; break; case ALGO_2D: dim = 2; break; case ALGO_3D: dim = 3; break; + case PARAM_ALGO: + dim = ( _param_algo_dim < 0 ) ? -_param_algo_dim : _param_algo_dim; break; } return dim; } @@ -68,7 +90,7 @@ int SMESH_Hypothesis::GetDim() */ //============================================================================= -int SMESH_Hypothesis::GetShapeType() +int SMESH_Hypothesis::GetShapeType() const { return _shapeType; } @@ -79,7 +101,7 @@ int SMESH_Hypothesis::GetShapeType() */ //============================================================================= -int SMESH_Hypothesis::GetStudyId() +int SMESH_Hypothesis::GetStudyId() const { return _studyId; } @@ -103,14 +125,40 @@ void SMESH_Hypothesis::NotifySubMeshesHypothesisModification() itm++) { SMESH_Mesh* mesh = (*itm).second; - const list& subMeshes = - mesh->GetSubMeshUsingHypothesis(this); + mesh->NotifySubMeshesHypothesisModification( this ); +// const list& subMeshes = +// mesh->GetSubMeshUsingHypothesis(this); - //for all subMeshes using hypothesis +// //for all subMeshes using hypothesis - list::const_iterator its; - for (its = subMeshes.begin(); its != subMeshes.end(); its++) - (*its)->ComputeStateEngine(SMESH_subMesh::MODIF_HYP); +// list::const_iterator its; +// for (its = subMeshes.begin(); its != subMeshes.end(); its++) +// (*its)->ComputeStateEngine(SMESH_subMesh::MODIF_HYP); } } +//============================================================================= +/*! + * + */ +//============================================================================= + +const char* SMESH_Hypothesis::GetLibName() const +{ +// MESSAGE("SMESHDS_Hypothesis::GetLibName"); +// SCRUTE(_LibName); +// SCRUTE(&_LibName); + return _libName.c_str(); +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +void SMESH_Hypothesis::SetLibName(const char* theLibName) +{ +// MESSAGE("SMESHDS_Hypothesis::SetLibName"); + _libName = string(theLibName); +}