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();
}
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;

View File

@ -38,11 +38,7 @@
#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
{

View 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 \