From c94bf0514574eb4305619bbba1a2fecd1373eee2 Mon Sep 17 00:00:00 2001 From: Nick Draper <nick.draper@stfc.ac.uk> Date: Fri, 6 Mar 2020 13:49:24 +0000 Subject: [PATCH] clang formatting for this pr --- Framework/API/inc/MantidAPI/Algorithm.h | 10 ++++++---- Framework/API/inc/MantidAPI/AlgorithmProxy.h | 16 ++++++++-------- Framework/API/inc/MantidAPI/IAlgorithm.h | 4 ++-- Framework/API/src/Algorithm.cpp | 3 ++- Framework/API/src/AlgorithmProxy.cpp | 5 ++--- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Framework/API/inc/MantidAPI/Algorithm.h b/Framework/API/inc/MantidAPI/Algorithm.h index d12aae54910..4bbb14e5da4 100644 --- a/Framework/API/inc/MantidAPI/Algorithm.h +++ b/Framework/API/inc/MantidAPI/Algorithm.h @@ -335,8 +335,10 @@ protected: friend class AlgorithmProxy; void initializeFromProxy(const AlgorithmProxy &); - void setExecutionState(const ExecutionState state); ///< Sets the current execution state - void setResultState(const ResultState state); ///< Sets the result execution state + void setExecutionState( + const ExecutionState state); ///< Sets the current execution state + void + setResultState(const ResultState state); ///< Sets the result execution state void store(); @@ -461,8 +463,8 @@ private: ExecutionState m_executionState; ///< the current execution state ResultState m_resultState; ///< the current result State - bool m_isExecuted; ///< Algorithm is executed flag - bool m_isChildAlgorithm; ///< Algorithm is a child algorithm + bool m_isExecuted; ///< Algorithm is executed flag + bool m_isChildAlgorithm; ///< Algorithm is a child algorithm bool m_recordHistoryForChild; ///< Flag to indicate whether history should be /// recorded. Applicable to child algs only bool m_alwaysStoreInADS; ///< Always store in the ADS, even for child algos diff --git a/Framework/API/inc/MantidAPI/AlgorithmProxy.h b/Framework/API/inc/MantidAPI/AlgorithmProxy.h index 0dd7cc982e1..6355b90456e 100644 --- a/Framework/API/inc/MantidAPI/AlgorithmProxy.h +++ b/Framework/API/inc/MantidAPI/AlgorithmProxy.h @@ -185,14 +185,14 @@ private: const int m_version; ///< version of the real algorithm mutable boost::shared_ptr<Algorithm> - m_alg; ///< Shared pointer to a real algorithm. Created on demand - - ExecutionState m_executionState; ///< the current execution state - ResultState m_resultState; ///< the current result State - bool m_isExecuted; ///< Executed flag - bool m_isLoggingEnabled; ///< is the logging of the underlying algorithm - /// enabled - int m_loggingOffset; ///< the logging priority offset + m_alg; ///< Shared pointer to a real algorithm. Created on demand + + ExecutionState m_executionState; ///< the current execution state + ResultState m_resultState; ///< the current result State + bool m_isExecuted; ///< Executed flag + bool m_isLoggingEnabled; ///< is the logging of the underlying algorithm + /// enabled + int m_loggingOffset; ///< the logging priority offset bool m_isAlgStartupLoggingEnabled; /// Whether to log alg startup and /// closedown messages from the base class /// (default = true) diff --git a/Framework/API/inc/MantidAPI/IAlgorithm.h b/Framework/API/inc/MantidAPI/IAlgorithm.h index 1da6aa9b46b..d1100040f1c 100644 --- a/Framework/API/inc/MantidAPI/IAlgorithm.h +++ b/Framework/API/inc/MantidAPI/IAlgorithm.h @@ -28,9 +28,9 @@ namespace API { */ using AlgorithmID = void *; -///The current state of the algorithm object +/// The current state of the algorithm object enum class ExecutionState { UNINITIALIZED, INITIALIZED, RUNNING, FINISHED }; -///The validity of the results of the algorithm object +/// The validity of the results of the algorithm object enum class ResultState { INCOMPLETE, FAILED, SUCCESS }; /** diff --git a/Framework/API/src/Algorithm.cpp b/Framework/API/src/Algorithm.cpp index 838a59883f7..f30d14e5c8c 100644 --- a/Framework/API/src/Algorithm.cpp +++ b/Framework/API/src/Algorithm.cpp @@ -140,7 +140,8 @@ bool Algorithm::isInitialized() const { /// Has the Algorithm already been executed bool Algorithm::isExecuted() const { - return ((executionState() == ExecutionState::FINISHED) && (resultState() == ResultState::SUCCESS)) ; + return ((executionState() == ExecutionState::FINISHED) && + (resultState() == ResultState::SUCCESS)); } //--------------------------------------------------------------------------------------------- diff --git a/Framework/API/src/AlgorithmProxy.cpp b/Framework/API/src/AlgorithmProxy.cpp index 2eaca031562..c8d9343331a 100644 --- a/Framework/API/src/AlgorithmProxy.cpp +++ b/Framework/API/src/AlgorithmProxy.cpp @@ -119,8 +119,7 @@ ExecutionState AlgorithmProxy::executionState() const { } /// Gets the current result State -ResultState AlgorithmProxy::resultState() const { - return m_resultState; } +ResultState AlgorithmProxy::resultState() const { return m_resultState; } /// True if the algorithm is running. bool AlgorithmProxy::isRunning() const { @@ -129,7 +128,7 @@ bool AlgorithmProxy::isRunning() const { /// Has the AlgorithmProxy already been initialized bool AlgorithmProxy::isInitialized() const { - return true; //Algorithm Proxies will always initialize the algorithm + return true; // Algorithm Proxies will always initialize the algorithm } /// Has the AlgorithmProxy already been executed -- GitLab