-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2014 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// 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 :
// Caracteristiques
//=============================================================================
//=============================================================================
-void HOMARD_Hypothesis_i::SetAdapRefinUnRef( CORBA::Long TypeAdap,CORBA::Long TypeRaff, CORBA::Long TypeDera )
+void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera )
{
ASSERT( myHomardHypothesis );
- myHomardHypothesis->SetAdapType( TypeAdap );
+ VERIFICATION( (TypeRaffDera==1) || (TypeRaffDera==-1) );
+ int TypeRaff, TypeDera ;
+ if ( TypeRaffDera == 1 )
+ {
+ TypeRaff = 1 ;
+ TypeDera = 0 ;
+ }
+ else if ( TypeRaffDera == -1 )
+ {
+ TypeRaff = 0 ;
+ TypeDera = 1 ;
+ }
+ myHomardHypothesis->SetAdapType( -1 );
myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
}
//=============================================================================
//=============================================================================
HOMARD::InfosHypo* HOMARD_Hypothesis_i::GetField()
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
HOMARD::InfosHypo* aInfosHypo = new HOMARD::InfosHypo();
aInfosHypo->FieldName = CORBA::string_dup( myHomardHypothesis->GetFieldName().c_str() );
aInfosHypo->TypeThR = CORBA::Long( myHomardHypothesis->GetRefinThrType() );
//=============================================================================
void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR )
{
+ myHomardHypothesis->SetAdapType( 1 );
+ if ( TypeThR > 0 )
+ {
+ int TypeDera = myHomardHypothesis->GetUnRefType() ;
+ myHomardHypothesis->SetRefinTypeDera( 1, TypeDera );
+ }
myHomardHypothesis->SetRefinThr( TypeThR, ThreshR );
}
//=============================================================================
//=============================================================================
void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC )
{
+ myHomardHypothesis->SetAdapType( 1 );
+ if ( TypeThC > 0 )
+ {
+ int TypeRaff = myHomardHypothesis->GetRefinType() ;
+ myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 );
+ }
myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC );
}
//=============================================================================
return myHomardHypothesis->GetAdapInit();
}
//=============================================================================
-void HOMARD_Hypothesis_i::SetLevelOutput( CORBA::Long LevelOutput )
+void HOMARD_Hypothesis_i::SetExtraOutput( CORBA::Long ExtraOutput )
{
ASSERT( myHomardHypothesis );
- myHomardHypothesis->SetLevelOutput( LevelOutput );
+ myHomardHypothesis->SetExtraOutput( ExtraOutput );
}
//=============================================================================
-CORBA::Long HOMARD_Hypothesis_i::GetLevelOutput()
+CORBA::Long HOMARD_Hypothesis_i::GetExtraOutput()
{
ASSERT( myHomardHypothesis );
- return myHomardHypothesis->GetLevelOutput();
+ return myHomardHypothesis->GetExtraOutput();
}
//=============================================================================
void HOMARD_Hypothesis_i::AddGroup( const char* Group)
myHomardHypothesis->AddGroup( Group );
}
//=============================================================================
+void HOMARD_Hypothesis_i::SupprGroup( const char* Group )
+{
+ ASSERT( myHomardHypothesis );
+ myHomardHypothesis->SupprGroup(Group);
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprGroups()
+{
+ ASSERT( myHomardHypothesis );
+ myHomardHypothesis->SupprGroups();
+}
+//=============================================================================
void HOMARD_Hypothesis_i::SetGroups(const HOMARD::ListGroupType& ListGroup)
{
ASSERT( myHomardHypothesis );
void HOMARD_Hypothesis_i::AddFieldInterp( const char* FieldInterp )
{
ASSERT( myHomardHypothesis );
- myHomardHypothesis->AddFieldInterp( FieldInterp );
+ myHomardHypothesis->AddFieldInterpType( FieldInterp, 0 );
}
//=============================================================================
-void HOMARD_Hypothesis_i::SupprFieldInterp()
+void HOMARD_Hypothesis_i::AddFieldInterpType( const char* FieldInterp, CORBA::Long TypeInterp )
{
ASSERT( myHomardHypothesis );
- myHomardHypothesis->SupprFieldInterp();
+ myHomardHypothesis->AddFieldInterpType( FieldInterp, TypeInterp );
}
//=============================================================================
-HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp()
+void HOMARD_Hypothesis_i::SupprFieldInterp( const char* FieldInterp )
{
ASSERT( myHomardHypothesis );
- const std::list<std::string>& ListString = myHomardHypothesis->GetListFieldInterp();
- HOMARD::listFieldInterpHypo_var aResult = new HOMARD::listFieldInterpHypo;
+ myHomardHypothesis->SupprFieldInterp(FieldInterp);
+}
+//=============================================================================
+void HOMARD_Hypothesis_i::SupprFieldInterps()
+{
+ ASSERT( myHomardHypothesis );
+ myHomardHypothesis->SupprFieldInterps();
+}
+//=============================================================================
+HOMARD::listeFieldInterpsHypo* HOMARD_Hypothesis_i::GetFieldInterps()
+{
+ ASSERT( myHomardHypothesis );
+ const std::list<std::string>& ListString = myHomardHypothesis->GetFieldInterps();
+ HOMARD::listeFieldInterpsHypo_var aResult = new HOMARD::listeFieldInterpsHypo;
aResult->length( ListString.size() );
std::list<std::string>::const_iterator it;
int i = 0;
//=============================================================================
void HOMARD_Hypothesis_i::LinkIteration( const char* NomIteration )
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
myHomardHypothesis->LinkIteration( NomIteration );
}
//=============================================================================
void HOMARD_Hypothesis_i::UnLinkIteration( const char* NomIteration )
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
myHomardHypothesis->UnLinkIteration( NomIteration );
}
//=============================================================================
HOMARD::listeIters* HOMARD_Hypothesis_i::GetIterations()
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
const std::list<std::string>& ListString = myHomardHypothesis->GetIterations();
HOMARD::listeIters_var aResult = new HOMARD::listeIters;
aResult->length( ListString.size() );
return aResult._retn();
}
//=============================================================================
-void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
+void HOMARD_Hypothesis_i::AddZone( const char* NomZone, CORBA::Long TypeUse )
{
- MESSAGE ("Dans AddZone pour " << NomZone) ;
+ MESSAGE ("Dans AddZone pour " << NomZone << " et TypeUse = " << TypeUse ) ;
ASSERT( myHomardHypothesis );
+ VERIFICATION( (TypeUse==1) || (TypeUse==-1) );
+ myHomardHypothesis->SetAdapType( 0 );
+ int TypeRaff, TypeDera ;
+ if ( TypeUse == 1 )
+ {
+ TypeRaff = 1 ;
+ TypeDera = myHomardHypothesis->GetUnRefType() ;
+ }
+ else if ( TypeUse == -1 )
+ {
+ TypeRaff = myHomardHypothesis->GetRefinType() ;
+ TypeDera = 1 ;
+ }
+ myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera );
char* NomHypo = GetName() ;
return _gen_i->AssociateHypoZone(NomHypo, NomZone, TypeUse) ;
}
//=============================================================================
-void HOMARD_Hypothesis_i::AddZone0( const char* NomZone, CORBA::Long TypeUse )
+void HOMARD_Hypothesis_i::AddZone0( const char* NomZone, CORBA::Long TypeUse )
{
MESSAGE ("Dans AddZone0 pour " << NomZone) ;
ASSERT( myHomardHypothesis );
myHomardHypothesis->AddZone( NomZone, TypeUse );
}
//=============================================================================
-void HOMARD_Hypothesis_i::SupprZone(const char * NomZone)
+void HOMARD_Hypothesis_i::SupprZone(const char * NomZone)
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
myHomardHypothesis->SupprZone( NomZone);
}
//=============================================================================
-void HOMARD_Hypothesis_i::SupprZones()
+void HOMARD_Hypothesis_i::SupprZones()
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
myHomardHypothesis->SupprZones();
}
//=============================================================================
HOMARD::listeZonesHypo* HOMARD_Hypothesis_i::GetZones()
{
- ASSERT(myHomardHypothesis);
+ ASSERT( myHomardHypothesis );
const std::list<std::string>& ListString = myHomardHypothesis->GetZones();
HOMARD::listeZonesHypo_var aResult = new HOMARD::listeZonesHypo;
aResult->length( ListString.size() );