Skip to content

Commit 704f1ce

Browse files
committed
Add missing default constructors and operators
1 parent 436cdea commit 704f1ce

2 files changed

Lines changed: 29 additions & 19 deletions

File tree

include/QualityControl/TaskInterface.h

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,27 @@ namespace QualityControl {
1616
namespace Core {
1717

1818
/// \brief Dummy class that should be removed when there is the official one.
19+
/// This corresponds to a Run1/2 "run".
1920
/// \author Barthelemy von Haller
2021
class Activity
2122
{
2223
public:
23-
/// Default constructor
24-
Activity() : mId(0), mType(0)
25-
{}
26-
24+
Activity() = default;
2725
Activity(int id, int type) : mId(id), mType(type)
2826
{}
29-
30-
/// Destructor
31-
virtual ~Activity()
32-
{}
33-
34-
int mId;
35-
int mType;
27+
/// Copy constructor
28+
Activity (const Activity& other) = default;
29+
/// Move constructor
30+
Activity (Activity&& other) noexcept = default;
31+
/// Copy assignment operator
32+
Activity& operator= (const Activity& other) = default;
33+
/// Move assignment operator
34+
Activity& operator= (Activity&& other) noexcept = default;
35+
36+
virtual ~Activity() = default;
37+
38+
int mId{0};
39+
int mType{0};
3640
};
3741

3842
/// \brief Skeleton of a QC task.
@@ -51,19 +55,27 @@ class TaskInterface
5155
/// Can't be used when dynamically loading the class with ROOT.
5256
/// @param name
5357
/// @param objectsManager
54-
TaskInterface(ObjectsManager *objectsManager);
58+
explicit TaskInterface(ObjectsManager *objectsManager);
5559

5660
/// \brief Default constructor
57-
/// Remember to set an objectsManager.
5861
TaskInterface();
5962

60-
virtual ~TaskInterface();
63+
/// \brief Destructor
64+
virtual ~TaskInterface() noexcept = default;
65+
/// Copy constructor
66+
TaskInterface (const TaskInterface& other) = default;
67+
/// Move constructor
68+
TaskInterface (TaskInterface&& other) noexcept = default;
69+
/// Copy assignment operator
70+
TaskInterface& operator= (const TaskInterface& other) = default;
71+
/// Move assignment operator
72+
TaskInterface& operator= (TaskInterface&& other) noexcept = default;
73+
6174

6275
// Definition of the methods for the template method pattern
6376
virtual void initialize() = 0;
6477
virtual void startOfActivity(Activity &activity) = 0;
6578
virtual void startOfCycle() = 0;
66-
// virtual void monitorDataBlock(vector<pair<DataHeader*, char*>>& datablock) = 0;
6779
virtual void monitorDataBlock(DataSetReference block) = 0;
6880
virtual void endOfCycle() = 0;
6981
virtual void endOfActivity(Activity &activity) = 0;

src/TaskInterface.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
/// \author Barthelemy von Haller
44
///
55

6+
#include <utility>
7+
68
#include "QualityControl/TaskInterface.h"
79

810
namespace AliceO2 {
@@ -19,10 +21,6 @@ TaskInterface::TaskInterface() :
1921
{
2022
}
2123

22-
TaskInterface::~TaskInterface()
23-
{
24-
}
25-
2624
const std::string &TaskInterface::getName() const
2725
{
2826
return mName;

0 commit comments

Comments
 (0)