From cf4662fa51f2dfc216e69cffd7bfc8f6e282041b Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 8 Feb 2021 16:05:49 +0100 Subject: [PATCH] Delivery of windows porting --- src/CMakeLists.txt | 7 +------ .../ElectromagnetismRotationHelper.cxx | 11 ++++++----- .../ElectromagnetismRotationHelper.h | 14 +++++++------- .../vtkElectromagnetismRotation.cxx | 4 ++-- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ad9fc2c..080ef80 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,9 +69,4 @@ ADD_SUBDIRECTORY(GlyphCIH) # EDF15785 ADD_SUBDIRECTORY(ElectromagnetismVecteur) ADD_SUBDIRECTORY(ElectromagnetismStreamTraceur) ADD_SUBDIRECTORY(ElectromagnetismFluxDisc) - -IF(NOT WIN32) - # still being under investigations - MESSAGE(WARNING "ElectromagnetismRotation will be skipped") - ADD_SUBDIRECTORY(ElectromagnetismRotation) -ENDIF(NOT WIN32) +ADD_SUBDIRECTORY(ElectromagnetismRotation) diff --git a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.cxx b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.cxx index b7c3032..e62425a 100644 --- a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.cxx +++ b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.cxx @@ -35,10 +35,6 @@ const char ZE_SEPP[]="@@][@@"; -const char ElectromagnetismRotationGrp::START[]="GRP_"; - -const char ElectromagnetismRotationFam::START[]="FAM_"; - ElectromagnetismRotationStatus::ElectromagnetismRotationStatus(const char *name):_status(false),_name(name) { } @@ -67,13 +63,18 @@ bool ElectromagnetismRotationGrp::isSameAs(const ElectromagnetismRotationGrp& ot return false; } +ElectromagnetismRotationGrp::ElectromagnetismRotationGrp(const char *name):ElectromagnetismRotationStatus(name) +{ + std::ostringstream oss; oss << ElectromagnetismRotationGrp::start() << name; _ze_key_name=oss.str(); +} + ElectromagnetismRotationFam::ElectromagnetismRotationFam(const char *name):ElectromagnetismRotationStatus(name),_id(0) { std::size_t pos(_name.find(ZE_SEPP)); std::string name0(_name.substr(0,pos)),name1(_name.substr(pos+strlen(ZE_SEPP))); std::istringstream iss(name1); iss >> _id; - std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); _name=name0; + std::ostringstream oss; oss << ElectromagnetismRotationFam::start() << name; _ze_key_name=oss.str(); _name=name0; } bool ElectromagnetismRotationFam::isSameAs(const ElectromagnetismRotationFam& other) const diff --git a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.h b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.h index aade392..2c743d3 100644 --- a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.h +++ b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationHelper/ElectromagnetismRotationHelper.h @@ -25,6 +25,7 @@ #include #include +#define MEDLOADERFORPV_EXPORTS #include "MEDLoaderForPV.h" class MEDLOADERFORPV_EXPORT ElectromagnetismRotationStatus @@ -41,20 +42,20 @@ public: virtual void printMySelf(std::ostream& os) const; virtual bool isSameAs(const ElectromagnetismRotationStatus& other) const; protected: -mutable bool _status; -std::string _name; -std::string _ze_key_name; + mutable bool _status; + std::string _name; + std::string _ze_key_name; }; class MEDLOADERFORPV_EXPORT ElectromagnetismRotationGrp : public ElectromagnetismRotationStatus { public: - ElectromagnetismRotationGrp(const char *name):ElectromagnetismRotationStatus(name) { std::ostringstream oss; oss << START << name; _ze_key_name=oss.str(); } + ElectromagnetismRotationGrp(const char *name); void setFamilies(const std::vector& fams) { _fams=fams; } const std::vector& getFamiliesLyingOn() const { return _fams; } bool isSameAs(const ElectromagnetismRotationGrp& other) const; + static const char* start() { return "GRP_"; } public: - static const char START[]; std::vector _fams; }; @@ -66,8 +67,7 @@ public: void fillIdsToKeep(std::set& s) const; int getId() const { return _id; } bool isSameAs(const ElectromagnetismRotationFam& other) const; -public: - static const char START[]; + static const char* start() { return "FAM_"; } private: int _id; }; diff --git a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationIO/vtkElectromagnetismRotation.cxx b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationIO/vtkElectromagnetismRotation.cxx index ce20795..dfe3af6 100644 --- a/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationIO/vtkElectromagnetismRotation.cxx +++ b/src/ElectromagnetismRotation/plugin/ElectromagnetismRotationIO/vtkElectromagnetismRotation.cxx @@ -406,12 +406,12 @@ int vtkElectromagnetismRotation::GetSILUpdateStamp() const char* vtkElectromagnetismRotation::GetGrpStart() { - return ElectromagnetismRotationGrp::START; + return ElectromagnetismRotationGrp::start(); } const char* vtkElectromagnetismRotation::GetFamStart() { - return ElectromagnetismRotationFam::START; + return ElectromagnetismRotationFam::start(); } void vtkElectromagnetismRotation::PrintSelf(ostream& os, vtkIndent indent) -- 2.39.2