Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
1b0b4c31
Commit
1b0b4c31
authored
Sep 14, 2021
by
Jose Borreguero
Browse files
override alias in AlgorithmAdapter
Signed-off-by:
Jose Borreguero
<
borreguero@gmail.com
>
parent
d6d172dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Framework/API/inc/MantidAPI/Algorithm.h
View file @
1b0b4c31
...
...
@@ -168,8 +168,7 @@ public:
/// Function to return all of the seeAlso (these are not validated) algorithms
/// related to this algorithm.A default implementation is provided.
const
std
::
vector
<
std
::
string
>
seeAlso
()
const
override
{
return
{};
};
/// function to return any aliases to the algorithm; A default implementation
/// is provided
/// function to return any aliases to the algorithm; A default implementation is provided
const
std
::
string
alias
()
const
override
{
return
""
;
}
/// function to return URL for algorithm documentation; A default
...
...
Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PythonAlgorithm/AlgorithmAdapter.h
View file @
1b0b4c31
...
...
@@ -53,6 +53,8 @@ public:
const
std
::
string
category
()
const
override
;
/// Returns seeAlso related algorithms.
const
std
::
vector
<
std
::
string
>
seeAlso
()
const
override
;
/// Allow the method returning the algorithm aliases to be overridden
const
std
::
string
alias
()
const
override
;
/// Returns optional documentation URL of the algorithm
const
std
::
string
helpURL
()
const
override
;
/// Allow the isRunning method to be overridden
...
...
Framework/PythonInterface/mantid/api/src/PythonAlgorithm/AlgorithmAdapter.cpp
View file @
1b0b4c31
...
...
@@ -107,6 +107,17 @@ template <typename BaseAlgorithm> const std::vector<std::string> AlgorithmAdapte
}
}
/**
* Returns the aliases of the algorithm. If not overridden returns the base algorithm implementation
*/
template
<
typename
BaseAlgorithm
>
const
std
::
string
AlgorithmAdapter
<
BaseAlgorithm
>::
alias
()
const
{
try
{
return
callMethod
<
std
::
string
>
(
getSelf
(),
"alias"
);
}
catch
(
UndefinedAttributeError
&
)
{
return
BaseAlgorithm
::
alias
();
}
}
/**
* Returns the summary of the algorithm. If not overridden
* it returns defaultSummary
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment