Skip to content

Commit

Permalink
Refs #10135. Added init-method to PointGroup
Browse files Browse the repository at this point in the history
This solves the problem of depending on initialization order of PointGroupFactory and SymmetryOperationFactory.
  • Loading branch information
Michael Wedel committed Sep 11, 2014
1 parent 9dc0264 commit 031a556
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 53 deletions.
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/Geometry/CMakeLists.txt
Expand Up @@ -5,13 +5,13 @@ set ( SRC_FILES
src/Crystal/IndexingUtils.cpp
src/Crystal/NiggliCell.cpp
src/Crystal/OrientedLattice.cpp
src/Crystal/SymmetryOperation.cpp
src/Crystal/SymmetryOperationFactory.cpp
src/Crystal/PointGroup.cpp
src/Crystal/PointGroupFactory.cpp
src/Crystal/ReducedCell.cpp
src/Crystal/ReflectionCondition.cpp
src/Crystal/ScalarUtils.cpp
src/Crystal/SymmetryOperation.cpp
src/Crystal/SymmetryOperationFactory.cpp
src/Crystal/UnitCell.cpp
src/IObjComponent.cpp
src/Instrument.cpp
Expand Down Expand Up @@ -108,13 +108,13 @@ set ( INC_FILES
inc/MantidGeometry/Crystal/IndexingUtils.h
inc/MantidGeometry/Crystal/NiggliCell.h
inc/MantidGeometry/Crystal/OrientedLattice.h
inc/MantidGeometry/Crystal/SymmetryOperation.h
inc/MantidGeometry/Crystal/SymmetryOperationFactory.h
inc/MantidGeometry/Crystal/PointGroup.h
inc/MantidGeometry/Crystal/PointGroupFactory.h
inc/MantidGeometry/Crystal/ReducedCell.h
inc/MantidGeometry/Crystal/ReflectionCondition.h
inc/MantidGeometry/Crystal/ScalarUtils.h
inc/MantidGeometry/Crystal/SymmetryOperation.h
inc/MantidGeometry/Crystal/SymmetryOperationFactory.h
inc/MantidGeometry/Crystal/UnitCell.h
inc/MantidGeometry/DllConfig.h
inc/MantidGeometry/ICompAssembly.h
Expand Down
Expand Up @@ -51,6 +51,9 @@ namespace Geometry
/// Returns the same hkl for all equivalent hkls
Kernel::V3D getReflectionFamily(const Kernel::V3D &hkl) const;

/// In this method symmetry operations should be defined. It's called by the factory after construction of the object.
virtual void init() = 0;

protected:
PointGroup(const std::string &symbolHM);

Expand Down Expand Up @@ -78,6 +81,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -91,6 +96,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -104,6 +111,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -117,6 +126,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -130,6 +141,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -143,6 +156,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -156,6 +171,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -169,6 +186,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -182,6 +201,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -195,6 +216,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -208,6 +231,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -221,6 +246,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};

//------------------------------------------------------------------------
Expand All @@ -234,6 +261,8 @@ namespace Geometry
/// Return true if the hkls are equivalent.
virtual bool isEquivalent(const Kernel::V3D &hkl, const Kernel::V3D &hkl2) const;
virtual PointGroup::CrystalSystem crystalSystem() const;

virtual void init();
};


Expand Down

0 comments on commit 031a556

Please sign in to comment.