1 // NETGENPlugin : C++ implementation
3 // Copyright (C) 2006 OPEN CASCADE, CEA/DEN, EDF R&D
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : NETGENPlugin_Hypothesis_2D.cxx
23 // Author : Michael Sazonov (OCN)
27 //=============================================================================
29 #include <NETGENPlugin_Hypothesis_2D.hxx>
30 #include <utilities.h>
34 //=============================================================================
38 //=============================================================================
39 NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId,
41 : NETGENPlugin_Hypothesis(hypId, studyId, gen),
42 _quadAllowed (GetDefaultQuadAllowed())
44 _name = "NETGEN_Parameters_2D";
48 //=============================================================================
52 //=============================================================================
53 void NETGENPlugin_Hypothesis_2D::SetQuadAllowed(bool theVal)
55 if (theVal != _quadAllowed)
57 _quadAllowed = theVal;
58 NotifySubMeshesHypothesisModification();
62 //=============================================================================
66 //=============================================================================
67 bool NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed()
72 //=============================================================================
76 //=============================================================================
77 ostream & NETGENPlugin_Hypothesis_2D::SaveTo(ostream & save)
79 NETGENPlugin_Hypothesis::SaveTo(save);
81 save << " " << (int)_quadAllowed;
86 //=============================================================================
90 //=============================================================================
91 istream & NETGENPlugin_Hypothesis_2D::LoadFrom(istream & load)
93 NETGENPlugin_Hypothesis::LoadFrom(load);
100 _quadAllowed = (bool) is;
102 load.clear(ios::badbit | load.rdstate());