ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
dpPart.cpp
Go to the documentation of this file.
1 #include <daq/dpPart.hpp>
2 #include <ostream>
3 
4 namespace daq {
5 
6 std::ostream& operator<<(std::ostream& os, DpPart const& part) noexcept {
7  os << "DpPart(source_name='" << part.SourceName() << "', ";
8  if (std::holds_alternative<std::string>(part.Part())) {
9  os << "path='" << std::get<std::string>(part.Part()) << "'";
10  } else {
11  os << "keywords=omitted...";
12  }
13  os << ")";
14  return os;
15 }
16 
17 DpPart::DpPart(std::string o, std::string path) noexcept
18  : m_source_name(std::move(o)), m_part(std::move(path)) {
19 }
20 
21 DpPart::DpPart(std::string o, fits::KeywordVector keywords) noexcept
22  : m_source_name(std::move(o)), m_part(std::move(keywords)) {
23 }
24 
25 bool DpPart::operator==(DpPart const& rhs) const noexcept {
26  return m_source_name == rhs.m_source_name && m_part == rhs.m_part;
27 }
28 
29 bool DpPart::operator!=(DpPart const& rhs) const noexcept {
30  return !(*this == rhs);
31 }
32 
33 } // namespace daq
Provides information of the location and source of a FITS file or keywords produced by a data acquisi...
Definition: dpPart.hpp:26
bool operator!=(DpPart const &rhs) const noexcept
Definition: dpPart.cpp:29
bool operator==(DpPart const &rhs) const noexcept
Definition: dpPart.cpp:25
DpPart()=default
Contains declaration for DpPart.
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
Definition: keyword.hpp:414
daqif::DaqStatus & operator<<(daqif::DaqStatus &status, daq::Status const &rhs)
Convert daq::Status -> daqif::DaqStatus by populating from rhs.
Definition: conversion.cpp:18