Skip to content
Snippets Groups Projects
DeprecatedAlgorithm.h 1.18 KiB
Newer Older
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
//   NScD Oak Ridge National Laboratory, European Spallation Source,
//   Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/Algorithm.h"
#include "MantidAPI/IAlgorithm.h"
#include <string>

namespace Mantid {
namespace API {
/**
 Class for marking algorithms as deprecated.

 @author Peter Peterson, NScD Oak Ridge National Laboratory
 @date 25/02/2011
*/
class MANTID_API_DLL DeprecatedAlgorithm {
public:
  DeprecatedAlgorithm();
  virtual ~DeprecatedAlgorithm();
  std::string deprecationMsg(const IAlgorithm *);
  void useAlgorithm(const std::string &, const int version = -1);
  void deprecatedDate(const std::string &);
private:
  /// The algorithm to use instead of this one.
  std::string m_replacementAlgorithm;
  /// Replacement version, -1 indicates latest
  int m_replacementVersion;
  /// The date that the algorithm was first deprecated.
  std::string m_deprecatedDate;
};

} // namespace API
} // namespace Mantid