From: ouv Date: Mon, 19 Nov 2007 12:19:25 +0000 (+0000) Subject: Remove CORBA dependency X-Git-Tag: V4_1_0rc2~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=43d7a80e605b6a5ecf178fec026b56b5d3b134b1;p=modules%2Fsmesh.git Remove CORBA dependency --- diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx index 25646c67c..c588008fc 100644 --- a/src/DriverMED/DriverMED_Family.cxx +++ b/src/DriverMED/DriverMED_Family.cxx @@ -129,11 +129,12 @@ DriverMED_Family return myElements.empty(); } -bool CompareColors( const SALOMEDS::Color& theColor, const SALOMEDS::Color& theRefColor ) +bool CompareColors( const Quantity_Color& theColor, const Quantity_Color& theRefColor ) { - if( fabs( theColor.R - theRefColor.R ) < 0.01 && - fabs( theColor.G - theRefColor.G ) < 0.01 && - fabs( theColor.B - theRefColor.B ) < 0.01 ) + float aTolerance = 0.01; + if( fabs( theColor.Red() - theRefColor.Red() ) < aTolerance && + fabs( theColor.Green() - theRefColor.Green() ) < aTolerance && + fabs( theColor.Blue() - theRefColor.Blue() ) < aTolerance ) return true; return false; @@ -217,16 +218,12 @@ DriverMED_Family ColorMap aColorMap; for (aGroupsIter = theGroups.begin(); aGroupsIter != theGroups.end(); aGroupsIter++) { - Quantity_Color aQColor = (*aGroupsIter)->GetColor(); - SALOMEDS::Color aColor; - aColor.R = aQColor.Red(); - aColor.G = aQColor.Green(); - aColor.B = aQColor.Blue(); + Quantity_Color aColor = (*aGroupsIter)->GetColor(); bool isFound = false; for (ColorMap::iterator aColorIter = aColorMap.begin(); aColorIter != aColorMap.end(); aColorIter++) { - SALOMEDS::Color aRefColor = aColorIter->second; + Quantity_Color aRefColor = aColorIter->second; if( CompareColors( aColor, aRefColor ) ) { isFound = true; @@ -422,14 +419,7 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup, const ColorMap& theCol ColorMap::const_iterator aColorIter = theColorMap.begin(); for (; aColorIter != theColorMap.end(); aColorIter++) { - Quantity_Color aGroupQColor = theGroup->GetColor(); - SALOMEDS::Color aGroupColor; - aGroupColor.R = aGroupQColor.Red(); - aGroupColor.G = aGroupQColor.Green(); - aGroupColor.B = aGroupQColor.Blue(); - - SALOMEDS::Color aColor = aColorIter->second; - if( CompareColors( aGroupColor, aColor ) ) + if( CompareColors( theGroup->GetColor(), aColorIter->second ) ) { myGroupAttributVal = aColorIter->first; break; diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index 34ada3db0..c23b747ce 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -38,11 +38,7 @@ #include #include -#include "SALOMEconfig.h" -#include CORBA_SERVER_HEADER(SALOMEDS) -#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) - -#define REST_NODES_FAMILY 1 +define REST_NODES_FAMILY 1 #define REST_EDGES_FAMILY -1 #define REST_FACES_FAMILY -2 #define REST_VOLUMES_FAMILY -3 @@ -55,7 +51,7 @@ typedef std::list DriverMED_FamilyPtrList; typedef std::map SMESHDS_SubMeshPtrMap; typedef std::list SMESHDS_GroupBasePtrList; typedef std::set ElementsSet; -typedef std::map ColorMap; +typedef std::map ColorMap; class MESHDRIVERMED_EXPORT DriverMED_Family { diff --git a/src/DriverMED/Makefile.am b/src/DriverMED/Makefile.am index cf183126c..6e2b6956d 100644 --- a/src/DriverMED/Makefile.am +++ b/src/DriverMED/Makefile.am @@ -64,8 +64,6 @@ libMeshDriverMED_la_CPPFLAGS = \ @HDF5_INCLUDES@ \ $(KERNEL_CXXFLAGS) \ $(CAS_CPPFLAGS) \ - $(CORBA_CXXFLAGS) \ - $(CORBA_INCLUDES) \ $(BOOST_CPPFLAGS) \ -I$(srcdir)/../Driver \ -I$(srcdir)/../SMDS \