]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Remove CORBA dependency
authorouv <ouv@opencascade.com>
Mon, 19 Nov 2007 12:19:25 +0000 (12:19 +0000)
committerouv <ouv@opencascade.com>
Mon, 19 Nov 2007 12:19:25 +0000 (12:19 +0000)
src/DriverMED/DriverMED_Family.cxx
src/DriverMED/DriverMED_Family.h
src/DriverMED/Makefile.am

index 25646c67c45a768ae471f0ae52ead8a38a70ef78..c588008fc6ecee4d8aeea3c427927bbe10c141f5 100644 (file)
@@ -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;
index 34ada3db0323b99a77aebbf565f00f8c6671825c..c23b747ce53286e02bf620686161f442e13041ba 100644 (file)
 #include <boost/shared_ptr.hpp>
 #include <set>
 
-#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_FamilyPtr> DriverMED_FamilyPtrList;
 typedef std::map<int,SMESHDS_SubMesh*> SMESHDS_SubMeshPtrMap;
 typedef std::list<SMESHDS_GroupBase*> SMESHDS_GroupBasePtrList;
 typedef std::set<const SMDS_MeshElement*> ElementsSet;
-typedef std::map<int,SALOMEDS::Color> ColorMap;
+typedef std::map<int,Quantity_Color> ColorMap;
 
 class MESHDRIVERMED_EXPORT DriverMED_Family
 {
index cf183126c5b5c56f1efc1154f5f5256e894a7b2b..6e2b6956d819557696985d692cdf2c9210c008d9 100644 (file)
@@ -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 \