Skip to content

Commit

Permalink
Moving deprecated algorithms to deprecated category. Refs #4359
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiSavici committed Dec 22, 2011
1 parent 2387422 commit 1fee420
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Code/Mantid/Framework/API/src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,11 @@ namespace Mantid
res.push_back(*h);
}

const DeprecatedAlgorithm * depo = dynamic_cast<const DeprecatedAlgorithm *>(this);
if (depo != NULL)
{
res.push_back("Deprecated");
}
return res;
}

Expand Down
6 changes: 6 additions & 0 deletions Code/Mantid/Framework/API/src/AlgorithmProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "MantidAPI/AlgorithmProxy.h"
#include "MantidAPI/AlgorithmObserver.h"
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/DeprecatedAlgorithm.h"

using namespace Mantid::Kernel;

Expand Down Expand Up @@ -258,6 +259,11 @@ namespace Mantid
res.push_back(*h);
}

const DeprecatedAlgorithm * depo = dynamic_cast<const DeprecatedAlgorithm *>(this);
if (depo != NULL)
{
res.push_back("Deprecated");
}
return res;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/DeprecatedAlgorithm.h"

namespace Mantid
{
Expand Down Expand Up @@ -58,7 +59,7 @@ namespace CurveFitting
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport Linear : public API::Algorithm
class DLLExport Linear : public API::Algorithm, public API::DeprecatedAlgorithm
{
public:
/// Constructor
Expand All @@ -70,7 +71,7 @@ class DLLExport Linear : public API::Algorithm
/// Algorithm's version
virtual int version() const { return (1); }
/// Algorithm's category for identification
virtual const std::string category() const { return "Deprecated"; }
virtual const std::string category() const { return "Optimization\\FitFunctions"; }

private:
/// Sets documentation strings for this algorithm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/DeprecatedAlgorithm.h"

namespace Mantid
{
Expand Down Expand Up @@ -41,7 +42,7 @@ namespace DataHandling
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport GetMaskedDetectors : public API::Algorithm
class DLLExport GetMaskedDetectors : public API::Algorithm, public API::DeprecatedAlgorithm
{
public:
GetMaskedDetectors();
Expand All @@ -52,7 +53,7 @@ class DLLExport GetMaskedDetectors : public API::Algorithm
/// Algorithm's version for identification overriding a virtual method
virtual int version() const { return 1;};
/// Algorithm's category for identification overriding a virtual method
virtual const std::string category() const { return "Deprecated";}
virtual const std::string category() const { return "Transforms\\Masking";}

private:
/// Sets documentation strings for this algorithm
Expand Down

0 comments on commit 1fee420

Please sign in to comment.