mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 00:31:14 +00:00
Apply modernize-use-equals-default
This commit is contained in:
parent
9444de5868
commit
6aeac265ec
|
@ -16,7 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string fText;
|
std::string fText;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string fText;
|
std::string fText;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
|
|
|
@ -16,8 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler()
|
Sampler() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace bpo = boost::program_options;
|
||||||
class Broadcaster : public FairMQDevice
|
class Broadcaster : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Broadcaster() {}
|
Broadcaster() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool ConditionalRun() override
|
bool ConditionalRun() override
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler1 : public FairMQDevice
|
class Sampler1 : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler1() {}
|
Sampler1() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler2 : public FairMQDevice
|
class Sampler2 : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler2() {}
|
Sampler2() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sender : public FairMQDevice
|
class Sender : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sender() {}
|
Sender() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Synchronizer : public FairMQDevice
|
class Synchronizer : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Synchronizer() {}
|
Synchronizer() = default;
|
||||||
|
|
||||||
bool ConditionalRun() override
|
bool ConditionalRun() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool ConditionalRun()
|
virtual bool ConditionalRun()
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Builder : public FairMQDevice
|
class Builder : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Builder() {}
|
Builder() = default;
|
||||||
|
|
||||||
void Init() override
|
void Init() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,8 @@ namespace bpo = boost::program_options;
|
||||||
class Processor : public FairMQDevice
|
class Processor : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Processor() {
|
Processor()
|
||||||
|
{
|
||||||
OnData("bp", &Processor::HandleData);
|
OnData("bp", &Processor::HandleData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Readout : public FairMQDevice
|
class Readout : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Readout() {}
|
Readout() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace bpo = boost::program_options;
|
||||||
class Receiver : public FairMQDevice
|
class Receiver : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Receiver() {}
|
Receiver() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sender : public FairMQDevice
|
class Sender : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sender() {}
|
Sender() = default;
|
||||||
|
|
||||||
void Init() override
|
void Init() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sampler : public FairMQDevice
|
class Sampler : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sampler() {}
|
Sampler() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace bpo = boost::program_options;
|
||||||
class Sink : public FairMQDevice
|
class Sink : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sink() {}
|
Sink() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace bpo = boost::program_options;
|
||||||
class Client : public FairMQDevice
|
class Client : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Client() {}
|
Client() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,8 @@ class FairMQChannel
|
||||||
// FairMQChannel& operator=(FairMQChannel&&) = delete;
|
// FairMQChannel& operator=(FairMQChannel&&) = delete;
|
||||||
|
|
||||||
/// Destructor
|
/// Destructor
|
||||||
virtual ~FairMQChannel() { /* LOG(warn) << "Destroying channel '" << fName << "'"; */ }
|
virtual ~FairMQChannel() = default;
|
||||||
|
// { LOG(warn) << "Destroying channel '" << fName << "'"; }
|
||||||
|
|
||||||
struct ChannelConfigurationError : std::runtime_error { using std::runtime_error::runtime_error; };
|
struct ChannelConfigurationError : std::runtime_error { using std::runtime_error::runtime_error; };
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class FairMQMessage
|
||||||
|
|
||||||
virtual void Copy(const FairMQMessage& msg) = 0;
|
virtual void Copy(const FairMQMessage& msg) = 0;
|
||||||
|
|
||||||
virtual ~FairMQMessage() {};
|
virtual ~FairMQMessage() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FairMQTransportFactory* fTransport{nullptr};
|
FairMQTransportFactory* fTransport{nullptr};
|
||||||
|
|
|
@ -24,7 +24,7 @@ class FairMQParts
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
FairMQParts() {};
|
FairMQParts() = default;
|
||||||
/// Copy Constructor
|
/// Copy Constructor
|
||||||
FairMQParts(const FairMQParts&) = delete;
|
FairMQParts(const FairMQParts&) = delete;
|
||||||
/// Move constructor
|
/// Move constructor
|
||||||
|
@ -35,7 +35,7 @@ class FairMQParts
|
||||||
template <typename... Ts>
|
template <typename... Ts>
|
||||||
FairMQParts(Ts&&... messages) { AddPart(std::forward<Ts>(messages)...); }
|
FairMQParts(Ts&&... messages) { AddPart(std::forward<Ts>(messages)...); }
|
||||||
/// Default destructor
|
/// Default destructor
|
||||||
~FairMQParts() {};
|
~FairMQParts() = default;
|
||||||
|
|
||||||
/// Adds part (FairMQMessage) to the container
|
/// Adds part (FairMQMessage) to the container
|
||||||
/// @param msg message pointer (for example created with NewMessage() method of FairMQDevice)
|
/// @param msg message pointer (for example created with NewMessage() method of FairMQDevice)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FairMQPoller
|
||||||
virtual bool CheckInput(const std::string& channelKey, const int index) = 0;
|
virtual bool CheckInput(const std::string& channelKey, const int index) = 0;
|
||||||
virtual bool CheckOutput(const std::string& channelKey, const int index) = 0;
|
virtual bool CheckOutput(const std::string& channelKey, const int index) = 0;
|
||||||
|
|
||||||
virtual ~FairMQPoller() {};
|
virtual ~FairMQPoller() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
using FairMQPollerPtr = std::unique_ptr<FairMQPoller>;
|
using FairMQPollerPtr = std::unique_ptr<FairMQPoller>;
|
||||||
|
|
|
@ -35,7 +35,7 @@ enum class TransferCode : int
|
||||||
class FairMQSocket
|
class FairMQSocket
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQSocket() {}
|
FairMQSocket() = default;
|
||||||
FairMQSocket(FairMQTransportFactory* fac) : fTransport(fac) {}
|
FairMQSocket(FairMQTransportFactory* fac) : fTransport(fac) {}
|
||||||
|
|
||||||
virtual std::string GetId() const = 0;
|
virtual std::string GetId() const = 0;
|
||||||
|
@ -76,7 +76,7 @@ class FairMQSocket
|
||||||
FairMQTransportFactory* GetTransport() { return fTransport; }
|
FairMQTransportFactory* GetTransport() { return fTransport; }
|
||||||
void SetTransport(FairMQTransportFactory* transport) { fTransport = transport; }
|
void SetTransport(FairMQTransportFactory* transport) { fTransport = transport; }
|
||||||
|
|
||||||
virtual ~FairMQSocket() {};
|
virtual ~FairMQSocket() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FairMQTransportFactory* fTransport{nullptr};
|
FairMQTransportFactory* fTransport{nullptr};
|
||||||
|
|
|
@ -122,7 +122,7 @@ class FairMQTransportFactory
|
||||||
virtual void Resume() = 0;
|
virtual void Resume() = 0;
|
||||||
virtual void Reset() = 0;
|
virtual void Reset() = 0;
|
||||||
|
|
||||||
virtual ~FairMQTransportFactory() {};
|
virtual ~FairMQTransportFactory() = default;
|
||||||
|
|
||||||
static auto CreateTransportFactory(const std::string& type, const std::string& id = "", const fair::mq::ProgOptions* config = nullptr) -> std::shared_ptr<FairMQTransportFactory>;
|
static auto CreateTransportFactory(const std::string& type, const std::string& id = "", const fair::mq::ProgOptions* config = nullptr) -> std::shared_ptr<FairMQTransportFactory>;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ enum class FairMQRegionEvent : int
|
||||||
|
|
||||||
struct FairMQRegionInfo
|
struct FairMQRegionInfo
|
||||||
{
|
{
|
||||||
FairMQRegionInfo() {}
|
FairMQRegionInfo() = default;
|
||||||
|
|
||||||
FairMQRegionInfo(bool _managed, uint64_t _id, void* _ptr, size_t _size, int64_t _flags, FairMQRegionEvent _event)
|
FairMQRegionInfo(bool _managed, uint64_t _id, void* _ptr, size_t _size, int64_t _flags, FairMQRegionEvent _event)
|
||||||
: managed(_managed)
|
: managed(_managed)
|
||||||
|
@ -63,7 +63,7 @@ using FairMQRegionEventCallback = std::function<void(FairMQRegionInfo)>;
|
||||||
class FairMQUnmanagedRegion
|
class FairMQUnmanagedRegion
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQUnmanagedRegion() {}
|
FairMQUnmanagedRegion() = default;
|
||||||
FairMQUnmanagedRegion(FairMQTransportFactory* factory) : fTransport(factory) {}
|
FairMQUnmanagedRegion(FairMQTransportFactory* factory) : fTransport(factory) {}
|
||||||
|
|
||||||
virtual void* GetData() const = 0;
|
virtual void* GetData() const = 0;
|
||||||
|
@ -76,7 +76,7 @@ class FairMQUnmanagedRegion
|
||||||
FairMQTransportFactory* GetTransport() { return fTransport; }
|
FairMQTransportFactory* GetTransport() { return fTransport; }
|
||||||
void SetTransport(FairMQTransportFactory* transport) { fTransport = transport; }
|
void SetTransport(FairMQTransportFactory* transport) { fTransport = transport; }
|
||||||
|
|
||||||
virtual ~FairMQUnmanagedRegion() {};
|
virtual ~FairMQUnmanagedRegion() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FairMQTransportFactory* fTransport{nullptr};
|
FairMQTransportFactory* fTransport{nullptr};
|
||||||
|
@ -103,7 +103,7 @@ namespace fair::mq
|
||||||
|
|
||||||
struct RegionConfig
|
struct RegionConfig
|
||||||
{
|
{
|
||||||
RegionConfig() {}
|
RegionConfig() = default;
|
||||||
|
|
||||||
RegionConfig(bool l, bool z)
|
RegionConfig(bool l, bool z)
|
||||||
: lock(l), zero(z)
|
: lock(l), zero(z)
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ProgOptions
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ProgOptions();
|
ProgOptions();
|
||||||
virtual ~ProgOptions() {}
|
virtual ~ProgOptions() = default;
|
||||||
|
|
||||||
void ParseAll(const std::vector<std::string>& cmdArgs, bool allowUnregistered);
|
void ParseAll(const std::vector<std::string>& cmdArgs, bool allowUnregistered);
|
||||||
void ParseAll(const int argc, char const* const* argv, bool allowUnregistered = true);
|
void ParseAll(const int argc, char const* const* argv, bool allowUnregistered = true);
|
||||||
|
|
|
@ -84,7 +84,7 @@ struct Machine_ : public state_machine_def<Machine_>
|
||||||
, fNewStatePending(false)
|
, fNewStatePending(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~Machine_() {}
|
virtual ~Machine_() = default;
|
||||||
|
|
||||||
// initial states
|
// initial states
|
||||||
using initial_state = bmpl::vector<IDLE_S, OK_S>;
|
using initial_state = bmpl::vector<IDLE_S, OK_S>;
|
||||||
|
|
|
@ -23,8 +23,8 @@ namespace fair::mq
|
||||||
class StateQueue
|
class StateQueue
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StateQueue() {}
|
StateQueue() = default;
|
||||||
~StateQueue() {}
|
~StateQueue() = default;
|
||||||
|
|
||||||
fair::mq::State WaitForNext()
|
fair::mq::State WaitForNext()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace fair::mq
|
||||||
class BenchmarkSampler : public Device
|
class BenchmarkSampler : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BenchmarkSampler() {}
|
BenchmarkSampler() = default;
|
||||||
|
|
||||||
void InitTask() override
|
void InitTask() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace fair::mq
|
||||||
class Multiplier : public Device
|
class Multiplier : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Multiplier() {}
|
Multiplier() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart = true;
|
bool fMultipart = true;
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace fair::mq
|
||||||
class Proxy : public Device
|
class Proxy : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Proxy() {}
|
Proxy() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart = true;
|
bool fMultipart = true;
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace fair::mq
|
||||||
class Sink : public Device
|
class Sink : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Sink() {}
|
Sink() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart = false;
|
bool fMultipart = false;
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace fair::mq
|
||||||
class Splitter : public Device
|
class Splitter : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Splitter() {}
|
Splitter() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart = true;
|
bool fMultipart = true;
|
||||||
|
|
|
@ -355,7 +355,7 @@ struct Cmds
|
||||||
using container = std::vector<std::unique_ptr<Cmd>>;
|
using container = std::vector<std::unique_ptr<Cmd>>;
|
||||||
struct CommandFormatError : std::runtime_error { using std::runtime_error::runtime_error; };
|
struct CommandFormatError : std::runtime_error { using std::runtime_error::runtime_error; };
|
||||||
|
|
||||||
explicit Cmds() {}
|
explicit Cmds() = default;
|
||||||
|
|
||||||
template<typename... Rest>
|
template<typename... Rest>
|
||||||
explicit Cmds(std::unique_ptr<Cmd>&& first, Rest&&... rest)
|
explicit Cmds(std::unique_ptr<Cmd>&& first, Rest&&... rest)
|
||||||
|
|
|
@ -187,7 +187,7 @@ using Uint16MsgDebugMapHashMap = boost::unordered_map<uint16_t, SizetMsgDebugMap
|
||||||
|
|
||||||
struct RegionBlock
|
struct RegionBlock
|
||||||
{
|
{
|
||||||
RegionBlock() {}
|
RegionBlock() = default;
|
||||||
|
|
||||||
RegionBlock(boost::interprocess::managed_shared_memory::handle_t handle, size_t size, size_t hint)
|
RegionBlock(boost::interprocess::managed_shared_memory::handle_t handle, size_t size, size_t hint)
|
||||||
: fHandle(handle)
|
: fHandle(handle)
|
||||||
|
|
|
@ -91,8 +91,7 @@ class TestDevice : public FairMQDevice
|
||||||
class Config : public ::testing::Test
|
class Config : public ::testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Config()
|
Config() = default;
|
||||||
{}
|
|
||||||
|
|
||||||
string TestDeviceSetConfig(const string& transport)
|
string TestDeviceSetConfig(const string& transport)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ using namespace fair::mq;
|
||||||
class SlowDevice : public FairMQDevice
|
class SlowDevice : public FairMQDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SlowDevice() {}
|
SlowDevice() = default;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init()
|
void Init()
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
|
|
||||||
struct MyClass
|
struct MyClass
|
||||||
{
|
{
|
||||||
MyClass() {}
|
MyClass() = default;
|
||||||
MyClass(const std::string& a) : msg(a) {}
|
MyClass(const std::string& a) : msg(a) {}
|
||||||
MyClass(const MyClass&) = default;
|
MyClass(const MyClass&) = default;
|
||||||
MyClass& operator=(const MyClass& b) { msg = b.msg; return *this; };
|
MyClass& operator=(const MyClass& b) = default;
|
||||||
std::string msg;
|
std::string msg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user