diff --git a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h index 56e7410ed2602592a67b98e1bfe336b52851325a..a18912ebd097d633cbf262b0cd023a9f8bbd7994 100644 --- a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/PointGroup.h @@ -37,7 +37,7 @@ namespace Geometry virtual ~PointGroup() {} /// Name of the point group - virtual std::string getName() = 0; + virtual std::string getName() const = 0; virtual CrystalSystem crystalSystem() const = 0; /// Return true if the hkls are in same group @@ -70,7 +70,7 @@ namespace Geometry public: PointGroupLaue1(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -83,7 +83,7 @@ namespace Geometry public: PointGroupLaue2(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -96,7 +96,7 @@ namespace Geometry public: PointGroupLaue3(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -109,7 +109,7 @@ namespace Geometry public: PointGroupLaue4(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -122,7 +122,7 @@ namespace Geometry public: PointGroupLaue5(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -135,7 +135,7 @@ namespace Geometry public: PointGroupLaue6(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -148,7 +148,7 @@ namespace Geometry public: PointGroupLaue7(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -161,7 +161,7 @@ namespace Geometry public: PointGroupLaue8(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -174,7 +174,7 @@ namespace Geometry public: PointGroupLaue9(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -187,7 +187,7 @@ namespace Geometry public: PointGroupLaue10(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -200,7 +200,7 @@ namespace Geometry public: PointGroupLaue11(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -213,7 +213,7 @@ namespace Geometry public: PointGroupLaue12(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; @@ -226,7 +226,7 @@ namespace Geometry public: PointGroupLaue13(); /// Name of the point group - virtual std::string getName(); + virtual std::string getName() const; /// Return true if the hkls are equivalent. virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const; virtual PointGroup::CrystalSystem crystalSystem() const; diff --git a/Code/Mantid/Framework/Geometry/src/Crystal/PointGroup.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/PointGroup.cpp index 37571b383e7c138b56d5520faf9b1d1c5faff570..42011a72b67e2eee5c20d5b8d9961efa7022526a 100644 --- a/Code/Mantid/Framework/Geometry/src/Crystal/PointGroup.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/PointGroup.cpp @@ -155,7 +155,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue1::getName() + std::string PointGroupLaue1::getName() const { return "-1 (Triclinic)"; } @@ -182,7 +182,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue2::getName() + std::string PointGroupLaue2::getName() const { return "1 2/m 1 (Monoclinic, unique axis b)"; } @@ -209,7 +209,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue3::getName() + std::string PointGroupLaue3::getName() const { return "1 1 2/m (Monoclinic, unique axis c)"; } @@ -237,7 +237,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue4::getName() + std::string PointGroupLaue4::getName() const { return "mmm (Orthorombic)"; } @@ -266,7 +266,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue5::getName() + std::string PointGroupLaue5::getName() const { return "4/m (Tetragonal)"; } @@ -296,7 +296,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue6::getName() + std::string PointGroupLaue6::getName() const { return "4/mmm (Tetragonal)"; } @@ -328,7 +328,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue7::getName() + std::string PointGroupLaue7::getName() const { return "-3 (Trigonal - Hexagonal)"; } @@ -357,7 +357,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue8::getName() + std::string PointGroupLaue8::getName() const { return "-3m1 (Trigonal - Rhombohedral)"; } @@ -388,7 +388,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue9::getName() + std::string PointGroupLaue9::getName() const { return "-31m (Trigonal - Rhombohedral)"; } @@ -418,7 +418,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue10::getName() + std::string PointGroupLaue10::getName() const { return "6/m (Hexagonal)"; } @@ -449,7 +449,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue11::getName() + std::string PointGroupLaue11::getName() const { return "6/mmm (Hexagonal)"; } @@ -485,7 +485,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue12::getName() + std::string PointGroupLaue12::getName() const { return "m-3 (Cubic)"; } @@ -521,7 +521,7 @@ namespace Geometry setTransformationMatrices(generateTransformationMatrices(getSymmetryOperations())); } - std::string PointGroupLaue13::getName() + std::string PointGroupLaue13::getName() const { return "m-3m (Cubic)"; } diff --git a/Code/Mantid/Framework/Geometry/test/PointGroupTest.h b/Code/Mantid/Framework/Geometry/test/PointGroupTest.h index c4bf04ab86d86e2bd5b57a28ad3d076e92f131f3..98dec1939058ef845af28a24c19d33af32b2e1ab 100644 --- a/Code/Mantid/Framework/Geometry/test/PointGroupTest.h +++ b/Code/Mantid/Framework/Geometry/test/PointGroupTest.h @@ -233,7 +233,7 @@ private: { } ~TestablePointGroup() {} - MOCK_METHOD0(getName, std::string()); + MOCK_CONST_METHOD0(getName, std::string()); MOCK_CONST_METHOD2(isEquivalent, bool(const V3D &hkl, const V3D &hkl2)); MOCK_CONST_METHOD0(crystalSystem, PointGroup::CrystalSystem()); };