Skip to content

Commit

Permalink
Move from MantidKernel/System.h to DllConfig.h
Browse files Browse the repository at this point in the history
This is for PythonInterface, LiveData, and Nexus subpackages as part
of #38457
  • Loading branch information
peterfpeterson committed Dec 23, 2024
1 parent da86e0b commit dafc8df
Show file tree
Hide file tree
Showing 34 changed files with 69 additions and 71 deletions.
52 changes: 26 additions & 26 deletions Framework/LiveData/inc/MantidLiveData/ADARA/ADARAPackets.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#include <string>

#include "ADARA.h"
#include "MantidKernel/System.h"
#include "MantidLiveData/DllConfig.h"

namespace ADARA {

class DLLExport PacketHeader {
class MANTID_LIVEDATA_DLL PacketHeader {
public:
PacketHeader(const uint8_t *data) {
const uint32_t *field = reinterpret_cast<const uint32_t *>(data);
Expand Down Expand Up @@ -67,7 +67,7 @@ class DLLExport PacketHeader {
PacketHeader();
};

class DLLExport Packet : public PacketHeader {
class MANTID_LIVEDATA_DLL Packet : public PacketHeader {
public:
Packet(const uint8_t *data, uint32_t len);
Packet(const Packet &pkt);
Expand All @@ -88,7 +88,7 @@ class DLLExport Packet : public PacketHeader {
Packet &operator=(const Packet &pkt);
};

class DLLExport RawDataPkt : public Packet {
class MANTID_LIVEDATA_DLL RawDataPkt : public Packet {
public:
RawDataPkt(const RawDataPkt &pkt);

Expand Down Expand Up @@ -120,15 +120,15 @@ class DLLExport RawDataPkt : public Packet {
friend class MappedDataPkt;
};

class DLLExport MappedDataPkt : public RawDataPkt {
class MANTID_LIVEDATA_DLL MappedDataPkt : public RawDataPkt {
public:
private:
MappedDataPkt(const uint8_t *data, uint32_t len);

friend class Parser;
};

class DLLExport RTDLPkt : public Packet {
class MANTID_LIVEDATA_DLL RTDLPkt : public Packet {
public:
RTDLPkt(const RTDLPkt &pkt);

Expand Down Expand Up @@ -184,7 +184,7 @@ class DLLExport RTDLPkt : public Packet {
friend class Parser;
};

class DLLExport SourceListPkt : public Packet {
class MANTID_LIVEDATA_DLL SourceListPkt : public Packet {
public:
const uint32_t *ids() const { return reinterpret_cast<const uint32_t *>(payload()); }
uint32_t num_ids() const { return (uint32_t)payload_length() / (uint32_t)sizeof(uint32_t); }
Expand All @@ -195,7 +195,7 @@ class DLLExport SourceListPkt : public Packet {
friend class Parser;
};

class DLLExport BankedEventPkt : public Packet {
class MANTID_LIVEDATA_DLL BankedEventPkt : public Packet {
public:
BankedEventPkt(const BankedEventPkt &pkt);

Expand Down Expand Up @@ -261,7 +261,7 @@ class DLLExport BankedEventPkt : public Packet {
friend class Parser;
};

class DLLExport BeamMonitorPkt : public Packet {
class MANTID_LIVEDATA_DLL BeamMonitorPkt : public Packet {
public:
BeamMonitorPkt(const BeamMonitorPkt &pkt);

Expand Down Expand Up @@ -299,7 +299,7 @@ class DLLExport BeamMonitorPkt : public Packet {
friend class Parser;
};

class DLLExport PixelMappingPkt : public Packet {
class MANTID_LIVEDATA_DLL PixelMappingPkt : public Packet {
public:
// TODO implement accessors for fields
private:
Expand All @@ -308,7 +308,7 @@ class DLLExport PixelMappingPkt : public Packet {
friend class Parser;
};

class DLLExport RunStatusPkt : public Packet {
class MANTID_LIVEDATA_DLL RunStatusPkt : public Packet {
public:
RunStatusPkt(const RunStatusPkt &pkt);

Expand All @@ -325,7 +325,7 @@ class DLLExport RunStatusPkt : public Packet {
friend class Parser;
};

class DLLExport RunInfoPkt : public Packet {
class MANTID_LIVEDATA_DLL RunInfoPkt : public Packet {
public:
const std::string &info() const { return m_xml; }

Expand All @@ -337,7 +337,7 @@ class DLLExport RunInfoPkt : public Packet {
friend class Parser;
};

class DLLExport TransCompletePkt : public Packet {
class MANTID_LIVEDATA_DLL TransCompletePkt : public Packet {
public:
TransCompletePkt(const TransCompletePkt &pkt);

Expand All @@ -353,7 +353,7 @@ class DLLExport TransCompletePkt : public Packet {
friend class Parser;
};

class DLLExport ClientHelloPkt : public Packet {
class MANTID_LIVEDATA_DLL ClientHelloPkt : public Packet {
public:
enum Flags {
PAUSE_AGNOSTIC = 0x0000,
Expand All @@ -373,7 +373,7 @@ class DLLExport ClientHelloPkt : public Packet {
friend class Parser;
};

class DLLExport AnnotationPkt : public Packet {
class MANTID_LIVEDATA_DLL AnnotationPkt : public Packet {
public:
AnnotationPkt(const AnnotationPkt &pkt);

Expand All @@ -400,7 +400,7 @@ class DLLExport AnnotationPkt : public Packet {
friend class Parser;
};

class DLLExport SyncPkt : public Packet {
class MANTID_LIVEDATA_DLL SyncPkt : public Packet {
public:
// TODO implement accessors for fields
private:
Expand All @@ -409,15 +409,15 @@ class DLLExport SyncPkt : public Packet {
friend class Parser;
};

class DLLExport HeartbeatPkt : public Packet {
class MANTID_LIVEDATA_DLL HeartbeatPkt : public Packet {
public:
private:
HeartbeatPkt(const uint8_t *data, uint32_t len);

friend class Parser;
};

class DLLExport GeometryPkt : public Packet {
class MANTID_LIVEDATA_DLL GeometryPkt : public Packet {
public:
const std::string &info() const { return m_xml; }

Expand All @@ -429,7 +429,7 @@ class DLLExport GeometryPkt : public Packet {
friend class Parser;
};

class DLLExport BeamlineInfoPkt : public Packet {
class MANTID_LIVEDATA_DLL BeamlineInfoPkt : public Packet {
public:
const uint32_t &targetStationNumber() const { return m_targetStationNumber; }

Expand All @@ -449,7 +449,7 @@ class DLLExport BeamlineInfoPkt : public Packet {
friend class Parser;
};

class DLLExport BeamMonitorConfigPkt : public Packet {
class MANTID_LIVEDATA_DLL BeamMonitorConfigPkt : public Packet {
public:
BeamMonitorConfigPkt(const BeamMonitorConfigPkt &pkt);

Expand Down Expand Up @@ -498,7 +498,7 @@ class DLLExport BeamMonitorConfigPkt : public Packet {
friend class Parser;
};

class DLLExport DetectorBankSetsPkt : public Packet {
class MANTID_LIVEDATA_DLL DetectorBankSetsPkt : public Packet {
public:
DetectorBankSetsPkt(const DetectorBankSetsPkt &pkt) = delete;
DetectorBankSetsPkt &operator=(DetectorBankSetsPkt) = delete;
Expand Down Expand Up @@ -617,15 +617,15 @@ class DLLExport DetectorBankSetsPkt : public Packet {
friend class Parser;
};

class DLLExport DataDonePkt : public Packet {
class MANTID_LIVEDATA_DLL DataDonePkt : public Packet {
public:
private:
DataDonePkt(const uint8_t *data, uint32_t len);

friend class Parser;
};

class DLLExport DeviceDescriptorPkt : public Packet {
class MANTID_LIVEDATA_DLL DeviceDescriptorPkt : public Packet {
public:
uint32_t devId() const { return m_devId; }
const std::string &description() const { return m_desc; }
Expand All @@ -645,7 +645,7 @@ class DLLExport DeviceDescriptorPkt : public Packet {
friend class Parser;
};

class DLLExport VariableU32Pkt : public Packet {
class MANTID_LIVEDATA_DLL VariableU32Pkt : public Packet {
public:
VariableU32Pkt(const VariableU32Pkt &pkt);

Expand All @@ -668,7 +668,7 @@ class DLLExport VariableU32Pkt : public Packet {
friend class Parser;
};

class DLLExport VariableDoublePkt : public Packet {
class MANTID_LIVEDATA_DLL VariableDoublePkt : public Packet {
public:
VariableDoublePkt(const VariableDoublePkt &pkt);

Expand All @@ -691,7 +691,7 @@ class DLLExport VariableDoublePkt : public Packet {
friend class Parser;
};

class DLLExport VariableStringPkt : public Packet {
class MANTID_LIVEDATA_DLL VariableStringPkt : public Packet {
public:
VariableStringPkt(const VariableStringPkt &pkt);

Expand Down
3 changes: 2 additions & 1 deletion Framework/LiveData/inc/MantidLiveData/ADARA/ADARAParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "ADARA.h"
#include "ADARAPackets.h"
#include "MantidLiveData/DllConfig.h"

namespace ADARA {

Expand All @@ -19,7 +20,7 @@ namespace ADARA {
Copyright &copy; 2012 Oak Ridge National Laboratory
**/
class DLLExport Parser {
class MANTID_LIVEDATA_DLL Parser {
public:
/// Constructor
Parser(uint32_t initial_buffer_size = 1024 * 1024, uint32_t max_pkt_size = 8 * 1024 * 1024);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/Algorithm.h"
#include "MantidLiveData/DllConfig.h"

namespace Mantid {
namespace LiveData {
Expand All @@ -24,7 +25,7 @@ namespace LiveData {
different time regime (they have different binning to the rest of the
spectra).
*/
class DLLExport FakeISISHistoDAE final : public API::Algorithm {
class MANTID_LIVEDATA_DLL FakeISISHistoDAE final : public API::Algorithm {
public:
/// Algorithm's name for identification overriding a virtual method
const std::string name() const override { return "FakeISISHistoDAE"; }
Expand Down
2 changes: 1 addition & 1 deletion Framework/LiveData/inc/MantidLiveData/Kafka/IKafkaBroker.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace LiveData {
Defines the interface used to communicate with a Kafka broker such as
subscribing to topics.
*/
class DLLExport IKafkaBroker {
class MANTID_LIVEDATA_DLL IKafkaBroker {
public:
virtual ~IKafkaBroker() = default;

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

#include "MantidAPI/SpectraDetectorTypes.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidLiveData/DllConfig.h"
#include "MantidLiveData/Kafka/IKafkaBroker.h"
#include "MantidLiveData/Kafka/IKafkaStreamSubscriber.h"

Expand All @@ -24,7 +25,7 @@ namespace LiveData {
Kafka stream decoder interface. Handles (implements) all thread synchronization
functionality for accessing the data stream and processing data.
*/
class DLLExport IKafkaStreamDecoder {
class MANTID_LIVEDATA_DLL IKafkaStreamDecoder {
public:
/**
* Defines a thread-safe callback. A mutex is held
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once

#include "MantidKernel/System.h"
#include "MantidLiveData/DllConfig.h"
#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
Expand All @@ -27,7 +28,7 @@ enum class SubscribeAtOption {
/**
Interface for classes that subscribe to Kafka streams.
*/
class DLLExport IKafkaStreamSubscriber {
class MANTID_LIVEDATA_DLL IKafkaStreamSubscriber {
public:
virtual ~IKafkaStreamSubscriber() = default;
virtual void subscribe() = 0;
Expand Down
2 changes: 1 addition & 1 deletion Framework/LiveData/inc/MantidLiveData/Kafka/KafkaBroker.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace LiveData {
/**
Wraps communication with a Kafka broker at a given address.
*/
class DLLExport KafkaBroker : public IKafkaBroker {
class MANTID_LIVEDATA_DLL KafkaBroker : public IKafkaBroker {
public:
explicit KafkaBroker(std::string address);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/LiveListener.h"
#include "MantidLiveData/DllConfig.h"

//----------------------------------------------------------------------
// Forward declarations
Expand All @@ -31,7 +32,7 @@ class KafkaEventStreamDecoder;
need updating if the schema changes.
Some further documentation is in docs/source/concepts/KafkaLiveStreams.rst
*/
class DLLExport KafkaEventListener : public API::LiveListener {
class MANTID_LIVEDATA_DLL KafkaEventListener : public API::LiveListener {
public:
KafkaEventListener();
~KafkaEventListener() override = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "MantidAPI/SpectraDetectorTypes.h"
#include "MantidDataObjects/EventWorkspace.h"
#include "MantidLiveData/DllConfig.h"
#include "MantidLiveData/Kafka/IKafkaBroker.h"
#include "MantidLiveData/Kafka/IKafkaStreamDecoder.h"
#include "MantidLiveData/Kafka/IKafkaStreamSubscriber.h"
Expand All @@ -23,7 +24,7 @@ namespace LiveData {
A call to capture() starts the process of capturing the stream on a separate
thread.
*/
class DLLExport KafkaEventStreamDecoder : public IKafkaStreamDecoder {
class MANTID_LIVEDATA_DLL KafkaEventStreamDecoder : public IKafkaStreamDecoder {
public:
struct BufferedPulse {
Types::Core::DateAndTime pulseTime;
Expand Down Expand Up @@ -82,7 +83,7 @@ class DLLExport KafkaEventStreamDecoder : public IKafkaStreamDecoder {
const std::size_t m_intermediateBufferFlushThreshold;
};

DLLExport std::vector<size_t>
MANTID_LIVEDATA_DLL std::vector<size_t>
computeGroupBoundaries(const std::vector<KafkaEventStreamDecoder::BufferedEvent> &eventBuffer,
const size_t numberOfGroups);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// Includes
//----------------------------------------------------------------------
#include "MantidAPI/LiveListener.h"
#include "MantidLiveData/DllConfig.h"

//----------------------------------------------------------------------
// Forward declarations
Expand All @@ -23,7 +24,7 @@ class KafkaHistoStreamDecoder;
format from the Kafka system at ISIS. It currently parses the histogram data
directly using flatbuffers so will need updating if the schema changes.
*/
class DLLExport KafkaHistoListener : public API::LiveListener {
class MANTID_LIVEDATA_DLL KafkaHistoListener : public API::LiveListener {
public:
KafkaHistoListener();
~KafkaHistoListener() override = default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace LiveData {
Some further documentation is in docs/source/concepts/KafkaLiveStreams.rst
*/
class DLLExport KafkaHistoStreamDecoder : public IKafkaStreamDecoder {
class MANTID_LIVEDATA_DLL KafkaHistoStreamDecoder : public IKafkaStreamDecoder {
public:
KafkaHistoStreamDecoder(std::shared_ptr<IKafkaBroker> broker, const std::string &histoTopic,
const std::string &runInfoTopic, const std::string &sampleEnvTopic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace LiveData {
/**
Interface to a named Kafka topic on a broker at a given address.
*/
class DLLExport KafkaTopicSubscriber final : public IKafkaStreamSubscriber {
class MANTID_LIVEDATA_DLL KafkaTopicSubscriber final : public IKafkaStreamSubscriber {
public:
KafkaTopicSubscriber(std::string broker, std::vector<std::string> topics, SubscribeAtOption subscribeOption);
~KafkaTopicSubscriber() override;
Expand Down
Loading

0 comments on commit dafc8df

Please sign in to comment.