Loading...
Searching...
No Matches
datapoint.h
Go to the documentation of this file.
#pragma once
#include <vector>
#include <limits>
#include <memory>
#include <QDataStream>
#include <QMetaType>
#include "../exportinmportconfig.h"
#include "../types.h"
namespace pappso
{
struct DataPoint;
typedef std::shared_ptr<const DataPoint> DataPointCstSPtr;
struct PMSPP_LIB_DECL DataPoint
{
pappso_double x = -1;
pappso_double y = 0;
DataPoint();
DataPoint(const DataPoint &other);
DataPoint(pappso_double x, pappso_double y);
DataPoint(std::pair<pappso_double, pappso_double> pair);
DataPoint(const QString &text);
// For debugging purposes.
//~DataPoint();
DataPointCstSPtr makeDataPointCstSPtr() const;
void initialize(pappso_double x, pappso_double y);
void initialize(const DataPoint &other);
bool initialize(const QString &text);
void reset();
void incrementX(pappso_double value);
void incrementY(pappso_double value);
bool operator==(const DataPoint &other) const;
DataPoint &operator=(const DataPoint &other);
bool isValid() const;
QString toString() const;
QString toString(int decimals) const;
};
PMSPP_LIB_DECL QDataStream &operator<<(QDataStream &out,
const DataPoint &dataPoint);
PMSPP_LIB_DECL QDataStream &operator>>(QDataStream &out, DataPoint &dataPoint);
} // namespace pappso
Q_DECLARE_METATYPE(pappso::DataPoint);
extern int dataPointMetaTypeId;
Q_DECLARE_METATYPE(pappso::DataPointCstSPtr);
extern int dataPointCstSPtrMetaTypeId;
dataPointCstSPtrMetaTypeId
int dataPointCstSPtrMetaTypeId
Definition datapoint.cpp:28
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(pappso::DataPoint)
dataPointMetaTypeId
int dataPointMetaTypeId
Definition datapoint.cpp:24
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::operator<<
QDataStream & operator<<(QDataStream &outstream, const MassSpectrum &massSpectrum)
Definition massspectrum.cpp:346
pappso::operator>>
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
Definition massspectrum.cpp:360
pappso::PeptideIonCter::y
@ y
pappso::PeptideIonCter::x
@ x
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition types.h:50
pappso::DataPointCstSPtr
std::shared_ptr< const DataPoint > DataPointCstSPtr
Definition datapoint.h:18
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition aa.cpp:341
pappso::DataPoint
Definition datapoint.h:22