Commit 55b3e3a2 authored by Zhang, Chen's avatar Zhang, Chen
Browse files

add the deprecated alias warning to doc page

parent f4c8ace6
......@@ -6,10 +6,12 @@
// SPDX - License - Identifier: GPL - 3.0 +
#include "MantidAPI/AlgorithmManager.h"
#include "MantidAPI/DeprecatedAlgorithm.h"
#include "MantidAPI/DeprecatedAlias.h"
#include <boost/python/class.hpp>
using Mantid::API::AlgorithmManager;
using Mantid::API::DeprecatedAlgorithm;
using Mantid::API::DeprecatedAlias;
using Mantid::API::IAlgorithm_sptr;
using namespace boost::python;
......@@ -43,8 +45,13 @@ public:
const std::string isDeprecated() const {
std::string deprecMessage;
auto *depr = dynamic_cast<DeprecatedAlgorithm *>(m_alg.get());
auto *deprecatedAliasAlg = dynamic_cast<DeprecatedAlias *>(m_alg.get());
if (depr)
deprecMessage = depr->deprecationMsg(m_alg.get());
else if (deprecatedAliasAlg)
deprecMessage = deprecatedAliasAlg->deprecationMessage(m_alg.get());
return deprecMessage;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment