12#include <QRegularExpressionMatch>
28 qRegisterMetaType<pappso::DataPointCstSPtr>(
"pappso::DataPointCstSPtr");
48 "Failed to initialize the DataPoint object using the provided string.");
67 return std::make_shared<const DataPoint>(*
this);
91 QRegularExpressionMatch regExpMatch;
95 if(!regExpMatch.hasMatch())
100 double key = regExpMatch.captured(1).toDouble(&ok);
107 double val = regExpMatch.captured(3).toDouble(&ok);
137 return QString(
"%1 %2").arg(
x, 0,
'f', 15).arg(
y, 0,
'f', 15);
144 return QString(
"%1 %2").arg(
x, 0,
'f', decimals).arg(
y, 0,
'f', decimals);
164 throw PappsoException(QString(
"error in QDataStream unserialize operator>> of massSpectrum "
165 "dataPoint:\nread datastream failed status=%1")
191 return ((
x == other.
x) && (
y == other.
y));
static QRegularExpression xyMassDataFormatRegExp
Regular expression matching <numerical value><non-numerical*><numericalvalue>.
int dataPointCstSPtrMetaTypeId
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
double pappso_double
A type definition for doubles.
std::shared_ptr< const DataPoint > DataPointCstSPtr
void incrementY(pappso_double value)
void initialize(pappso_double x, pappso_double y)
bool operator==(const DataPoint &other) const
void incrementX(pappso_double value)
DataPoint & operator=(const DataPoint &other)
DataPointCstSPtr makeDataPointCstSPtr() const