diff --git a/Framework/Kernel/inc/MantidKernel/ArrayProperty.h b/Framework/Kernel/inc/MantidKernel/ArrayProperty.h index eb7c4a047d4b0..a456406c9792e 100644 --- a/Framework/Kernel/inc/MantidKernel/ArrayProperty.h +++ b/Framework/Kernel/inc/MantidKernel/ArrayProperty.h @@ -25,7 +25,7 @@ namespace Kernel { @author Russell Taylor, Tessella Support Services plc @date 27/02/2008 */ -template class DLLExport ArrayProperty : public PropertyWithValue> { +template class MANTID_KERNEL_DLL ArrayProperty : public PropertyWithValue> { public: ArrayProperty(const std::string &name, std::vector vec, const IValidator_sptr &validator = IValidator_sptr(new NullValidator), diff --git a/Framework/Kernel/inc/MantidKernel/BinaryFile.h b/Framework/Kernel/inc/MantidKernel/BinaryFile.h index 7cc16f2db9e92..3fc7a4911d8bc 100644 --- a/Framework/Kernel/inc/MantidKernel/BinaryFile.h +++ b/Framework/Kernel/inc/MantidKernel/BinaryFile.h @@ -40,7 +40,7 @@ static const size_t MIN_BLOCK_SIZE = 1000; * the T type is done with a reinterpret_cast. * */ -template class DLLExport BinaryFile { +template class MANTID_KERNEL_DLL BinaryFile { public: //------------------------------------------------------------------------------------ /// Empty constructor diff --git a/Framework/Kernel/inc/MantidKernel/BoundedValidator.h b/Framework/Kernel/inc/MantidKernel/BoundedValidator.h index 1ec079de6e1cd..fe147d2e68b13 100644 --- a/Framework/Kernel/inc/MantidKernel/BoundedValidator.h +++ b/Framework/Kernel/inc/MantidKernel/BoundedValidator.h @@ -29,7 +29,7 @@ constexpr int LOWER_BOUND = -1; constexpr int UPPER_BOUND = 1; } // namespace -template class DLLExport BoundedValidator final : public TypedValidator { +template class MANTID_KERNEL_DLL BoundedValidator final : public TypedValidator { public: /// No-arg Constructor BoundedValidator() noexcept diff --git a/Framework/Kernel/inc/MantidKernel/Cache.h b/Framework/Kernel/inc/MantidKernel/Cache.h index 597798ecbfe43..41eae9a6e11fa 100644 --- a/Framework/Kernel/inc/MantidKernel/Cache.h +++ b/Framework/Kernel/inc/MantidKernel/Cache.h @@ -24,7 +24,7 @@ Cache is a generic caching storage class. @author Nick Draper, Tessella Support Services plc @date 20/10/2009 */ -template class DLLExport Cache { +template class MANTID_KERNEL_DLL Cache { public: /// No-arg Constructor Cache() : m_cacheHit(0), m_cacheMiss(0), m_cacheMap(), m_mutex() {} diff --git a/Framework/Kernel/inc/MantidKernel/Chainable.h b/Framework/Kernel/inc/MantidKernel/Chainable.h index e0ca533aa29fa..71772ddfbaf6f 100644 --- a/Framework/Kernel/inc/MantidKernel/Chainable.h +++ b/Framework/Kernel/inc/MantidKernel/Chainable.h @@ -6,7 +6,7 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" +#include "MantidKernel/DllConfig.h" #include #include @@ -28,7 +28,7 @@ Otherwise you could do this along the chain top to bottom. **/ -template class DLLExport Chainable { +template class MANTID_KERNEL_DLL Chainable { protected: /// Successor factory /// std::optional> m_successor; diff --git a/Framework/Kernel/inc/MantidKernel/ChainableFactory.h b/Framework/Kernel/inc/MantidKernel/ChainableFactory.h index 1b355866ca9df..0723b92ee83e4 100644 --- a/Framework/Kernel/inc/MantidKernel/ChainableFactory.h +++ b/Framework/Kernel/inc/MantidKernel/ChainableFactory.h @@ -7,7 +7,7 @@ #pragma once #include "MantidKernel/Chainable.h" -#include "MantidKernel/System.h" +#include "MantidKernel/DllConfig.h" #include #include @@ -17,7 +17,7 @@ namespace Kernel { /** ChainableFactory : Chain of Responsiblity generic factory */ template -class DLLExport ChainableFactory : public Chainable { +class MANTID_KERNEL_DLL ChainableFactory : public Chainable { public: /** * Factory method wrapper. Wraps results in smart pointer. diff --git a/Framework/Kernel/inc/MantidKernel/CompositeValidator.h b/Framework/Kernel/inc/MantidKernel/CompositeValidator.h index 9c871e73c557f..9e25c02eb75e8 100644 --- a/Framework/Kernel/inc/MantidKernel/CompositeValidator.h +++ b/Framework/Kernel/inc/MantidKernel/CompositeValidator.h @@ -6,8 +6,8 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/IValidator.h" -#include "MantidKernel/System.h" #include diff --git a/Framework/Kernel/inc/MantidKernel/DataService.h b/Framework/Kernel/inc/MantidKernel/DataService.h index b67d87117b59f..b74b348a9445e 100644 --- a/Framework/Kernel/inc/MantidKernel/DataService.h +++ b/Framework/Kernel/inc/MantidKernel/DataService.h @@ -54,7 +54,7 @@ struct CaseInsensitiveCmp { through writing scripts or directly through the API. It is implemented as a singleton class. */ -template class DLLExport DataService { +template class MANTID_KERNEL_DLL DataService { private: /// Typedef for the map holding the names of and pointers to the data objects using svcmap = std::map, CaseInsensitiveCmp>; diff --git a/Framework/Kernel/inc/MantidKernel/DiskBuffer.h b/Framework/Kernel/inc/MantidKernel/DiskBuffer.h index 790bed4b084e9..5b1cd3014fdb4 100644 --- a/Framework/Kernel/inc/MantidKernel/DiskBuffer.h +++ b/Framework/Kernel/inc/MantidKernel/DiskBuffer.h @@ -6,8 +6,8 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/FreeBlock.h" -#include "MantidKernel/System.h" #ifndef Q_MOC_RUN #include #include diff --git a/Framework/Kernel/inc/MantidKernel/EmptyValues.h b/Framework/Kernel/inc/MantidKernel/EmptyValues.h index 78ce16fa75dae..43cedba02be8d 100644 --- a/Framework/Kernel/inc/MantidKernel/EmptyValues.h +++ b/Framework/Kernel/inc/MantidKernel/EmptyValues.h @@ -12,7 +12,6 @@ @author Martyn Gigg, Tessella plc */ #include "MantidKernel/DllConfig.h" -#include "MantidKernel/System.h" #include diff --git a/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h b/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h index dc8de43dcd48c..2914a00bd6736 100644 --- a/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h +++ b/Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h @@ -6,8 +6,8 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/IPropertySettings.h" -#include "MantidKernel/System.h" #include #include diff --git a/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h index f3d85f357ca13..8c8b6d61dffd8 100644 --- a/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/FilteredTimeSeriesProperty.h @@ -7,7 +7,6 @@ #pragma once #include "MantidKernel/DllConfig.h" -#include "MantidKernel/System.h" #include "MantidKernel/TimeSeriesProperty.h" namespace Mantid { @@ -20,7 +19,7 @@ class SplittingInterval; * Templated class that defines a filtered time series but * still gives access to the original data. */ -template class DLLExport FilteredTimeSeriesProperty : public TimeSeriesProperty { +template class MANTID_KERNEL_DLL FilteredTimeSeriesProperty : public TimeSeriesProperty { public: explicit FilteredTimeSeriesProperty(const std::string &name); diff --git a/Framework/Kernel/inc/MantidKernel/FunctionTask.h b/Framework/Kernel/inc/MantidKernel/FunctionTask.h index 6b22017c2e98f..cc407436be846 100644 --- a/Framework/Kernel/inc/MantidKernel/FunctionTask.h +++ b/Framework/Kernel/inc/MantidKernel/FunctionTask.h @@ -28,7 +28,7 @@ namespace Kernel { * @author Janik Zikovsky, SNS * @date Feb 8, 2011 */ -class DLLExport FunctionTask final : public Task { +class MANTID_KERNEL_DLL FunctionTask final : public Task { public: /// Typedef for a function with no arguments and no return using voidFunction = void (*)(); diff --git a/Framework/Kernel/inc/MantidKernel/INode.h b/Framework/Kernel/inc/MantidKernel/INode.h index 49389a89e7317..698b894a3b292 100644 --- a/Framework/Kernel/inc/MantidKernel/INode.h +++ b/Framework/Kernel/inc/MantidKernel/INode.h @@ -15,7 +15,7 @@ namespace Mantid { namespace Kernel { /** Helper class providing interface to ISAveable */ -class DLLExport INode { +class MANTID_KERNEL_DLL INode { public: virtual ~INode() {}; }; diff --git a/Framework/Kernel/inc/MantidKernel/IPropertyManager.h b/Framework/Kernel/inc/MantidKernel/IPropertyManager.h index fb5129d18dfe7..5256e6beef8e9 100644 --- a/Framework/Kernel/inc/MantidKernel/IPropertyManager.h +++ b/Framework/Kernel/inc/MantidKernel/IPropertyManager.h @@ -525,7 +525,7 @@ class MANTID_KERNEL_DLL IPropertyManager { #define DEFINE_IPROPERTYMANAGER_GETVALUE(type) \ namespace Mantid { \ namespace Kernel { \ - template <> DLLExport type IPropertyManager::getValue(const std::string &name) const { \ + template <> MANTID_KERNEL_DLL type IPropertyManager::getValue(const std::string &name) const { \ PropertyWithValue *prop = dynamic_cast *>(getPointerToProperty(name)); \ if (prop) { \ return *prop; \ diff --git a/Framework/Kernel/inc/MantidKernel/Instantiator.h b/Framework/Kernel/inc/MantidKernel/Instantiator.h index a90717863688e..73609a9f8f289 100644 --- a/Framework/Kernel/inc/MantidKernel/Instantiator.h +++ b/Framework/Kernel/inc/MantidKernel/Instantiator.h @@ -6,6 +6,7 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include namespace Mantid { @@ -20,7 +21,7 @@ namespace Kernel { @date 10/10/2007 */ template -class DLLExport AbstractInstantiator +class MANTID_KERNEL_DLL AbstractInstantiator /// The base class for instantiators { public: @@ -51,7 +52,7 @@ class DLLExport AbstractInstantiator // instances are to be instantiated must have a no-argument // constructor. template -class DLLExport Instantiator : public AbstractInstantiator { +class MANTID_KERNEL_DLL Instantiator : public AbstractInstantiator { public: /// Creates the Instantiator. Instantiator() = default; diff --git a/Framework/Kernel/inc/MantidKernel/LambdaValidator.h b/Framework/Kernel/inc/MantidKernel/LambdaValidator.h index 734a4ee829741..74bd94087f978 100644 --- a/Framework/Kernel/inc/MantidKernel/LambdaValidator.h +++ b/Framework/Kernel/inc/MantidKernel/LambdaValidator.h @@ -20,7 +20,7 @@ to extract the parameter type and then pass it to the vaildtor function. The function used for validation should accept one parameter, the variable to be validated, and returns an error string (empty string for no error). */ -template class DLLExport LambdaValidator : public TypedValidator { +template class MANTID_KERNEL_DLL LambdaValidator : public TypedValidator { using ValidatorFunction = std::function; public: diff --git a/Framework/Kernel/inc/MantidKernel/MDUnit.h b/Framework/Kernel/inc/MantidKernel/MDUnit.h index 46a120758a9c6..14fc9a717e40f 100644 --- a/Framework/Kernel/inc/MantidKernel/MDUnit.h +++ b/Framework/Kernel/inc/MantidKernel/MDUnit.h @@ -6,7 +6,7 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" +#include "MantidKernel/DllConfig.h" #include "MantidKernel/UnitLabel.h" #include #include diff --git a/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h b/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h index 45c0298867b50..6573626d09acb 100644 --- a/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h +++ b/Framework/Kernel/inc/MantidKernel/MDUnitFactory.h @@ -9,7 +9,6 @@ #include "MantidKernel/ChainableFactory.h" #include "MantidKernel/DllConfig.h" #include "MantidKernel/MDUnit.h" -#include "MantidKernel/System.h" #include namespace Mantid { diff --git a/Framework/Kernel/inc/MantidKernel/MRUList.h b/Framework/Kernel/inc/MantidKernel/MRUList.h index 3c5a44615bb87..f35674f7b3cb2 100644 --- a/Framework/Kernel/inc/MantidKernel/MRUList.h +++ b/Framework/Kernel/inc/MantidKernel/MRUList.h @@ -29,7 +29,7 @@ namespace Kernel { Boost.MultiIndex documentation () */ -template class DLLExport MRUList { +template class MANTID_KERNEL_DLL MRUList { private: /// hideous typedef for the container holding the list using item_list = typename boost::multi_index::multi_index_container< diff --git a/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h b/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h index 168641bd0c8e2..532cce5ac9ea8 100644 --- a/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h +++ b/Framework/Kernel/inc/MantidKernel/MandatoryValidator.h @@ -14,7 +14,7 @@ namespace Mantid { namespace Kernel { namespace Detail { /// Forward declare checking function -template DLLExport bool checkIsEmpty(const T &); +template MANTID_KERNEL_DLL bool checkIsEmpty(const T &); /// Specialization for any vector type template bool checkIsEmpty(const std::vector &value) { return value.empty(); } @@ -40,7 +40,7 @@ template struct IsEmpty { @author Nick Draper, Tessella Support Services plc @date 28/11/2007 */ -template class DLLExport MandatoryValidator : public TypedValidator { +template class MANTID_KERNEL_DLL MandatoryValidator : public TypedValidator { public: IValidator_sptr clone() const override { return std::make_shared(); } diff --git a/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h b/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h index 92771551ec584..caa0f5a6a61f8 100644 --- a/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h +++ b/Framework/Kernel/inc/MantidKernel/Math/Optimization/SLSQPMinimizer.h @@ -8,7 +8,6 @@ #include "MantidKernel/DllConfig.h" #include "MantidKernel/Matrix.h" -#include "MantidKernel/System.h" #include diff --git a/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h b/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h index afa5e22c602c7..2496143692cc9 100644 --- a/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h +++ b/Framework/Kernel/inc/MantidKernel/NDPseudoRandomNumberGenerator.h @@ -26,7 +26,7 @@ namespace Kernel { * */ template -class DLLExport NDPseudoRandomNumberGenerator : public NDRandomNumberGenerator { +class MANTID_KERNEL_DLL NDPseudoRandomNumberGenerator : public NDRandomNumberGenerator { public: /// Constructor NDPseudoRandomNumberGenerator(const unsigned int ndims, const size_t seedValue); diff --git a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h index 22217e79c2546..bd7f07a3c8773 100644 --- a/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h +++ b/Framework/Kernel/inc/MantidKernel/NearestNeighbours.h @@ -81,7 +81,7 @@ class NNDataPoints { // NearestNeighbours implementation //------------------------------------------------------------------------------ -template class DLLExport NearestNeighbours { +template class MANTID_KERNEL_DLL NearestNeighbours { public: // typedefs for code brevity diff --git a/Framework/Kernel/inc/MantidKernel/NetworkProxy.h b/Framework/Kernel/inc/MantidKernel/NetworkProxy.h index a2154a0772065..ce408f0add501 100644 --- a/Framework/Kernel/inc/MantidKernel/NetworkProxy.h +++ b/Framework/Kernel/inc/MantidKernel/NetworkProxy.h @@ -6,9 +6,9 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/Logger.h" #include "MantidKernel/ProxyInfo.h" -#include "MantidKernel/System.h" namespace Mantid { namespace Kernel { diff --git a/Framework/Kernel/inc/MantidKernel/PropertyNexus.h b/Framework/Kernel/inc/MantidKernel/PropertyNexus.h index b17af5f141e8f..bf729784d2d91 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyNexus.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyNexus.h @@ -6,8 +6,8 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/NexusHDF5Descriptor.h" -#include "MantidKernel/System.h" #include #include @@ -39,11 +39,11 @@ namespace PropertyNexus { * @param prefix indicates current group location in file (absolute name) * @return std::unique_ptr */ -DLLExport std::unique_ptr loadProperty(::NeXus::File *file, const std::string &group, - const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, - const std::string &prefix); +MANTID_KERNEL_DLL std::unique_ptr loadProperty(::NeXus::File *file, const std::string &group, + const Mantid::Kernel::NexusHDF5Descriptor &fileInfo, + const std::string &prefix); -DLLExport std::unique_ptr loadProperty(::NeXus::File *file, const std::string &group); +MANTID_KERNEL_DLL std::unique_ptr loadProperty(::NeXus::File *file, const std::string &group); } // namespace PropertyNexus diff --git a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h index a980869503c2a..fce090d893961 100644 --- a/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h +++ b/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h @@ -34,7 +34,7 @@ namespace Kernel { http://proj-gaudi.web.cern.ch/proj-gaudi/) @date 14/11/2007 */ -template class DLLExport PropertyWithValue : public Property { +template class MANTID_KERNEL_DLL PropertyWithValue : public Property { public: PropertyWithValue(std::string name, TYPE defaultValue, IValidator_sptr validator = IValidator_sptr(new NullValidator), const unsigned int direction = Direction::Input); diff --git a/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h b/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h index 8051976f4f7d7..4a351de19265f 100644 --- a/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h +++ b/Framework/Kernel/inc/MantidKernel/RegistrationHelper.h @@ -16,6 +16,8 @@ namespace Kernel { * factories in Mantid. The fact that the constructor takes an int means that * the comma operator can be used to make a call to the factories' subscribe * method in the first part. + * + * The MANTID_KERNEL_DLL needs to be available where this helper is imported and used. */ class MANTID_KERNEL_DLL RegistrationHelper{// clang-format off public: diff --git a/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h b/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h index c4b92895dc7d5..c7151e0512cb5 100644 --- a/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h +++ b/Framework/Kernel/inc/MantidKernel/StartsWithValidator.h @@ -6,9 +6,9 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/IValidator.h" #include "MantidKernel/ListValidator.h" -#include "MantidKernel/System.h" #include #include #include @@ -19,7 +19,7 @@ namespace Kernel { start with one of the strings in a defined list of possibilities. */ -class DLLExport StartsWithValidator : public Kernel::StringListValidator { +class MANTID_KERNEL_DLL StartsWithValidator : public Kernel::StringListValidator { public: StartsWithValidator() = default; StartsWithValidator(const std::vector &values); diff --git a/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h b/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h index 48c3e40b142a6..89537bad33026 100644 --- a/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h +++ b/Framework/Kernel/inc/MantidKernel/StringContainsValidator.h @@ -6,7 +6,7 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" +#include "MantidKernel/DllConfig.h" #include "MantidKernel/TypedValidator.h" namespace Mantid { diff --git a/Framework/Kernel/inc/MantidKernel/Strings.h b/Framework/Kernel/inc/MantidKernel/Strings.h index 90f7d8c585973..9a6fe011ba0b0 100644 --- a/Framework/Kernel/inc/MantidKernel/Strings.h +++ b/Framework/Kernel/inc/MantidKernel/Strings.h @@ -12,6 +12,7 @@ #include "MantidKernel/DllConfig.h" #include "MantidKernel/MultiThreaded.h" #include "MantidKernel/StringTokenizer.h" +// System is currently needed for windows to import this #include "MantidKernel/System.h" #ifndef Q_MOC_RUN diff --git a/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h b/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h index 3b5421b0f934f..cbc2bb10c6d8f 100644 --- a/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h +++ b/Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h @@ -33,7 +33,7 @@ namespace Kernel { * @author Janik Zikovsky * @date 2011-02-25 16:39:43.233991 */ -class DLLExport ThreadSchedulerMutexes : public ThreadScheduler { +class MANTID_KERNEL_DLL ThreadSchedulerMutexes : public ThreadScheduler { public: ThreadSchedulerMutexes() = default; diff --git a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h index d18ef1c4fd6dd..8b92807818dd1 100644 --- a/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h +++ b/Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h @@ -139,7 +139,7 @@ template class TimeValueUnit { /** A specialised Property class for holding a series of time-value pairs. */ -template class DLLExport TimeSeriesProperty : public Property, public ITimeSeriesProperty { +template class MANTID_KERNEL_DLL TimeSeriesProperty : public Property, public ITimeSeriesProperty { public: /// Constructor explicit TimeSeriesProperty(const std::string &name); diff --git a/Framework/Kernel/inc/MantidKernel/TypedValidator.h b/Framework/Kernel/inc/MantidKernel/TypedValidator.h index d05f332cba7dc..91414bde57ada 100644 --- a/Framework/Kernel/inc/MantidKernel/TypedValidator.h +++ b/Framework/Kernel/inc/MantidKernel/TypedValidator.h @@ -22,7 +22,7 @@ directly. A specialised type exists for std::shared_ptr types */ -template class DLLExport TypedValidator : public IValidator { +template class MANTID_KERNEL_DLL TypedValidator : public IValidator { protected: /// Override this function to check the validity of the type virtual std::string checkValidity(const HeldType &) const = 0; @@ -56,7 +56,8 @@ template class DLLExport TypedValidator : public IValidator * The advantage of this is that Validator types then don't have to match * their types exactly. */ -template class DLLExport TypedValidator> : public IValidator { +template +class MANTID_KERNEL_DLL TypedValidator> : public IValidator { /// Shared ptr type using ElementType_sptr = std::shared_ptr; diff --git a/Framework/Kernel/inc/MantidKernel/VMD.h b/Framework/Kernel/inc/MantidKernel/VMD.h index 7e90524920c99..4cb7799d062f1 100644 --- a/Framework/Kernel/inc/MantidKernel/VMD.h +++ b/Framework/Kernel/inc/MantidKernel/VMD.h @@ -19,7 +19,7 @@ class V3D; @author Janik Zikovsky @date 2011-08-30 */ -template class DLLExport VMDBase { +template class MANTID_KERNEL_DLL VMDBase { public: VMDBase(); VMDBase(size_t nd); diff --git a/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h b/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h index 1ee804b389bb3..24895c8f36c3e 100644 --- a/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h +++ b/Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h @@ -6,8 +6,8 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once +#include "MantidKernel/DllConfig.h" #include "MantidKernel/EnabledWhenProperty.h" -#include "MantidKernel/System.h" #include diff --git a/Framework/Kernel/inc/MantidKernel/normal_distribution.h b/Framework/Kernel/inc/MantidKernel/normal_distribution.h index ff8683ef6bb01..8521b84ddd273 100644 --- a/Framework/Kernel/inc/MantidKernel/normal_distribution.h +++ b/Framework/Kernel/inc/MantidKernel/normal_distribution.h @@ -6,7 +6,7 @@ // SPDX - License - Identifier: GPL - 3.0 + #pragma once -#include "MantidKernel/System.h" +#include "MantidKernel/DllConfig.h" #include "MantidKernel/WarningSuppressions.h" #include #include @@ -58,12 +58,12 @@ template class __save_flags { } }; -template class DLLExport normal_distribution { +template class MANTID_KERNEL_DLL normal_distribution { public: // types using result_type = _RealType; - class DLLExport param_type { + class MANTID_KERNEL_DLL param_type { result_type __mean_; result_type __stddev_; diff --git a/Framework/Kernel/src/ArrayProperty.cpp b/Framework/Kernel/src/ArrayProperty.cpp index 3d77b6929ad91..78eb8847ed32b 100644 --- a/Framework/Kernel/src/ArrayProperty.cpp +++ b/Framework/Kernel/src/ArrayProperty.cpp @@ -98,27 +98,27 @@ template void ArrayProperty::visualStudioC4661Workaround() {} // export macro not needed for int32_t due to explicit specialization in header. template class ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; - -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; + +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; #if defined(_WIN32) || defined(__clang__) && defined(__APPLE__) -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty; -template class DLLExport ArrayProperty>; -template class DLLExport ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty; +template class MANTID_KERNEL_DLL ArrayProperty>; +template class MANTID_KERNEL_DLL ArrayProperty>; #endif /// @endcond diff --git a/Framework/Kernel/src/ConfigObserver.cpp b/Framework/Kernel/src/ConfigObserver.cpp index 2ed8ea434befc..a5f3cf919b695 100644 --- a/Framework/Kernel/src/ConfigObserver.cpp +++ b/Framework/Kernel/src/ConfigObserver.cpp @@ -6,7 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/ConfigObserver.h" #include "MantidKernel/ConfigService.h" -#include "MantidKernel/System.h" namespace Mantid::Kernel { /** diff --git a/Framework/Kernel/src/ConfigService.cpp b/Framework/Kernel/src/ConfigService.cpp index 05d9df39d3ab5..0cbb8aae5d721 100644 --- a/Framework/Kernel/src/ConfigService.cpp +++ b/Framework/Kernel/src/ConfigService.cpp @@ -19,7 +19,6 @@ #include "MantidKernel/StdoutChannel.h" #include "MantidKernel/StringTokenizer.h" #include "MantidKernel/Strings.h" -#include "MantidKernel/System.h" #include #include @@ -1934,12 +1933,12 @@ void ConfigServiceImpl::setLogLevel(std::string const &logLevel, bool quiet) { std::string ConfigServiceImpl::getLogLevel() { return g_log.getLevelName(); } /// \cond TEMPLATE -template DLLExport std::optional ConfigServiceImpl::getValue(const std::string &); -template DLLExport std::optional ConfigServiceImpl::getValue(const std::string &); -template DLLExport std::optional ConfigServiceImpl::getValue(const std::string &); -template DLLExport std::optional ConfigServiceImpl::getValue(const std::string &); +template MANTID_KERNEL_DLL std::optional ConfigServiceImpl::getValue(const std::string &); +template MANTID_KERNEL_DLL std::optional ConfigServiceImpl::getValue(const std::string &); +template MANTID_KERNEL_DLL std::optional ConfigServiceImpl::getValue(const std::string &); +template MANTID_KERNEL_DLL std::optional ConfigServiceImpl::getValue(const std::string &); #ifdef _MSC_VER -template DLLExport std::optional ConfigServiceImpl::getValue(const std::string &); +template MANTID_KERNEL_DLL std::optional ConfigServiceImpl::getValue(const std::string &); #endif /// \endcond TEMPLATE diff --git a/Framework/Kernel/src/DateTimeValidator.cpp b/Framework/Kernel/src/DateTimeValidator.cpp index 26218531669d5..f43b29e73a84d 100644 --- a/Framework/Kernel/src/DateTimeValidator.cpp +++ b/Framework/Kernel/src/DateTimeValidator.cpp @@ -6,7 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/DateTimeValidator.h" #include "MantidKernel/DateAndTimeHelpers.h" -#include "MantidKernel/System.h" #include #include diff --git a/Framework/Kernel/src/Exception.cpp b/Framework/Kernel/src/Exception.cpp index d90edda84055e..df1a165248b5b 100644 --- a/Framework/Kernel/src/Exception.cpp +++ b/Framework/Kernel/src/Exception.cpp @@ -237,8 +237,8 @@ const char *MisMatch::what() const noexcept } /// \cond TEMPLATE -template class DLLExport MisMatch; -template class DLLExport MisMatch; +template class MANTID_KERNEL_DLL MisMatch; +template class MANTID_KERNEL_DLL MisMatch; /// \endcond TEMPLATE //------------------------- diff --git a/Framework/Kernel/src/FloatingPointComparison.cpp b/Framework/Kernel/src/FloatingPointComparison.cpp index 18e21ee0a5c86..69f78fa73d659 100644 --- a/Framework/Kernel/src/FloatingPointComparison.cpp +++ b/Framework/Kernel/src/FloatingPointComparison.cpp @@ -8,7 +8,6 @@ // Includes //----------------------------------------------------------------------------- #include "MantidKernel/FloatingPointComparison.h" -#include "MantidKernel/System.h" #include "MantidKernel/V3D.h" #include @@ -236,55 +235,57 @@ inline bool withinRelativeDifference(T const x, T const y, S const tolerance, MA ///@cond // Concrete instantiations -template DLLExport bool equals(double const, double const); -template DLLExport bool equals(float const, float const); -template DLLExport bool ltEquals(double const, double const); -template DLLExport bool ltEquals(float const, float const); -template DLLExport bool gtEquals(double const, double const); -template DLLExport bool gtEquals(float const, float const); +template MANTID_KERNEL_DLL bool equals(double const, double const); +template MANTID_KERNEL_DLL bool equals(float const, float const); +template MANTID_KERNEL_DLL bool ltEquals(double const, double const); +template MANTID_KERNEL_DLL bool ltEquals(float const, float const); +template MANTID_KERNEL_DLL bool gtEquals(double const, double const); +template MANTID_KERNEL_DLL bool gtEquals(float const, float const); // difference methods -template DLLExport double absoluteDifference(double const, double const); -template DLLExport float absoluteDifference(float const, float const); -template DLLExport double relativeDifference(double const, double const); -template DLLExport float relativeDifference(float const, float const); +template MANTID_KERNEL_DLL double absoluteDifference(double const, double const); +template MANTID_KERNEL_DLL float absoluteDifference(float const, float const); +template MANTID_KERNEL_DLL double relativeDifference(double const, double const); +template MANTID_KERNEL_DLL float relativeDifference(float const, float const); // within difference methods -- object and tolerance same -template DLLExport bool withinAbsoluteDifference(double const, double const, double const); -template DLLExport bool withinAbsoluteDifference(float const, float const, float const); -template DLLExport bool withinAbsoluteDifference(int const, int const, int const); -template DLLExport bool withinAbsoluteDifference(unsigned int const, unsigned int const, - unsigned int const); -template DLLExport bool withinAbsoluteDifference(long const, long const, long const); -template DLLExport bool withinAbsoluteDifference(long long const, long long const, long long const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(double const, double const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(float const, float const, float const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(int const, int const, int const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(unsigned int const, unsigned int const, + unsigned int const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(long const, long const, long const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(long long const, long long const, long long const); // -template DLLExport bool withinRelativeDifference(double const, double const, double const); -template DLLExport bool withinRelativeDifference(float const, float const, float const); -template DLLExport bool withinRelativeDifference(int const, int const, int const); -template DLLExport bool withinRelativeDifference(unsigned int const, unsigned int const, - unsigned int const); -template DLLExport bool withinRelativeDifference(long const, long const, long const); -template DLLExport bool withinRelativeDifference(long long const, long long const, long long const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(double const, double const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(float const, float const, float const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(int const, int const, int const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(unsigned int const, unsigned int const, + unsigned int const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(long const, long const, long const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(long long const, long long const, long long const); // within difference methods -- tolerance is double -template DLLExport bool withinAbsoluteDifference(float const, float const, double const); -template DLLExport bool withinAbsoluteDifference(int const, int const, double const); -template DLLExport bool withinAbsoluteDifference(unsigned int const, unsigned int const, - double const); -template DLLExport bool withinAbsoluteDifference(long const, long const, double const); -template DLLExport bool withinAbsoluteDifference(unsigned long const, unsigned long const, - double const); -template DLLExport bool withinAbsoluteDifference(long long const, long long const, double const); -template DLLExport bool withinAbsoluteDifference(unsigned long long const, - unsigned long long const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(float const, float const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(int const, int const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(unsigned int const, unsigned int const, + double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(long const, long const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(unsigned long const, + unsigned long const, double const); +template MANTID_KERNEL_DLL bool withinAbsoluteDifference(long long const, long long const, + double const); +template MANTID_KERNEL_DLL bool +withinAbsoluteDifference(unsigned long long const, unsigned long long const, double const); // -template DLLExport bool withinRelativeDifference(float const, float const, double const); -template DLLExport bool withinRelativeDifference(int const, int const, double const); -template DLLExport bool withinRelativeDifference(unsigned int const, unsigned int const, - double const); -template DLLExport bool withinRelativeDifference(long const, long const, double const); -template DLLExport bool withinRelativeDifference(unsigned long const, unsigned long const, - double const); -template DLLExport bool withinRelativeDifference(long long const, long long const, double const); -template DLLExport bool withinRelativeDifference(unsigned long long const, - unsigned long long const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(float const, float const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(int const, int const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(unsigned int const, unsigned int const, + double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(long const, long const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(unsigned long const, + unsigned long const, double const); +template MANTID_KERNEL_DLL bool withinRelativeDifference(long long const, long long const, + double const); +template MANTID_KERNEL_DLL bool +withinRelativeDifference(unsigned long long const, unsigned long long const, double const); ///@endcond } // namespace Mantid::Kernel diff --git a/Framework/Kernel/src/IPropertyManager.cpp b/Framework/Kernel/src/IPropertyManager.cpp index a13b8b6096bf8..988bc4125444a 100644 --- a/Framework/Kernel/src/IPropertyManager.cpp +++ b/Framework/Kernel/src/IPropertyManager.cpp @@ -33,11 +33,11 @@ namespace Mantid::Kernel { // assign to an existing string // via the getProperty() method, you can construct a local variable by saying, // e.g.: std::string s = getProperty("myProperty") -template <> DLLExport std::string IPropertyManager::getValue(const std::string &name) const { +template <> MANTID_KERNEL_DLL std::string IPropertyManager::getValue(const std::string &name) const { return getPropertyValue(name); } -template <> DLLExport Property *IPropertyManager::getValue(const std::string &name) const { +template <> MANTID_KERNEL_DLL Property *IPropertyManager::getValue(const std::string &name) const { return getPointerToProperty(name); } diff --git a/Framework/Kernel/src/MandatoryValidator.cpp b/Framework/Kernel/src/MandatoryValidator.cpp index d491efe2b3211..967d6f2ebf35e 100644 --- a/Framework/Kernel/src/MandatoryValidator.cpp +++ b/Framework/Kernel/src/MandatoryValidator.cpp @@ -18,25 +18,27 @@ namespace Mantid::Kernel::Detail { * @param value :: A string object * @return True if the string is considered empty */ -template <> DLLExport bool checkIsEmpty(const std::string &value) { return value.empty(); } +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const std::string &value) { return value.empty(); } /** * Specialization of checkIsEmpty for double values * @param value :: A double * @return True if the value is considered empty, see EmptyValues.h */ -template <> DLLExport bool checkIsEmpty(const double &value) { return std::fabs(value - Mantid::EMPTY_DBL()) < 1e-08; } +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const double &value) { + return std::fabs(value - Mantid::EMPTY_DBL()) < 1e-08; +} /** * Specialization of checkIsEmpty for int * @param value :: A int value * @return True if the value is considered empty, see EmptyValues.h */ -template <> DLLExport bool checkIsEmpty(const int &value) { return (value == Mantid::EMPTY_INT()); } +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const int &value) { return (value == Mantid::EMPTY_INT()); } /** * Specialization of checkIsEmpty for long * @param value :: A long value * @return True if the value is considered empty, see EmptyValues.h */ -template <> DLLExport bool checkIsEmpty(const long &value) { +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const long &value) { // 32 bit for Windows and Clang, 64 bit for GCC return (value == Mantid::EMPTY_LONG()); } @@ -46,12 +48,14 @@ template <> DLLExport bool checkIsEmpty(const long &value) { * @param value :: A int64_t value * @return True if the value is considered empty, see EmptyValues.h */ -template <> DLLExport bool checkIsEmpty(const int64_t &value) { return (value == Mantid::EMPTY_INT64()); } +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const int64_t &value) { return (value == Mantid::EMPTY_INT64()); } #endif /** * Specialization of checkIsEmpty for OptionalBool * @param value :: A long value * @return True if the value is considered empty, see EmptyValues.h */ -template <> DLLExport bool checkIsEmpty(const OptionalBool &value) { return (value.getValue() == OptionalBool::Unset); } +template <> MANTID_KERNEL_DLL bool checkIsEmpty(const OptionalBool &value) { + return (value.getValue() == OptionalBool::Unset); +} } // namespace Mantid::Kernel::Detail diff --git a/Framework/Kernel/src/Memory.cpp b/Framework/Kernel/src/Memory.cpp index fff4dfdb05993..78ac1ed317911 100644 --- a/Framework/Kernel/src/Memory.cpp +++ b/Framework/Kernel/src/Memory.cpp @@ -6,7 +6,6 @@ // SPDX - License - Identifier: GPL - 3.0 + #include "MantidKernel/Memory.h" #include "MantidKernel/Logger.h" -#include "MantidKernel/System.h" #include #include @@ -561,8 +560,8 @@ size_t MemoryStats::getCurrentRSS() const { } // -------------------------- concrete instantiations -template DLLExport string memToString(const uint32_t); -template DLLExport string memToString(const uint64_t); +template MANTID_KERNEL_DLL string memToString(const uint32_t); +template MANTID_KERNEL_DLL string memToString(const uint64_t); // To initialize the static class variable. std::mutex MemoryStats::mutexMemory; diff --git a/Framework/Kernel/src/RegexStrings.cpp b/Framework/Kernel/src/RegexStrings.cpp index 11867cc5727d9..1ee4e3013695a 100644 --- a/Framework/Kernel/src/RegexStrings.cpp +++ b/Framework/Kernel/src/RegexStrings.cpp @@ -256,7 +256,7 @@ template <> int StrSingleSplit(const std::string &text, const boost::regex &Re, @param Out :: string to place match @return count of line that matched (or zero on failure) */ -DLLExport int findPattern(std::istream &fh, const boost::regex &Re, std::string &Out) { +MANTID_KERNEL_DLL int findPattern(std::istream &fh, const boost::regex &Re, std::string &Out) { char ss[512]; // max of 512 boost::cmatch ans; @@ -304,7 +304,7 @@ template int findComp(std::istream &fh, const boost::regex &Re, T & @param Out :: component in ( ) expression must be first. @return count of line that matched (or zero on failure) */ -template <> DLLExport int findComp(std::istream &fh, const boost::regex &Re, std::string &Out) { +template <> MANTID_KERNEL_DLL int findComp(std::istream &fh, const boost::regex &Re, std::string &Out) { char ss[512]; // max of 512 boost::cmatch ans; @@ -323,23 +323,23 @@ template <> DLLExport int findComp(std::istream &fh, const boost::regex &Re, std /// \cond TEMPLATE -template DLLExport int StrFullCut(std::string &, const boost::regex &, std::string &, const int); -template DLLExport int StrFullCut(std::string &, const boost::regex &, int &, const int); -template DLLExport int StrFullCut(std::string &, const boost::regex &, double &, const int); +template MANTID_KERNEL_DLL int StrFullCut(std::string &, const boost::regex &, std::string &, const int); +template MANTID_KERNEL_DLL int StrFullCut(std::string &, const boost::regex &, int &, const int); +template MANTID_KERNEL_DLL int StrFullCut(std::string &, const boost::regex &, double &, const int); -template DLLExport int StrFullSplit(const std::string &, const boost::regex &, std::vector &); -template DLLExport int StrFullSplit(const std::string &, const boost::regex &, std::vector &); -template DLLExport int StrFullSplit(const std::string &, const boost::regex &, std::vector &); +template MANTID_KERNEL_DLL int StrFullSplit(const std::string &, const boost::regex &, std::vector &); +template MANTID_KERNEL_DLL int StrFullSplit(const std::string &, const boost::regex &, std::vector &); +template MANTID_KERNEL_DLL int StrFullSplit(const std::string &, const boost::regex &, std::vector &); -template DLLExport int StrSingleSplit(const std::string &, const boost::regex &, std::vector &); -template DLLExport int StrSingleSplit(const std::string &, const boost::regex &, std::vector &); +template MANTID_KERNEL_DLL int StrSingleSplit(const std::string &, const boost::regex &, std::vector &); +template MANTID_KERNEL_DLL int StrSingleSplit(const std::string &, const boost::regex &, std::vector &); -template DLLExport int StrComp(const char *, const boost::regex &, double &, const int); -template DLLExport int StrComp(const char *, const boost::regex &, int &, const int); -template DLLExport int StrComp(const std::string &, const boost::regex &, double &, const int); -template DLLExport int StrComp(const std::string &, const boost::regex &, int &, const int); +template MANTID_KERNEL_DLL int StrComp(const char *, const boost::regex &, double &, const int); +template MANTID_KERNEL_DLL int StrComp(const char *, const boost::regex &, int &, const int); +template MANTID_KERNEL_DLL int StrComp(const std::string &, const boost::regex &, double &, const int); +template MANTID_KERNEL_DLL int StrComp(const std::string &, const boost::regex &, int &, const int); -template DLLExport int findComp(std::istream &, const boost::regex &, int &); +template MANTID_KERNEL_DLL int findComp(std::istream &, const boost::regex &, int &); /// \endcond TEMPLATE diff --git a/Framework/Kernel/src/Statistics.cpp b/Framework/Kernel/src/Statistics.cpp index d638cba1beaa0..0b2f481e0abde 100644 --- a/Framework/Kernel/src/Statistics.cpp +++ b/Framework/Kernel/src/Statistics.cpp @@ -208,14 +208,14 @@ template Statistics getStatistics(const vector &data, cons } /// Getting statistics of a string array should just give a bunch of NaNs -template <> DLLExport Statistics getStatistics(const vector &data, const unsigned int flags) { +template <> MANTID_KERNEL_DLL Statistics getStatistics(const vector &data, const unsigned int flags) { UNUSED_ARG(flags); UNUSED_ARG(data); return Statistics(); // default is all nan } /// Getting statistics of a boolean array should just give a bunch of NaNs -template <> DLLExport Statistics getStatistics(const vector &data, const unsigned int flags) { +template <> MANTID_KERNEL_DLL Statistics getStatistics(const vector &data, const unsigned int flags) { UNUSED_ARG(flags); UNUSED_ARG(data); return Statistics(); // default is all nan diff --git a/Framework/Kernel/src/VectorHelper.cpp b/Framework/Kernel/src/VectorHelper.cpp index abe5145ee9090..02d83ddd3224f 100644 --- a/Framework/Kernel/src/VectorHelper.cpp +++ b/Framework/Kernel/src/VectorHelper.cpp @@ -31,9 +31,10 @@ namespace Mantid::Kernel::VectorHelper { * @param[in] power the power in case of inverse power sum. Must be between 0 and 1 or is ignored. * @return The number of bin boundaries in the new axis **/ -int DLLExport createAxisFromRebinParams(const std::vector ¶ms, std::vector &xnew, - const bool resize_xnew, const bool full_bins_only, const double xMinHint, - const double xMaxHint, const bool useReverseLogarithmic, const double power) { +int MANTID_KERNEL_DLL createAxisFromRebinParams(const std::vector ¶ms, std::vector &xnew, + const bool resize_xnew, const bool full_bins_only, + const double xMinHint, const double xMaxHint, + const bool useReverseLogarithmic, const double power) { std::vector tmp; const std::vector &fullParams = [¶ms, &tmp, xMinHint, xMaxHint]() { if (params.size() == 1) { @@ -765,11 +766,11 @@ void smoothInRange(const std::vector &input, std::vector &output } /// Declare all version of this -template DLLExport std::vector splitStringIntoVector(std::string listString); -template DLLExport std::vector splitStringIntoVector(std::string listString); -template DLLExport std::vector splitStringIntoVector(std::string listString); -template DLLExport std::vector splitStringIntoVector(std::string listString); -template DLLExport std::vector splitStringIntoVector(std::string listString); -template DLLExport std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); +template MANTID_KERNEL_DLL std::vector splitStringIntoVector(std::string listString); } // namespace Mantid::Kernel::VectorHelper diff --git a/buildconfig/CMake/CppCheck_Suppressions.txt.in b/buildconfig/CMake/CppCheck_Suppressions.txt.in index 303402501531d..45a3262f38ff8 100644 --- a/buildconfig/CMake/CppCheck_Suppressions.txt.in +++ b/buildconfig/CMake/CppCheck_Suppressions.txt.in @@ -51,7 +51,7 @@ constParameterPointer:${CMAKE_SOURCE_DIR}/Framework/Kernel/src/AttenuationProfil missingOverride:${CMAKE_SOURCE_DIR}/Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h:26 uninitMemberVarPrivate:${CMAKE_SOURCE_DIR}/Framework/Kernel/inc/MantidKernel/PropertyWithValue.h:93 returnByReference:${CMAKE_SOURCE_DIR}/Framework/Kernel/inc/MantidKernel/FacilityInfo.h:48 -knownConditionTrueFalse:${CMAKE_SOURCE_DIR}/Framework/Kernel/inc/MantidKernel/Strings.h:170 +knownConditionTrueFalse:${CMAKE_SOURCE_DIR}/Framework/Kernel/inc/MantidKernel/Strings.h:171 nullPointerRedundantCheck:${CMAKE_SOURCE_DIR}/Framework/Kernel/src/GitHubApiHelper.cpp:167 nullPointerRedundantCheck:${CMAKE_SOURCE_DIR}/Framework/Kernel/src/GitHubApiHelper.cpp:168 nullPointerRedundantCheck:${CMAKE_SOURCE_DIR}/Framework/Kernel/src/GitHubApiHelper.cpp:169 @@ -271,8 +271,6 @@ uninitMemberVarPrivate:${CMAKE_SOURCE_DIR}/Framework/Algorithms/inc/MantidAlgori constVariableReference:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/MergeRuns.cpp:292 constVariableReference:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/MergeRuns.cpp:679 knownConditionTrueFalse:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/PaalmanPingsAbsorptionCorrection.cpp:452 -constParameterReference:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp:138 -constParameterReference:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/PolarizationCorrectionFredrikze.cpp:155 missingOverride:${CMAKE_SOURCE_DIR}/Framework/Algorithms/inc/MantidAlgorithms/Rebin2D.h:26 duplicateConditionalAssign:${CMAKE_SOURCE_DIR}/Framework/Algorithms/src/ReadGroupsFromFile.cpp:134 missingOverride:${CMAKE_SOURCE_DIR}/Framework/Algorithms/inc/MantidAlgorithms/RebinByTimeBase.h:24 @@ -1370,7 +1368,6 @@ unsafeClassCanLeak:${CMAKE_SOURCE_DIR}/qt/widgets/plugins/algorithm_dialogs/inc/ unsafeClassCanLeak:${CMAKE_SOURCE_DIR}/qt/widgets/plugins/algorithm_dialogs/inc/MantidQtWidgets/Plugins/AlgorithmDialogs/FitDialog.h:186 constVariablePointer:${CMAKE_SOURCE_DIR}/qt/widgets/plugins/algorithm_dialogs/src/FitDialog.cpp:202 constVariablePointer:${CMAKE_SOURCE_DIR}/qt/widgets/plugins/algorithm_dialogs/src/FitDialog.cpp:413 -iterateByValue:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/Muon/ALCDataLoadingView.cpp:349 missingOverride:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Common/IReflMessageHandler.h:21 constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp:79 constParameterReference:${CMAKE_SOURCE_DIR}/qt/scientific_interfaces/ISISReflectometry/GUI/Instrument/QtInstrumentView.cpp:83 diff --git a/buildconfig/CMake/GenerateMantidExportHeader.cmake b/buildconfig/CMake/GenerateMantidExportHeader.cmake index 65f0aac249dab..fbe2eeb1fe0ed 100644 --- a/buildconfig/CMake/GenerateMantidExportHeader.cmake +++ b/buildconfig/CMake/GenerateMantidExportHeader.cmake @@ -40,13 +40,15 @@ function(GENERATE_MANTID_EXPORT_HEADER TARGET_LIBRARY GENERATE_EXTERN) if(GENERATE_EXTERN) set(CUSTOM "${CUSTOM}\ -// Use extern keyword in client code to suppress class template instantiation\n\ +// MantidKernel/System.h will be removed\n\ #include \"MantidKernel/System.h\"\n\n\ +// Use extern keyword in client code to suppress class template instantiation\n\ #ifdef ${TARGET_LIBRARY}_EXPORTS\n\ #define EXTERN_MANTID_${TARGET_NAME}\n\ #else\n\ -#define EXTERN_MANTID_${TARGET_NAME} EXTERN_IMPORT\n\ -#endif /* ${TARGET_LIBRARY}_EXPORTS*/\n\ +#define EXTERN_MANTID_${TARGET_NAME} extern\n\ +#endif /* ${TARGET_LIBRARY}_EXPORTS*/\n\n\ +#include " ) endif(GENERATE_EXTERN)