X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FOrientationInverter.hxx;h=5ab0ee6297468feb6da25607375d43571d494c94;hb=714ec20d9675ab2c7d5530ae57656635def4e30f;hp=8fe7c9bca56e635aa07d4677eff4bb1ece7e9735;hpb=8d97afe48bd8fb622fccd2c16c37f281261bd0d7;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/OrientationInverter.hxx b/src/INTERP_KERNEL/OrientationInverter.hxx index 8fe7c9bca..5ab0ee629 100644 --- a/src/INTERP_KERNEL/OrientationInverter.hxx +++ b/src/INTERP_KERNEL/OrientationInverter.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -22,26 +22,29 @@ #define __ORIENTATIONINVERTER_HXX__ #include "INTERPKERNELDefines.hxx" +#include "NormalizedGeometricTypes" +#include "MCIdType.hxx" namespace INTERP_KERNEL { class OrientationInverter { public: + INTERPKERNEL_EXPORT static OrientationInverter *BuildInstanceFrom(NormalizedCellType gt); INTERPKERNEL_EXPORT virtual ~OrientationInverter() { } - INTERPKERNEL_EXPORT virtual void operate(int *beginPt, int *endPt) const = 0; + INTERPKERNEL_EXPORT virtual void operate(mcIdType *beginPt, mcIdType *endPt) const = 0; }; class OrientationInverterChecker : public OrientationInverter { public: OrientationInverterChecker(unsigned nbNodes):_nb_nodes(nbNodes) { } - void operate(int *beginPt, int *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); } - virtual void operateAndShutUp(int *beginPt) const = 0; + void operate(mcIdType *beginPt, mcIdType *endPt) const { check(beginPt,endPt); operateAndShutUp(beginPt); } + virtual void operateAndShutUp(mcIdType *beginPt) const = 0; protected: unsigned getNbNodes() const { return _nb_nodes; } private: - void check(int *beginPt, int *endPt) const; + void check(mcIdType *beginPt, mcIdType *endPt) const; private: unsigned _nb_nodes; }; @@ -50,82 +53,82 @@ namespace INTERP_KERNEL { public: OrientationInverterSEG2():OrientationInverterChecker(2u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterSEG3 : public OrientationInverterChecker { public: OrientationInverterSEG3():OrientationInverterChecker(3u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter2DLinear : public OrientationInverterChecker { public: OrientationInverter2DLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter2DQuadratic : public OrientationInverterChecker { public: OrientationInverter2DQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPolygon : public OrientationInverter { public: - void operate(int *beginPt, int *endPt) const; + void operate(mcIdType *beginPt, mcIdType *endPt) const; }; class OrientationInverterQPolygon : public OrientationInverter { public: - void operate(int *beginPt, int *endPt) const; + void operate(mcIdType *beginPt, mcIdType *endPt) const; }; class OrientationInverterTetra4 : public OrientationInverterChecker { public: OrientationInverterTetra4():OrientationInverterChecker(4u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterTetra10 : public OrientationInverterChecker { public: - OrientationInverterTetra10():OrientationInverterChecker(4u) { } - void operateAndShutUp(int *beginPt) const; + OrientationInverterTetra10():OrientationInverterChecker(10u) { } + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPyra5 : public OrientationInverterChecker { public: OrientationInverterPyra5():OrientationInverterChecker(5u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverterPyra13 : public OrientationInverterChecker { public: OrientationInverterPyra13():OrientationInverterChecker(13u) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter3DExtrusionLinear : public OrientationInverterChecker { public: OrientationInverter3DExtrusionLinear(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; class OrientationInverter3DExtrusionQuadratic : public OrientationInverterChecker { public: OrientationInverter3DExtrusionQuadratic(unsigned nbNodes):OrientationInverterChecker(nbNodes) { } - void operateAndShutUp(int *beginPt) const; + void operateAndShutUp(mcIdType *beginPt) const; }; }