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)
const char ZE_SEPP[]="@@][@@";
-const char ElectromagnetismRotationGrp::START[]="GRP_";
-
-const char ElectromagnetismRotationFam::START[]="FAM_";
-
ElectromagnetismRotationStatus::ElectromagnetismRotationStatus(const char *name):_status(false),_name(name)
{
}
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
#include <set>
#include <map>
+#define MEDLOADERFORPV_EXPORTS
#include "MEDLoaderForPV.h"
class MEDLOADERFORPV_EXPORT ElectromagnetismRotationStatus
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<std::string>& fams) { _fams=fams; }
const std::vector<std::string>& getFamiliesLyingOn() const { return _fams; }
bool isSameAs(const ElectromagnetismRotationGrp& other) const;
+ static const char* start() { return "GRP_"; }
public:
- static const char START[];
std::vector<std::string> _fams;
};
void fillIdsToKeep(std::set<int>& 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;
};
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)