Remove CORBA dependency

This commit is contained in:
ouv 2007-11-19 12:19:25 +00:00
parent 14d8b9e876
commit 43d7a80e60
3 changed files with 10 additions and 26 deletions

View File

@ -129,11 +129,12 @@ DriverMED_Family
return myElements.empty(); 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 && float aTolerance = 0.01;
fabs( theColor.G - theRefColor.G ) < 0.01 && if( fabs( theColor.Red() - theRefColor.Red() ) < aTolerance &&
fabs( theColor.B - theRefColor.B ) < 0.01 ) fabs( theColor.Green() - theRefColor.Green() ) < aTolerance &&
fabs( theColor.Blue() - theRefColor.Blue() ) < aTolerance )
return true; return true;
return false; return false;
@ -217,16 +218,12 @@ DriverMED_Family
ColorMap aColorMap; ColorMap aColorMap;
for (aGroupsIter = theGroups.begin(); aGroupsIter != theGroups.end(); aGroupsIter++) for (aGroupsIter = theGroups.begin(); aGroupsIter != theGroups.end(); aGroupsIter++)
{ {
Quantity_Color aQColor = (*aGroupsIter)->GetColor(); Quantity_Color aColor = (*aGroupsIter)->GetColor();
SALOMEDS::Color aColor;
aColor.R = aQColor.Red();
aColor.G = aQColor.Green();
aColor.B = aQColor.Blue();
bool isFound = false; bool isFound = false;
for (ColorMap::iterator aColorIter = aColorMap.begin(); aColorIter != aColorMap.end(); aColorIter++) for (ColorMap::iterator aColorIter = aColorMap.begin(); aColorIter != aColorMap.end(); aColorIter++)
{ {
SALOMEDS::Color aRefColor = aColorIter->second; Quantity_Color aRefColor = aColorIter->second;
if( CompareColors( aColor, aRefColor ) ) if( CompareColors( aColor, aRefColor ) )
{ {
isFound = true; isFound = true;
@ -422,14 +419,7 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup, const ColorMap& theCol
ColorMap::const_iterator aColorIter = theColorMap.begin(); ColorMap::const_iterator aColorIter = theColorMap.begin();
for (; aColorIter != theColorMap.end(); aColorIter++) for (; aColorIter != theColorMap.end(); aColorIter++)
{ {
Quantity_Color aGroupQColor = theGroup->GetColor(); if( CompareColors( theGroup->GetColor(), aColorIter->second ) )
SALOMEDS::Color aGroupColor;
aGroupColor.R = aGroupQColor.Red();
aGroupColor.G = aGroupQColor.Green();
aGroupColor.B = aGroupQColor.Blue();
SALOMEDS::Color aColor = aColorIter->second;
if( CompareColors( aGroupColor, aColor ) )
{ {
myGroupAttributVal = aColorIter->first; myGroupAttributVal = aColorIter->first;
break; break;

View File

@ -38,11 +38,7 @@
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <set> #include <set>
#include "SALOMEconfig.h" define REST_NODES_FAMILY 1
#include CORBA_SERVER_HEADER(SALOMEDS)
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
#define REST_NODES_FAMILY 1
#define REST_EDGES_FAMILY -1 #define REST_EDGES_FAMILY -1
#define REST_FACES_FAMILY -2 #define REST_FACES_FAMILY -2
#define REST_VOLUMES_FAMILY -3 #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::map<int,SMESHDS_SubMesh*> SMESHDS_SubMeshPtrMap;
typedef std::list<SMESHDS_GroupBase*> SMESHDS_GroupBasePtrList; typedef std::list<SMESHDS_GroupBase*> SMESHDS_GroupBasePtrList;
typedef std::set<const SMDS_MeshElement*> ElementsSet; 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 class MESHDRIVERMED_EXPORT DriverMED_Family
{ {

View File

@ -64,8 +64,6 @@ libMeshDriverMED_la_CPPFLAGS = \
@HDF5_INCLUDES@ \ @HDF5_INCLUDES@ \
$(KERNEL_CXXFLAGS) \ $(KERNEL_CXXFLAGS) \
$(CAS_CPPFLAGS) \ $(CAS_CPPFLAGS) \
$(CORBA_CXXFLAGS) \
$(CORBA_INCLUDES) \
$(BOOST_CPPFLAGS) \ $(BOOST_CPPFLAGS) \
-I$(srcdir)/../Driver \ -I$(srcdir)/../Driver \
-I$(srcdir)/../SMDS \ -I$(srcdir)/../SMDS \