mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
Define copy/move ctors and assignment ops
Delete special member functions where they are not used. (as part of applying suggestions from cppcoreguidelines-special-member-functions) These classes don't need to be copyable/movable: # copy/move not used: zmq:: TransportFactory, Socket, Message, UnmanagedRegion, Poller, Context shm:: TransportFactory, Socket, Message, UnmanagedRegion, Poller ofi:: TransportFactory, Socket, Message, Context shm:: ZMsg, Region, Monitor, TerminalConfig, Manager plugins:: Config, Control, TerminalConfig fairmq::StateQueue, StateMachine, ProgOptions, PluginServices, PluginManager, Plugin, Device, StateSubscription TestData, BadDevice, TestDevice (test suite heplers) # used via ptr interface: fairmq::UnmanagedRegion, TransportFactory, Socket, Poller, Message These classes need to be movable/copyable: MyClass (test suite helper), fairmq::Channel, fairmq::Parts
This commit is contained in:
parent
597d88277b
commit
ad824b4de1
|
@ -9,7 +9,6 @@
|
|||
#ifndef FAIR_MQ_CHANNEL_H
|
||||
#define FAIR_MQ_CHANNEL_H
|
||||
|
||||
#include <cstdint> // int64_t
|
||||
#include <fairmq/Message.h>
|
||||
#include <fairmq/Parts.h>
|
||||
#include <fairmq/Properties.h>
|
||||
|
@ -17,8 +16,9 @@
|
|||
#include <fairmq/TransportFactory.h>
|
||||
#include <fairmq/Transports.h>
|
||||
#include <fairmq/UnmanagedRegion.h>
|
||||
|
||||
#include <cstdint> // int64_t
|
||||
#include <memory> // unique_ptr, shared_ptr
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <utility> // std::move
|
||||
|
@ -73,16 +73,16 @@ class Channel
|
|||
Channel(const Channel&, std::string name);
|
||||
|
||||
/// Move constructor
|
||||
// Channel(Channel&&) = delete;
|
||||
Channel(Channel&&) = default;
|
||||
|
||||
/// Assignment operator
|
||||
Channel& operator=(const Channel&);
|
||||
|
||||
/// Move assignment operator
|
||||
// Channel& operator=(Channel&&) = delete;
|
||||
Channel& operator=(Channel&&) = default;
|
||||
|
||||
/// Destructor
|
||||
virtual ~Channel() = default;
|
||||
~Channel() = default;
|
||||
// { LOG(warn) << "Destroying channel '" << fName << "'"; }
|
||||
|
||||
struct ChannelConfigurationError : std::runtime_error { using std::runtime_error::runtime_error; };
|
||||
|
|
|
@ -47,6 +47,11 @@ struct StateSubscription
|
|||
});
|
||||
}
|
||||
|
||||
StateSubscription(const StateSubscription&) = delete;
|
||||
StateSubscription(StateSubscription&&) = delete;
|
||||
StateSubscription& operator=(const StateSubscription&) = delete;
|
||||
StateSubscription& operator=(StateSubscription&&) = delete;
|
||||
|
||||
~StateSubscription() {
|
||||
fStateMachine.UnsubscribeFromStateChange(fId);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,9 @@ class Device
|
|||
|
||||
public:
|
||||
Device(const Device&) = delete;
|
||||
Device operator=(const Device&) = delete;
|
||||
Device(Device&&) = delete;
|
||||
Device& operator=(const Device&) = delete;
|
||||
Device& operator=(Device&&) = delete;
|
||||
virtual ~Device();
|
||||
|
||||
/// Outputs the socket transfer rates
|
||||
|
|
|
@ -32,6 +32,11 @@ struct Message
|
|||
: fTransport(factory)
|
||||
{}
|
||||
|
||||
Message(const Message&) = delete;
|
||||
Message(Message&&) = delete;
|
||||
Message& operator=(const Message&) = delete;
|
||||
Message& operator=(Message&&) = delete;
|
||||
|
||||
virtual void Rebuild() = 0;
|
||||
virtual void Rebuild(Alignment alignment) = 0;
|
||||
virtual void Rebuild(size_t size) = 0;
|
||||
|
|
|
@ -25,13 +25,11 @@ class Parts
|
|||
public:
|
||||
Parts() = default;
|
||||
Parts(const Parts&) = delete;
|
||||
Parts(Parts&& p) = default;
|
||||
Parts& operator=(const Parts&) = delete;
|
||||
Parts(Parts&&) = default;
|
||||
template<typename... Ts>
|
||||
Parts(Ts&&... messages)
|
||||
{
|
||||
AddPart(std::forward<Ts>(messages)...);
|
||||
}
|
||||
Parts(Ts&&... messages) { AddPart(std::forward<Ts>(messages)...); }
|
||||
Parts& operator=(const Parts&) = delete;
|
||||
Parts& operator=(Parts&&) = default;
|
||||
~Parts() = default;
|
||||
|
||||
/// Adds part (Message) to the container
|
||||
|
|
|
@ -48,7 +48,9 @@ class Plugin
|
|||
PluginServices* pluginServices);
|
||||
|
||||
Plugin(const Plugin&) = delete;
|
||||
Plugin operator=(const Plugin&) = delete;
|
||||
Plugin(Plugin&&) = delete;
|
||||
Plugin& operator=(const Plugin&) = delete;
|
||||
Plugin& operator=(Plugin&&) = delete;
|
||||
|
||||
virtual ~Plugin();
|
||||
|
||||
|
|
|
@ -49,6 +49,10 @@ class PluginManager
|
|||
using PluginFactory = std::unique_ptr<fair::mq::Plugin>(PluginServices&);
|
||||
|
||||
PluginManager();
|
||||
PluginManager(const PluginManager&) = delete;
|
||||
PluginManager(PluginManager&&) = delete;
|
||||
PluginManager& operator=(const PluginManager&) = delete;
|
||||
PluginManager& operator=(PluginManager&&) = delete;
|
||||
PluginManager(const std::vector<std::string>& args);
|
||||
|
||||
~PluginManager()
|
||||
|
|
|
@ -51,7 +51,9 @@ class PluginServices
|
|||
}
|
||||
|
||||
PluginServices(const PluginServices&) = delete;
|
||||
PluginServices operator=(const PluginServices&) = delete;
|
||||
PluginServices(PluginServices&&) = delete;
|
||||
PluginServices& operator=(const PluginServices&) = delete;
|
||||
PluginServices& operator=(PluginServices&&) = delete;
|
||||
|
||||
using DeviceState = fair::mq::State;
|
||||
using DeviceStateTransition = fair::mq::Transition;
|
||||
|
|
|
@ -17,6 +17,12 @@ namespace fair::mq {
|
|||
|
||||
struct Poller
|
||||
{
|
||||
Poller() = default;
|
||||
Poller(const Poller&) = delete;
|
||||
Poller(Poller&&) = delete;
|
||||
Poller& operator=(const Poller&) = delete;
|
||||
Poller& operator=(Poller&&) = delete;
|
||||
|
||||
virtual void Poll(int timeout) = 0;
|
||||
virtual bool CheckInput(int index) = 0;
|
||||
virtual bool CheckOutput(int index) = 0;
|
||||
|
|
|
@ -33,7 +33,11 @@ class ProgOptions
|
|||
{
|
||||
public:
|
||||
ProgOptions();
|
||||
virtual ~ProgOptions() = default;
|
||||
ProgOptions(const ProgOptions&) = delete;
|
||||
ProgOptions(ProgOptions&&) = delete;
|
||||
ProgOptions& operator=(const ProgOptions&) = delete;
|
||||
ProgOptions& operator=(ProgOptions&&) = delete;
|
||||
~ProgOptions() = default;
|
||||
|
||||
void ParseAll(const std::vector<std::string>& cmdArgs, bool allowUnregistered);
|
||||
void ParseAll(int argc, char const* const* argv, bool allowUnregistered = true);
|
||||
|
|
|
@ -30,9 +30,11 @@ enum class TransferCode : int
|
|||
struct Socket
|
||||
{
|
||||
Socket() = default;
|
||||
Socket(TransportFactory* fac)
|
||||
: fTransport(fac)
|
||||
{}
|
||||
Socket(TransportFactory* fac) : fTransport(fac) {}
|
||||
Socket(const Socket&) = delete;
|
||||
Socket(Socket&&) = delete;
|
||||
Socket& operator=(const Socket&) = delete;
|
||||
Socket& operator=(Socket&&) = delete;
|
||||
|
||||
virtual std::string GetId() const = 0;
|
||||
|
||||
|
|
|
@ -84,8 +84,6 @@ struct Machine_ : public state_machine_def<Machine_>
|
|||
, fNewStatePending(false)
|
||||
{}
|
||||
|
||||
virtual ~Machine_() = default;
|
||||
|
||||
// initial states
|
||||
using initial_state = bmpl::vector<IDLE_S, OK_S>;
|
||||
|
||||
|
|
|
@ -23,7 +23,11 @@ class StateMachine
|
|||
{
|
||||
public:
|
||||
StateMachine();
|
||||
virtual ~StateMachine();
|
||||
StateMachine(const StateMachine&) = delete;
|
||||
StateMachine(StateMachine&&) = delete;
|
||||
StateMachine& operator=(const StateMachine&) = delete;
|
||||
StateMachine& operator=(StateMachine&&) = delete;
|
||||
~StateMachine();
|
||||
|
||||
bool ChangeState(Transition transition);
|
||||
bool ChangeState(const std::string& transition) { return ChangeState(GetTransition(transition)); }
|
||||
|
|
|
@ -24,6 +24,10 @@ class StateQueue
|
|||
{
|
||||
public:
|
||||
StateQueue() = default;
|
||||
StateQueue(const StateQueue&) = delete;
|
||||
StateQueue(StateQueue&&) = delete;
|
||||
StateQueue& operator=(const StateQueue&) = delete;
|
||||
StateQueue& operator=(StateQueue&&) = delete;
|
||||
~StateQueue() = default;
|
||||
|
||||
fair::mq::State WaitForNext()
|
||||
|
|
|
@ -43,6 +43,11 @@ class TransportFactory
|
|||
: fkId(std::move(id))
|
||||
{}
|
||||
|
||||
TransportFactory(const TransportFactory&) = delete;
|
||||
TransportFactory(TransportFactory&&) = delete;
|
||||
TransportFactory& operator=(const TransportFactory&) = delete;
|
||||
TransportFactory& operator=(TransportFactory&&) = delete;
|
||||
|
||||
auto GetId() const -> const std::string { return fkId; };
|
||||
|
||||
/// Get a pointer to the associated polymorphic memory resource
|
||||
|
|
|
@ -78,6 +78,11 @@ struct UnmanagedRegion
|
|||
: fTransport(factory)
|
||||
{}
|
||||
|
||||
UnmanagedRegion(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion(UnmanagedRegion&&) = delete;
|
||||
UnmanagedRegion& operator=(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion& operator=(UnmanagedRegion&&) = delete;
|
||||
|
||||
virtual void* GetData() const = 0;
|
||||
virtual size_t GetSize() const = 0;
|
||||
virtual uint16_t GetId() const = 0;
|
||||
|
|
|
@ -54,6 +54,10 @@ class Context
|
|||
Context(FairMQTransportFactory& sendFactory,
|
||||
FairMQTransportFactory& receiveFactory,
|
||||
int numberIoThreads = 1);
|
||||
Context(const Context&) = delete;
|
||||
Context(Context&&) = delete;
|
||||
Context& operator=(const Context&) = delete;
|
||||
Context& operator=(Context&&) = delete;
|
||||
~Context();
|
||||
|
||||
auto GetAsiofiVersion() const -> std::string;
|
||||
|
|
|
@ -46,7 +46,9 @@ class Message final : public fair::mq::Message
|
|||
void* hint = 0);
|
||||
|
||||
Message(const Message&) = delete;
|
||||
Message operator=(const Message&) = delete;
|
||||
Message(Message&&) = delete;
|
||||
Message& operator=(const Message&) = delete;
|
||||
Message& operator=(Message&&) = delete;
|
||||
|
||||
auto Rebuild() -> void override;
|
||||
auto Rebuild(Alignment alignment) -> void override;
|
||||
|
|
|
@ -36,7 +36,9 @@ class Socket final : public fair::mq::Socket
|
|||
public:
|
||||
Socket(Context& context, const std::string& type, const std::string& name, const std::string& id = "");
|
||||
Socket(const Socket&) = delete;
|
||||
Socket operator=(const Socket&) = delete;
|
||||
Socket(Socket&&) = delete;
|
||||
Socket& operator=(const Socket&) = delete;
|
||||
Socket& operator=(Socket&&) = delete;
|
||||
|
||||
auto GetId() const -> std::string override { return fId; }
|
||||
|
||||
|
|
|
@ -55,10 +55,11 @@ struct TransportFactory final : mq::TransportFactory
|
|||
}
|
||||
}
|
||||
|
||||
TransportFactory(TransportFactory const&) = delete;
|
||||
TransportFactory& operator=(TransportFactory const&) = delete;
|
||||
TransportFactory(TransportFactory&&) = default;
|
||||
TransportFactory& operator=(TransportFactory&&) = default;
|
||||
TransportFactory(const TransportFactory&) = delete;
|
||||
TransportFactory(TransportFactory&&) = delete;
|
||||
TransportFactory& operator=(const TransportFactory&) = delete;
|
||||
TransportFactory& operator=(TransportFactory&&) = delete;
|
||||
~TransportFactory() = default;
|
||||
|
||||
auto CreateMessage() -> std::unique_ptr<mq::Message> override
|
||||
{
|
||||
|
|
|
@ -21,6 +21,10 @@ class Config : public Plugin
|
|||
{
|
||||
public:
|
||||
Config(const std::string& name, Plugin::Version version, const std::string& maintainer, const std::string& homepage, PluginServices* pluginServices);
|
||||
Config(const Config&) = delete;
|
||||
Config(Config&&) = delete;
|
||||
Config& operator=(const Config&) = delete;
|
||||
Config& operator=(Config&&) = delete;
|
||||
|
||||
~Config();
|
||||
};
|
||||
|
|
|
@ -119,9 +119,9 @@ auto ControlPluginProgramOptions() -> Plugin::ProgOptions
|
|||
return pluginOptions;
|
||||
}
|
||||
|
||||
struct terminal_config
|
||||
struct TerminalConfig
|
||||
{
|
||||
terminal_config()
|
||||
TerminalConfig()
|
||||
{
|
||||
termios t;
|
||||
tcgetattr(STDIN_FILENO, &t); // get the current terminal I/O structure
|
||||
|
@ -130,7 +130,12 @@ struct terminal_config
|
|||
tcsetattr(STDIN_FILENO, TCSANOW, &t); // apply the new settings
|
||||
}
|
||||
|
||||
~terminal_config()
|
||||
TerminalConfig(const TerminalConfig&) = delete;
|
||||
TerminalConfig(TerminalConfig&&) = delete;
|
||||
TerminalConfig& operator=(const TerminalConfig&) = delete;
|
||||
TerminalConfig& operator=(TerminalConfig&&) = delete;
|
||||
|
||||
~TerminalConfig()
|
||||
{
|
||||
termios t;
|
||||
tcgetattr(STDIN_FILENO, &t); // get the current terminal I/O structure
|
||||
|
@ -150,7 +155,7 @@ try {
|
|||
cinfd[0].events = POLLIN;
|
||||
cinfd[0].revents = 0;
|
||||
|
||||
terminal_config tconfig;
|
||||
TerminalConfig tconfig;
|
||||
|
||||
bool color = GetProperty<bool>("color");
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@ class Control : public Plugin
|
|||
{
|
||||
public:
|
||||
Control(const std::string& name, Plugin::Version version, const std::string& maintainer, const std::string& homepage, PluginServices* pluginServices);
|
||||
Control(const Control&) = delete;
|
||||
Control(Control&&) = delete;
|
||||
Control& operator=(const Control&) = delete;
|
||||
Control& operator=(Control&&) = delete;
|
||||
|
||||
~Control();
|
||||
|
||||
|
|
|
@ -293,9 +293,10 @@ class Manager
|
|||
}
|
||||
|
||||
Manager() = delete;
|
||||
|
||||
Manager(const Manager&) = delete;
|
||||
Manager operator=(const Manager&) = delete;
|
||||
Manager(Manager&&) = delete;
|
||||
Manager& operator=(const Manager&) = delete;
|
||||
Manager& operator=(Manager&&) = delete;
|
||||
|
||||
void ZeroSegment(uint16_t id)
|
||||
{
|
||||
|
|
|
@ -136,7 +136,9 @@ class Message final : public fair::mq::Message
|
|||
}
|
||||
|
||||
Message(const Message&) = delete;
|
||||
Message operator=(const Message&) = delete;
|
||||
Message(Message&&) = delete;
|
||||
Message& operator=(const Message&) = delete;
|
||||
Message& operator=(Message&&) = delete;
|
||||
|
||||
void Rebuild() override
|
||||
{
|
||||
|
|
|
@ -60,6 +60,11 @@ struct TerminalConfig
|
|||
tcsetattr(STDIN_FILENO, TCSANOW, &t); // apply the new settings
|
||||
}
|
||||
|
||||
TerminalConfig(const TerminalConfig&) = delete;
|
||||
TerminalConfig(TerminalConfig&&) = delete;
|
||||
TerminalConfig& operator=(const TerminalConfig&) = delete;
|
||||
TerminalConfig& operator=(TerminalConfig&&) = delete;
|
||||
|
||||
~TerminalConfig()
|
||||
{
|
||||
termios t;
|
||||
|
|
|
@ -53,9 +53,10 @@ class Monitor
|
|||
{
|
||||
public:
|
||||
Monitor(std::string shmId, bool selfDestruct, bool interactive, bool viewOnly, unsigned int timeoutInMS, unsigned int intervalInMS, bool runAsDaemon, bool cleanOnExit);
|
||||
|
||||
Monitor(const Monitor&) = delete;
|
||||
Monitor operator=(const Monitor&) = delete;
|
||||
Monitor(Monitor&&) = delete;
|
||||
Monitor& operator=(const Monitor&) = delete;
|
||||
Monitor& operator=(Monitor&&) = delete;
|
||||
|
||||
virtual ~Monitor();
|
||||
|
||||
|
|
|
@ -102,7 +102,9 @@ class Poller final : public fair::mq::Poller
|
|||
}
|
||||
|
||||
Poller(const Poller&) = delete;
|
||||
Poller operator=(const Poller&) = delete;
|
||||
Poller(Poller&&) = delete;
|
||||
Poller& operator=(const Poller&) = delete;
|
||||
Poller& operator=(Poller&&) = delete;
|
||||
|
||||
void SetItemEvents(zmq_pollitem_t& item, int type)
|
||||
{
|
||||
|
|
|
@ -113,6 +113,8 @@ struct Region
|
|||
|
||||
Region(const Region&) = delete;
|
||||
Region(Region&&) = delete;
|
||||
Region& operator=(const Region&) = delete;
|
||||
Region& operator=(Region&&) = delete;
|
||||
|
||||
void InitializeQueues()
|
||||
{
|
||||
|
|
|
@ -35,6 +35,11 @@ struct ZMsg
|
|||
explicit ZMsg(size_t size) { int rc __attribute__((unused)) = zmq_msg_init_size(&fMsg, size); assert(rc == 0); }
|
||||
~ZMsg() { int rc __attribute__((unused)) = zmq_msg_close(&fMsg); assert(rc == 0); }
|
||||
|
||||
ZMsg(const ZMsg&) = delete;
|
||||
ZMsg(ZMsg&&) = delete;
|
||||
ZMsg& operator=(const ZMsg&) = delete;
|
||||
ZMsg& operator=(ZMsg&&) = delete;
|
||||
|
||||
void* Data() { return zmq_msg_data(&fMsg); }
|
||||
size_t Size() { return zmq_msg_size(&fMsg); }
|
||||
zmq_msg_t* Msg() { return &fMsg; }
|
||||
|
@ -100,7 +105,9 @@ class Socket final : public fair::mq::Socket
|
|||
}
|
||||
|
||||
Socket(const Socket&) = delete;
|
||||
Socket operator=(const Socket&) = delete;
|
||||
Socket(Socket&&) = delete;
|
||||
Socket& operator=(const Socket&) = delete;
|
||||
Socket& operator=(Socket&&) = delete;
|
||||
|
||||
std::string GetId() const override { return fId; }
|
||||
|
||||
|
|
|
@ -89,7 +89,9 @@ class TransportFactory final : public fair::mq::TransportFactory
|
|||
}
|
||||
|
||||
TransportFactory(const TransportFactory&) = delete;
|
||||
TransportFactory operator=(const TransportFactory&) = delete;
|
||||
TransportFactory(TransportFactory&&) = delete;
|
||||
TransportFactory& operator=(const TransportFactory&) = delete;
|
||||
TransportFactory& operator=(TransportFactory&&) = delete;
|
||||
|
||||
MessagePtr CreateMessage() override
|
||||
{
|
||||
|
|
|
@ -51,6 +51,11 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion
|
|||
fRegionId = result.second;
|
||||
}
|
||||
|
||||
UnmanagedRegion(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion(UnmanagedRegion&&) = delete;
|
||||
UnmanagedRegion& operator=(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion& operator=(UnmanagedRegion&&) = delete;
|
||||
|
||||
void* GetData() const override { return fRegion->get_address(); }
|
||||
size_t GetSize() const override { return fRegion->get_size(); }
|
||||
uint16_t GetId() const override { return fRegionId; }
|
||||
|
|
|
@ -56,7 +56,9 @@ class Context
|
|||
}
|
||||
|
||||
Context(const Context&) = delete;
|
||||
Context operator=(const Context&) = delete;
|
||||
Context(Context&&) = delete;
|
||||
Context& operator=(const Context&) = delete;
|
||||
Context& operator=(Context&&) = delete;
|
||||
|
||||
void SubscribeToRegionEvents(RegionEventCallback callback)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,11 @@ class Message final : public fair::mq::Message
|
|||
friend class Socket;
|
||||
|
||||
public:
|
||||
Message(const Message&) = delete;
|
||||
Message(Message&&) = delete;
|
||||
Message& operator=(const Message&) = delete;
|
||||
Message& operator=(Message&&) = delete;
|
||||
|
||||
Message(FairMQTransportFactory* factory = nullptr)
|
||||
: fair::mq::Message(factory)
|
||||
, fMsg(std::make_unique<zmq_msg_t>())
|
||||
|
|
|
@ -24,6 +24,12 @@ namespace fair::mq::zmq
|
|||
class Poller final : public fair::mq::Poller
|
||||
{
|
||||
public:
|
||||
Poller() = default;
|
||||
Poller(const Poller&) = delete;
|
||||
Poller(Poller&&) = delete;
|
||||
Poller& operator=(const Poller&) = delete;
|
||||
Poller& operator=(Poller&&) = delete;
|
||||
|
||||
Poller(const std::vector<Channel>& channels)
|
||||
: fItems()
|
||||
, fNumItems(0)
|
||||
|
@ -102,9 +108,6 @@ class Poller final : public fair::mq::Poller
|
|||
}
|
||||
}
|
||||
|
||||
Poller(const Poller&) = delete;
|
||||
Poller operator=(const Poller&) = delete;
|
||||
|
||||
void SetItemEvents(zmq_pollitem_t& item, int type)
|
||||
{
|
||||
if (type == ZMQ_REQ || type == ZMQ_REP || type == ZMQ_PAIR || type == ZMQ_DEALER || type == ZMQ_ROUTER) {
|
||||
|
|
|
@ -72,7 +72,9 @@ class Socket final : public fair::mq::Socket
|
|||
}
|
||||
|
||||
Socket(const Socket&) = delete;
|
||||
Socket operator=(const Socket&) = delete;
|
||||
Socket(Socket&&) = delete;
|
||||
Socket& operator=(const Socket&) = delete;
|
||||
Socket& operator=(Socket&&) = delete;
|
||||
|
||||
std::string GetId() const override { return fId; }
|
||||
|
||||
|
|
|
@ -44,7 +44,9 @@ class TransportFactory final : public FairMQTransportFactory
|
|||
}
|
||||
|
||||
TransportFactory(const TransportFactory&) = delete;
|
||||
TransportFactory operator=(const TransportFactory&) = delete;
|
||||
TransportFactory(TransportFactory&&) = delete;
|
||||
TransportFactory& operator=(const TransportFactory&) = delete;
|
||||
TransportFactory& operator=(TransportFactory&&) = delete;
|
||||
|
||||
MessagePtr CreateMessage() override
|
||||
{
|
||||
|
|
|
@ -59,7 +59,9 @@ class UnmanagedRegion final : public fair::mq::UnmanagedRegion
|
|||
}
|
||||
|
||||
UnmanagedRegion(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion operator=(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion(UnmanagedRegion&&) = delete;
|
||||
UnmanagedRegion& operator=(const UnmanagedRegion&) = delete;
|
||||
UnmanagedRegion& operator=(UnmanagedRegion&&) = delete;
|
||||
|
||||
virtual void* GetData() const override { return fBuffer; }
|
||||
virtual size_t GetSize() const override { return fSize; }
|
||||
|
|
|
@ -67,6 +67,11 @@ class TestDevice : public FairMQDevice
|
|||
ChangeState(fair::mq::Transition::Run);
|
||||
}
|
||||
|
||||
TestDevice(const TestDevice&) = delete;
|
||||
TestDevice(TestDevice&&) = delete;
|
||||
TestDevice& operator=(const TestDevice&) = delete;
|
||||
TestDevice& operator=(TestDevice&&) = delete;
|
||||
|
||||
~TestDevice()
|
||||
{
|
||||
WaitForState(fair::mq::State::Running);
|
||||
|
|
|
@ -44,6 +44,11 @@ class BadDevice : public FairMQDevice
|
|||
parts.AddPart(NewMessage());
|
||||
}
|
||||
|
||||
BadDevice(const BadDevice&) = delete;
|
||||
BadDevice(BadDevice&&) = delete;
|
||||
BadDevice& operator=(const BadDevice&) = delete;
|
||||
BadDevice& operator=(BadDevice&&) = delete;
|
||||
|
||||
~BadDevice()
|
||||
{
|
||||
ChangeState(fair::mq::Transition::ResetDevice);
|
||||
|
|
|
@ -39,6 +39,9 @@ struct TestData
|
|||
++nallocations;
|
||||
}
|
||||
|
||||
TestData& operator=(const TestData&) = delete;
|
||||
TestData& operator=(TestData&&) = delete;
|
||||
|
||||
TestData(const TestData& in)
|
||||
: i{in.i}
|
||||
{
|
||||
|
|
|
@ -17,7 +17,10 @@ struct MyClass
|
|||
MyClass() = default;
|
||||
MyClass(std::string a) : msg(std::move(a)) {}
|
||||
MyClass(const MyClass&) = default;
|
||||
MyClass& operator=(const MyClass& b) = default;
|
||||
MyClass(MyClass&&) = default;
|
||||
MyClass& operator=(const MyClass&) = default;
|
||||
MyClass& operator=(MyClass&&) = default;
|
||||
~MyClass() = default;
|
||||
std::string msg;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user