2 //=============================================================================
3 // File : SMESH_LengthFromEdges.cxx
4 // Created : mar jun 11 22:42:30 CEST 2002
5 // Author : Paul RASCLE, EDF
7 // Copyright : EDF 2002
9 //=============================================================================
12 #include "SMESH_LengthFromEdges.hxx"
13 #include "utilities.h"
15 //=============================================================================
19 //=============================================================================
21 SMESH_LengthFromEdges::SMESH_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen)
22 : SMESH_Hypothesis(hypId, studyId, gen)
25 _name = "LengthFromEdges";
30 //=============================================================================
34 //=============================================================================
36 SMESH_LengthFromEdges::~SMESH_LengthFromEdges()
40 //=============================================================================
44 //=============================================================================
46 void SMESH_LengthFromEdges::SetMode(int mode)
47 throw (SALOME_Exception)
51 throw SALOME_Exception(LOCALIZED("mode must be positive"));
54 NotifySubMeshesHypothesisModification();
57 //=============================================================================
61 //=============================================================================
63 int SMESH_LengthFromEdges::GetMode()
68 //=============================================================================
72 //=============================================================================
74 ostream & SMESH_LengthFromEdges::SaveTo(ostream & save)
79 //=============================================================================
83 //=============================================================================
85 istream & SMESH_LengthFromEdges::LoadFrom(istream & load)
87 return load >> (*this);
90 //=============================================================================
94 //=============================================================================
96 ostream & operator << (ostream & save, SMESH_LengthFromEdges & hyp)
102 //=============================================================================
106 //=============================================================================
108 istream & operator >> (istream & load, SMESH_LengthFromEdges & hyp)
113 if (isOK) hyp._mode = a;
114 else load.clear(ios::badbit | load.rdstate());