mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-15 22:21:28 +05:00
0020431: EDF 1020 SMESH : Radial Mesh of a cylinder
+ virtual bool operator==(const SMESHDS_Hypothesis& other) const; + bool operator!=(const SMESHDS_Hypothesis& other) const { return !(*this==other); }
This commit is contained in:
parent
6462277df0
commit
982b910458
@ -23,10 +23,11 @@
|
|||||||
// File : SMESHDS_Hypothesis.cxx
|
// File : SMESHDS_Hypothesis.cxx
|
||||||
// Author : Paul RASCLE, EDF
|
// Author : Paul RASCLE, EDF
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header$
|
|
||||||
//
|
//
|
||||||
#include "SMESHDS_Hypothesis.hxx"
|
#include "SMESHDS_Hypothesis.hxx"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -37,11 +38,8 @@ using namespace std;
|
|||||||
|
|
||||||
SMESHDS_Hypothesis::SMESHDS_Hypothesis(int hypId)
|
SMESHDS_Hypothesis::SMESHDS_Hypothesis(int hypId)
|
||||||
{
|
{
|
||||||
// MESSAGE("SMESHDS_Hypothesis::SMESHDS_Hypothesis");
|
|
||||||
_hypId = hypId;
|
_hypId = hypId;
|
||||||
_name = "generic";
|
_name = "generic";
|
||||||
// SCRUTE(_name);
|
|
||||||
// SCRUTE(_hypId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -52,7 +50,6 @@ SMESHDS_Hypothesis::SMESHDS_Hypothesis(int hypId)
|
|||||||
|
|
||||||
SMESHDS_Hypothesis::~SMESHDS_Hypothesis()
|
SMESHDS_Hypothesis::~SMESHDS_Hypothesis()
|
||||||
{
|
{
|
||||||
// MESSAGE("SMESHDS_Hypothesis::~SMESHDS_Hypothesis");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -63,9 +60,6 @@ SMESHDS_Hypothesis::~SMESHDS_Hypothesis()
|
|||||||
|
|
||||||
const char* SMESHDS_Hypothesis::GetName() const
|
const char* SMESHDS_Hypothesis::GetName() const
|
||||||
{
|
{
|
||||||
// MESSAGE("SMESHDS_Hypothesis::GetName");
|
|
||||||
// SCRUTE(_name);
|
|
||||||
// SCRUTE(&_name);
|
|
||||||
return _name.c_str();
|
return _name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +71,6 @@ const char* SMESHDS_Hypothesis::GetName() const
|
|||||||
|
|
||||||
int SMESHDS_Hypothesis::GetID() const
|
int SMESHDS_Hypothesis::GetID() const
|
||||||
{
|
{
|
||||||
// MESSAGE("SMESHDS_Hypothesis::GetId");
|
|
||||||
// SCRUTE(_hypId);
|
|
||||||
return _hypId;
|
return _hypId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +82,23 @@ int SMESHDS_Hypothesis::GetID() const
|
|||||||
|
|
||||||
int SMESHDS_Hypothesis::GetType() const
|
int SMESHDS_Hypothesis::GetType() const
|
||||||
{
|
{
|
||||||
// MESSAGE("SMESHDS_Hypothesis::GetType");
|
|
||||||
// SCRUTE(_type);
|
|
||||||
return _type;
|
return _type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* Equality
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
|
||||||
|
bool SMESHDS_Hypothesis::operator==(const SMESHDS_Hypothesis& other) const
|
||||||
|
{
|
||||||
|
if ( this == &other )
|
||||||
|
return true;
|
||||||
|
if ( _name != other._name )
|
||||||
|
return false;
|
||||||
|
ostringstream mySave, otherSave;
|
||||||
|
((SMESHDS_Hypothesis*)this )->SaveTo(mySave);
|
||||||
|
((SMESHDS_Hypothesis*)&other)->SaveTo(otherSave);
|
||||||
|
return mySave.str() == otherSave.str();
|
||||||
|
}
|
||||||
|
@ -46,6 +46,9 @@ public:
|
|||||||
virtual std::ostream & SaveTo(std::ostream & save)=0;
|
virtual std::ostream & SaveTo(std::ostream & save)=0;
|
||||||
virtual std::istream & LoadFrom(std::istream & load)=0;
|
virtual std::istream & LoadFrom(std::istream & load)=0;
|
||||||
|
|
||||||
|
virtual bool operator==(const SMESHDS_Hypothesis& other) const;
|
||||||
|
bool operator!=(const SMESHDS_Hypothesis& other) const { return !(*this==other); }
|
||||||
|
|
||||||
enum hypothesis_type {PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D};
|
enum hypothesis_type {PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D, ALGO_3D};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user