11#include "MantidTypes/Core/DateAndTimeHelpers.h"
16Kernel::Logger
g_log(
"DeprecatedAlias");
32 if ((!date.empty()) && (Types::Core::DateAndTimeHelpers::stringIsISO8601(date))) {
35 throw std::invalid_argument(
"DeprecatedAlias::DeprecationDate(): deprecation date must follow ISO8601.");
46 std::stringstream msg;
48 auto alias = algo->
alias();
51 throw std::logic_error(
"Cannot find the deprecated alias for this algorithm.");
53 msg <<
"The algorithm '" << alias <<
"' is deprecated on " <<
m_deprecationDate <<
"."
54 <<
"Please use '" << algo->
name() <<
"' instead.";
std::string m_deprecationDate
Deprecation date.
void setDeprecationDate(const std::string &date)
Set the deprecation date which will be used to inform the users.
std::string deprecationMessage(const IAlgorithm *)
Construct and return a full deprecation message.
virtual ~DeprecatedAlias()
Destructor to ensure the compiler is happy.
DeprecatedAlias()
Constructor to ensure the compiler is happy.
IAlgorithm is the interface implemented by the Algorithm base class.
virtual const std::string alias() const =0
function to return any aliases of the algorithm.
virtual const std::string name() const =0
function to return a name of the algorithm, must be overridden in all algorithms
Kernel::Logger g_log("ExperimentInfo")
static logger object