Commit cf596710 authored by Edward Brown's avatar Edward Brown
Browse files

Re #22048: Applied fixes to Framework/API.

parent 1ea9948e
......@@ -301,7 +301,7 @@ public:
/// parent object to fill.
void trackAlgorithmHistory(boost::shared_ptr<AlgorithmHistory> parentHist);
typedef std::vector<boost::shared_ptr<Workspace>> WorkspaceVector;
using WorkspaceVector = std::vector<boost::shared_ptr<Workspace> >;
void findWorkspaceProperties(WorkspaceVector &inputWorkspaces,
WorkspaceVector &outputWorkspaces) const;
......@@ -502,7 +502,7 @@ private:
};
/// Typedef for a shared pointer to an Algorithm
typedef boost::shared_ptr<Algorithm> Algorithm_sptr;
using Algorithm_sptr = boost::shared_ptr<Algorithm>;
} // namespace API
} // namespace Mantid
......
......@@ -163,18 +163,16 @@ private:
void fillHiddenCategories(std::unordered_set<std::string> *categorySet) const;
/// A typedef for the map of algorithm versions
typedef std::map<std::string, int> VersionMap;
using VersionMap = std::map<std::string, int>;
/// The map holding the registered class names and their highest versions
VersionMap m_vmap;
};
typedef Mantid::Kernel::SingletonHolder<AlgorithmFactoryImpl> AlgorithmFactory;
using AlgorithmFactory = Mantid::Kernel::SingletonHolder<AlgorithmFactoryImpl>;
/// Convenient typedef for an UpdateNotification
typedef Mantid::Kernel::DynamicFactory<Algorithm>::UpdateNotification
AlgorithmFactoryUpdateNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DynamicFactory<
Algorithm>::UpdateNotification> &AlgorithmFactoryUpdateNotification_ptr;
using AlgorithmFactoryUpdateNotification = Mantid::Kernel::DynamicFactory<Algorithm>::UpdateNotification;
using AlgorithmFactoryUpdateNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DynamicFactory<Algorithm>::UpdateNotification> &;
} // namespace API
} // namespace Mantid
......
......@@ -34,10 +34,9 @@ template <class T> struct CompareHistory {
}
// typedefs for algorithm history pointers
typedef boost::shared_ptr<AlgorithmHistory> AlgorithmHistory_sptr;
typedef boost::shared_ptr<const AlgorithmHistory> AlgorithmHistory_const_sptr;
typedef std::set<AlgorithmHistory_sptr,
Detail::CompareHistory<AlgorithmHistory>> AlgorithmHistories;
using AlgorithmHistory_sptr = boost::shared_ptr<AlgorithmHistory>;
using AlgorithmHistory_const_sptr = boost::shared_ptr<const AlgorithmHistory>;
using AlgorithmHistories = std::set<AlgorithmHistory_sptr, Detail::CompareHistory<AlgorithmHistory> >;
/** @class AlgorithmHistory AlgorithmHistory.h API/MAntidAPI/AlgorithmHistory.h
......
......@@ -102,7 +102,7 @@ private:
mutable std::mutex m_managedMutex;
};
typedef Mantid::Kernel::SingletonHolder<AlgorithmManagerImpl> AlgorithmManager;
using AlgorithmManager = Mantid::Kernel::SingletonHolder<AlgorithmManagerImpl>;
} // namespace API
} // Namespace Mantid
......
......@@ -53,7 +53,7 @@ class DLLExport AlgorithmProperty
: public Kernel::PropertyWithValue<boost::shared_ptr<IAlgorithm>> {
public:
/// Typedef the held type
typedef boost::shared_ptr<IAlgorithm> HeldType;
using HeldType = boost::shared_ptr<IAlgorithm>;
/// Constructor
AlgorithmProperty(const std::string &propName,
......
......@@ -26,7 +26,7 @@ class Void;
namespace Mantid {
namespace API {
class Algorithm;
typedef boost::shared_ptr<Algorithm> Algorithm_sptr;
using Algorithm_sptr = boost::shared_ptr<Algorithm>;
/**
......
......@@ -178,65 +178,37 @@ private:
std::string m_illegalChars;
};
typedef Mantid::Kernel::SingletonHolder<AnalysisDataServiceImpl>
AnalysisDataService;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::AddNotification
WorkspaceAddNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::AddNotification> &WorkspaceAddNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::
BeforeReplaceNotification WorkspaceBeforeReplaceNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::BeforeReplaceNotification> &
WorkspaceBeforeReplaceNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::
AfterReplaceNotification WorkspaceAfterReplaceNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::AfterReplaceNotification> &
WorkspaceAfterReplaceNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::
PreDeleteNotification WorkspacePreDeleteNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::PreDeleteNotification> &
WorkspacePreDeleteNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::
PostDeleteNotification WorkspacePostDeleteNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::PostDeleteNotification> &
WorkspacePostDeleteNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::ClearNotification
ClearADSNotification;
typedef const Poco::AutoPtr<Mantid::Kernel::DataService<
Mantid::API::Workspace>::ClearNotification> &ClearADSNotification_ptr;
typedef Mantid::Kernel::DataService<Mantid::API::Workspace>::RenameNotification
WorkspaceRenameNotification;
typedef const Poco::AutoPtr<
Mantid::Kernel::DataService<Mantid::API::Workspace>::RenameNotification> &
WorkspaceRenameNotification_ptr;
typedef AnalysisDataServiceImpl::GroupWorkspacesNotification
WorkspacesGroupedNotification;
typedef const Poco::AutoPtr<
AnalysisDataServiceImpl::GroupWorkspacesNotification> &
WorkspacesGroupedNotification_ptr;
typedef AnalysisDataServiceImpl::UnGroupingWorkspaceNotification
WorkspaceUnGroupingNotification;
typedef const Poco::AutoPtr<
AnalysisDataServiceImpl::UnGroupingWorkspaceNotification> &
WorkspaceUnGroupingNotification_ptr;
typedef AnalysisDataServiceImpl::GroupUpdatedNotification
GroupUpdatedNotification;
typedef const Poco::AutoPtr<AnalysisDataServiceImpl::GroupUpdatedNotification> &
GroupUpdatedNotification_ptr;
using AnalysisDataService = Mantid::Kernel::SingletonHolder<AnalysisDataServiceImpl>;
using WorkspaceAddNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::AddNotification;
using WorkspaceAddNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::AddNotification> &;
using WorkspaceBeforeReplaceNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::BeforeReplaceNotification;
using WorkspaceBeforeReplaceNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::BeforeReplaceNotification> &;
using WorkspaceAfterReplaceNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::AfterReplaceNotification;
using WorkspaceAfterReplaceNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::AfterReplaceNotification> &;
using WorkspacePreDeleteNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::PreDeleteNotification;
using WorkspacePreDeleteNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::PreDeleteNotification> &;
using WorkspacePostDeleteNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::PostDeleteNotification;
using WorkspacePostDeleteNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::PostDeleteNotification> &;
using ClearADSNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::ClearNotification;
using ClearADSNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::ClearNotification> &;
using WorkspaceRenameNotification = Mantid::Kernel::DataService<Mantid::API::Workspace>::RenameNotification;
using WorkspaceRenameNotification_ptr = const Poco::AutoPtr<Mantid::Kernel::DataService<Mantid::API::Workspace>::RenameNotification> &;
using WorkspacesGroupedNotification = AnalysisDataServiceImpl::GroupWorkspacesNotification;
using WorkspacesGroupedNotification_ptr = const Poco::AutoPtr<AnalysisDataServiceImpl::GroupWorkspacesNotification> &;
using WorkspaceUnGroupingNotification = AnalysisDataServiceImpl::UnGroupingWorkspaceNotification;
using WorkspaceUnGroupingNotification_ptr = const Poco::AutoPtr<AnalysisDataServiceImpl::UnGroupingWorkspaceNotification> &;
using GroupUpdatedNotification = AnalysisDataServiceImpl::GroupUpdatedNotification;
using GroupUpdatedNotification_ptr = const Poco::AutoPtr<AnalysisDataServiceImpl::GroupUpdatedNotification> &;
} // Namespace API
} // Namespace Mantid
......
......@@ -56,8 +56,7 @@ private:
~ArchiveSearchFactoryImpl() override = default;
};
typedef Mantid::Kernel::SingletonHolder<ArchiveSearchFactoryImpl>
ArchiveSearchFactory;
using ArchiveSearchFactory = Mantid::Kernel::SingletonHolder<ArchiveSearchFactoryImpl>;
}
}
......
......@@ -505,10 +505,10 @@ public:
};
/// Shared ptr to BoxController
typedef boost::shared_ptr<BoxController> BoxController_sptr;
using BoxController_sptr = boost::shared_ptr<BoxController>;
/// Shared ptr to a const BoxController
typedef boost::shared_ptr<const BoxController> BoxController_const_sptr;
using BoxController_const_sptr = boost::shared_ptr<const BoxController>;
} // namespace API
......
......@@ -78,7 +78,7 @@ private:
/// The specialisation of the SingletonHolder class that holds the
/// CatalogFactory
typedef Mantid::Kernel::SingletonHolder<CatalogFactoryImpl> CatalogFactory;
using CatalogFactory = Mantid::Kernel::SingletonHolder<CatalogFactoryImpl>;
} // namespace API
} // namespace Mantid
......
......@@ -67,7 +67,7 @@ private:
std::map<CatalogSession_sptr, ICatalog_sptr> m_activeCatalogs;
};
typedef Kernel::SingletonHolder<CatalogManagerImpl> CatalogManager;
using CatalogManager = Kernel::SingletonHolder<CatalogManagerImpl>;
}
}
......
......@@ -49,8 +49,8 @@ private:
std::string m_endpoint;
};
typedef boost::shared_ptr<CatalogSession> CatalogSession_sptr;
typedef boost::shared_ptr<const CatalogSession> CatalogSession_const_sptr;
using CatalogSession_sptr = boost::shared_ptr<CatalogSession>;
using CatalogSession_const_sptr = boost::shared_ptr<const CatalogSession>;
}
}
......
......@@ -227,8 +227,8 @@ MANTID_API_DLL std::ostream &operator<<(std::ostream &, const API::Boolean &);
/// Redaing a Boolean from an input stream
MANTID_API_DLL std::istream &operator>>(std::istream &istr, API::Boolean &);
typedef boost::shared_ptr<Column> Column_sptr;
typedef boost::shared_ptr<const Column> Column_const_sptr;
using Column_sptr = boost::shared_ptr<Column>;
using Column_const_sptr = boost::shared_ptr<const Column>;
} // namespace API
} // Namespace Mantid
......
......@@ -63,7 +63,7 @@ private:
~ColumnFactoryImpl() override = default;
};
typedef Mantid::Kernel::SingletonHolder<ColumnFactoryImpl> ColumnFactory;
using ColumnFactory = Mantid::Kernel::SingletonHolder<ColumnFactoryImpl>;
} // namespace API
} // namespace Mantid
......
......@@ -247,9 +247,9 @@ private:
};
/// shared pointer to the composite function base class
typedef boost::shared_ptr<CompositeFunction> CompositeFunction_sptr;
using CompositeFunction_sptr = boost::shared_ptr<CompositeFunction>;
/// shared pointer to the composite function base class (const version)
typedef boost::shared_ptr<const CompositeFunction> CompositeFunction_const_sptr;
using CompositeFunction_const_sptr = boost::shared_ptr<const CompositeFunction>;
/** A Jacobian for individual functions
*/
......
......@@ -72,8 +72,7 @@ private:
~ConstraintFactoryImpl() override = default;
};
typedef Mantid::Kernel::SingletonHolder<ConstraintFactoryImpl>
ConstraintFactory;
using ConstraintFactory = Mantid::Kernel::SingletonHolder<ConstraintFactoryImpl>;
} // namespace API
} // namespace Mantid
......
......@@ -59,10 +59,10 @@ protected:
};
// Helper typedef for a shared pointer of this type.
typedef boost::shared_ptr<CoordTransform> CoordTransform_sptr;
using CoordTransform_sptr = boost::shared_ptr<CoordTransform>;
// Helper typdef for a const shared pointer of this type.
typedef boost::shared_ptr<const CoordTransform> CoordTransform_const_sptr;
using CoordTransform_const_sptr = boost::shared_ptr<const CoordTransform>;
} // namespace Mantid
} // namespace API
......
......@@ -63,8 +63,7 @@ private:
CostFunctionFactoryImpl();
};
typedef Mantid::Kernel::SingletonHolder<CostFunctionFactoryImpl>
CostFunctionFactory;
using CostFunctionFactory = Mantid::Kernel::SingletonHolder<CostFunctionFactoryImpl>;
} // namespace API
} // namespace Mantid
......
......@@ -56,7 +56,7 @@ class MANTID_API_DLL DetectorSearcher {
public:
/// Search result type representing whether a detector was found and if so
/// which detector index it was.
typedef std::tuple<bool, size_t> DetectorSearchResult;
using DetectorSearchResult = std::tuple<bool, size_t>;
/// Create a new DetectorSearcher with the given instrument & detectors
DetectorSearcher(Geometry::Instrument_const_sptr instrument,
......
......@@ -73,8 +73,7 @@ private:
using Kernel::DynamicFactory<IDomainCreator>::createUnwrapped;
};
typedef Mantid::Kernel::SingletonHolder<DomainCreatorFactoryImpl>
DomainCreatorFactory;
using DomainCreatorFactory = Mantid::Kernel::SingletonHolder<DomainCreatorFactoryImpl>;
} // namespace API
} // namespace Mantid
......
Supports Markdown
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