// File : HOMARD_Hypothesis.cxx
// Author : Paul RASCLE, EDF
// Module : HOMARD
+//
+// Remarques :
+// L'ordre de description des fonctions est le meme dans tous les fichiers
+// HOMARD_aaaa.idl, HOMARD_aaaa.hxx, HOMARD_aaaa.cxx, HOMARD_aaaa_i.hxx, HOMARD_aaaa_i.cxx :
+// 1. Les generalites : Name, Delete, DumpPython, Dump, Restore
+// 2. Les caracteristiques
+// 3. Le lien avec les autres structures
+//
+// Quand les 2 fonctions Setxxx et Getxxx sont presentes, Setxxx est decrit en premier
#include "HOMARD_Hypothesis.hxx"
#include "utilities.h"
{
MESSAGE("~HOMARD_Hypothesis");
}
-
-//=============================================================================
-/*!
- */
-//=============================================================================
-void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
-{
- _NomCasCreation = std::string( NomCasCreation );
-}
-
//=============================================================================
-/*!
-*/
//=============================================================================
-std::string HOMARD_Hypothesis::GetCaseCreation() const
-{
- return _NomCasCreation;
-}
+// Generalites
//=============================================================================
-/*!
-*/
//=============================================================================
void HOMARD_Hypothesis::SetName( const char* Name )
{
_Name = std::string( Name );
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
std::string HOMARD_Hypothesis::GetName() const
{
return aScript.str();
}
-
-
//=============================================================================
-/*!
-*/
+//=============================================================================
+// Caracteristiques
+//=============================================================================
//=============================================================================
void HOMARD_Hypothesis::SetAdapType( int TypeAdap )
{
ASSERT (!((TypeAdap < -1) or (TypeAdap > 1)));
_TypeAdap = TypeAdap;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
int HOMARD_Hypothesis::GetAdapType() const
{
return _TypeAdap;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera )
{
ASSERT(! ((TypeDera < 0) or (TypeDera > 1)));
_TypeDera = TypeDera;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
int HOMARD_Hypothesis::GetRefinType() const
{
return _TypeRaff;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
int HOMARD_Hypothesis::GetUnRefType() const
{
return _TypeDera;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
void HOMARD_Hypothesis::SetField( const char* FieldName )
{
MESSAGE( "SetField : FieldName = " << FieldName );
}
//=============================================================================
-void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
+std::string HOMARD_Hypothesis::GetFieldName() const
{
- MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR );
- ASSERT(!(( TypeThR < 0) or (TypeThR > 3 )));
- _TypeThR = TypeThR;
- _ThreshR = ThreshR;
+ return _Field;
}
//=============================================================================
-void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
+void HOMARD_Hypothesis::SetUseField( int UsField )
{
- ASSERT(!((TypeThC < 0) or (TypeThC > 3)));
- _TypeThC = TypeThC;
- _ThreshC = ThreshC;
+ ASSERT(!((UsField < 0) or (UsField > 1 )));
+ _UsField = UsField;
+}
+//=============================================================================
+int HOMARD_Hypothesis::GetUseField() const
+{
+ return _UsField;
}
//=============================================================================
void HOMARD_Hypothesis::SetUseComp( int UsCmpI )
_UsCmpI = UsCmpI;
}
//=============================================================================
-void HOMARD_Hypothesis::SetUseField( int UsField )
+int HOMARD_Hypothesis::GetUseComp() const
{
- ASSERT(!((UsField < 0) or (UsField > 1 )));
- _UsField = UsField;
+ return _UsCmpI;
}
-
//=============================================================================
-/*!
-*/
+void HOMARD_Hypothesis::AddComp( const char* NomComposant )
+{
+ _ListComposant.push_back( std::string( NomComposant ) );
+}
//=============================================================================
-std::string HOMARD_Hypothesis::GetFieldName() const
+void HOMARD_Hypothesis::SupprComp()
{
- return _Field;
+ MESSAGE ("SupprComp") ;
+ _ListComposant.clear();
+}
+//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetListComp() const
+{
+ return _ListComposant;
+}
+//=============================================================================
+void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR )
+{
+ MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR );
+ ASSERT(!(( TypeThR < 0) or (TypeThR > 4 )));
+ _TypeThR = TypeThR;
+ _ThreshR = ThreshR;
}
//=============================================================================
int HOMARD_Hypothesis::GetRefinThrType() const
return _ThreshR;
}
//=============================================================================
+void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC )
+{
+ ASSERT(!((TypeThC < 0) or (TypeThC > 4)));
+ _TypeThC = TypeThC;
+ _ThreshC = ThreshC;
+}
+//=============================================================================
int HOMARD_Hypothesis::GetUnRefThrType() const
{
return _TypeThC;
}
-
//=============================================================================
double HOMARD_Hypothesis::GetThreshC() const
{
return _ThreshC;
}
//=============================================================================
-int HOMARD_Hypothesis::GetUseField() const
-{
- return _UsField;
-}
+void HOMARD_Hypothesis::SetNivMax( int NivMax )
//=============================================================================
-int HOMARD_Hypothesis::GetUseCompI() const
{
- return _UsCmpI;
+ _NivMax = NivMax;
}
//=============================================================================
-/*!
-*/
+const int HOMARD_Hypothesis::GetNivMax() const
//=============================================================================
-void HOMARD_Hypothesis::AddIteration( const char* NomIteration )
{
- _ListIter.push_back( std::string( NomIteration ) );
+ return _NivMax;
}
//=============================================================================
-void HOMARD_Hypothesis::SupprIterations()
-{
- _ListIter.clear();
-}
+void HOMARD_Hypothesis::SetDiamMin( double DiamMin )
//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
{
- return _ListIter;
+ _DiamMin = DiamMin;
}
//=============================================================================
-/*!
-*/
+const double HOMARD_Hypothesis::GetDiamMin() const
//=============================================================================
-void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse )
{
- _ListZone.push_back( std::string( NomZone ) );
- std::stringstream saux1 ;
- saux1 << TypeUse ;
- std::string saux2 = saux1.str() ;
- _ListZone.push_back( saux2 );
+ return _DiamMin;
}
//=============================================================================
-void HOMARD_Hypothesis::SupprZone( const char* NomZone )
-{
- std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
- if ( it != _ListZone.end() )
- {
- _ListZone.erase( it );
- }
-}
+void HOMARD_Hypothesis::SetAdapInit( int AdapInit )
//=============================================================================
-void HOMARD_Hypothesis::SupprZones()
{
- _ListZone.clear();
+ _AdapInit = AdapInit;
}
//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
+const int HOMARD_Hypothesis::GetAdapInit() const
+//=============================================================================
{
- return _ListZone;
+ return _AdapInit;
}
//=============================================================================
-/*!
-*/
+void HOMARD_Hypothesis::SetLevelOutput( int LevelOutput )
//=============================================================================
-void HOMARD_Hypothesis::AddComp( const char* NomComposant )
{
- _ListComposant.push_back( std::string( NomComposant ) );
+ _LevelOutput = LevelOutput;
}
//=============================================================================
-void HOMARD_Hypothesis::SupprComp()
-{
- std::cerr << "HOMARD_Hypothesis::SupprComp" << std::endl;
- _ListComposant.clear();
-}
+const int HOMARD_Hypothesis::GetLevelOutput() const
//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetListComp() const
{
- return _ListComposant;
+ return _LevelOutput;
}
//=============================================================================
-/*!
-*/
-//=============================================================================
-const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
+void HOMARD_Hypothesis::AddGroup( const char* Group)
{
- return _ListGroupSelected;
+ _ListGroupSelected.push_back(Group);
}
//=============================================================================
void HOMARD_Hypothesis::SetGroups( const std::list<std::string>& ListGroup )
_ListGroupSelected.push_back((*it++));
}
//=============================================================================
-void HOMARD_Hypothesis::AddGroup( const char* Group)
+const std::list<std::string>& HOMARD_Hypothesis::GetGroups() const
{
- _ListGroupSelected.push_back(Group);
+ return _ListGroupSelected;
}
//=============================================================================
-/*!
-*/
-//=============================================================================
void HOMARD_Hypothesis::SetTypeFieldInterp( int TypeFieldInterp )
{
ASSERT (!((TypeFieldInterp < -1) or (TypeFieldInterp > 2)));
_TypeFieldInterp = TypeFieldInterp;
}
-
-//=============================================================================
-/*!
-*/
//=============================================================================
int HOMARD_Hypothesis::GetTypeFieldInterp() const
{
return _TypeFieldInterp;
}
-/*!
-*/
//=============================================================================
void HOMARD_Hypothesis::AddFieldInterp( const char* FieldInterp )
{
//=============================================================================
void HOMARD_Hypothesis::SupprFieldInterp()
{
- std::cerr << "HOMARD_Hypothesis::SupprFieldInterpp" << std::endl;
+ MESSAGE ("SupprFieldInterp") ;
_ListFieldInterp.clear();
}
//=============================================================================
return _ListFieldInterp;
}
//=============================================================================
-void HOMARD_Hypothesis::SetNivMax( int NivMax )
//=============================================================================
-{
- _NivMax = NivMax;
-}
+// Liens avec les autres structures
//=============================================================================
-const int HOMARD_Hypothesis::GetNivMax() const
//=============================================================================
+void HOMARD_Hypothesis::SetCaseCreation( const char* NomCasCreation )
{
- return _NivMax;
+ _NomCasCreation = std::string( NomCasCreation );
}
//=============================================================================
-void HOMARD_Hypothesis::SetAdapInit( int AdapInit )
-//=============================================================================
+std::string HOMARD_Hypothesis::GetCaseCreation() const
{
- _AdapInit = AdapInit;
+ return _NomCasCreation;
}
//=============================================================================
-const int HOMARD_Hypothesis::GetAdapInit() const
-//=============================================================================
+void HOMARD_Hypothesis::LinkIteration( const char* NomIteration )
{
- return _AdapInit;
+ _ListIter.push_back( std::string( NomIteration ) );
}
//=============================================================================
-void HOMARD_Hypothesis::SetDiamMin( double DiamMin )
-//=============================================================================
+void HOMARD_Hypothesis::UnLinkIteration( const char* NomIteration )
{
- _DiamMin = DiamMin;
+ std::list<std::string>::iterator it = find( _ListIter.begin(), _ListIter.end(), NomIteration ) ;
+ if ( it != _ListIter.end() )
+ {
+ MESSAGE ("Dans UnLinkIteration pour " << NomIteration) ;
+ _ListIter.erase( it ) ;
+ }
}
//=============================================================================
-const double HOMARD_Hypothesis::GetDiamMin() const
+void HOMARD_Hypothesis::UnLinkIterations()
+{
+ _ListIter.clear();
+}
//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetIterations() const
{
- return _DiamMin;
+ return _ListIter;
}
//=============================================================================
-void HOMARD_Hypothesis::SetLevelOutput( int LevelOutput )
+void HOMARD_Hypothesis::AddZone( const char* NomZone, int TypeUse )
+{
+ MESSAGE ("Dans AddZone pour " << NomZone) ;
+ _ListZone.push_back( std::string( NomZone ) );
+ std::stringstream saux1 ;
+ saux1 << TypeUse ;
+ std::string saux2 = saux1.str() ;
+ _ListZone.push_back( saux2 );
+}
//=============================================================================
+void HOMARD_Hypothesis::SupprZone( const char* NomZone )
{
- _LevelOutput = LevelOutput;
+ MESSAGE ("Dans SupprZone pour " << NomZone) ;
+ std::list<std::string>::iterator it = find( _ListZone.begin(), _ListZone.end(), NomZone );
+ if ( it != _ListZone.end() )
+ {
+ _ListZone.erase( it );
+ }
}
//=============================================================================
-const int HOMARD_Hypothesis::GetLevelOutput() const
+void HOMARD_Hypothesis::SupprZones()
+{
+ _ListZone.clear();
+}
//=============================================================================
+const std::list<std::string>& HOMARD_Hypothesis::GetZones() const
{
- return _LevelOutput;
+ return _ListZone;
}