Mantid
|
Class for marking algorithms as deprecated. More...
#include <DeprecatedAlgorithm.h>
Public Member Functions | |
DeprecatedAlgorithm () | |
Does nothing other than make the compiler happy. More... | |
void | deprecatedDate (const std::string &) |
The date the algorithm was deprecated on. More... | |
std::string | deprecationMsg (const IAlgorithm *) |
This merely prints the deprecation error for people to see. More... | |
void | useAlgorithm (const std::string &, const int version=-1) |
The algorithm to use instead of this one. More... | |
virtual | ~DeprecatedAlgorithm () |
Does nothing other than make the compiler happy. More... | |
Private Attributes | |
std::string | m_deprecatedDate |
The date that the algorithm was first deprecated. More... | |
std::string | m_replacementAlgorithm |
The algorithm to use instead of this one. More... | |
int | m_replacementVersion |
Replacement version, -1 indicates latest. More... | |
Class for marking algorithms as deprecated.
Definition at line 23 of file DeprecatedAlgorithm.h.
Mantid::API::DeprecatedAlgorithm::DeprecatedAlgorithm | ( | ) |
Does nothing other than make the compiler happy.
Definition at line 20 of file DeprecatedAlgorithm.cpp.
|
virtualdefault |
Does nothing other than make the compiler happy.
void Mantid::API::DeprecatedAlgorithm::deprecatedDate | ( | const std::string & | date | ) |
The date the algorithm was deprecated on.
Definition at line 42 of file DeprecatedAlgorithm.cpp.
References m_deprecatedDate.
Referenced by Mantid::Algorithms::AlignDetectors::AlignDetectors(), Mantid::Crystal::FindUBUsingMinMaxD::FindUBUsingMinMaxD(), and Mantid::DataHandling::LoadSNSspec::LoadSNSspec().
std::string Mantid::API::DeprecatedAlgorithm::deprecationMsg | ( | const IAlgorithm * | algo | ) |
This merely prints the deprecation error for people to see.
Definition at line 56 of file DeprecatedAlgorithm.cpp.
References Mantid::DataHandling::exists(), Mantid::API::g_log, Mantid::Kernel::SingletonHolder< T >::Instance(), m_deprecatedDate, m_replacementAlgorithm, m_replacementVersion, Mantid::API::IAlgorithm::name(), and Mantid::Kernel::Logger::warning().
void Mantid::API::DeprecatedAlgorithm::useAlgorithm | ( | const std::string & | replacement, |
const int | version = -1 |
||
) |
The algorithm to use instead of this one.
replacement | Name of the algorithm that replaces the deprecated one |
version | An optional version number for the replacement (default=-1) |
Definition at line 28 of file DeprecatedAlgorithm.cpp.
References m_replacementAlgorithm, and m_replacementVersion.
Referenced by Mantid::Algorithms::AlignDetectors::AlignDetectors(), Mantid::MDAlgorithms::CentroidPeaksMD::CentroidPeaksMD(), Mantid::Crystal::FindUBUsingMinMaxD::FindUBUsingMinMaxD(), Mantid::DataHandling::LoadAscii::LoadAscii(), Mantid::DataHandling::LoadSNSspec::LoadSNSspec(), and Mantid::Algorithms::RecordPythonScript::RecordPythonScript().
|
private |
The date that the algorithm was first deprecated.
Definition at line 39 of file DeprecatedAlgorithm.h.
Referenced by deprecatedDate(), and deprecationMsg().
|
private |
The algorithm to use instead of this one.
Definition at line 35 of file DeprecatedAlgorithm.h.
Referenced by deprecationMsg(), and useAlgorithm().
|
private |
Replacement version, -1 indicates latest.
Definition at line 37 of file DeprecatedAlgorithm.h.
Referenced by deprecationMsg(), and useAlgorithm().