diff --git a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h index 611c094a8e04e91f24761d8e79a43c0daf11ba8e..8a113a7470e02812c0e743a83d0c4226b28d5e4e 100644 --- a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrame.h @@ -38,7 +38,7 @@ public: virtual const Mantid::Kernel::MDUnit& getMDUnit() const = 0; virtual bool canConvertTo(const Mantid::Kernel::MDUnit& otherUnit) const = 0; virtual std::string name() const = 0; - + virtual ~MDFrame(){} }; } // namespace Geometry diff --git a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h index a847c22be5445e7d8f605d35b0ed168b89a835fe..f9678b31299e99e0f6e28268c5c0c3357afa3204 100644 --- a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/MDGeometry/MDFrameFactory.h @@ -3,7 +3,7 @@ #include "MantidKernel/ChainableFactory.h" #include "MantidGeometry/MDGeometry/MDFrame.h" -#include "MantidKernel/System.h" +#include "MantidGeometry/MDGeometry/GeneralFrame.h" namespace Mantid { namespace Geometry { @@ -33,16 +33,8 @@ namespace Geometry { */ class DLLExport MDFrameFactory : public Kernel::ChainableFactory<MDFrameFactory, MDFrame> { -private: - virtual MDFrame *createRaw(const std::string &argument) const; - public: - /// Indicate an ability to intepret the string - virtual bool canInterpret(const std::string &unitString) const; - - MDFrameFactory(); - - virtual ~MDFrameFactory(); + virtual ~MDFrameFactory(){} }; //----------------------------------------------------------------------- @@ -50,7 +42,7 @@ public: //----------------------------------------------------------------------- class DLLExport GeneralFrameFactory : public MDFrameFactory { private: - GeneralFrame *createRaw(const std::string &unitString) const; + GeneralFrame *createRaw(const std::string &argument) const; public: bool canInterpret(const std::string &) const; }; diff --git a/Code/Mantid/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp b/Code/Mantid/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp index 72311acacad47edb2846d60e5ec422bb78e28290..7b1af687046486d26761f28f7dd43c7d0ea2a4d0 100644 --- a/Code/Mantid/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp +++ b/Code/Mantid/Framework/Geometry/src/MDGeometry/MDFrameFactory.cpp @@ -5,17 +5,6 @@ namespace Mantid { namespace Geometry { -//---------------------------------------------------------------------------------------------- -/** Constructor - */ -MDFrameFactory::MDFrameFactory() {} - -//---------------------------------------------------------------------------------------------- -/** Destructor - */ -MDFrameFactory::~MDFrameFactory() {} - - GeneralFrame * GeneralFrameFactory::createRaw(const std::string &argument) const{ return new GeneralFrame(argument, argument); // HACK diff --git a/Code/Mantid/Framework/Geometry/test/MDFrameFactoryTest.h b/Code/Mantid/Framework/Geometry/test/MDFrameFactoryTest.h index 0b3e33bf1505ab3f69f68a4b1b2c50877d29e34b..b67d2a73cf04d8c8215aa02e6dd7057bdaad490e 100644 --- a/Code/Mantid/Framework/Geometry/test/MDFrameFactoryTest.h +++ b/Code/Mantid/Framework/Geometry/test/MDFrameFactoryTest.h @@ -5,8 +5,10 @@ #include "MantidGeometry/MDGeometry/MDFrameFactory.h" #include "MantidGeometry/MDGeometry/MDFrame.h" +#include "MantidGeometry/MDGeometry/GeneralFrame.h" using namespace Mantid::Geometry; +using namespace Mantid::Kernel; class MDFrameFactoryTest : public CxxTest::TestSuite { public: @@ -22,7 +24,7 @@ public: TS_ASSERT(factory.canInterpret("anything")); std::unique_ptr<MDFrame> product = factory.create("anything"); - GeneralFrame x = + TSM_ASSERT("Should be creating a GeneralFrame", dynamic_cast<GeneralFrame*>(product.get())); }