SetQuadAllowed() is not needed any more as now it is in the base class

This commit is contained in:
eap 2012-09-21 14:37:32 +00:00
parent 9dd6e6252a
commit f24fcd75c9
2 changed files with 54 additions and 54 deletions

View File

@ -39,8 +39,8 @@ using namespace std;
//============================================================================= //=============================================================================
NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId, NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId,
SMESH_Gen * gen) SMESH_Gen * gen)
: NETGENPlugin_Hypothesis(hypId, studyId, gen), : NETGENPlugin_Hypothesis(hypId, studyId, gen)/*,
_quadAllowed (GetDefaultQuadAllowed()) _quadAllowed (GetDefaultQuadAllowed())*/
{ {
_name = "NETGEN_Parameters_2D"; _name = "NETGEN_Parameters_2D";
_param_algo_dim = 2; _param_algo_dim = 2;
@ -51,56 +51,56 @@ NETGENPlugin_Hypothesis_2D::NETGENPlugin_Hypothesis_2D (int hypId, int studyId,
* *
*/ */
//============================================================================= //=============================================================================
void NETGENPlugin_Hypothesis_2D::SetQuadAllowed(bool theVal) // void NETGENPlugin_Hypothesis_2D::SetQuadAllowed(bool theVal)
{ // {
if (theVal != _quadAllowed) // if (theVal != _quadAllowed)
{ // {
_quadAllowed = theVal; // _quadAllowed = theVal;
NotifySubMeshesHypothesisModification(); // NotifySubMeshesHypothesisModification();
} // }
} // }
//============================================================================= // //=============================================================================
/*! // /*!
* // *
*/ // */
//============================================================================= // //=============================================================================
bool NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() // bool NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed()
{ // {
return false; // return false;
} // }
//============================================================================= // //=============================================================================
/*! // /*!
* // *
*/ // */
//============================================================================= // //=============================================================================
ostream & NETGENPlugin_Hypothesis_2D::SaveTo(ostream & save) // ostream & NETGENPlugin_Hypothesis_2D::SaveTo(ostream & save)
{ // {
NETGENPlugin_Hypothesis::SaveTo(save); // NETGENPlugin_Hypothesis::SaveTo(save);
save << " " << (int)_quadAllowed; // save << " " << (int)_quadAllowed;
return save; // return save;
} // }
//============================================================================= // //=============================================================================
/*! // /*!
* // *
*/ // */
//============================================================================= // //=============================================================================
istream & NETGENPlugin_Hypothesis_2D::LoadFrom(istream & load) // istream & NETGENPlugin_Hypothesis_2D::LoadFrom(istream & load)
{ // {
NETGENPlugin_Hypothesis::LoadFrom(load); // NETGENPlugin_Hypothesis::LoadFrom(load);
bool isOK = true; // bool isOK = true;
int is; // int is;
isOK = (load >> is); // isOK = (load >> is);
if (isOK) // if (isOK)
_quadAllowed = (bool) is; // _quadAllowed = (bool) is;
else // else
load.clear(ios::badbit | load.rdstate()); // load.clear(ios::badbit | load.rdstate());
return load; // return load;
} // }

View File

@ -45,16 +45,16 @@ public:
NETGENPlugin_Hypothesis_2D(int hypId, int studyId, SMESH_Gen * gen); NETGENPlugin_Hypothesis_2D(int hypId, int studyId, SMESH_Gen * gen);
void SetQuadAllowed(bool theVal); // void SetQuadAllowed(bool theVal);
bool GetQuadAllowed() const { return _quadAllowed; } // bool GetQuadAllowed() const { return _quadAllowed; }
static bool GetDefaultQuadAllowed(); // static bool GetDefaultQuadAllowed();
// Persistence // Persistence
virtual ostream & SaveTo(ostream & save); // virtual ostream & SaveTo(ostream & save);
virtual istream & LoadFrom(istream & load); // virtual istream & LoadFrom(istream & load);
private: // private:
bool _quadAllowed; // bool _quadAllowed;
}; };
#endif #endif