Skip to content
Snippets Groups Projects
Commit d11963c2 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Introduce a typedef for unique_ptr<IAlgorithm>

The definitions, along with the shared_ptr variants have been moved
to a fwd declare header.
Refs #14599
parent 4a1224f4
No related branches found
No related tags found
No related merge requests found
...@@ -202,6 +202,7 @@ set ( INC_FILES ...@@ -202,6 +202,7 @@ set ( INC_FILES
inc/MantidAPI/HistoryItem.h inc/MantidAPI/HistoryItem.h
inc/MantidAPI/HistoryView.h inc/MantidAPI/HistoryView.h
inc/MantidAPI/IAlgorithm.h inc/MantidAPI/IAlgorithm.h
inc/MantidAPI/IAlgorithm_fwd.h
inc/MantidAPI/IArchiveSearch.h inc/MantidAPI/IArchiveSearch.h
inc/MantidAPI/IBackgroundFunction.h inc/MantidAPI/IBackgroundFunction.h
inc/MantidAPI/IBoxControllerIO.h inc/MantidAPI/IBoxControllerIO.h
......
...@@ -5,10 +5,9 @@ ...@@ -5,10 +5,9 @@
// Includes // Includes
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#include "MantidAPI/DllConfig.h" #include "MantidAPI/DllConfig.h"
#include "MantidAPI/IAlgorithm_fwd.h"
#include "MantidKernel/IPropertyManager.h" #include "MantidKernel/IPropertyManager.h"
#include <memory>
namespace Poco { namespace Poco {
class AbstractObserver; class AbstractObserver;
template <class T> class ActiveResult; template <class T> class ActiveResult;
...@@ -179,15 +178,6 @@ public: ...@@ -179,15 +178,6 @@ public:
virtual std::string toString() const = 0; virtual std::string toString() const = 0;
}; };
/// Typedef for shared_ptr to IAlgorithm
typedef boost::shared_ptr<IAlgorithm> IAlgorithm_sptr;
/// Typedef for shared_ptr to IAlgorithm (const version)
typedef boost::shared_ptr<const IAlgorithm> IAlgorithm_const_sptr;
/// Typedef for unique_ptr to IAlgorithm
typedef std::unique<IAlgorithm> IAlgorithm_uptr;
/// Typedef for unique_ptr to IAlgorithm (const version)
typedef std::unique_ptr<const IAlgorithm> IAlgorithm_const_uptr;
} // namespace API } // namespace API
} // namespace Mantid } // namespace Mantid
......
#ifndef MANTID_API_IALGORITHM_FWD_H_
#define MANTID_API_IALGORITHM_FWD_H_
#include <boost/shared_ptr.hpp>
#include <memory>
namespace Mantid {
namespace API {
/**
This file provides forward declarations for Mantid::API::IAlgorithm
Copyright &copy; 2015 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
/// forward declare of Mantid::API::IAlgorithm
class IAlgorithm;
/// shared pointer to Mantid::API::IAlgorithm
typedef boost::shared_ptr<IAlgorithm> IAlgorithm_sptr;
/// shared pointer to Mantid::API::IAlgorithm (const version)
typedef boost::shared_ptr<const IAlgorithm> IAlgorithm_const_sptr;
/// unique pointer to Mantid::API::IAlgorithm
typedef std::unique_ptr<IAlgorithm> IAlgorithm_uptr;
/// unique pointer to Mantid::API::IAlgorithm (const version)
typedef std::unique_ptr<const IAlgorithm> IAlgorithm_const_uptr;
} // namespace API
} // namespace Mantid
#endif // MANTID_API_IALGORITHM_FWD_H_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment