Skip to content

Commit

Permalink
Change from System.h to DllConfig.h
Browse files Browse the repository at this point in the history
This is part of mantidproject#38457 which cleans up all of Kernel except the
precompiled headers. System.h is still included in the generated
DllConfig.h file, but all of its necessary functionality should have
been pulled from System.h once everything else is ready.
  • Loading branch information
peterfpeterson committed Dec 26, 2024
1 parent da86e0b commit 0bf3635
Show file tree
Hide file tree
Showing 50 changed files with 164 additions and 162 deletions.
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/ArrayProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Kernel {
@author Russell Taylor, Tessella Support Services plc
@date 27/02/2008
*/
template <typename T> class DLLExport ArrayProperty : public PropertyWithValue<std::vector<T>> {
template <typename T> class MANTID_KERNEL_DLL ArrayProperty : public PropertyWithValue<std::vector<T>> {
public:
ArrayProperty(const std::string &name, std::vector<T> vec,
const IValidator_sptr &validator = IValidator_sptr(new NullValidator),
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/BinaryFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static const size_t MIN_BLOCK_SIZE = 1000;
* the T type is done with a reinterpret_cast<T>.
*
*/
template <typename T> class DLLExport BinaryFile {
template <typename T> class MANTID_KERNEL_DLL BinaryFile {
public:
//------------------------------------------------------------------------------------
/// Empty constructor
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/BoundedValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ constexpr int LOWER_BOUND = -1;
constexpr int UPPER_BOUND = 1;
} // namespace

template <class TYPE> class DLLExport BoundedValidator final : public TypedValidator<TYPE> {
template <class TYPE> class MANTID_KERNEL_DLL BoundedValidator final : public TypedValidator<TYPE> {
public:
/// No-arg Constructor
BoundedValidator() noexcept
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Cache is a generic caching storage class.
@author Nick Draper, Tessella Support Services plc
@date 20/10/2009
*/
template <class KEYTYPE, class VALUETYPE> class DLLExport Cache {
template <class KEYTYPE, class VALUETYPE> class MANTID_KERNEL_DLL Cache {
public:
/// No-arg Constructor
Cache() : m_cacheHit(0), m_cacheMiss(0), m_cacheMap(), m_mutex() {}
Expand Down
1 change: 1 addition & 0 deletions Framework/Kernel/inc/MantidKernel/Chainable.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once

// this needs to be System.h to use DllExport for windows
#include "MantidKernel/System.h"
#include <memory>
#include <utility>
Expand Down
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/ChainableFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#pragma once

#include "MantidKernel/Chainable.h"
#include "MantidKernel/System.h"
#include "MantidKernel/DllConfig.h"
#include <memory>
#include <stdexcept>

Expand All @@ -17,7 +17,7 @@ namespace Kernel {
/** ChainableFactory : Chain of Responsiblity generic factory
*/
template <typename Factory, typename Product, typename Argument>
class DLLExport ChainableFactory : public Chainable<Factory> {
class MANTID_KERNEL_DLL ChainableFactory : public Chainable<Factory> {
public:
/**
* Factory method wrapper. Wraps results in smart pointer.
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/CompositeValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>

Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/DataService.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct CaseInsensitiveCmp {
through writing scripts or directly
through the API. It is implemented as a singleton class.
*/
template <typename T> class DLLExport DataService {
template <typename T> class MANTID_KERNEL_DLL DataService {
private:
/// Typedef for the map holding the names of and pointers to the data objects
using svcmap = std::map<std::string, std::shared_ptr<T>, CaseInsensitiveCmp>;
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/DiskBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/mem_fun.hpp>
Expand Down
1 change: 0 additions & 1 deletion Framework/Kernel/inc/MantidKernel/EmptyValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
@author Martyn Gigg, Tessella plc
*/
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/System.h"

#include <limits>

Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/EnabledWhenProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#pragma once

#include "MantidKernel/DllConfig.h"
#include "MantidKernel/System.h"
#include "MantidKernel/TimeSeriesProperty.h"

namespace Mantid {
Expand All @@ -20,7 +19,7 @@ class SplittingInterval;
* Templated class that defines a filtered time series but
* still gives access to the original data.
*/
template <typename HeldType> class DLLExport FilteredTimeSeriesProperty : public TimeSeriesProperty<HeldType> {
template <typename HeldType> class MANTID_KERNEL_DLL FilteredTimeSeriesProperty : public TimeSeriesProperty<HeldType> {

public:
explicit FilteredTimeSeriesProperty(const std::string &name);
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/FunctionTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 (*)();
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/INode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {};
};
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/IPropertyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class MANTID_KERNEL_DLL IPropertyManager {
#define DEFINE_IPROPERTYMANAGER_GETVALUE(type) \
namespace Mantid { \
namespace Kernel { \
template <> DLLExport type IPropertyManager::getValue<type>(const std::string &name) const { \
template <> MANTID_KERNEL_DLL type IPropertyManager::getValue<type>(const std::string &name) const { \
PropertyWithValue<type> *prop = dynamic_cast<PropertyWithValue<type> *>(getPointerToProperty(name)); \
if (prop) { \
return *prop; \
Expand Down
5 changes: 3 additions & 2 deletions Framework/Kernel/inc/MantidKernel/Instantiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once

#include "MantidKernel/DllConfig.h"
#include <memory>

namespace Mantid {
Expand All @@ -20,7 +21,7 @@ namespace Kernel {
@date 10/10/2007
*/
template <class Base, typename... Args>
class DLLExport AbstractInstantiator
class MANTID_KERNEL_DLL AbstractInstantiator
/// The base class for instantiators
{
public:
Expand Down Expand Up @@ -51,7 +52,7 @@ class DLLExport AbstractInstantiator
// instances are to be instantiated must have a no-argument
// constructor.
template <class C, class Base, typename... Args>
class DLLExport Instantiator : public AbstractInstantiator<Base, Args...> {
class MANTID_KERNEL_DLL Instantiator : public AbstractInstantiator<Base, Args...> {
public:
/// Creates the Instantiator.
Instantiator() = default;
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/LambdaValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename ParamType> class DLLExport LambdaValidator : public TypedValidator<ParamType> {
template <typename ParamType> class MANTID_KERNEL_DLL LambdaValidator : public TypedValidator<ParamType> {
using ValidatorFunction = std::function<std::string(ParamType)>;

public:
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/MDUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <string>
Expand Down
1 change: 0 additions & 1 deletion Framework/Kernel/inc/MantidKernel/MDUnitFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "MantidKernel/ChainableFactory.h"
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/MDUnit.h"
#include "MantidKernel/System.h"
#include <memory>

namespace Mantid {
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/MRUList.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Kernel {
Boost.MultiIndex documentation
(<http://www.boost.org/libs/multi_index/doc/reference/index.html>)
*/
template <class T> class DLLExport MRUList {
template <class T> class MANTID_KERNEL_DLL MRUList {
private:
/// hideous typedef for the container holding the list
using item_list = typename boost::multi_index::multi_index_container<
Expand Down
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/MandatoryValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Mantid {
namespace Kernel {
namespace Detail {
/// Forward declare checking function
template <typename T> DLLExport bool checkIsEmpty(const T &);
template <typename T> MANTID_KERNEL_DLL bool checkIsEmpty(const T &);

/// Specialization for any vector type
template <typename T> bool checkIsEmpty(const std::vector<T> &value) { return value.empty(); }
Expand All @@ -40,7 +40,7 @@ template <typename T> struct IsEmpty {
@author Nick Draper, Tessella Support Services plc
@date 28/11/2007
*/
template <typename TYPE> class DLLExport MandatoryValidator : public TypedValidator<TYPE> {
template <typename TYPE> class MANTID_KERNEL_DLL MandatoryValidator : public TypedValidator<TYPE> {
public:
IValidator_sptr clone() const override { return std::make_shared<MandatoryValidator>(); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "MantidKernel/DllConfig.h"
#include "MantidKernel/Matrix.h"
#include "MantidKernel/System.h"

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Kernel {
*
*/
template <typename SingleValueGenerator>
class DLLExport NDPseudoRandomNumberGenerator : public NDRandomNumberGenerator {
class MANTID_KERNEL_DLL NDPseudoRandomNumberGenerator : public NDRandomNumberGenerator {
public:
/// Constructor
NDPseudoRandomNumberGenerator(const unsigned int ndims, const size_t seedValue);
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/NearestNeighbours.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class NNDataPoints {
// NearestNeighbours implementation
//------------------------------------------------------------------------------

template <int N = 3> class DLLExport NearestNeighbours {
template <int N = 3> class MANTID_KERNEL_DLL NearestNeighbours {

public:
// typedefs for code brevity
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/NetworkProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions Framework/Kernel/inc/MantidKernel/PropertyNexus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <string>

Expand Down Expand Up @@ -39,11 +39,11 @@ namespace PropertyNexus {
* @param prefix indicates current group location in file (absolute name)
* @return std::unique_ptr<Property>
*/
DLLExport std::unique_ptr<Property> loadProperty(::NeXus::File *file, const std::string &group,
const Mantid::Kernel::NexusHDF5Descriptor &fileInfo,
const std::string &prefix);
MANTID_KERNEL_DLL std::unique_ptr<Property> loadProperty(::NeXus::File *file, const std::string &group,
const Mantid::Kernel::NexusHDF5Descriptor &fileInfo,
const std::string &prefix);

DLLExport std::unique_ptr<Property> loadProperty(::NeXus::File *file, const std::string &group);
MANTID_KERNEL_DLL std::unique_ptr<Property> loadProperty(::NeXus::File *file, const std::string &group);

} // namespace PropertyNexus

Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/PropertyWithValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace Kernel {
http://proj-gaudi.web.cern.ch/proj-gaudi/)
@date 14/11/2007
*/
template <typename TYPE> class DLLExport PropertyWithValue : public Property {
template <typename TYPE> 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);
Expand Down
2 changes: 2 additions & 0 deletions Framework/Kernel/inc/MantidKernel/RegistrationHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/StartsWithValidator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <set>
#include <string>
#include <vector>
Expand All @@ -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<std::string> &values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions Framework/Kernel/inc/MantidKernel/Strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/StringTokenizer.h"
// System is currently needed for DLLExport on windows
#include "MantidKernel/System.h"

#ifndef Q_MOC_RUN
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ template <class TYPE> class TimeValueUnit {
/**
A specialised Property class for holding a series of time-value pairs.
*/
template <typename TYPE> class DLLExport TimeSeriesProperty : public Property, public ITimeSeriesProperty {
template <typename TYPE> class MANTID_KERNEL_DLL TimeSeriesProperty : public Property, public ITimeSeriesProperty {
public:
/// Constructor
explicit TimeSeriesProperty(const std::string &name);
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/VMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class V3D;
@author Janik Zikovsky
@date 2011-08-30
*/
template <typename TYPE = double> class DLLExport VMDBase {
template <typename TYPE = double> class MANTID_KERNEL_DLL VMDBase {
public:
VMDBase();
VMDBase(size_t nd);
Expand Down
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/VisibleWhenProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdexcept>

Expand Down
Loading

0 comments on commit 0bf3635

Please sign in to comment.