From c4232a1a902fb0a6357270b9faadadc2980246bb Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 9 Apr 2008 09:23:20 +0000 Subject: [PATCH] first executable version --- src/CONVERTOR/VISU_ConvertorDef_impl.hxx | 4 --- src/CONVERTOR/VISU_MedConvertor.cxx | 2 ++ src/CONVERTOR/VISU_Structures_impl.hxx | 45 ++++-------------------- src/PIPELINE/VISUPipeline.hxx | 20 ++++------- src/PIPELINE/VISU_PipeLineUtils.hxx | 18 +++++----- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 10 +++--- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 6 ++-- src/VISU_I/VISU_Prs3dUtils.hh | 4 ++- src/VISU_I/VISU_ResultUtils.hh | 28 ++++++++------- 9 files changed, 49 insertions(+), 88 deletions(-) diff --git a/src/CONVERTOR/VISU_ConvertorDef_impl.hxx b/src/CONVERTOR/VISU_ConvertorDef_impl.hxx index eb7fbcd0..639119b1 100644 --- a/src/CONVERTOR/VISU_ConvertorDef_impl.hxx +++ b/src/CONVERTOR/VISU_ConvertorDef_impl.hxx @@ -54,10 +54,6 @@ namespace VISU typedef vtkSmartPointer PMergeFilter; typedef vtkSmartPointer PCommonCellsFilter; - struct TCommonCellsFilterHolder; - typedef MED::SharedPtr PCommonCellsFilterHolder; - - //--------------------------------------------------------------- typedef vtkSmartPointer PPolyData; typedef vtkSmartPointer PAppendPolyData; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 35d2b55b..090c727f 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -51,6 +51,8 @@ using MED::TInt; using MED::TFloat; using MED::EBooleen; +using namespace std; + #ifdef _DEBUG_ static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; diff --git a/src/CONVERTOR/VISU_Structures_impl.hxx b/src/CONVERTOR/VISU_Structures_impl.hxx index 71b078b8..0ab7f8f1 100644 --- a/src/CONVERTOR/VISU_Structures_impl.hxx +++ b/src/CONVERTOR/VISU_Structures_impl.hxx @@ -53,7 +53,7 @@ namespace VISU //--------------------------------------------------------------- //! Define a container for VTK representation - class TPolyDataHolder: public virtual TSizeCounter + class VISU_CONVERTOR_EXPORT TPolyDataHolder: public virtual TSizeCounter { protected: mutable PPolyData mySource; @@ -134,45 +134,12 @@ namespace VISU GetUnstructuredGridOutput(); }; - /*! - This container allow to combine other VTK representation into single one. - */ - class VISU_CONVERTOR_EXPORT TCommonCellsFilterHolder: public virtual TMemoryCheckIDMapper - { - protected: - mutable PCommonCellsFilter myFilter; - mutable PMergeFilter myMergeFilter; - public: - TCommonCellsFilterHolder(); - - //! This method allow to create corresponding VTK filter by demand (not at once) - const PCommonCellsFilter& - GetFilter() const; - - //! Reimplement the TNamedIDMapper::GetUnstructuredGridOutput - virtual - vtkUnstructuredGrid* - GetUnstructuredGridOutput(); - - virtual - unsigned long int - GetMemorySize(); - - //! if false, TIDCommonCellsFilter - same as TIDMapperFilter - //! if true, TIDCommonCellsFilter - use VISU_CommonCellsFilter - bool myIsSpecialKey; - - //! Vector of id mappers, which consist of meshonentity in next sequence: - //! CELL_ENTITY,FACE_ENTITY,EDGE_ENTITY - PNamedIDMapperMap myMappers; - }; - //--------------------------------------------------------------- //! Define a container for VTK representation /*! This container allow to combine other VTK representation into single one. */ - class TAppendPolyDataHolder: public virtual TMemoryCheckIDMapper + class VISU_CONVERTOR_EXPORT TAppendPolyDataHolder: public virtual TMemoryCheckIDMapper { protected: mutable PAppendPolyData myFilter; @@ -195,7 +162,7 @@ namespace VISU /*! This container allow to assign data to mesh and represent them into single VTK representation */ - class TMergeFilterHolder: public virtual TMemoryCheckIDMapper + class VISU_CONVERTOR_EXPORT TMergeFilterHolder: public virtual TMemoryCheckIDMapper { protected: mutable PMergeFilter myFilter; @@ -345,7 +312,7 @@ namespace VISU //--------------------------------------------------------------- //! Specialize TIDMapper to provide VTK mapping for MED TIMESTAMP mesh - struct TUnstructuredGridIDMapperImpl: virtual TMergeFilterHolder, + struct VISU_CONVERTOR_EXPORT TUnstructuredGridIDMapperImpl: virtual TMergeFilterHolder, virtual TUnstructuredGridIDMapper { PAppendFilterHolder myIDMapper; //!< Responsible for numbering @@ -410,7 +377,7 @@ namespace VISU //--------------------------------------------------------------- //! Specialize TIDMapper to provide VTK mapping for MED TIMESTAMP mesh - struct TPolyDataIDMapperImpl: virtual TMergeFilterHolder, + struct VISU_CONVERTOR_EXPORT TPolyDataIDMapperImpl: virtual TMergeFilterHolder, virtual TPolyDataIDMapper { PAppendPolyDataHolder myIDMapper; //!< Responsible for numbering @@ -815,7 +782,7 @@ namespace VISU //--------------------------------------------------------------- typedef std::map TGeom2MeshValue; - class TGeom2Value: public virtual TBaseStructure + class VISU_CONVERTOR_EXPORT TGeom2Value: public virtual TBaseStructure { TGeom2MeshValue myGeom2MeshValue; public: diff --git a/src/PIPELINE/VISUPipeline.hxx b/src/PIPELINE/VISUPipeline.hxx index 334195fa..6431ab12 100755 --- a/src/PIPELINE/VISUPipeline.hxx +++ b/src/PIPELINE/VISUPipeline.hxx @@ -27,21 +27,13 @@ #define _VISUPipeline_HXX_ #ifdef WNT - #if defined VISU_PIPELINE_EXPORTS - #if defined WIN32 - #define VISU_PIPELINE_EXPORT __declspec( dllexport ) - #else - #define VISU_PIPELINE_EXPORT - #endif - #else - #if defined WIN32 - #define VISU_PIPELINE_EXPORT __declspec( dllimport ) - #else - #define VISU_PIPELINE_EXPORT - #endif - #endif +# if defined VISU_PIPELINE_EXPORTS +# define VISU_PIPELINE_EXPORT __declspec( dllexport ) +# else +# define VISU_PIPELINE_EXPORT __declspec( dllimport ) +# endif #else - #define VISU_PIPELINE_EXPORT +# define VISU_PIPELINE_EXPORT #endif #endif diff --git a/src/PIPELINE/VISU_PipeLineUtils.hxx b/src/PIPELINE/VISU_PipeLineUtils.hxx index 65909900..a99c0d31 100644 --- a/src/PIPELINE/VISU_PipeLineUtils.hxx +++ b/src/PIPELINE/VISU_PipeLineUtils.hxx @@ -59,14 +59,14 @@ class VISU_OpenGLPointSpriteMapper; namespace VISU { //---------------------------------------------------------------------------- - void + void VISU_PIPELINE_EXPORT Mul(const vtkFloatingPointType A[3], vtkFloatingPointType b, vtkFloatingPointType C[3]); // C = A * b //---------------------------------------------------------------------------- - void + void VISU_PIPELINE_EXPORT Sub(const vtkFloatingPointType A[3], const vtkFloatingPointType B[3], vtkFloatingPointType C[3]); // C = A - B @@ -95,12 +95,12 @@ namespace VISU vtkFloatingPointType theSource); //! Checks whether the scalar range is the same or not - bool + bool VISU_PIPELINE_EXPORT CheckIsSameRange(vtkFloatingPointType* theTarget, vtkFloatingPointType* theSource); //! Customizes vtkMapper::ShallowCopy - void + void VISU_PIPELINE_EXPORT CopyMapper(vtkMapper* theTarget, vtkMapper* theSource, bool theIsCopyInput); @@ -112,20 +112,20 @@ namespace VISU bool theIsCopyInput); //! Customizes vtkPolyDataMapper::ShallowCopy - void + void VISU_PIPELINE_EXPORT CopyPolyDataMapper(vtkPolyDataMapper* theTarget, vtkPolyDataMapper* theSource, bool theIsCopyInput); //! Customizes VISU_OpenGLPointSpriteMapper::ShallowCopy - void + void VISU_PIPELINE_EXPORT CopyPointSpriteDataMapper(VISU_OpenGLPointSpriteMapper* theTarget, VISU_OpenGLPointSpriteMapper* theSource, bool theIsCopyInput); //---------------------------------------------------------------------------- - void + void VISU_PIPELINE_EXPORT ComputeBoundsParam(vtkDataSet* theDataSet, vtkFloatingPointType theDirection[3], vtkFloatingPointType theMinPnt[3], @@ -134,7 +134,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_PIPELINE_EXPORT DistanceToPosition(vtkDataSet* theDataSet, vtkFloatingPointType theDirection[3], vtkFloatingPointType theDist, @@ -142,7 +142,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_PIPELINE_EXPORT PositionToDistance(vtkDataSet* theDataSet, vtkFloatingPointType theDirection[3], vtkFloatingPointType thePos[3], diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index 554ba78d..13192dda 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -368,7 +368,7 @@ void VisuGUI_CutLinesDlg::createPlanes() { SVTK_ViewWindow* aView = VISU::GetActiveViewWindow(); if (aView == NULL) return; - if (!myCutLines) return; + if (!(bool)myCutLines) return; if (myPreviewActor != 0) return; storeToPrsObject(myCutLines); @@ -461,7 +461,7 @@ void VisuGUI_CutLinesDlg::onCutSelect (int theId, bool theUpdate) } SVTK_ViewWindow* aView = VISU::GetActiveViewWindow(); if (aView) { - if (theUpdate && myPreviewCheck->isChecked() && myCutLines) { + if (theUpdate && myPreviewCheck->isChecked() && (bool)myCutLines) { deletePlanes(); createPlanes(); } @@ -478,7 +478,7 @@ void VisuGUI_CutLinesDlg::setBaseDefault (bool theUpdate) myCutLines->SetDisplacement(myPosSpn->value()); SVTK_ViewWindow* aView = VISU::GetActiveViewWindow(); if (aView) { - if (theUpdate && myPreviewCheck->isChecked() && myCutLines) { + if (theUpdate && myPreviewCheck->isChecked() && (bool)myCutLines) { deletePlanes(); createPlanes(); } @@ -769,7 +769,7 @@ void VisuGUI_CutLinesDlg::onAllCurvesInvertedCheck(bool theInvert) void VisuGUI_CutLinesDlg::onRotation (double theValue) { - if (!myCutLines) return; + if (!(bool)myCutLines) return; SVTK_ViewWindow* aView = VISU::GetActiveViewWindow(); if (aView) { if (myPreviewCheck->isChecked()) { @@ -781,7 +781,7 @@ void VisuGUI_CutLinesDlg::onRotation (double theValue) void VisuGUI_CutLinesDlg::onPlanePos (const QString& theValue) { - if (!myCutLines) return; + if (!(bool)myCutLines) return; SVTK_ViewWindow* aView = VISU::GetActiveViewWindow(); if (aView) { if (myPreviewCheck->isChecked()) { diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 52f8a065..f867f1d6 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -202,7 +202,7 @@ void VisuGUI_CutPlanesPane::initFromPrsObject (VISU::CutPlanes_i* thePrs) void VisuGUI_CutPlanesPane::createPlanes() { if (VISU::GetActiveViewWindow() == NULL) return; - if (!myCutPlanes) return; + if (!(bool)myCutPlanes) return; if (myPreviewActor != 0) return; vtkAppendPolyData* aPolyData = myCutPlanes->GetSpecificPL()->GetAppendPolyData(); @@ -308,7 +308,7 @@ void VisuGUI_CutPlanesPane::setRotation (const double r1, const double r2) */ void VisuGUI_CutPlanesPane::DrawTable() { - if (!myCutPlanes) return; + if (!(bool)myCutPlanes) return; if (!hasInit) return; int aNbRows = myPosTable->numRows(); @@ -438,7 +438,7 @@ void VisuGUI_CutPlanesPane::deletePlanes() void VisuGUI_CutPlanesPane::onRotation (double theValue) { - if (!myCutPlanes) return; + if (!(bool)myCutPlanes) return; if (myPreviewCheck->isChecked()) { if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow()) { myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.); diff --git a/src/VISU_I/VISU_Prs3dUtils.hh b/src/VISU_I/VISU_Prs3dUtils.hh index 2f4bf8b9..4ff48b76 100644 --- a/src/VISU_I/VISU_Prs3dUtils.hh +++ b/src/VISU_I/VISU_Prs3dUtils.hh @@ -27,6 +27,8 @@ #ifndef __VISU_PRS3D_UTILS_H__ #define __VISU_PRS3D_UTILS_H__ +#include "VISU_I.hxx" + #include "VISU_Prs3d_i.hh" #include @@ -35,7 +37,7 @@ namespace VISU { //---------------------------------------------------------------------------- - struct TSetModified: vtkTimeStamp + struct VISU_I_EXPORT TSetModified: vtkTimeStamp { VISU::Prs3d_i* myPrs3d; diff --git a/src/VISU_I/VISU_ResultUtils.hh b/src/VISU_I/VISU_ResultUtils.hh index 357dfd49..b4c4b0c2 100644 --- a/src/VISU_I/VISU_ResultUtils.hh +++ b/src/VISU_I/VISU_ResultUtils.hh @@ -27,6 +27,8 @@ #ifndef __VISU_RESULT_UTILS_H__ #define __VISU_RESULT_UTILS_H__ +#include "VISU_I.hxx" + #include "VISU_Result_i.hh" #include "SALOME_Event.hxx" @@ -35,7 +37,7 @@ namespace VISU { //---------------------------------------------------------------------------- - struct TUpdateObjBrowser: public SALOME_Event + struct VISU_I_EXPORT TUpdateObjBrowser: public SALOME_Event { int myStudyId; CORBA::Boolean* myIsDone; @@ -48,7 +50,7 @@ namespace VISU //---------------------------------------------------------------------------- - struct TResultManager + struct VISU_I_EXPORT TResultManager { Result_i* myResult; @@ -59,7 +61,7 @@ namespace VISU //---------------------------------------------------------------------------- - struct TTransactionManager + struct VISU_I_EXPORT TTransactionManager { _PTR(StudyBuilder) myStudyBuilder; @@ -70,12 +72,12 @@ namespace VISU //---------------------------------------------------------------------------- - QString + QString VISU_I_EXPORT GenerateName(const std::string& theName); //---------------------------------------------------------------------------- - bool + bool VISU_I_EXPORT SplitName(const std::string& theName, std::string& theBase, std::string& theSuffix, @@ -83,13 +85,13 @@ namespace VISU //---------------------------------------------------------------------------- - std::string + std::string VISU_I_EXPORT MakeFileName(const std::string& theName, const void* thePointer); //---------------------------------------------------------------------------- - void + void VISU_I_EXPORT BuildEntities(Result_i* theResult, Result_i::PInput theInput, CORBA::Boolean* theIsDone, @@ -102,7 +104,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_I_EXPORT BuildGroups(Result_i* theResult, Result_i::PInput theInput, CORBA::Boolean* theIsDone, @@ -112,7 +114,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_I_EXPORT BuildFields(Result_i* theResult, Result_i::PInput theInput, CORBA::Boolean* theIsDone, @@ -122,7 +124,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_I_EXPORT BuildMinMax(Result_i* theResult, Result_i::PInput theInput, CORBA::Boolean* theIsDone, @@ -130,7 +132,7 @@ namespace VISU //---------------------------------------------------------------------------- - void + void VISU_I_EXPORT BuildFieldDataTree(Result_i* theResult, Result_i::PInput theInput, CORBA::Boolean* theIsFieldsDone, @@ -140,12 +142,12 @@ namespace VISU _PTR(Study) theStudy); //---------------------------------------------------------------------------- - bool + bool VISU_I_EXPORT RemoveFile(const std::string& theFileName, bool theRemoveEmptyDir = true); //---------------------------------------------------------------------------- - bool + bool VISU_I_EXPORT CopyFile(const std::string& theSourceFileName, const std::string& theTargetFileName); -- 2.39.2