|
| 1 | +// Copyright CERN and copyright holders of ALICE O2. This software is |
| 2 | +// distributed under the terms of the GNU General Public License v3 (GPL |
| 3 | +// Version 3), copied verbatim in the file "COPYING". |
| 4 | +// |
| 5 | +// See http://alice-o2.web.cern.ch/license for full licensing information. |
| 6 | +// |
| 7 | +// In applying this license CERN does not waive the privileges and immunities |
| 8 | +// granted to it by virtue of its status as an Intergovernmental Organization |
| 9 | +// or submit itself to any jurisdiction. |
| 10 | +#ifndef o2_framework_ConcreteDataMatcher_H_INCLUDED |
| 11 | +#define o2_framework_ConcreteDataMatcher_H_INCLUDED |
| 12 | + |
| 13 | +#include "Headers/DataHeader.h" |
| 14 | + |
| 15 | +namespace o2 |
| 16 | +{ |
| 17 | +namespace framework |
| 18 | +{ |
| 19 | + |
| 20 | +struct ConcreteDataMatcher { |
| 21 | + header::DataOrigin origin; |
| 22 | + header::DataDescription description; |
| 23 | + header::DataHeader::SubSpecificationType subSpec; |
| 24 | + |
| 25 | + ConcreteDataMatcher(header::DataOrigin origin_, |
| 26 | + header::DataDescription description_, |
| 27 | + header::DataHeader::SubSpecificationType subSpec_) |
| 28 | + : origin(origin_), |
| 29 | + description(description_), |
| 30 | + subSpec(subSpec_) |
| 31 | + { |
| 32 | + } |
| 33 | + ConcreteDataMatcher(ConcreteDataMatcher const& other) = default; |
| 34 | + ConcreteDataMatcher(ConcreteDataMatcher&& other) noexcept = default; |
| 35 | + ConcreteDataMatcher& operator=(ConcreteDataMatcher const& other) = default; |
| 36 | + ConcreteDataMatcher& operator=(ConcreteDataMatcher&& other) noexcept = default; |
| 37 | + |
| 38 | + /// Two DataDescription are the same if and only |
| 39 | + /// if every component is the same. |
| 40 | + bool operator==(ConcreteDataMatcher const& that) const |
| 41 | + { |
| 42 | + return origin == that.origin && description == that.description && subSpec == that.subSpec; |
| 43 | + } |
| 44 | +}; |
| 45 | + |
| 46 | +} // namespace framework |
| 47 | +} // namespace o2 |
| 48 | +#endif |
0 commit comments