Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change from System.h to DllConfig.h
Browse files Browse the repository at this point in the history
This is part of #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.
peterfpeterson committed Dec 20, 2024
1 parent 5b8b829 commit 9f14abe
Showing 49 changed files with 174 additions and 167 deletions.
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/ArrayProperty.h
Original file line number Diff line number Diff line change
@@ -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),
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/BinaryFile.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/BoundedValidator.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/Cache.h
Original file line number Diff line number Diff line change
@@ -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() {}
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/Chainable.h
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once

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

@@ -28,7 +28,7 @@ Otherwise you could do this
along the chain top to bottom.
**/

template <typename ChainableType> class DLLExport Chainable {
template <typename ChainableType> class MANTID_KERNEL_DLL Chainable {
protected:
/// Successor factory
/// std::optional<std::unique_ptr<ChainableType>> m_successor;
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/ChainableFactory.h
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
#pragma once

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

@@ -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.
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/CompositeValidator.h
Original file line number Diff line number Diff line change
@@ -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>

2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/DataService.h
Original file line number Diff line number Diff line change
@@ -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>;
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/DiskBuffer.h
Original file line number Diff line number Diff line change
@@ -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>
1 change: 0 additions & 1 deletion Framework/Kernel/inc/MantidKernel/EmptyValues.h
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
@author Martyn Gigg, Tessella plc
*/
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/System.h"

#include <limits>

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

Original file line number Diff line number Diff line change
@@ -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 <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);
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/FunctionTask.h
Original file line number Diff line number Diff line change
@@ -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 (*)();
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/INode.h
Original file line number Diff line number Diff line change
@@ -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() {};
};
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/IPropertyManager.h
Original file line number Diff line number Diff line change
@@ -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; \
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/Instantiator.h
Original file line number Diff line number Diff line change
@@ -20,7 +20,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:
@@ -51,7 +51,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;
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/LambdaValidator.h
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/MDUnit.h
Original file line number Diff line number Diff line change
@@ -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>
1 change: 0 additions & 1 deletion Framework/Kernel/inc/MantidKernel/MDUnitFactory.h
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
#include "MantidKernel/ChainableFactory.h"
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/MDUnit.h"
#include "MantidKernel/System.h"
#include <memory>

namespace Mantid {
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/MRUList.h
Original file line number Diff line number Diff line change
@@ -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<
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/MandatoryValidator.h
Original file line number Diff line number Diff line change
@@ -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(); }
@@ -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>(); }

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

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

#include <vector>

Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/NearestNeighbours.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/NetworkProxy.h
Original file line number Diff line number Diff line change
@@ -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 {
10 changes: 5 additions & 5 deletions Framework/Kernel/inc/MantidKernel/PropertyNexus.h
Original file line number Diff line number Diff line change
@@ -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>

@@ -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

2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/PropertyWithValue.h
Original file line number Diff line number Diff line change
@@ -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);
4 changes: 2 additions & 2 deletions Framework/Kernel/inc/MantidKernel/StartsWithValidator.h
Original file line number Diff line number Diff line change
@@ -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>
@@ -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);
Original file line number Diff line number Diff line change
@@ -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 {
11 changes: 5 additions & 6 deletions Framework/Kernel/inc/MantidKernel/Strings.h
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/StringTokenizer.h"
#include "MantidKernel/System.h"

#ifndef Q_MOC_RUN
#include <boost/lexical_cast.hpp>
@@ -50,7 +49,7 @@ namespace Strings {
* @return
*/
template <typename ITERATOR_TYPE>
DLLExport std::string simpleJoin(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator) {
MANTID_KERNEL_DLL std::string simpleJoin(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator) {
std::ostringstream output;
ITERATOR_TYPE it;
for (it = begin; it != end;) {
@@ -80,7 +79,7 @@ DLLExport std::string simpleJoin(ITERATOR_TYPE begin, ITERATOR_TYPE end, const s
* @return
*/
template <typename ITERATOR_TYPE>
DLLExport std::string
MANTID_KERNEL_DLL std::string
join(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator,
typename std::enable_if<!(std::is_same<typename std::iterator_traits<ITERATOR_TYPE>::iterator_category,
std::random_access_iterator_tag>::value)>::type * = nullptr) {
@@ -107,7 +106,7 @@ join(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator,
* @return
*/
template <typename ITERATOR_TYPE>
DLLExport std::string
MANTID_KERNEL_DLL std::string
join(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator,
typename std::enable_if<(std::is_same<typename std::iterator_traits<ITERATOR_TYPE>::iterator_category,
std::random_access_iterator_tag>::value)>::type * = nullptr) {
@@ -193,8 +192,8 @@ join(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator,
* @return A string with contiguous values compressed using the list syntax
*/
template <typename ITERATOR_TYPE>
DLLExport std::string joinCompress(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator = ",",
const std::string &listSeparator = "-") {
MANTID_KERNEL_DLL std::string joinCompress(ITERATOR_TYPE begin, ITERATOR_TYPE end, const std::string &separator = ",",
const std::string &listSeparator = "-") {

if (begin == end) {
return "";
2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/ThreadSchedulerMutexes.h
Original file line number Diff line number Diff line change
@@ -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;

2 changes: 1 addition & 1 deletion Framework/Kernel/inc/MantidKernel/TimeSeriesProperty.h
Original file line number Diff line number Diff line change
@@ -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);
Loading

0 comments on commit 9f14abe

Please sign in to comment.